DNS-based IPv6 traffic diversion method, device and equipment
By dividing access types according to the terminal's scheduling controllability in the authoritative DNS and scheduling system between the server and the terminal, the access failure problem caused by the complexity of the IPv6 environment is solved, and a more stable IPv6 drainage solution.
Patent Information
- Application Number
- CN202111077188.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-13
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-09-13
AI Technical Summary
In the prior art, the complexity of the IPv6 environment causes the terminal to easily fail when accessing the server, resulting in access failure, and it is difficult to predict and control, and a more stable and flexible DNS-based IPv6 drainage solution is needed.
By introducing authoritative DNS and scheduling systems between the server and the terminal, access types are divided according to whether the terminal is scheduled to control the scheduling system. If it is controllable, it returns the IPv6 address and IPv4 address. If it is uncontrollable, it only returns the IPv4 address. Control the allocation of IPv6 addresses through grayscale rules to ensure access stability.
It realizes flexible control of the terminal, distinguishes controllable and uncontrollable terminals, increases the flexibility of IPv6 address allocation, ensures the stability of the access process, and reduces the occurrence of faults during IPv6 drainage.
Smart Images

Figure CN113873054B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a DNS-based IPv6 traffic diversion method, device, and equipment. Background Art
[0002] The Domain Name System (DNS) is a service of the Internet. As a distributed database that maps domain names and IP addresses, it enables people to access the Internet more conveniently. IP address (Internet Protocol Address) refers to the Internet Protocol address, which is also translated as Internet Protocol address. It includes Internet Protocol version 4 (Internet Protocol version 4, IPv4) and Internet Protocol version 6 (Internet Protocol version 6, IPv6) used to replace IPv4. The use of IPv6 can not only effectively solve the problem of insufficient IPv4 network address resources, but also solve the obstacles for various access devices to connect to the Internet, promoting the further development of the Internet.
[0003] Since the IPv6 environment is relatively complex and there are risks that are difficult to predict and control, terminals are prone to malfunctions when accessing the server through IPv6, resulting in access failures. For example, there may be momentary network failures caused by packet loss, software or hardware device support, or failures caused by underlying protocol conflicts.
[0004] Based on this, a more stable and flexible DNS-based IPv6 diversion solution is needed. Summary of the invention
[0005] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion method, apparatus, device, and storage medium to solve the following technical problem: a more stable and flexible DNS-based IPv6 traffic diversion solution is needed.
[0006] To solve the above technical problems, one or more embodiments of this specification are implemented as follows:
[0007] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion method, which is applied to a server, wherein the server includes an authoritative DNS and a scheduling system, and the method includes:
[0008] The authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, where the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system;
[0009] If the access type of the domain name resolution request corresponds to the situation that the scheduling is controllable, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system. If the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use;
[0010] If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
[0011] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion method, which is applied to a terminal. The method includes:
[0012] Access is performed through a specified access type, so that the server performs domain name resolution for the terminal to obtain an IP address, the server includes an authoritative DNS and a scheduling system, and the access type is divided according to whether the terminal is controllable by the scheduling system;
[0013] If the access type corresponds to the situation where the scheduling is controllable, the access includes: sending a domain name resolution request to the scheduling system, so that if the scheduling system determines that the terminal hits the grayscale rule, it returns the IPv6 address and IPv4 address of the domain name obtained from the authoritative DNS;
[0014] If the access type corresponds to a situation where the scheduling is uncontrollable, the access includes: without going through the scheduling system, causing the authoritative DNS to perform domain name resolution and return the IPv4 address of the domain name;
[0015] An IP address returned in response to the access is received, and the IP address is accessed.
[0016] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion device, which is applied to a server, wherein the server includes an authoritative DNS and a scheduling system, and the device includes:
[0017] A receiving module, wherein the authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, wherein the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system;
[0018] A first return module, if the access type of the domain name resolution request corresponds to the situation that the scheduling is controllable, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system, and if the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use;
[0019] The second returning module, if the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
[0020] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion device, which is applied to a terminal, and includes:
[0021] An access initiation module, which performs access through a specified access type so that the server performs domain name resolution for the terminal to obtain an IP address, wherein the server includes an authoritative DNS and a scheduling system, and the access type is divided according to whether the terminal is controllable by the scheduling system;
[0022] A first sending module, if the access type corresponds to the situation where the scheduling is controllable, the access includes: sending a domain name resolution request to the scheduling system, so that if the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and the IPv4 address of the domain name obtained from the authoritative DNS are returned;
[0023] A second sending module, if the access type corresponds to the situation that the scheduling is uncontrollable, the access includes: without going through the scheduling system, enabling the authoritative DNS to perform domain name resolution and return the IPv4 address of the domain name;
[0024] The IP address access module receives the IP address returned in response to the access and accesses the IP address.
[0025] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion device, which is applied to a server, wherein the server includes an authoritative DNS and a scheduling system, and the device includes:
[0026] at least one processor; and,
[0027] a memory communicatively connected to the at least one processor; wherein,
[0028] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0029] The authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, where the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system;
[0030] If the access type of the domain name resolution request corresponds to the situation that the scheduling is controllable, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system. If the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use;
[0031] If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
[0032] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion device, which is applied to a terminal, and includes:
[0033] at least one processor; and,
[0034] a memory communicatively connected to the at least one processor; wherein,
[0035] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0036] Access is performed through a specified access type, so that the server performs domain name resolution for the terminal to obtain an IP address, the server includes an authoritative DNS and a scheduling system, and the access type is divided according to whether the terminal is controllable by the scheduling system;
[0037] If the access type corresponds to the situation where the scheduling is controllable, the access includes: sending a domain name resolution request to the scheduling system, so that if the scheduling system determines that the terminal hits the grayscale rule, it returns the IPv6 address and IPv4 address of the domain name obtained from the authoritative DNS;
[0038] If the access type corresponds to a situation where the scheduling is uncontrollable, the access includes: without going through the scheduling system, causing the authoritative DNS to perform domain name resolution and return the IPv4 address of the domain name;
[0039] An IP address returned in response to the access is received, and the IP address is accessed.
[0040] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to:
[0041] The authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, where the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system;
[0042] If the access type of the domain name resolution request corresponds to the situation that the scheduling is controllable, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system. If the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use;
[0043] If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
[0044] Another non-volatile computer storage medium provided in one or more embodiments of the present specification stores computer executable instructions, wherein the computer executable instructions are configured as follows:
[0045] The authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, where the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system;
[0046] If the access type of the domain name resolution request corresponds to the situation that the scheduling is controllable, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system. If the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use;
[0047] If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
[0048] At least one of the above technical solutions adopted in one or more embodiments of this specification can achieve the following beneficial effects:
[0049] By classifying the access types of the terminals, it is possible to determine whether the terminal is controllable or not. Compared with allocating IPv6 or not for all access types, the two can be treated differently, and the allocation of IPv6 addresses in the diversion process can be flexibly controlled. By formulating grayscale rules in the scheduling system, the flexibility of IPv6 address allocation is further increased. For terminals that are not controllable in scheduling, since it is difficult to determine their IPv6 environment through grayscale rules, only IPv4 addresses are allocated to them, which ensures their stability during the access process and makes the IPv6 diversion process more stable. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0051] Figure 1 A flowchart of a DNS-based IPv6 traffic diversion method on a server side provided in one or more embodiments of this specification;
[0052] Figure 2 A schematic diagram of the architecture of a DNS-based IPv6 traffic diversion system in the first grayscale stage provided for one or more embodiments of this specification;
[0053] Figure 3 A schematic diagram of the architecture of a DNS-based IPv6 traffic diversion system in the second grayscale stage provided for one or more embodiments of this specification;
[0054] Figure 4 A schematic diagram of a flow chart of a DNS-based IPv6 traffic diversion method on a terminal side provided in one or more embodiments of this specification;
[0055] Figure 5 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the server side provided in one or more embodiments of this specification;
[0056] Figure 6 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the terminal side provided for one or more embodiments of this specification;
[0057] Figure 7 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the server side provided for one or more embodiments of this specification;
[0058] Figure 8 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the terminal side provided for one or more embodiments of this specification. DETAILED DESCRIPTION
[0059] The embodiments of this specification provide a DNS-based IPv6 traffic diversion method, device, equipment and storage medium.
[0060] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0061] Figure 1 A flow chart of a DNS-based IPv6 traffic diversion method on the server side provided for one or more embodiments of this specification. The method can be applied to different business fields, such as Internet financial business field, e-commerce business field, instant messaging business field, game business field, official business field, etc. The process can be executed by a computing device in the corresponding field (such as an intelligent customer service server or intelligent mobile terminal corresponding to the payment business, etc.), and some input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.
[0062] Figure 2 A schematic diagram of the architecture of a DNS-based IPv6 drainage system in the first grayscale stage provided for one or more embodiments of this specification, the system mainly includes three modules, namely, a terminal, a DNS server (hereinafter referred to as the server), and a server cluster corresponding to IPv6 and IPv4 (hereinafter referred to as the server cluster). The terminal includes two types, corresponding to the two situations of controllable scheduling and uncontrollable scheduling. It should be noted that when the same terminal processes different domain name resolution requests, the corresponding scheduling situations are also different. The server mainly includes an authoritative DNS and a DNS scheduling system (hereinafter referred to as the scheduling system), and the server cluster mainly includes an IPv6 server cluster and an IPv4 server cluster. The server and the server cluster are usually set relatively independently, but in some cases, the two can also be combined so that they are located in the same system or region. Among them, the part about the first grayscale stage will be described in detail when it is involved in the following embodiments.
[0063] Figure 1 The method shown mainly stands for Figure 2The server side of the DNS-based IPv6 traffic diversion system shown is explained. Figure 1 The process in may include the following steps:
[0064] S102: The authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, where the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system.
[0065] Authoritative DNS refers to a system located on the server side, which stores the authoritative information of the corresponding domain name (for example, the domain name in the domain name resolution request sent by the terminal this time. For the convenience of description, the domain name mentioned below refers to the domain name in the domain name resolution request unless otherwise specified). It is mainly used to perform domain name resolution based on the domain name resolution request and obtain the IP address corresponding to the domain name.
[0066] There are two main types of access, corresponding to the two situations of controllable scheduling and uncontrollable scheduling. The scheduling system is mainly used to process the domain name resolution requests that are controllable by scheduling, such as determining whether the terminal hits the grayscale rules, interacting with the terminal and the authoritative DNS, etc. However, due to some objective reasons (for example, the client that currently sends the domain name resolution request is not associated with the scheduling system, resulting in the domain name resolution request being unable to be sent to the scheduling system), the domain name resolution request is still uncontrollable by scheduling. At this time, the terminal may send the domain name resolution request to the authoritative DNS directly or through other means.
[0067] Based on this, the server can determine the access type of the current domain name resolution request based on the different devices that send the domain name resolution request. Figure 2 As shown, if the authoritative DNS receives a domain name resolution request sent by the scheduling system, it is considered that the domain name resolution request has been processed by the scheduling system, and its access type corresponds to a situation where the scheduling is controllable. Of course, the domain name resolution request forwarded by the scheduling system to the authoritative DNS may be different from the original domain name resolution request sent by the terminal (for example, the original domain name resolution request is formatted and packaged, etc.), but it will not have a substantial impact on the domain name resolution request. If the domain name resolution request received is sent by the terminal directly or by other means, it is considered that the access type corresponds to a situation where the scheduling is uncontrollable.
[0068] For domain name resolution requests sent by different devices, the response object of the server (or the authoritative DNS belonging to the server) is usually the object with which it directly interacts. For example, if the authoritative DNS receives a domain name resolution request forwarded by a scheduling system, the response object of the authoritative DNS can be the scheduling system.
[0069] In addition, the server can also determine the access type based on other methods. For example, the terminal has determined the access type when sending the domain name resolution request, and carries a corresponding identifier in the domain name resolution request. The server can determine the access type based on the identifier.
[0070] S104: If the access type of the domain name resolution request corresponds to the scheduling controllable situation, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system. If the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use.
[0071] In the case where scheduling is controllable, the received domain name resolution request may be a DNS request or an HTTP DNS request.
[0072] For IP addresses, it is usually preferred that terminals use IPv6 to access the server cluster to solve the problem of insufficient IPv4 network address resources and improve data transmission efficiency. However, due to the relatively complex IPv6 environment, there are risks that are difficult to predict and control. If IPv6 addresses are directly assigned to all terminals, it is easy to cause large-scale IPv6 access failures.
[0073] Based on this, the corresponding grayscale rules are pre-set, and the scheduling system uses the grayscale rules to select terminals whose access type is controllable by scheduling. Grayscale rules can include multiple rules, and the multiple rules can be and (the terminal needs to hit all rules to be considered to hit the grayscale rules), or (the terminal can be considered to hit the grayscale rules as long as it hits one rule) or other logical relationships. Grayscale rules can be set accordingly based on the terminal information that can be obtained (the relevant information carried by the terminal when sending a domain name resolution request). For example, if the terminal information carries environmental information, the grayscale rules can be constraints on the environmental information. Only terminals that meet certain specific environmental information can be considered to have hit the grayscale rules and assigned IPv6 addresses.
[0074] A domain name may correspond to multiple IP addresses for its services. Different IP addresses may correspond to different server clusters (also known as server rooms), but the corresponding domain names and websites are the same. During the domain name resolution process, the authoritative DNS can resolve multiple IP addresses that can point to the website corresponding to the domain name. The IPv6 address and IPv4 address assigned by the authoritative DNS to terminals that are controllable and hit the grayscale rules are obtained by resolving the domain name corresponding to the domain name resolution request. In actual scenarios, they correspond to different server clusters (for example, IPv6 server clusters and IPv4 server clusters in different locations). Terminals can use IPv6 addresses or IPv4 addresses to access them.
[0075] S106: If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
[0076] In the case of uncontrollable scheduling, domain name resolution requests are difficult to send to the scheduling system, and the scheduling system is difficult to filter through grayscale rules, which is relatively more uncertain. Therefore, for this part of the scheduling that is uncontrollable, in the current grayscale stage, even if an IPv6 address is generated, only an IPv4 address is returned to the terminal. In this way, the stability of the IPv6 environment can be guaranteed as much as possible under the current network environment, and the occurrence of IPv6 access failures can be reduced.
[0077] First of all, it should be noted that there is no order between step S106 and step S104 , and the two can be understood as the two branches corresponding to the content in step S102 when the scheduling is controllable and the scheduling is uncontrollable.
[0078] based on Figure 1 This specification also provides some specific implementation plans and extension plans of the method, which will be described below.
[0079] In one or more embodiments of this specification, Figure 2 As shown, if the authoritative DNS receives a domain name resolution request sent by the dispatch system, it is considered that the current situation is controllable by the dispatch system and responds according to the controllable situation. If the authoritative DNS receives a domain name resolution request sent by the operator's local DNS device (Local DNS), it responds according to the situation that is uncontrollable by the dispatch system.
[0080] Specifically, for the case where the scheduling is controllable, the terminal sends a domain name resolution request to the scheduling system, which has been described above and will not be repeated here. Figure 2As shown, when the terminal sends a domain name resolution request through the browser, it needs to be forwarded through the operator's local DNS device instead of the scheduling system. At this time, the scheduling system cannot receive the domain name resolution request. The authoritative DNS receives the domain name resolution request sent by the operator's local DNS device, and responds here according to the uncontrollable situation of the scheduling.
[0081] Furthermore, the browser here mainly refers to an independent application. For some software, all or part of the browser's functions may be added internally in a nested manner. At this time, if the browser is pre-associated with the scheduling system, when a domain name resolution request related to the authoritative DNS is sent through the browser nested inside the software, it can also be considered to be a situation that the scheduling is controllable. Otherwise, it is still a situation that the scheduling is uncontrollable.
[0082] In one or more embodiments of this specification, Figure 2 As shown, the authoritative DNS pre-sets the declaration type corresponding to the domain name declaration. After obtaining the domain name resolution request, the IP address can be announced based on the declaration type to ensure the reliability of IPv6 address diversion.
[0083] Specifically, the IPv4 address is set to a declaration type that can be announced outside the server, and the IPv6 address is set to a declaration type that cannot be announced outside the server. The IPv6 address is only used as metadata for internal protocol use. The declaration of IPv6 addresses is only involved when the scheduling is controllable. At this time, whether the IPv6 address needs to be allocated to the terminal is determined by the scheduling system. When the scheduling system determines that it can be allocated, the scheduling system interacts with the authoritative DNS to obtain the IPv6 address. Since the scheduling system is also part of the server, the authoritative DNS only declares the IPv6 address to other devices inside the server, and the scheduling system forwards the IPv6 address. The authoritative DNS does not declare the IPv6 address outside the server, and still meets the declaration type. As for the declaration of IPv4 addresses, regardless of whether the terminal is in the case of scheduling control or scheduling uncontrollable, it can be announced outside the server.
[0084] Furthermore, after setting the corresponding declaration type, when the scheduling system determines that it can be allocated, the scheduling system needs to interact with the authoritative DNS. At this time, the corresponding private protocol can be set in advance based on the extended DNS mechanism (Extension Mechanisms for DNS, ENDS). EDNS is to add some fields on the basis of following the existing DNS message format to support more DNS request services. Both belong to the server side, set the corresponding private protocol, and through the corresponding DNS service in the scheduling system, it can be guaranteed that the IPv6 address can be correctly transmitted to the scheduling system while not declaring IPv6 outside the server in the declaration protocol, so that the scheduling system returns the IPv6 address to the terminal. Of course, similar to the above, the original domain name resolution request received by the scheduling system may be different from the domain name resolution request processed and packaged by the private protocol, but it will not affect its essence.
[0085] For example, the scheduling system sends the corresponding private protocol for IPv4 A records, which can include the ECS (EDNS-Client-Subnet) code = 8 identifier and the custom backup code = 65002 identifier. For IPv6 AAAA records, the private protocol contains code = 8 and code = 65002, and adds an IPv6 grayscale identifier code = 65003. Only with this identifier can the IPv6 address be obtained from the authoritative DNS.
[0086] In one or more embodiments of the present specification, the main purpose of setting grayscale rules in the scheduling system is to perform IPv6 tests on different terminals as much as possible, so as to count and repair the IPv6 access failures, so as to achieve the goal of ultimately popularizing IPv6. As mentioned above, even for the same terminal, the corresponding scheduling situation may be different under different circumstances. At this time, for some terminals, due to some objective circumstances (such as the user's software installation preferences, low terminal processing capabilities, etc.), the number of times the terminal is uncontrollable is much greater than the number of times the terminal is controllable, and when the terminal does not hit the grayscale rule, it is difficult for the scheduling system to perform IPv6 environment testing corresponding to the terminal.
[0087] Based on this, when the service end receives a scheduling-controllable access type, it can selectively analyze it (for example, randomly or periodically selecting and analyzing the terminal, when receiving the scheduling-controllable domain name resolution request of the terminal for the first time, etc.) to determine the occurrence ratio between the scheduling-controllable situation and the scheduling-uncontrollable situation in the historical access type of the terminal. If the occurrence ratio is too low (lower than the preset threshold), and the terminal does not hit the grayscale rule, the grayscale rule is dynamically adjusted to enable the terminal to hit. In this way, the terminal is added to the hit range of the grayscale rule as early as possible, and the number of IPv6 environment tests for the terminal is increased as much as possible. For some terminals that are difficult to perform IPv6 environment tests through grayscale rules, it can be discovered as early as possible whether they are prone to IPv6 access failures, thereby ensuring the user experience after the widespread application of IPv6.
[0088] In one or more embodiments of the present specification, as mentioned above, the terminal information contains multiple types of information. Here, several types of information (for example, user information, location information, domain name information, and device information) are selected and combined with the grayscale rules to explain in detail how to determine whether the terminal information hits the grayscale rules.
[0089] In Example 1, users usually use their own accounts to log in to the client in the terminal in order to perform related services. At this time, the terminal information carries user information representing the user's identity. By analyzing the user information, it can be determined whether the user is an internal user of the specified enterprise (for example, the user is an employee or privileged customer of the specified enterprise). The corresponding grayscale rules are set, and only internal users of the specified enterprise can hit the grayscale rules.
[0090] Furthermore, the main stage for setting the grayscale rule is the initial stage of grayscale release. The main purpose is to test the stability of IPv6 access, select only a part of the terminals to allocate IPv6 addresses, and try to find out whether there are any abnormalities in the application of IPv6 at this stage, so as to facilitate the subsequent large-scale allocation of IPv6 addresses. At this time, if a designated enterprise is randomly selected, it is likely that the expected test effect will not be achieved. Due to the instability of IPv6, the user experience of the internal employees of the designated enterprise may be reduced, and it may even cause greater losses to the designated enterprise and internal users during the business execution process.
[0091] Based on this, the pre-selected designated enterprise can be the enterprise to which the terminal or client belongs (for example, the enterprise that develops the client). As an internal employee of the enterprise, it is possible that they have participated in the development process of the client (even if they have not participated, they have a deeper understanding of the client than employees of other enterprises). When an IPv6 failure causes access failure, they can more effectively cooperate with the dispatching equipment to identify and repair the fault. In addition, the designated enterprise can send relevant notifications to internal employees in advance, so that internal employees can make corresponding preparations in advance to avoid or reduce the losses caused by IPv6 failures to business execution.
[0092] In Example 2, the terminal information carries the location information. For different geographical areas, the corresponding network quality and other environmental information may be affected by geographical factors (e.g., high altitude, high temperature environment) or local network environment construction. Grayscale rules related to the location information are set, and only terminals within the specified location range can hit the grayscale rules.
[0093] In order to achieve a similar purpose as in Example 1 (stability test of IPv6 access), the designated location range can be set accordingly. For example, in the early stage of grayscale release, the designated location range is set in some relatively remote areas or areas with complex terrain. At this time, IPv6 access is prone to abnormalities during IPv6 access due to poor local network environment construction or complex terrain, which makes it easier to detect problems in the early stage of grayscale release, so as to facilitate corresponding maintenance. In addition, due to the relatively remote location and usually small population, the number of users affected by IPv6 failures is relatively small, which ensures the experience of most users as much as possible.
[0094] Furthermore, even in remote areas (such as a relatively remote city), there are still a large number of users (the number of users is still at a large level). Therefore, the terminals that hit the grayscale rule can be further screened, and a random probability (for example, 10%) is preset. When the location information hits the grayscale rule, it is necessary to further determine whether the terminal hits the random probability. If it still hits, it is considered that it hits the grayscale rule and an IPv6 address and an IPv4 address are allocated to it.
[0095] In Example 3, the terminal information carries the domain name information to be accessed. Similarly, in the initial stage of grayscale release, the domain names of some websites with relatively small user traffic, or the websites of the companies to which the authoritative DNS belongs, are selected as designated domain names, and the constraints of the designated domain names are added to the grayscale rules. This can minimize the impact of IPv6 failures on user experience and improve the efficiency of IPv6 maintenance.
[0096] In Example 4, the terminal information carries the device IP, which is designated to a specific device through precise grayscale control. Similarly, in the initial stage of grayscale release, the device IP within the enterprise to which the terminal belongs is selected as the preset designated device, and the constraints of the designated device are added to the grayscale rules. This can minimize the impact of IPv6 failures on user experience and improve the efficiency of IPv6 maintenance.
[0097] Figure 3 Provided for one or more embodiments of this specification, a schematic diagram of the architecture of a DNS-based IPv6 traffic diversion system in the second grayscale stage. As the grayscale rule hit range of the scheduling system continues to expand, the number of scheduling controllable terminals that can be hit is increasing. When the range of terminals that can be hit reaches the preset target range and the failure rate of these terminals is very low, it means that the environmental test of IPv6 can remain basically stable and can be put into use on a large scale. At this time, it can be considered that the first grayscale stage is in the final state and enters the state such as Figure 3 The second grayscale stage shown. In the second grayscale stage, since the IPv6 test for the scheduling controllable terminal has been completed in the first grayscale stage, and the stability of the current use of IPv6 is guaranteed, and it is difficult to test the scheduling uncontrollable terminal, when receiving the scheduling uncontrollable domain name resolution request, it directly assigns an IPv6 address to it (of course, it can also assign an IPv6 address and an IPv4 address to it at the same time), thus entering the second grayscale stage. In the second grayscale stage, the scheduling system may still be using grayscale rules to select terminals, which still belongs to the stage in the grayscale release process, so it is called the second grayscale stage.
[0098] Figure 4 A schematic diagram of a flow chart of a DNS-based IPv6 traffic diversion method on a terminal side provided in one or more embodiments of this specification, Figure 4 The method shown mainly stands for Figure 2 The terminal side of the DNS-based IPv6 traffic diversion system shown is explained, and the content that is similar to the server side mentioned above is not repeated here. Figure 4 The process in may include the following steps:
[0099] S402: Access is performed through a specified access type so that the server performs domain name resolution for the terminal to obtain an IP address. The server includes an authoritative DNS and a scheduling system. The access type is divided according to whether the terminal is controllable by the scheduling system.
[0100] When the terminal accesses through the client, there is no need to actively determine the access type. It can automatically access in a manner corresponding to the access type based on the program code preset in the client.
[0101] S404: If the access type corresponds to the situation where the scheduling is controllable, the access includes: sending a domain name resolution request to the scheduling system, so that if the scheduling system determines that the terminal hits the grayscale rule, it returns the IPv6 address and IPv4 address of the domain name obtained from the authoritative DNS.
[0102] When the terminal is a smartphone (including Android operating system, IOS operating system, etc.), tablet computer, personal PC and other devices, the user can initiate access through the client associated with the authoritative DNS, which corresponds to the situation where scheduling is controllable. Association with the authoritative DNS means that the authoritative DNS and the client belong to the same enterprise, or the domain name accessed by the client are all domain names saved and defined by the authoritative DNS.
[0103] When the terminal is an IoT device other than the above-mentioned devices and associated with the authoritative DNS (for example, surveillance cameras, smart speakers, sensors, etc.), if the IoT device belongs to the same enterprise as the authoritative DNS, or the IoT device can only access the domain name defined by the authoritative DNS, then the IoT device is also considered to correspond to a scheduling controllable situation.
[0104] S406: If the access type corresponds to a situation where the scheduling is uncontrollable, the access includes: without going through the scheduling system, enabling the authoritative DNS to perform domain name resolution and return the IPv4 address of the domain name.
[0105] If the user accesses the domain through the browser in the terminal, as mentioned above, the domain name resolution needs to be performed through the operator's local DNS device. Under normal circumstances, domain name resolution can be completed without going through the authoritative DNS, but some domain name resolution requests use some private protocols, which need to be processed by the authoritative DNS, so at least some domain name resolution requests will still be sent to the authoritative DNS.
[0106] Similarly, there is no order between step S406 and step S404, which can be understood as two branches corresponding to the content in step S402 when the scheduling is controllable and the scheduling is uncontrollable.
[0107] S408: Receive an IP address returned in response to the access, and access the IP address.
[0108] like Figure 2 as well as Figure 3As shown in the figure, when the client receives the returned IPv6 address, it will first access through the IPv6 address, and the corresponding IPv6 server cluster will be accessed. However, if the access fails during the access process and the website cannot be accessed through IPv6, it will switch to access through the IPv4 address. At this time, the IPv4 server cluster will be accessed. However, no matter which server cluster is accessed, it is the server corresponding to the website, and the user can perform the corresponding business through the client.
[0109] Based on the same idea, one or more embodiments of this specification also provide devices and apparatuses corresponding to the above methods, such as Figures 5 to 8 shown.
[0110] Figure 5 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on a server side provided in one or more embodiments of this specification, the device comprising:
[0111] Receiving module 502, the authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, where the access type is divided according to whether the terminal to use the IP address is controllable by the scheduling system;
[0112] The first returning module 504, if the access type of the domain name resolution request corresponds to the scheduling controllable situation, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system, and if the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use;
[0113] The second returning module 506, if the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
[0114] Optionally, in the receiving module 502, if the authoritative DNS receives the domain name resolution request sent by the scheduling system, it responds according to the access type corresponding to the controllable situation of the scheduling;
[0115] The domain name resolution request is sent by the scheduling system in response to the request of the terminal.
[0116] Optionally, in the receiving module 502, if the authoritative DNS receives a domain name resolution request sent by a local DNS device of an operator, the authoritative DNS responds according to an access type corresponding to the situation where the scheduling is uncontrollable;
[0117] The domain name resolution request is sent by the operator's local DNS device in response to the request of the terminal.
[0118] Optionally, it also includes:
[0119] The announcement type setting module 508, the authoritative DNS sets the IPv4 address as an announcement type that can be announced outside the server, and sets the IPv6 address as an announcement type that cannot be announced outside the server.
[0120] Optionally, it also includes:
[0121] Private protocol module 510, the scheduling system receives the domain name resolution request sent by the terminal;
[0122] The scheduling system responds to the domain name resolution request by sending a domain name resolution request to the authoritative DNS through a private protocol based on EDNS between the scheduling system and the authoritative DNS, so as to request the IP address from the authoritative DNS;
[0123] The private protocol is at least for the declaration type that cannot be declared outside the server.
[0124] Optionally, it also includes:
[0125] A grayscale rule adjustment module 512 determines, according to the historical access type of the terminal, an occurrence ratio between a situation corresponding to the controllable scheduling and a situation corresponding to the uncontrollable scheduling;
[0126] If the occurrence ratio is lower than a preset threshold and the terminal does not hit the grayscale rule, the grayscale rule is dynamically adjusted so that the terminal can hit the grayscale rule.
[0127] Optionally, in the first returning module 510, the scheduling system determines, according to the user information carried in the domain name resolution request, that the user corresponding to the terminal is an internal user of a designated enterprise; or
[0128] The scheduling system determines, based on the positioning information carried in the domain name resolution request, that the location of the terminal belongs to a specified location range, and determines that the terminal hits a preset random probability; or
[0129] The scheduling system determines that the domain name to be accessed by the terminal is a designated domain name according to the domain name information carried in the domain name resolution request; or
[0130] The scheduling system determines, based on the device information carried in the domain name resolution request, that the device ID of the terminal is a preset designated device ID.
[0131] Optionally, it also includes:
[0132] The final state module 514 enters the second grayscale stage if it is determined that the current first grayscale stage is in a final state according to the dynamic adjustment process of the grayscale rule in the scheduling system;
[0133] If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv6 address of the domain name.
[0134] Figure 6 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on a terminal side provided for one or more embodiments of this specification, the device comprising:
[0135] The access initiation module 602 performs access through a specified access type so that the server performs domain name resolution for the terminal to obtain an IP address. The server includes an authoritative DNS and a scheduling system. The access type is divided according to whether the terminal is controllable by the scheduling system.
[0136] The first sending module 604, if the access type corresponds to the situation where the scheduling is controllable, the access includes: sending a domain name resolution request to the scheduling system, so that if the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and the IPv4 address of the domain name obtained from the authoritative DNS are returned;
[0137] The second sending module 606, if the access type corresponds to the situation that the scheduling is uncontrollable, the access includes: without going through the scheduling system, enabling the authoritative DNS to perform domain name resolution and return the IPv4 address of the domain name;
[0138] The IP address access module 608 receives the IP address returned in response to the access and accesses the IP address.
[0139] Optionally, the access receiving module 608 receives an IPv6 address and an IPv4 address returned by the server in response to the access if the access type corresponds to the scheduling controllable situation;
[0140] Use the IPv6 address to access, and if the access using the IPv6 address fails, use the IPv4 address to access.
[0141] Optionally, if the first sending module 604 is through a client or an IoT device associated with the authoritative DNS, the access type corresponds to a situation where the scheduling is controllable;
[0142] The second sending module 606, if access is performed through a browser, then the access type corresponds to the situation where the scheduling is uncontrollable.
[0143] Figure 7 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on a server side provided for one or more embodiments of this specification is applied to a server side, wherein the server side includes an authoritative DNS and a scheduling system, and the device includes:
[0144] at least one processor; and,
[0145] a memory communicatively connected to the at least one processor; wherein,
[0146] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0147] The authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, where the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system;
[0148] If the access type of the domain name resolution request corresponds to the situation that the scheduling is controllable, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system. If the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use;
[0149] If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
[0150] Figure 8 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the terminal side provided for one or more embodiments of this specification is applied to the terminal, and the device includes:
[0151] at least one processor; and,
[0152] a memory communicatively connected to the at least one processor; wherein,
[0153] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0154] Access is performed through a specified access type, so that the server performs domain name resolution for the terminal to obtain an IP address, the server includes an authoritative DNS and a scheduling system, and the access type is divided according to whether the terminal is controllable by the scheduling system;
[0155] If the access type corresponds to the situation where the scheduling is controllable, the access includes: sending a domain name resolution request to the scheduling system, so that if the scheduling system determines that the terminal hits the grayscale rule, it returns the IPv6 address and IPv4 address of the domain name obtained from the authoritative DNS;
[0156] If the access type corresponds to a situation where the scheduling is uncontrollable, the access includes: without going through the scheduling system, causing the authoritative DNS to perform domain name resolution and return the IPv4 address of the domain name;
[0157] An IP address returned in response to the access is received, and the IP address is accessed.
[0158] Based on the same idea, one or more embodiments of this specification also provide a non-volatile computer storage medium corresponding to the above method, storing computer executable instructions, wherein the computer executable instructions are configured as follows:
[0159] The authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, where the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system;
[0160] If the access type of the domain name resolution request corresponds to the situation that the scheduling is controllable, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system. If the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use;
[0161] If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
[0162] Based on the same idea, one or more embodiments of this specification also provide another non-volatile computer storage medium corresponding to the above method, storing computer executable instructions, wherein the computer executable instructions are configured as:
[0163] Access is performed through a specified access type, so that the server performs domain name resolution for the terminal to obtain an IP address, the server includes an authoritative DNS and a scheduling system, and the access type is divided according to whether the terminal is controllable by the scheduling system;
[0164] If the access type corresponds to the situation where the scheduling is controllable, the access includes: sending a domain name resolution request to the scheduling system, so that if the scheduling system determines that the terminal hits the grayscale rule, it returns the IPv6 address and IPv4 address of the domain name obtained from the authoritative DNS;
[0165] If the access type corresponds to a situation where the scheduling is uncontrollable, the access includes: without going through the scheduling system, causing the authoritative DNS to perform domain name resolution and return the IPv4 address of the domain name;
[0166] An IP address returned in response to the access is received, and the IP address is accessed.
[0167] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0168] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0169] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0170] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0171] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0172] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0173] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0174] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0175] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0176] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0177] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0178] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0179] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0180] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0181] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0182] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. A DNS-based IPv6 traffic diversion method, applied to a server, the server comprising an authoritative DNS and a scheduling system, the method comprising: The authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, where the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system; If the access type of the domain name resolution request corresponds to the situation that the scheduling is controllable, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system. If the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use; If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
2. The method according to claim 1, wherein the authoritative DNS receives a domain name resolution request for obtaining an IP address and responds according to an access type of the domain name resolution request, specifically comprising: If the authoritative DNS receives the domain name resolution request sent by the scheduling system, it responds according to the access type corresponding to the controllable situation of the scheduling; The domain name resolution request is sent by the scheduling system in response to the request of the terminal.
3. The method according to claim 1, wherein the authoritative DNS receives a domain name resolution request for obtaining an IP address and responds according to an access type of the domain name resolution request, specifically comprising: If the authoritative DNS receives a domain name resolution request sent by the operator's local DNS device, it responds according to the access type corresponding to the uncontrollable scheduling situation; The domain name resolution request is sent by the operator's local DNS device in response to the request of the terminal.
4. The method according to claim 2, before the authoritative DNS receives the domain name resolution request for obtaining the IP address, the method further comprises: The authoritative DNS sets the IPv4 address as a declaration type that can be declared outside the server, and sets the IPv6 address as a declaration type that cannot be declared outside the server.
5. The method according to claim 4, before the authoritative DNS returns the IPv6 address and the IPv4 address of the domain name to the scheduling system, the method further comprises: The scheduling system receives a domain name resolution request sent by the terminal; The scheduling system responds to the domain name resolution request by sending a domain name resolution request to the authoritative DNS through a private protocol based on EDNS between the scheduling system and the authoritative DNS, so as to request the IP address from the authoritative DNS; The private protocol is at least for the declaration type that cannot be declared outside the server.
6. The method according to claim 1, wherein if the access type of the domain name resolution request corresponds to the scheduling controllable situation, the method further comprises: determining, according to the historical access type of the terminal, an occurrence ratio between a situation corresponding to the controllable scheduling and a situation corresponding to the uncontrollable scheduling; If the occurrence ratio is lower than a preset threshold and the terminal does not hit the grayscale rule, the grayscale rule is dynamically adjusted so that the terminal can hit the grayscale rule.
7. The method according to claim 1, wherein if the scheduling system determines that the terminal hits the grayscale rule, the method further comprises: The scheduling system determines, based on the user information carried in the domain name resolution request, that the user corresponding to the terminal is an internal user of the designated enterprise; or The scheduling system determines, based on the positioning information carried in the domain name resolution request, that the location of the terminal belongs to a specified location range, and determines that the terminal hits a preset random probability; or The scheduling system determines that the domain name to be accessed by the terminal is a designated domain name according to the domain name information carried in the domain name resolution request; or The scheduling system determines, based on the device information carried in the domain name resolution request, that the device ID of the terminal is a preset designated device ID.
8. The method of claim 1, wherein if the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, after the authoritative DNS returns the IPv4 address of the domain name, the method further comprises: If it is determined according to the dynamic adjustment process of the grayscale rule in the scheduling system that the current first grayscale stage is in a final state, then entering the second grayscale stage; If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv6 address of the domain name.
9. A DNS-based IPv6 traffic diversion method, applied to a terminal, the method comprising: Access is performed through a specified access type, so that the server performs domain name resolution for the terminal to obtain an IP address, the server includes an authoritative DNS and a scheduling system, and the access type is divided according to whether the terminal is controllable by the scheduling system; If the access type corresponds to the situation where the scheduling is controllable, the access includes: sending a domain name resolution request to the scheduling system, so that if the scheduling system determines that the terminal hits the grayscale rule, it returns the IPv6 address and IPv4 address of the domain name obtained from the authoritative DNS; If the access type corresponds to a situation where the scheduling is uncontrollable, the access includes: without going through the scheduling system, causing the authoritative DNS to perform domain name resolution and return the IPv4 address of the domain name; An IP address returned in response to the access is received, and the IP address is accessed.
10. The method according to claim 9, wherein receiving the IP address returned in response to the access and accessing the IP address specifically comprises: If the access type corresponds to the scheduling controllable situation, receiving the IPv6 address and the IPv4 address returned by the server in response to the access; Use the IPv6 address to access, and if the access using the IPv6 address fails, use the IPv4 address to access.
11. The method according to claim 9, wherein the access type corresponds to the situation where the scheduling is controllable, and specifically comprises: If access is made through a client or IoT device associated with the authoritative DNS, the access type corresponds to a situation where the scheduling is controllable; The access type corresponds to the situation where the scheduling is uncontrollable, and specifically includes: If access is performed through a browser, the access type corresponds to a situation where the scheduling is uncontrollable.
12. A DNS-based IPv6 traffic diversion device, applied to a server, the server comprising an authoritative DNS and a scheduling system, the device comprising: A receiving module, wherein the authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, wherein the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system; A first return module, if the access type of the domain name resolution request corresponds to the situation that the scheduling is controllable, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system, and if the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use; The second returning module, if the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
13. The device according to claim 12, wherein the receiving module, if the authoritative DNS receives the domain name resolution request sent by the scheduling system, responds according to the access type corresponding to the controllable situation of the scheduling; in, The domain name resolution request is sent by the scheduling system in response to the request of the terminal.
14. The device according to claim 12, wherein the receiving module, if the authoritative DNS receives a domain name resolution request sent by a local DNS device of an operator, responds according to the access type corresponding to the situation where the scheduling is uncontrollable; in, The domain name resolution request is sent by the operator's local DNS device in response to the request of the terminal.
15. The apparatus of claim 13, further comprising: The declaration type setting module is used for the authoritative DNS to set the IPv4 address as a declaration type that can be declared outside the server, and to set the IPv6 address as a declaration type that cannot be declared outside the server.
16. The apparatus of claim 15, further comprising: A private protocol module, wherein the scheduling system receives a domain name resolution request sent by the terminal; The scheduling system responds to the domain name resolution request by sending a domain name resolution request to the authoritative DNS through a private protocol based on EDNS between the scheduling system and the authoritative DNS, so as to request the IP address from the authoritative DNS; The private protocol is at least for the declaration type that cannot be declared outside the server.
17. The apparatus of claim 12, further comprising: A grayscale rule adjustment module, which determines, according to the historical access type of the terminal, an occurrence ratio between a situation corresponding to the controllable scheduling and a situation corresponding to the uncontrollable scheduling; If the occurrence ratio is lower than a preset threshold and the terminal does not hit the grayscale rule, the grayscale rule is dynamically adjusted so that the terminal can hit the grayscale rule.
18. The device according to claim 12, wherein the first return module, the scheduling system determines that the user corresponding to the terminal is an internal user of a designated enterprise according to the user information carried in the domain name resolution request; or The scheduling system determines, based on the positioning information carried in the domain name resolution request, that the location of the terminal belongs to a specified location range, and determines that the terminal hits a preset random probability; or The scheduling system determines that the domain name to be accessed by the terminal is a designated domain name according to the domain name information carried in the domain name resolution request; or The scheduling system determines, based on the device information carried in the domain name resolution request, that the device ID of the terminal is a preset designated device ID.
19. The apparatus of claim 12, further comprising: A final state module, if it is determined that the current first grayscale stage is in a final state according to the dynamic adjustment process of the grayscale rule in the scheduling system, then the second grayscale stage is entered; If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv6 address of the domain name.
20. A DNS-based IPv6 traffic diversion device, applied to a terminal, comprising: An access initiation module, which performs access through a specified access type so that the server performs domain name resolution for the terminal to obtain an IP address, wherein the server includes an authoritative DNS and a scheduling system, and the access type is divided according to whether the terminal is controllable by the scheduling system; A first sending module, if the access type corresponds to the situation where the scheduling is controllable, the access includes: sending a domain name resolution request to the scheduling system, so that if the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and the IPv4 address of the domain name obtained from the authoritative DNS are returned; A second sending module, if the access type corresponds to the situation that the scheduling is uncontrollable, the access includes: without going through the scheduling system, enabling the authoritative DNS to perform domain name resolution and return the IPv4 address of the domain name; The IP address access module receives the IP address returned in response to the access and accesses the IP address.
21. The apparatus of claim 20, wherein the IP address access module receives an IPv6 address and an IPv4 address returned by the server in response to the access if the access type corresponds to the situation where the scheduling is controllable; Use the IPv6 address to access, and if the access using the IPv6 address fails, use the IPv4 address to access.
22. The apparatus of claim 20, wherein the first sending module, if through a client or an IoT device associated with the authoritative DNS, the access type corresponds to a situation where the scheduling is controllable; If the second sending module is accessed through a browser, the access type corresponds to the situation where the scheduling is uncontrollable.
23. A DNS-based IPv6 traffic diversion device, applied to a server, the server comprising an authoritative DNS and a scheduling system, the device comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: The authoritative DNS receives a domain name resolution request for obtaining an IP address, and responds according to an access type of the domain name resolution request, where the access type is classified according to whether a terminal to use the IP address is controllable by the scheduling system; If the access type of the domain name resolution request corresponds to the situation that the scheduling is controllable, the authoritative DNS returns the IPv6 address and IPv4 address of the domain name to the scheduling system. If the scheduling system determines that the terminal hits the grayscale rule, the IPv6 address and IPv4 address of the domain name are returned to the terminal for use; If the access type of the domain name resolution request corresponds to the situation where the scheduling is uncontrollable, the authoritative DNS returns the IPv4 address of the domain name for use by the terminal.
24. A DNS-based IPv6 traffic diversion device, applied to a terminal, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Access is performed through a specified access type, so that the server performs domain name resolution for the terminal to obtain an IP address, the server includes an authoritative DNS and a scheduling system, and the access type is divided according to whether the terminal is controllable by the scheduling system; If the access type corresponds to the situation where the scheduling is controllable, the access includes: sending a domain name resolution request to the scheduling system, so that if the scheduling system determines that the terminal hits the grayscale rule, it returns the IPv6 address and IPv4 address of the domain name obtained from the authoritative DNS; If the access type corresponds to a situation where the scheduling is uncontrollable, the access includes: without going through the scheduling system, causing the authoritative DNS to perform domain name resolution and return the IPv4 address of the domain name; An IP address returned in response to the access is received, and the IP address is accessed.
