DNS-based IPv6 traffic diversion method, device and equipment
By setting grayscale rules in the DNS scheduling device and assigning IPv6 and IPv4 addresses based on client information, the problem of insufficient access stability in the IPv6 environment is solved, and the stability of the IPv6 drainage process and the smooth execution of user services are achieved.
Patent Information
- Application Number
- CN202111069634.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-13
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-09-13
AI Technical Summary
In an IPv6 environment, clients are prone to failure when accessing the server, resulting in access failure. It is difficult for the existing technology to effectively control and predict these risks, resulting in insufficient stability.
By setting grayscale rules in the DNS scheduling device, determining whether to hit the rules based on client information, assigning IPv6 addresses and IPv4 addresses, and accessing through IPv6 addresses is preferred. If it fails, it will be downgraded to IPv4 addresses to ensure access stability.
By finely controlling the grayscale rules, gradually increasing the hit range, the controllability of IPv6 usage risks is improved, the stability of the IPv6 drainage process is ensured, and the smooth execution of user services is maximized.
Smart Images

Figure CN113840018B_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, when the client accesses the server through IPv6, it is easy for faults to occur, resulting in access failures. For example, there may be momentary network failures caused by packet loss, software or hardware device support, and failures caused by underlying protocol conflicts.
[0004] Based on this, a more stable DNS-based IPv6 diversion solution is needed. Summary of the invention
[0005] One or more embodiments of the present specification provide a DNS-based IPv6 traffic diversion method, apparatus, device, and storage medium to solve the following technical problem: a more stable DNS-based IPv6 traffic diversion solution is required.
[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, including:
[0008] Receive DNS requests sent by clients;
[0009] According to the client information carried in the DNS request, determine whether the client hits the corresponding grayscale rule;
[0010] If so, an IPv6 address and an IPv4 address are allocated to the client, so that the client can access the network through the IPv6 address, and in the case that the client fails to access the network through the IPv6 address, the client can access the network through the IPv4 address.
[0011] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion method, including:
[0012] Send a DNS request carrying client information to the DNS scheduling device;
[0013] Receiving an IPv6 address and an IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits a corresponding grayscale rule according to the client information;
[0014] Access is performed through the IPv6 address, and if access through the IPv6 address fails, access is performed through the IPv4 address.
[0015] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion device, including:
[0016] The first receiving module receives the DNS request sent by the client;
[0017] A judgment module, judging whether the client hits the corresponding grayscale rule according to the client information carried in the DNS request;
[0018] The first allocation module allocates an IPv6 address and an IPv4 address to the client if the judgment result of the judgment module is yes, so that the client can access through the IPv6 address, and when the client fails to access through the IPv6 address, access through the IPv4 address.
[0019] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion device, including:
[0020] A sending module sends a DNS request carrying client information to a DNS scheduling device;
[0021] A second receiving module receives an IPv6 address and an IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits a corresponding grayscale rule based on the client information;
[0022] The access module performs access via the IPv6 address, and performs access via the IPv4 address when access via the IPv6 address fails.
[0023] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion device, including:
[0024] at least one processor; and,
[0025] a memory communicatively connected to the at least one processor; wherein,
[0026] 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:
[0027] Receive DNS requests sent by clients;
[0028] According to the client information carried in the DNS request, determine whether the client hits the corresponding grayscale rule;
[0029] If so, an IPv6 address and an IPv4 address are allocated to the client, so that the client can access the network through the IPv6 address, and in the case that the client fails to access the network through the IPv6 address, the client can access the network through the IPv4 address.
[0030] One or more embodiments of this specification provide a DNS-based IPv6 traffic diversion device, including:
[0031] at least one processor; and,
[0032] a memory communicatively connected to the at least one processor; wherein,
[0033] 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:
[0034] Send a DNS request carrying client information to the DNS scheduling device;
[0035] Receiving an IPv6 address and an IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits a corresponding grayscale rule according to the client information;
[0036] Access is performed through the IPv6 address, and if access through the IPv6 address fails, access is performed through the IPv4 address.
[0037] 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:
[0038] Receive DNS requests sent by clients;
[0039] According to the client information carried in the DNS request, determine whether the client hits the corresponding grayscale rule;
[0040] If so, an IPv6 address and an IPv4 address are allocated to the client, so that the client can access the network through the IPv6 address, and in the case that the client fails to access the network through the IPv6 address, the client can access the network through the IPv4 address.
[0041] 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:
[0042] Send a DNS request carrying client information to the DNS scheduling device;
[0043] Receiving an IPv6 address and an IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits a corresponding grayscale rule according to the client information;
[0044] Access is performed through the IPv6 address, and if access through the IPv6 address fails, access is performed through the IPv4 address.
[0045] At least one of the above technical solutions adopted in one or more embodiments of this specification can achieve the following beneficial effects:
[0046] Formulate corresponding grayscale rules, define the scope of clients in a flexible way, and determine the hit range of grayscale rules based on current needs and IPv6 network environment, so as to achieve gradual expansion from small to large, ensure the controllability of the risk range of IPv6 use, and ultimately achieve the popularization of IPv6. By finely controlling grayscale rules and assigning them to specific clients, the controllability of the risk range is further improved. Use IPv4 as a backup, actively downgrade when IPv6 access fails, ensure the smooth execution of user services, and maximize the stability of the IPv6 diversion process, thereby providing a more stable DNS-based IPv6 diversion solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] 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.
[0048] Figure 1 A flowchart of a DNS-based IPv6 traffic diversion method on a DNS scheduling device side provided in one or more embodiments of this specification;
[0049] Figure 2 A schematic diagram of a flow chart of a DNS-based IPv6 traffic diversion method on the client side provided in one or more embodiments of this specification;
[0050] Figure 3 A schematic diagram of a client access process in an application scenario provided for one or more embodiments of this specification;
[0051] Figure 4 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the DNS scheduling device side provided in one or more embodiments of this specification;
[0052] Figure 5 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the client side provided in one or more embodiments of this specification;
[0053] Figure 6 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the DNS scheduling device side provided in one or more embodiments of this specification;
[0054] Figure 7 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the client side provided in one or more embodiments of this specification. DETAILED DESCRIPTION
[0055] The embodiments of this specification provide a DNS-based IPv6 traffic diversion method, apparatus, device, and storage medium.
[0056] 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.
[0057] Figure 1 A flow chart of a DNS-based IPv6 traffic diversion method on the DNS scheduling device 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 (for example, an intelligent customer service server or intelligent mobile terminal corresponding to a payment business, etc.), and some input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.
[0058] Figure 1 The process in may include the following steps:
[0059] S102: Receive a DNS request sent by a client.
[0060] The client is a terminal used by users (for example, a smartphone, a personal PC, an IoT device, etc.). The client can be a WEB browser or software or hardware with corresponding functions and requirements.
[0061] When a user accesses a server through a client, if a domain name is entered, the domain name needs to be resolved by DNS and converted into a corresponding IP address before the client can access the server through the IP address (the server can belong to a corresponding server cluster). Based on this, the client sends a DNS request to a system or device that performs DNS resolution (the system or device is referred to as a DNS scheduling device. In addition to performing DNS resolution, the DNS scheduling device also performs other data processing and transmission tasks, hereinafter referred to as a scheduling device). After receiving the DNS request, the scheduling device resolves it and obtains the client information carried therein. The client information may include the client's own information (for example, the client version number), user information bound to the client, the client's environmental information (for example, the terminal's device ID, the device's location information, the terminal's network protocol stack, network quality, client operating system, etc.), the domain name that needs to be resolved, etc.
[0062] S104: Determine whether the client matches a corresponding grayscale rule based on the client information carried in the DNS request.
[0063] For IP addresses, it is usually preferred that clients use IPv6 to access website servers 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 clients, it is easy to cause large-scale IPv6 access failures.
[0064] Based on this, the corresponding grayscale rules are pre-set, and the clients are selected in the form of grayscale release. Grayscale rules can include multiple rules, and the multiple rules can be and (the client needs to hit all rules to be considered to hit the grayscale rules), or (the client can be considered to hit the grayscale rules as long as it hits one rule) or other logical relationships.
[0065] Specifically, the grayscale rules can be set accordingly based on the client information that can be obtained. For example, if the client information carries environmental information, the grayscale rules can be constraints on the environmental information. Only clients that meet certain specific environmental information can be considered to have hit the grayscale rules and be assigned an IPv6 address.
[0066] The hit range of the grayscale rule is obtained based on each rule and logical relationship, and the hit range will also change based on the change of the rules and logical relationships. For example, the grayscale rule contains constraints on the geographical range of the terminal where the client is located. When the geographical range becomes larger, it can be considered that the hit range of the grayscale rule has become larger. However, if the geographical range changes from City A to City B (there is no relationship of inclusion and being included between City A and City B), it cannot be simply considered that the geographical range has become larger or smaller. At this time, it can be determined whether the hit range has become larger based on the area occupied by City A and City B. The larger the area occupied, the larger the hit range. Alternatively, it can be determined whether the hit range has become larger based on the permanent population and number of clients in City A or City B. The larger the permanent population and the number of clients, the larger the hit range. The grayscale rule contains constraints on the domain names that need to be resolved. When the number of domain names increases, it can be considered that the hit range of the grayscale rule has become larger. Similarly, if the domain name is replaced, and domain name A is replaced with domain name B (there is no inclusion relationship between domain name A and domain name B), then the hit range can be determined based on the number of visits to domain name A and domain name B. For the replacement of client version numbers, the hit range can be determined based on the number of existing users of each client version number; for the replacement of device IDs, the hit range can be determined based on the processing capabilities of different devices and the number of DNS requests sent. The hit range of other types of grayscale rules can also be determined by setting corresponding rules, which will not be repeated here.
[0067] Grayscale rules are not always the same. The scheduling system can dynamically adjust grayscale rules during the DNS resolution process, for example, gradually expanding the hit range of grayscale rules over time, or dynamically adjusting them manually. Several typical scenarios will be selected below for detailed explanations.
[0068] S106: If yes, allocate an IPv6 address and an IPv4 address to the client, so that the client can access the server through the IPv6 address, and if the client fails to access the server through the IPv6 address, the client can access the server through the IPv4 address.
[0069] A domain name may correspond to multiple IP addresses for its services. Different IP addresses may correspond to different server clusters (also called server rooms), but the corresponding domain names and websites are the same. During the DNS resolution process, the multiple IP addresses obtained by resolution can all point to the website corresponding to the domain name.
[0070] The IPv6 address and IPv4 address assigned to the client are obtained by resolving the domain name in the client information. In actual scenarios, they correspond to different server clusters. For example, corresponding IPv6 server clusters and IPv4 server clusters are set up in City C, City D, and City E respectively. When the client receives the returned IPv6 address, it will first access it through the IPv6 address. At this time, the corresponding IPv6 server cluster is accessed. However, if an access failure occurs 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 is naturally accessed. However, no matter which server cluster is accessed, it is the server corresponding to the website, and users can perform corresponding services through the client.
[0071] based on Figure 1 This specification also provides some specific implementation plans and extension plans of the method, which will be described below.
[0072] In one or more embodiments of the present specification, as mentioned above, the client information contains multiple types of information. Here, several types of information (for example, user information, location information, domain name information, device information) are selected and combined with the grayscale rules to explain in detail how to determine whether the client information hits the grayscale rules.
[0073] In Example 1, users usually use their own accounts to log in to the client in order to perform related business. At this time, the client 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). Set the corresponding grayscale rules, and only internal users of the specified enterprise can hit the grayscale rules.
[0074] 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 clients 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.
[0075] Based on this, the pre-selected designated enterprise can be the enterprise to which the 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.
[0076] In Example 2, the client information carries the location information of the terminal where the client is located. 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.
[0077] 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.
[0078] Furthermore, even in remote areas (such as a relatively remote city), the number of users is still relatively large (the number of users is still at a large level). Therefore, the clients 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 client 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.
[0079] In Example 3, the client 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 website of the company to which the client 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.
[0080] In Example 4, the client information carries the device IP, which is assigned 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 client 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.
[0081] In one or more embodiments of the present specification, for clients that hit the grayscale rule, an IPv6 address and an IPv4 address are allocated to them, so that they can access through the IPv6 address first. If IPv6 fails, there is still an IPv4 address as a backup, which will not affect the client's domain name access. For clients that do not hit the grayscale rule, usually only an IPv4 address is allocated, so that they can access through the IPv4 address.
[0082] As mentioned above, the grayscale rules are not always the same, and they can be changed accordingly during the grayscale release process. At this time, you can analyze the clients that do not hit the grayscale rules to make reasonable automatic adjustments to the hit range of the grayscale rules.
[0083] Specifically, before allocating an IP address to a client, if it is determined that the client information does not hit the grayscale rule, the IPv4 address is no longer directly allocated to the client, but the client information is analyzed to determine the first client information that does not hit the grayscale rule.
[0084] The first client information is analyzed to determine whether the difference between the first client information and the grayscale rule is lower than the preset threshold. If so, it means that although the client information does not hit the grayscale rule, it is very close to the hit range of the grayscale rule. The difference degree has a corresponding judgment standard based on the difference of the client information. For example, when the first client information is positioning information, if the actual distance between the positioning information and the specified location range constraint in the grayscale rule is very close and lower than the preset distance, it can be considered that the difference degree is lower than the preset threshold. When the first client information is user information, if the enterprise where the user information is located has one or more of the relationships such as parent-subsidiary, close cooperation, belonging to the same industry, and similar scale with the specified enterprise constraint in the grayscale rule, it can be considered that the difference degree is lower than the preset threshold. The first client information is domain name information. If the domain name information has one or more of the relationships such as close user visits and similar website content with the specified domain name constraint in the grayscale rule, it can be considered that the difference degree is lower than the preset threshold. The first client information is device information. If the device information and the specified device ID constraint in the grayscale rule have one or more of the following relationships, such as belonging to the same production batch, being applied to the same enterprise, etc., then it can be considered that the degree of difference is lower than the preset threshold.
[0085] At this time, although the client does not hit the grayscale rule, it can still be tried to allocate an IPv6 address and an IPv4 address. If the client successfully accesses through the IPv6 address, it means that the range corresponding to the client information can be accessed using IPv6. At this time, the hit range of the grayscale rule can be dynamically adjusted so that the first client information can hit the adjusted grayscale rule. In this way, in the process of IPv6 diversion, the hit range of the grayscale rule can be gradually expanded to achieve a smooth transition in the grayscale release process. Of course, in order to ensure the accuracy of the transition process, the hit range of the reading rule can be expanded after multiple clients containing the first client information successfully access through the IPv6 address.
[0086] In one or more embodiments of the present specification, in the process of grayscale release, in addition to the method described above, the grayscale rules may be dynamically adjusted in other ways.
[0087] For example, before determining whether a client hits a grayscale rule, the historical records are traversed to determine other clients that hit the grayscale rule, and the access results of other clients when accessing through the IPv6 addresses assigned to them are analyzed. The access results are analyzed to determine multiple clients that failed to access. These multiple clients are analyzed to determine whether they have the same second client information (for example, these multiple clients are all in the same geographical range, or use the same operating system). If so, it means that the access failure of these multiple clients through IPv6 is likely to be caused by the second client information. At this time, the grayscale rule is dynamically adjusted so that the second client information can no longer hit the hit range corresponding to the grayscale rule, thereby improving the user experience of these clients.
[0088] Of course, it is not necessary to perform analysis before each client hits the grayscale rule. Instead, a timing and quantitative method can be used to perform corresponding analysis every predetermined time or every predetermined number of intervals before determining whether a client hits the grayscale rule.
[0089] In one or more embodiments of this specification, for some enterprises, multiple clients may frequently send DNS requests in a certain period of time. For example, for Internet companies, during the testing phase of a certain software, multiple clients may need to communicate with the outside world frequently at the same time. At this time, if these multiple clients all hit the grayscale rule and are assigned IPv6 addresses, once IPv6 fails, it may cause the communication function test of the software to fail or affect the results of the testing phase.
[0090] Based on this, if multiple DNS requests are received from multiple clients at the same time (here, "simultaneously" can refer to the same moment, or a very short time difference can be regarded as simultaneous, for example, multiple DNS requests received within 0.1 seconds are regarded as received at the same time), and all hit the corresponding grayscale rules, then determine whether the specified client information is the same among the multiple clients based on the client information (for example, determine whether the multiple clients are all internal employees of the same company based on the user information in the client information). If so, when allocating IP addresses, only some of the clients are allocated IPv6 addresses and IPv4 addresses. If these clients successfully access through the IPv6 address, it means that the multiple clients with the specified client information are likely to adapt to the IPv6 environment. At this time, the IPv6 address and IPv4 address are allocated to the remaining clients with a delay. Since the access speed of IPv6 is very fast, the delay is actually very short, and usually does not affect the user experience and testing, and can also guarantee the service guarantee for the user end in this case.
[0091] Figure 2 A flowchart of a DNS-based IPv6 traffic diversion method on the client side provided for one or more embodiments of this specification. Figure 2 The method shown is similar to Figure 1 The methods shown are interpretations and limitations of the drainage methods from different perspectives, so there will be a lot of identical or similar content therein, and we will not go into details about this part here.
[0092] S202: Send a DNS request carrying client information to a DNS scheduling device.
[0093] The client sends a DNS request to the scheduling device based on the user's business needs or the needs of related software.
[0094] S204: Receive the IPv6 address and the IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits the corresponding grayscale rule based on the client information.
[0095] S206: Access through the IPv6 address, and if access through the IPv6 address fails, access through the IPv4 address.
[0096] The received IPv6 address is used first to access the IPv6 server cluster. Users interact with the server through the client to perform corresponding services. However, if the access through IPv6 fails, the received IPv4 address is used to access the IPv4 server cluster. Here, IPv4 is used as a backup method to ensure the smooth execution of user services.
[0097] In one or more embodiments of this specification, in order to reduce the probability of domain name hijacking, many clients choose HTTP DNS to perform domain name resolution. HTTP DNS is different from traditional DNS resolution. Instead, it builds its own DNS server cluster based on HTTP protocol, which is distributed in multiple locations and multiple operators. When the client needs DNS resolution, it directly requests the corresponding server cluster through HTTP protocol to obtain the nearest address.
[0098] Figure 3 A schematic diagram of a client access process in an application scenario provided by one or more embodiments of this specification, in which an IPv6 server cluster (such as Figure 3As shown in , IPv6 server cluster A and IPv6 server cluster B are respectively established in different geographical locations, and corresponding mapping relationships are established. For example, based on the geographical distance, the IPv6 server cluster closest to the device is used as the IPv6 server cluster.
[0099] The client sends an HTTP DNS request, and the scheduling device calculates the grayscale rules. If the client hits the grayscale rules, the IPv6 address and IPv4 address are returned. When the client accesses, it first accesses the IPv6 server cluster with a higher priority through the IPv6 address. If the access fails, it downgrades to access other IPv6 server clusters with lower priorities. If the access still fails, it downgrades to access the corresponding IPv4 server cluster through the IPv4 address (for example Figure 3 As shown in the figure, IPv4 server cluster A, IPv4 server cluster B and IPv4 server cluster C are respectively established in different geographical locations. They actively downgrade after failure, thus ensuring stability to the greatest extent.
[0100] In one or more embodiments of the present specification, during the access process of the client, even if the above-mentioned downgraded access method is adopted, there is still a problem that a certain switching time is required. For some important or high-demand services, there are still risks.
[0101] Based on this, during the client access process, the corresponding server cluster is accessed through the IPv6 address and the IPv4 address at the same time, and the corresponding access results are obtained respectively (the access results are usually displayed in the form of pages, and the access results corresponding to the IPv6 address are referred to as the first page, and the access results corresponding to the IPv4 address are referred to as the second page). When the user accesses normally through the IPv6 address, the first page is displayed. If an access failure occurs, the display mode is immediately switched to display the second page. In this way, page switching can be achieved efficiently, and the user experience when switching access modes is guaranteed to the greatest extent.
[0102] Furthermore, in the page display process, a virtual page is generated in advance. The virtual page is not used to display the corresponding content, but is only used as a carrier, in which the first page and the second page are displayed at the same time, and the two are displayed overlappingly, and when the user accesses normally through IPv6, the first page is displayed in a conventional manner, and the second page is displayed in a transparent manner (transparency here refers to a fully transparent manner). In this way, the first page and the second page can both collect the relevant operations of the user in the virtual page and perform corresponding processing. If the IPv6 access fails, the display mode is switched, the transparency of the two is replaced, the first page is displayed in a transparent manner, and the second page is displayed in a conventional manner. For the user, due to the phenomenon of visual persistence, it is difficult for the user to find that the page has been switched, making the switching process smoother, further ensuring the user experience.
[0103] In addition, since both the first page and the second page collect relevant operations and perform corresponding business processing in their corresponding IPv6 server clusters and IPv4 server clusters, it is possible that the same business may be processed multiple times, resulting in failures in the business processing process. At this time, this problem can be solved through interaction between different server clusters. For example, when accessing normally through IPv6, the first page generates a real response, and the second page generates a virtual response. After the IPv4 server cluster receives the virtual response, it does not perform business processing, but communicates with the IPv6 server cluster. After the IPv6 server cluster performs business processing, it returns the corresponding results to the IPv4 server cluster, and then returns to the second page.
[0104] 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 4 to 7 shown.
[0105] Figure 4 A schematic diagram of a DNS-based IPv6 traffic diversion device on the DNS scheduling device side provided in one or more embodiments of this specification, the device comprising:
[0106] A first receiving module 402 receives a DNS request sent by a client;
[0107] The judgment module 404 judges whether the client hits the corresponding grayscale rule according to the client information carried in the DNS request;
[0108] The first allocation module 406 allocates an IPv6 address and an IPv4 address to the client if the judgment result of the judgment module is yes, so that the client can access through the IPv6 address, and if the client fails to access through the IPv6 address, access through the IPv4 address.
[0109] Optionally, the client information includes at least one of user information, location information, domain name information, and device information;
[0110] The determination module 404 determines, based on the user information, whether the user to which the client belongs is an internal user of a designated enterprise; or
[0111] When it is determined according to the positioning information that the location of the client belongs to a specified location range, determining whether the client hits a preset random probability; or
[0112] Determining, based on the domain name information, whether the domain name to be accessed by the client is a designated domain name; or
[0113] According to the device information, it is determined whether the device ID of the client is a preset designated device ID.
[0114] Optionally, it also includes:
[0115] The second allocation module 408 allocates an IPv4 address to the client if the judgment result of the judgment module is no, so that the client can access through the IPv4 address.
[0116] Optionally, it also includes:
[0117] A first grayscale rule adjustment module 412 determines first client information in the client information that does not match the grayscale rule;
[0118] If the difference between the first client information and the grayscale rule is lower than a preset threshold, the IPv6 address and the IPv4 address are still allocated to the client, and after the client successfully accesses through the IPv6 address, the hit range corresponding to the grayscale rule is dynamically adjusted so that the first client information can hit the dynamically adjusted grayscale rule.
[0119] Optionally, it also includes:
[0120] The second grayscale rule adjustment module 414 determines other clients that have hit the grayscale rule based on the historical records;
[0121] Determine the access result when the other client accesses through the IPv6 address allocated to it;
[0122] The access result is analyzed to determine the same second client information among multiple clients that failed to access, and the hit range corresponding to the grayscale rule is dynamically adjusted according to the second client information.
[0123] Optionally, the first receiving module 402 receives multiple DNS requests sent by multiple clients simultaneously and respectively;
[0124] The judgment module 404 judges, according to the client information carried in the multiple DNS requests, whether the multiple clients hit the corresponding grayscale rules;
[0125] The first allocation module 406 determines that the designated client information is the same in the corresponding client information of the multiple clients, and then allocates IPv6 addresses and IPv4 addresses to some of the multiple clients;
[0126] If some of the clients successfully access the site through the IPv6 address, the IPv6 address and the IPv4 address are allocated to the remaining clients with a delay.
[0127] Figure 5 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the client side provided in one or more embodiments of this specification, the device comprising:
[0128] A sending module 502 sends a DNS request carrying client information to a DNS scheduling device;
[0129] A second receiving module 504 receives an IPv6 address and an IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits a corresponding grayscale rule according to the client information;
[0130] The access module 506 performs access via the IPv6 address, and performs access via the IPv4 address when the access via the IPv6 address fails.
[0131] Optionally, the sending module 502 sends an HTTP DNS request carrying client information to a DNS scheduling device;
[0132] The access module 506 accesses the IPv6 server cluster to which the client belongs through the IPv6 address, and if access to the IPv6 server cluster fails, accesses other IPv6 server clusters through the IPv6 address, and the priority of the IPv6 server cluster is higher than that of the other IPv6 server clusters.
[0133] Optionally, the access module 506 accesses through the IPv6 address and the IPv4 address at the same time, and obtains a first page corresponding to the IPv6 address and a second page corresponding to the IPv4 address respectively;
[0134] Display the first page, and switch to displaying the second page when access through the IPv6 address fails.
[0135] Optionally, the access module 506 generates a corresponding virtual page;
[0136] Using the virtual page as a carrier, displaying the first page in the virtual page, and displaying the second page in a transparent manner at the same time;
[0137] In the event that access through the IPv6 address fails, the display mode is switched to display the second page in the virtual page and display the first page in a transparent manner at the same time.
[0138] Figure 6 A schematic diagram of a DNS-based IPv6 traffic diversion device on the DNS scheduling device side provided in one or more embodiments of this specification, wherein the device includes:
[0139] at least one processor; and,
[0140] a memory communicatively connected to the at least one processor; wherein,
[0141] 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:
[0142] Receive DNS requests sent by clients;
[0143] According to the client information carried in the DNS request, determine whether the client hits the corresponding grayscale rule;
[0144] If so, an IPv6 address and an IPv4 address are allocated to the client, so that the client can access the network through the IPv6 address, and in the case that the client fails to access the network through the IPv6 address, the client can access the network through the IPv4 address.
[0145] Figure 7 A schematic diagram of the structure of a DNS-based IPv6 traffic diversion device on the client side provided in one or more embodiments of this specification, the device includes:
[0146] at least one processor; and,
[0147] a memory communicatively connected to the at least one processor; wherein,
[0148] 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:
[0149] Send a DNS request carrying client information to the DNS scheduling device;
[0150] Receiving an IPv6 address and an IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits a corresponding grayscale rule according to the client information;
[0151] Access is performed through the IPv6 address, and if access through the IPv6 address fails, access is performed through the IPv4 address.
[0152] 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:
[0153] Receive DNS requests sent by clients;
[0154] According to the client information carried in the DNS request, determine whether the client hits the corresponding grayscale rule;
[0155] If so, an IPv6 address and an IPv4 address are allocated to the client, so that the client can access the network through the IPv6 address, and in the case that the client fails to access the network through the IPv6 address, the client can access the network through the IPv4 address.
[0156] 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:
[0157] Send a DNS request carrying client information to the DNS scheduling device;
[0158] Receiving an IPv6 address and an IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits a corresponding grayscale rule according to the client information;
[0159] Access is performed through the IPv6 address, and if access through the IPv6 address fails, access is performed through the IPv4 address.
[0160] 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.
[0161] 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.
[0162] 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.
[0163] 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.
[0164] 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.
[0165] 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.
[0166] 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 comprising 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.
[0167] 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. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0168] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0169] 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.
[0170] 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.
[0171] 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.
[0172] 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.
[0173] 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.
[0174] 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.
[0175] 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, comprising: Receive DNS requests sent by clients; According to the client information carried in the DNS request, determine whether the client hits the corresponding grayscale rule; If yes, allocate an IPv6 address and an IPv4 address to the client, so that the client can access the network through the IPv6 address, and if the client fails to access the network through the IPv6 address, access the network through the IPv4 address; If not, assigning an IPv4 address to the client so that the client can access the client through the IPv4 address; Before allocating an IPv4 address to the client so that the client can access the client through the IPv4 address, the method further includes: Determine first client information in the client information that does not match the grayscale rule; If the difference between the first client information and the grayscale rule is lower than a preset threshold, the IPv6 address and the IPv4 address are still allocated to the client, and after the client successfully accesses through the IPv6 address, the hit range corresponding to the grayscale rule is dynamically adjusted so that the first client information can hit the dynamically adjusted grayscale rule.
2. The method according to claim 1, wherein the client information includes at least one of user information, location information, domain name information, and device information; The determining, according to the client information carried in the DNS request, whether the client hits the corresponding grayscale rule specifically includes: Determining, based on the user information, whether the user to which the client belongs is an internal user of a designated enterprise; or When it is determined according to the positioning information that the location of the client belongs to a specified location range, determining whether the client hits a preset random probability; or Determining, based on the domain name information, whether the domain name to be accessed by the client is a designated domain name; or According to the device information, it is determined whether the device ID of the client is a preset designated device ID.
3. The method according to claim 1, before determining whether the client matches the corresponding grayscale rule, the method further comprises: Based on historical records, determine other clients that have hit the grayscale rule; Determine the access result when the other client accesses through the IPv6 address allocated to it; The access result is analyzed to determine the same second client information among multiple clients that failed to access, and the hit range corresponding to the grayscale rule is dynamically adjusted according to the second client information.
4. The method according to claim 1, wherein receiving a DNS request sent by a client comprises: Receive multiple DNS requests sent by multiple clients simultaneously; The determining, according to the client information carried in the DNS request, whether the client hits the corresponding grayscale rule specifically includes: According to the client information carried in the multiple DNS requests, determine whether the multiple clients hit the corresponding grayscale rules respectively; The allocating an IPv6 address and an IPv4 address to the client specifically includes: Determining that the designated client information is the same among the corresponding client information of the multiple clients, allocating IPv6 addresses and IPv4 addresses to some of the multiple clients; If some of the clients successfully access the site through the IPv6 address, the IPv6 address and the IPv4 address are allocated to the remaining clients with a delay.
5. A DNS-based IPv6 traffic diversion method, comprising: Send a DNS request carrying client information to the DNS scheduling device; Receiving an IPv6 address and an IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits a corresponding grayscale rule according to the client information; Accessing via the IPv6 address, and if access via the IPv6 address fails, accessing via the IPv4 address; Among them, if the result of the judgment is no, the DNS scheduling device assigns an IPv4 address to the client so that the client can access it through the IPv4 address; before assigning an IPv4 address to the client so that the client can access it through the IPv4 address, the DNS scheduling device determines the first client information in the client information that does not hit the grayscale rule. If the difference between the first client information and the grayscale rule is lower than a preset threshold, the IPv6 address and the IPv4 address are still assigned to the client, and after the client successfully accesses through the IPv6 address, the hit range corresponding to the grayscale rule is dynamically adjusted so that the first client information can hit the dynamically adjusted grayscale rule.
6. The method according to claim 5, wherein sending a DNS request carrying client information to a DNS scheduling device specifically comprises: Send an HTTP DNS request carrying client information to the DNS scheduling device; The accessing through the IPv6 address specifically includes: The IPv6 server cluster to which the client belongs is accessed through the IPv6 address, and in case access to the IPv6 server cluster fails, other IPv6 server clusters are accessed through the IPv6 address, wherein the priority of the IPv6 server cluster is higher than that of the other IPv6 server clusters.
7. The method according to claim 5, wherein the accessing through the IPv6 address and, if the accessing through the IPv6 address fails, accessing through the IPv4 address, specifically comprises: Accessing through the IPv6 address and the IPv4 address simultaneously, respectively obtaining a first page corresponding to the IPv6 address and a second page corresponding to the IPv4 address; Display the first page, and switch to displaying the second page when access through the IPv6 address fails.
8. The method according to claim 7, wherein displaying the first page and switching to displaying the second page when access through the IPv6 address fails, specifically comprises: Generate the corresponding virtual page; Using the virtual page as a carrier, displaying the first page in the virtual page, and displaying the second page in a transparent manner at the same time; In the event that access through the IPv6 address fails, the display mode is switched to display the second page in the virtual page and display the first page in a transparent manner at the same time.
9. A DNS-based IPv6 traffic diversion device, comprising: The first receiving module receives the DNS request sent by the client; A judgment module, judging whether the client hits the corresponding grayscale rule according to the client information carried in the DNS request; A first allocation module allocates an IPv6 address and an IPv4 address to the client if the judgment result of the judgment module is yes, so that the client can access the client through the IPv6 address, and when the client fails to access the client through the IPv6 address, the client can access the client through the IPv4 address; Also includes: A second allocation module allocates an IPv4 address to the client if the judgment result of the judgment module is no, so that the client can access the client through the IPv4 address; Also includes: A first grayscale rule adjustment module determines first client information that does not match the grayscale rule in the client information; If the difference between the first client information and the grayscale rule is lower than a preset threshold, the IPv6 address and the IPv4 address are still allocated to the client, and after the client successfully accesses through the IPv6 address, the hit range corresponding to the grayscale rule is dynamically adjusted so that the first client information can hit the dynamically adjusted grayscale rule.
10. The device according to claim 9, wherein the client information includes at least one of user information, location information, domain name information, and device information; The judging module judges, based on the user information, whether the user to which the client belongs is an internal user of a designated enterprise; or When it is determined according to the positioning information that the location of the client belongs to a specified location range, determining whether the client hits a preset random probability; or Determining, based on the domain name information, whether the domain name to be accessed by the client is a designated domain name; or According to the device information, it is determined whether the device ID of the client is a preset designated device ID.
11. The apparatus of claim 9, further comprising: The second grayscale rule adjustment module determines other clients that have hit the grayscale rule based on historical records; Determine the access result when the other client accesses through the IPv6 address allocated to it; The access result is analyzed to determine the same second client information among multiple clients that failed to access, and the hit range corresponding to the grayscale rule is dynamically adjusted according to the second client information.
12. The device according to claim 9, wherein the first receiving module receives a plurality of DNS requests respectively sent by a plurality of clients simultaneously; The judgment module judges whether the multiple clients hit the corresponding grayscale rules according to the client information carried in the multiple DNS requests; The first allocation module determines that the designated client information is the same in the corresponding client information of the multiple clients, and then allocates IPv6 addresses and IPv4 addresses to some of the multiple clients; If some of the clients successfully access the site through the IPv6 address, the IPv6 address and the IPv4 address are allocated to the remaining clients with a delay.
13. A DNS-based IPv6 traffic diversion device, comprising: A sending module sends a DNS request carrying client information to a DNS scheduling device; A second receiving module receives an IPv6 address and an IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits a corresponding grayscale rule based on the client information; An access module, accessing through the IPv6 address, and accessing through the IPv4 address if access through the IPv6 address fails; Among them, if the result of the judgment is no, the DNS scheduling device assigns an IPv4 address to the client so that the client can access it through the IPv4 address; before assigning an IPv4 address to the client so that the client can access it through the IPv4 address, the DNS scheduling device determines the first client information in the client information that does not hit the grayscale rule. If the difference between the first client information and the grayscale rule is lower than a preset threshold, the IPv6 address and the IPv4 address are still assigned to the client, and after the client successfully accesses through the IPv6 address, the hit range corresponding to the grayscale rule is dynamically adjusted so that the first client information can hit the dynamically adjusted grayscale rule.
14. The apparatus according to claim 13, wherein the sending module sends an HTTP DNS request carrying client information to the DNS scheduling device; The access module accesses the IPv6 server cluster to which the client belongs through the IPv6 address, and in the event of failure to access the IPv6 server cluster, accesses other IPv6 server clusters through the IPv6 address, wherein the priority of the IPv6 server cluster is higher than that of the other IPv6 server clusters.
15. The device according to claim 13, wherein the access module simultaneously accesses through the IPv6 address and the IPv4 address to obtain a first page corresponding to the IPv6 address and a second page corresponding to the IPv4 address respectively; Display the first page, and switch to displaying the second page when access through the IPv6 address fails.
16. The apparatus of claim 15, wherein the access module generates a corresponding virtual page; Using the virtual page as a carrier, displaying the first page in the virtual page, and displaying the second page in a transparent manner at the same time; In the event that access through the IPv6 address fails, the display mode is switched to display the second page in the virtual page and display the first page in a transparent manner at the same time.
17. A DNS-based IPv6 traffic diversion 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: Receive DNS requests sent by clients; According to the client information carried in the DNS request, determine whether the client hits the corresponding grayscale rule; If yes, allocate an IPv6 address and an IPv4 address to the client, so that the client can access the network through the IPv6 address, and if the client fails to access the network through the IPv6 address, access the network through the IPv4 address; If not, assigning an IPv4 address to the client so that the client can access the client through the IPv4 address; The IPv4 address is assigned to the client so that before the client accesses through the IPv4 address, the first client information that does not hit the grayscale rule is determined in the client information. If the difference between the first client information and the grayscale rule is lower than a preset threshold, the IPv6 address and the IPv4 address are still assigned to the client, and after the client successfully accesses through the IPv6 address, the hit range corresponding to the grayscale rule is dynamically adjusted so that the first client information can hit the dynamically adjusted grayscale rule.
18. A DNS-based IPv6 traffic diversion 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: Send a DNS request carrying client information to the DNS scheduling device; Receiving an IPv6 address and an IPv4 address returned by the DNS scheduling device, where the IPv6 address and the IPv4 address are assigned when the DNS scheduling device determines that the client hits a corresponding grayscale rule according to the client information; Accessing via the IPv6 address, and if access via the IPv6 address fails, accessing via the IPv4 address; Among them, if the result of the judgment is no, the DNS scheduling device assigns an IPv4 address to the client so that the client can access it through the IPv4 address; before assigning an IPv4 address to the client so that the client can access it through the IPv4 address, the DNS scheduling device determines the first client information in the client information that does not hit the grayscale rule. If the difference between the first client information and the grayscale rule is lower than a preset threshold, the IPv6 address and the IPv4 address are still assigned to the client, and after the client successfully accesses through the IPv6 address, the hit range corresponding to the grayscale rule is dynamically adjusted so that the first client information can hit the dynamically adjusted grayscale rule.
