DNS switching method, system and device for multi-dimensional network detection and storage medium

By employing multi-dimensional network detection and tiered DNS switching methods, the problem of difficult network fault diagnosis was solved, achieving automated and intelligent DNS repair and improving the availability and stability of the network system.

CN121664772APending Publication Date: 2026-03-13CTRIP COMP TECH SHANGHAI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies face difficulties in troubleshooting network faults, rely on manual processes for repair, resulting in low efficiency, lack intelligent recovery strategies, and are unable to achieve fast and accurate DNS switching and system repair.

Method used

Through multi-dimensional network detection, network environment information is automatically obtained, enhanced Ping detection and TCP/HTTP connectivity detection are performed, network quality is evaluated by weight coefficients, DNS servers are intelligently switched according to tiered strategies, and repair logs are recorded to optimize the repair process.

Benefits of technology

It enables automatic, intelligent, and tiered DNS switching and system repair, significantly reducing technical barriers and labor costs, improving network availability and stability, and quickly restoring business continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121664772A_ABST
    Figure CN121664772A_ABST
Patent Text Reader

Abstract

The invention provides a DNS switching method, system and device for multi-dimensional network detection and a storage medium. The method comprises the following steps: acquiring a current network exit IP, identifying an operator and reading current DNS configuration; performing enhanced Ping detection and TCP / HTTP connectivity detection on a preset domain name list, and collecting packet loss rate, average delay, HTTP response status code and response time data; according to the data collected by the comprehensive detection module, threshold comparison, weighted calculation and short-circuit rule judgment are executed to evaluate the quality of each domain name network, and global analysis is carried out to determine whether DNS switching is triggered or not and determine a switching strategy; when the execution repair module triggers switching, the DNS configuration of the system network adapter is automatically modified, DNS cache refreshing is executed, and verification detection is triggered; and persistently recording a DNS switching state, an operation log and a network detection report. According to the invention, when analysis or connectivity faults occur in the network, problems can be diagnosed automatically and intelligently in an echelon-based manner, and DNS switching and system repairing are executed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network management and processing, and more specifically, to a DNS switching method, system, device, and storage medium for multi-dimensional network detection. Background Technology

[0002] With the increasing informatization of enterprises and the widespread adoption of cloud computing and mobile internet, networks have become the cornerstone of business operations. Especially for scenarios such as online travel agencies (OTAs), e-commerce, online finance, software development, and remote work, stable and reliable network connections are crucial to ensuring the continuous availability of business systems (such as order processing, API calls, resource loading, and user authentication). However, in real-world network environments, end users or client devices often face the following challenges:

[0003] Frequent DNS resolution failures: DNS is the core service that translates domain names into IP addresses. DNS servers may fail due to their own malfunctions, network attacks (such as DNS hijacking or poisoning), ISP link jitter, or regional network congestion. When a DNS server is slow to respond or cannot respond at all, users will be unable to access any services that rely on domain name resolution.

[0004] Network quality issues are becoming increasingly complex: Network connectivity problems are not limited to DNS. Physical link interruptions, router misconfigurations, inappropriate firewall policies, abnormal content delivery network nodes, and target server overload can all lead to increased packet loss, higher latency, or TCP connection failures. While these problems may appear similar to DNS failures (inability to access websites), their root causes are different, making fault localization difficult.

[0005] Limitations of existing solutions:

[0006] Manual troubleshooting: When network problems occur, users typically rely on personal experience to manually execute a series of diagnostic commands (such as ping, nslookup, and tracert). This requires users to have some network knowledge. Afterward, users need to manually locate and verify alternative public DNS servers (such as 114.114.114.114, Google DNS 8.8.8.8) and access the operating system's network settings interface (for Windows systems, this may involve the Control Panel or the netsh command-line tool) to make complex configuration modifications. The entire process is inefficient and lacks timeliness, especially in production environments where rapid restoration of business continuity is crucial; the business interruption caused by manual intervention is unacceptable.

[0007] High technical barrier: Ordinary users, and even many IT operations personnel without network expertise, find it difficult to accurately distinguish between DNS resolution failures, TCP connection timeouts, and HTTP application layer errors. Incorrectly modifying network configurations (such as DNS, IP addresses, and gateways) may worsen existing problems or introduce new connectivity issues.

[0008] Lack of intelligent recovery strategies: Simple failover scripts may simply change the DNS from one address to another. If the replaced DNS server also has problems, or if the root cause of the problem is not in the DNS (such as a physical link failure), the script will get stuck in an invalid switching loop, failing to achieve a true "repair," and may even cause system instability due to frequent configuration changes.

[0009] Lack of state awareness and persistence: Traditional repair tools are usually "stateless". Each execution starts from the initial strategy and cannot remember the previous switching behavior and results, thus failing to implement a step-by-step, tiered progressive repair strategy.

[0010] In view of this, the present invention provides a solution that can simulate the diagnostic thinking of a professional network administrator, and achieve accurate fault location, intelligent decision-making and tiered automatic repair. Summary of the Invention

[0011] In view of the problems in the prior art, the purpose of this invention is to provide a DNS switching method, system, device and storage medium for multi-dimensional network detection, which overcomes the difficulties of the prior art and can automatically, intelligently and in stages diagnose problems and perform DNS switching and system repair when network resolution or connectivity failures occur.

[0012] Embodiments of the present invention provide a DNS switching method for multi-dimensional network detection, comprising the following steps:

[0013] S110. Obtain the exit IP address of the current network environment, identify the current network operator according to the IP address database, and read the local network configuration to obtain the list of currently used DNS server addresses;

[0014] S120, Multi-dimensional Comprehensive Detection: By loading a preset list of key business domain names, enhanced Ping detection and TCP / HTTP connectivity detection are performed in parallel or sequentially for each domain name in the list. The enhanced Ping detection includes sending N ICMP packets to the target domain name and calculating the packet loss rate based on the number of packets sent and received, and calculating the average latency based on the round-trip time of each packet. The TCP / HTTP connectivity detection includes attempting to establish a TCP connection with the target domain name or sending an HTTP / HTTPS request, and recording whether the connection is successful or not or the HTTP response status code.

[0015] S130. Perform network quality assessment on each domain name. The network quality assessment includes: comparing packet loss rate, average latency, and HTTP response status with preset threshold ranges to obtain their respective level values; performing weighted calculation on the level values ​​according to preset weight coefficients to obtain the comprehensive score and network quality level of the domain name, and determining the DNS tier strategy.

[0016] S140. Identify the currently active network adapter; according to the DNS tier policy, call the underlying operating system command to modify the DNS server address of the active network adapter to the preset DNS address of the corresponding tier;

[0017] S150. After the DNS address is modified, the DNS cache refresh command is automatically executed. After the switch and cache refresh are completed, the multi-dimensional comprehensive detection steps described in step S120 are immediately re-executed to verify the network repair effect, and the details of this operation are recorded in the log file.

[0018] Preferably, in step S120, the number of ICMP packets N sent in the enhanced Ping detection is greater than or equal to 6; the TCP / HTTP connectivity detection prioritizes the use of the HTTPS protocol and falls back to the HTTP protocol when the HTTPS connection fails.

[0019] Preferably, in step S130, comparing the packet loss rate, average latency, and HTTP response status with preset threshold ranges to obtain their respective corresponding level values ​​specifically includes:

[0020] Set an excellent packet loss rate threshold and a good packet loss rate threshold; if the packet loss rate is less than or equal to the excellent packet loss rate threshold, the packet loss rate level is level one; if the packet loss rate is greater than the excellent packet loss rate threshold but less than or equal to the good packet loss rate threshold, the packet loss rate level is level two; if the packet loss rate is greater than the good packet loss rate threshold, the packet loss rate level is level three.

[0021] Set an excellent latency threshold and a good latency threshold; if the average latency is less than or equal to the excellent latency threshold, the latency level is Level 1; if the average latency is greater than the excellent latency threshold but less than or equal to the good latency threshold, the latency level is Level 2; if the average latency is greater than the good latency threshold, the latency level is Level 3.

[0022] Set the range of HTTP success status codes; if the HTTP request is successful and the response status code is within the range of success status codes, the HTTP response level is Level 1; if the HTTP request is successful but the response status code is within the preset warning status code range, the HTTP response level is Level 2; if the HTTP request fails or the response status code is within the preset error status code range, the HTTP response level is Level 3.

[0023] Preferably, the weighted calculation adopts the formula: Comprehensive score = Packet loss rate weight coefficient × Packet loss rate level value + Delay weight coefficient × Delay level value + HTTP response weight coefficient × HTTP response level value; wherein, the sum of the packet loss rate weight coefficient, the delay weight coefficient and the HTTP response weight coefficient is 1, and the packet loss rate weight coefficient is greater than the delay weight coefficient and the HTTP response weight coefficient.

[0024] Preferably, the step of determining the DNS tiering strategy in step S130 includes:

[0025] The network quality level initially determined is corrected by applying at least one short-circuit rule. The short-circuit rule includes forcibly determining the network quality level when an HTTP request fails completely, and forcibly determining the network quality level when the packet loss rate is higher than a first short-circuit threshold and the average latency is higher than a second short-circuit threshold.

[0026] Count the number of domains at the fault level among all domains and the number of domains at the fault level in the preset set of key domains, and calculate the global healthy domain ratio;

[0027] If there is at least one fault-level domain in the set of critical domains, or the proportion of global healthy domains is lower than the preset global health rate threshold, or the HTTP response status code for a specific business API is abnormal, the DNS switching process will be triggered.

[0028] Read the local persistent log file and determine the DNS queuing policy to be used based on the status flags recorded therein.

[0029] Preferably, in step S130, the DNS tiering strategy includes at least a first tier and a second tier, where the first tier corresponds to the set of DNS server addresses to be used preferentially, and the second tier corresponds to the set of DNS server addresses to be used alternatively; the local persistent log file is used to record the tier identifier used during the last DNS switch; if there is no marker in the log or the marker is in the initial state, the first tier is selected; if the marker in the log indicates that the first tier has failed, the second tier is selected.

[0030] Preferably, in step S130, determining the network quality level based on the comprehensive score and a preset scoring threshold includes: setting a health score threshold and a suspicious score threshold; if the comprehensive score is less than the health score threshold, the network quality level is initially determined to be healthy; if the comprehensive score is greater than or equal to the health score threshold and less than the suspicious score threshold, the network quality level is initially determined to be suspicious; if the comprehensive score is greater than or equal to the suspicious score threshold, the network quality level is initially determined to be faulty.

[0031] Embodiments of the present invention also provide a DNS switching system for multi-dimensional network detection, used to implement the above-described DNS switching method for multi-dimensional network detection, wherein the DNS switching system for multi-dimensional network detection includes:

[0032] The network environment module obtains the current network environment's exit IP address, identifies the current network operator based on the IP address database, and reads the local network configuration to obtain the list of currently used DNS server addresses.

[0033] The comprehensive detection module performs multi-dimensional comprehensive detection. By loading a preset list of key business domain names, it performs enhanced Ping detection and TCP / HTTP connectivity detection in parallel or sequentially for each domain name in the list. The enhanced Ping detection includes sending N ICMP packets to the target domain name, calculating the packet loss rate based on the number of packets sent and received, and calculating the average latency based on the round-trip time of each packet. The TCP / HTTP connectivity detection includes attempting to establish a TCP connection with the target domain name or sending an HTTP / HTTPS request, and recording whether the connection is successful or not or the HTTP response status code.

[0034] The decision logic module performs network quality assessment on each domain name. The network quality assessment includes: comparing packet loss rate, average latency, and HTTP response status with preset threshold ranges to obtain their respective level values; performing weighted calculations on the level values ​​according to preset weight coefficients to obtain the comprehensive score and network quality level of the domain name, and determining the DNS tier strategy.

[0035] The repair module is executed to identify the currently active network adapter; according to the DNS tier policy, the underlying operating system commands are invoked to modify the DNS server address of the active network adapter to the preset DNS address of the corresponding tier;

[0036] After the DNS address is modified, the log management module automatically executes the DNS cache refresh command. After the switch and cache refresh are completed, the multi-dimensional comprehensive detection steps described in step S120 are immediately re-executed to verify the network repair effect, and the details of this operation are recorded in the log file.

[0037] Embodiments of the present invention also provide a DNS switching device for multi-dimensional network detection, comprising:

[0038] processor;

[0039] A memory in which executable instructions of the processor are stored;

[0040] The processor is configured to perform the steps of the DNS switching method for multi-dimensional network detection described above by executing the executable instructions.

[0041] Embodiments of the present invention also provide a computer-readable storage medium for storing a program, which, when executed, implements the steps of the DNS switching method for multi-dimensional network detection described above.

[0042] The purpose of this invention is to provide a DNS switching method, system, device, and storage medium for multi-dimensional network detection, which can automatically, intelligently, and hierarchically diagnose problems and perform DNS switching and system repair when network resolution or connectivity failures occur. Attached Figure Description

[0043] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.

[0044] Figure 1 This is a flowchart of the DNS switching method for multi-dimensional network detection according to the present invention.

[0045] Figure 2 This is a system architecture diagram of the DNS switching system for multi-dimensional network detection of the present invention.

[0046] Figure 3 This is a schematic diagram of the structure of the DNS switching device for multi-dimensional network detection according to the present invention.

[0047] Figure 4 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation

[0048] The following specific examples illustrate the implementation methods of this application. Those skilled in the art can easily understand the other advantages and effects of this application from the content disclosed herein. This application can also be implemented or applied through other different specific embodiments, and various details in this application can be modified or changed according to different viewpoints and application systems without departing from the spirit of this application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.

[0049] The embodiments of this application will now be described in detail with reference to the accompanying drawings, so that those skilled in the art can easily implement the application. This application may be embodied in many different forms and is not limited to the embodiments described herein.

[0050] In this application, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics represented in connection with that embodiment or example, which are included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics represented may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate different embodiments or examples represented in this application, as well as features of different embodiments or examples.

[0051] Furthermore, the terms "first" and "second" are used for illustrative purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the representation of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0052] For the purpose of clearly describing this application, devices that are not relevant to the description are omitted, and the same or similar components throughout the specification are given the same reference numerals.

[0053] Throughout this specification, when it is said that a device is "connected" to another device, this includes not only "direct connection" but also "indirect connection" by placing other components in between. Furthermore, when it is said that a device "comprises" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather implies that other constituent elements may be included.

[0054] When we say that a device is "above" another device, this can mean that it is directly above the other device, or it can mean that other devices are present in between. Conversely, when we say that a device is "directly" "above" another device, there are no other devices present in between.

[0055] Although the terms first, second, etc., are used in some instances herein to refer to various elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, first interface and second interface, etc., are used. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.

[0056] The technical terms used herein are for reference only to specific embodiments and are not intended to limit the scope of this application. The singular form used herein includes the plural form unless the statement explicitly indicates otherwise. The word "comprising" as used in the specification means to specify a particular characteristic, region, integer, step, operation, element, and / or component, and does not exclude the presence or addition of other characteristics, regions, integers, steps, operations, elements, and / or components.

[0057] Although not explicitly defined, all terms, including technical and scientific terms used herein, shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. Terms defined in commonly used dictionaries shall be further interpreted as having a meaning consistent with the relevant technical literature and the content of this present application, and shall not be over-interpreted as having an ideal or overly formulaic meaning unless otherwise defined.

[0058] Figure 1 This is a flowchart of the DNS switching method for multi-dimensional network detection according to the present invention. Figure 1 As shown, the DNS switching method for multi-dimensional network detection of the present invention includes the following steps:

[0059] S110. Obtain the current network egress IP, identify the ISP, and read the current DNS configuration. Obtain the egress IP address of the current network environment, identify the current network ISP based on the IP address database, and read the local network configuration to obtain the list of currently used DNS server addresses;

[0060] S120. Perform enhanced Ping detection and TCP / HTTP connectivity detection on a preset list of domain names, and collect data on packet loss rate, average latency, HTTP response status codes, and response time. Multi-dimensional comprehensive detection is performed by loading a preset list of key business domain names and executing enhanced Ping detection and TCP / HTTP connectivity detection in parallel or sequentially for each domain name in the list. Enhanced Ping detection includes sending N ICMP packets to the target domain name and calculating the packet loss rate based on the number of packets sent and received, and calculating the average latency based on the round-trip time of each packet. TCP / HTTP connectivity detection includes attempting to establish a TCP connection with the target domain name or sending HTTP / HTTPS requests, and recording whether the connection is successful or not or the HTTP response status code.

[0061] S130. Based on the data collected by the comprehensive detection module, perform threshold comparison, weighted calculation, and short-circuit rule judgment to evaluate the network quality of each domain name, and conduct a global analysis to determine whether to trigger DNS switching and to determine the switching strategy. For each domain name, a network quality assessment is performed, including comparing packet loss rate, average latency, and HTTP response status with preset threshold ranges to obtain their respective level values; weighting the level values ​​according to preset weighting coefficients to obtain the comprehensive score and network quality level of the domain name, and determining the DNS tier strategy.

[0062] S140. Upon triggering a switchover, automatically modify the DNS configuration of the system network adapter, perform a DNS cache refresh, and trigger a verification check. Identify the currently active network adapter; based on the DNS tier policy, call underlying operating system commands to modify the DNS server address of the active network adapter to the preset DNS address of the corresponding tier.

[0063] S150. Persistently record the DNS switch status, operation log, and network test report. After the DNS address is modified, automatically execute the DNS cache refresh command; after the switch and cache refresh are completed, immediately re-execute the multi-dimensional comprehensive test steps in step S120 to verify the network repair effect, and record the details of this operation to the log file.

[0064] The primary objective of this invention is to overcome the shortcomings of existing technologies, such as difficulties in network fault diagnosis, reliance on manual repair processes, low efficiency, and limited strategies. It provides an intelligent DNS automatic switching and network repair method and system based on multi-dimensional network detection. This invention aims to achieve rapid self-healing of network connectivity problems through automated comprehensive detection, intelligent decision-making, and automated repair execution, significantly reducing the technical threshold and labor costs of network operation and maintenance, and improving the network availability and stability of business systems.

[0065] In a preferred embodiment, in step S120, during enhanced Ping detection, the number of ICMP packets N sent is greater than or equal to 6; TCP / HTTP connectivity detection preferentially uses the HTTPS protocol, and falls back to the HTTP protocol when the HTTPS connection fails, but is not limited to this.

[0066] In a preferred embodiment, step S130 compares the packet loss rate, average latency, and HTTP response status with preset threshold ranges to obtain their respective level values, specifically including:

[0067] Set an excellent packet loss rate threshold and a good packet loss rate threshold; if the packet loss rate is less than or equal to the excellent packet loss rate threshold, the packet loss rate level is level one; if the packet loss rate is greater than the excellent packet loss rate threshold but less than or equal to the good packet loss rate threshold, the packet loss rate level is level two; if the packet loss rate is greater than the good packet loss rate threshold, the packet loss rate level is level three.

[0068] Set an excellent latency threshold and a good latency threshold; if the average latency is less than or equal to the excellent latency threshold, the latency level is Level 1; if the average latency is greater than the excellent latency threshold but less than or equal to the good latency threshold, the latency level is Level 2; if the average latency is greater than the good latency threshold, the latency level is Level 3.

[0069] Set the range of HTTP success status codes; if the HTTP request is successful and the response status code is within the success status code range, the HTTP response level is Level 1; if the HTTP request is successful but the response status code is within the preset warning status code range, the HTTP response level is Level 2; if the HTTP request fails or the response status code is within the preset error status code range, the HTTP response level is Level 3, but this is not the only limit.

[0070] In a preferred embodiment, the weighted calculation adopts the formula: Comprehensive score = Packet loss rate weight coefficient × Packet loss rate level value + Delay weight coefficient × Delay level value + HTTP response weight coefficient × HTTP response level value; wherein, the sum of the packet loss rate weight coefficient, the delay weight coefficient and the HTTP response weight coefficient is 1, and the packet loss rate weight coefficient is greater than the delay weight coefficient and the HTTP response weight coefficient, but is not limited thereto.

[0071] In a preferred embodiment, the step of determining the DNS tiering policy in step S130 includes:

[0072] At least one short-circuit rule is applied to correct the initial network quality level. The short-circuit rule includes forcibly classifying the network as faulty when an HTTP request fails completely, and forcibly classifying the network as faulty when the packet loss rate is higher than the first short-circuit threshold and the average latency is higher than the second short-circuit threshold.

[0073] Count the number of domains at the fault level among all domains and the number of domains at the fault level in the preset set of key domains, and calculate the global healthy domain ratio;

[0074] If there is at least one fault-level domain in the set of critical domains, or the proportion of global healthy domains is lower than the preset global health rate threshold, or the HTTP response status code for a specific business API is abnormal, the DNS switching process will be triggered.

[0075] Read the local persistent log file and determine the DNS queuing policy to be used based on the status flags recorded therein, but do not limit yourself to this policy.

[0076] In a preferred embodiment, in step S130, the DNS tiering strategy includes at least a first tier and a second tier. The first tier corresponds to the set of DNS server addresses that are preferred to be used, and the second tier corresponds to the set of DNS server addresses that are alternatives to be used. The local persistent log file is used to record the tier identifier used during the last DNS switch. If there is no marker in the log or the marker is in the initial state, the first tier is selected. If the marker in the log indicates that the first tier has failed to be used, the second tier is selected, but this is not a limitation.

[0077] In a preferred embodiment, step S130, determining the network quality level based on the comprehensive score and a preset scoring threshold, includes: setting a health score threshold and a suspicious score threshold; if the comprehensive score is less than the health score threshold, the network quality level is initially determined to be healthy; if the comprehensive score is greater than or equal to the health score threshold and less than the suspicious score threshold, the network quality level is initially determined to be suspicious; if the comprehensive score is greater than or equal to the suspicious score threshold, the network quality level is initially determined to be faulty, but this is not a limitation.

[0078] This invention is achieved through a closed loop of four main steps: environmental perception, comprehensive detection, intelligent decision-making, automatic repair, and verification.

[0079] Step 1: Network Environment Awareness. After system startup, the system first obtains the public IP address of the current network environment by calling a public IP lookup interface or accessing a specific service. Using this IP address, combined with a pre-configured or online IP address geolocation database, the system identifies the ISP of the current network connection, such as China Telecom, China Unicom, and China Mobile. Simultaneously, the system reads the network configuration interface provided by the operating system (such as through the management API in Windows or by parsing the output of the ipconfig / all command) to obtain a list of DNS server addresses used by all active network adapters (such as wired and wireless network cards) on the current computer. This step provides context for subsequent decisions; for example, it can recommend different preferred DNS servers based on different ISPs.

[0080] Step Two: Multi-dimensional Comprehensive Detection. This is the key technical aspect of this invention. The system loads a pre-configured list of critical business domain names, which typically includes core business domain names relied upon by the enterprise or user, account authentication domain names, CDN resource domain names, and important API gateway domain names, etc. For each domain name in the list, the system performs two types of detection concurrently or sequentially:

[0081] Enhanced Ping Detection: Unlike traditional single-ping, this invention sends a set (e.g., 10) ICMP echo request packets to the target domain. By statistically analyzing the number of packets sent, received, and lost, the packet loss rate is accurately calculated. Simultaneously, the round-trip time (RTT) of each successful reply packet is recorded, and the average delay is calculated. Increasing the number of packets effectively improves the statistical stability of the detection results and avoids misjudgments caused by single network fluctuations.

[0082] TCP / HTTP Connectivity Detection: Because some network environments or firewall policies may disable the ICMP protocol, Ping tests alone may not reflect true business connectivity. Therefore, this invention adds TCP layer or application layer detection. The system attempts to establish a TCP connection with the target domain's standard HTTP (port 80) or HTTPS (port 443) service. Furthermore, it can simulate browser behavior by sending a simple HTTP GET request (preferably HTTPS) and check the returned HTTP status code (e.g., 200 OK for success, 500 for an internal server error) and the entire request-response time. This detection directly verifies whether the business port is accessible and whether the service is responding normally.

[0083] Step 3: Intelligent Decision-Making and Status Labeling. This step embodies the intelligence of this invention, transforming raw detection data into actionable decisions. First, the detection results for each domain are quantitatively evaluated: the calculated packet loss rate and average latency are compared with preset threshold ranges. For example, a packet loss rate ≤2% is "Excellent," >2% and ≤8% is "Good," and >8% is "Dangerous," and these are mapped to numerical levels (e.g., 0, 1, 2). Similarly, HTTP response status is also graded (e.g., 2xx is 0, 3xx / 4xx is 1, 5xx or failure is 2). Then, a weighted calculation formula (e.g., comprehensive score = 0.4 * packet loss rate level + 0.3 * latency level + 0.3 * HTTP level) is used to calculate the comprehensive network quality score for the domain. Based on the score's range (e.g., <0.5 is "Healthy," 0.5–1.2 is "Suspicious," and ≥1.2 is "Faulty"), its status is initially determined. In addition, a "short-circuit rule" is introduced to handle extreme cases: for example, when an HTTP request fails completely (timeout or inability to connect), it is directly judged as a "fault" regardless of the score; or when a packet loss rate of extremely high (>15%) and a latency of extremely high (>200ms) occur simultaneously, it is also directly judged as a "fault", which improves the ability to identify serious problems.

[0084] After evaluating all individual domains, a global assessment is performed. The system counts the total number of domains in a "faulty" state, paying particular attention to whether a predefined set of "critical domains" (such as core business entry points) are faulty. Simultaneously, the proportion of "healthy" domains out of the total number of domains detected (global health rate) is calculated. The triggering conditions for DNS switching are designed as a logical "OR" relationship, triggering the switch if any one of the following conditions is met: a) at least one critical domain is determined to be faulty; b) the global health rate is lower than a preset threshold (e.g., 70%); c) an HTTP status code for a specific critical API (e.g., the ebooking API) is abnormal (not 200). This multi-condition triggering mechanism ensures the sensitivity and comprehensiveness of problem detection.

[0085] Finally, to construct an effective retry mechanism and avoid infinitely looping between invalid DNS servers, this invention introduces a log-based "tiered DNS policy" and state persistence. The system maintains a local log file (e.g., dns_switch.log) that records the currently active DNS tier markers. Typically, two tiers are preset: Tier 1 (preferred option, such as ISP-recommended DNS or a recognized stable public DNS) and Tier 2 (alternative option). During decision-making, the system reads this log. If the log shows "Initial State" or "Unmarked," the system attempts to switch to Tier 1; if the log is marked "Tier 1 Tried," the system switches to Tier 2. This achieves a hierarchical policy.

[0086] Step 4: Automatic DNS Switching and Repair by Tier. Once the decision-making module determines that a DNS switch is necessary and has obtained the necessary user or policy authorization (usually administrator privileges), the execution module begins its work. It first automatically identifies the currently active network adapter (e.g., "Ethernet" or "Wi-Fi"). Then, based on the DNS tier selected by the decision-making module, it obtains one or more corresponding DNS server IP addresses. Next, it programmatically modifies the DNS server settings of the specified network adapter by calling low-level network configuration commands provided by the operating system (in Windows, for example, using the command `netsh interface ip set dns "Ethernet" static 1.2.4.8"`). After modification, it immediately executes a DNS cache refresh command (e.g., `ipconfig / flushdns`) to forcibly clear any historical erroneous resolution records that the operating system and applications may have cached, ensuring that the new DNS configuration takes effect immediately. At this point, the repair process is complete.

[0087] To create a closed loop and verify the repair effect, the system automatically and immediately re-executes the second step of "multi-dimensional comprehensive detection" after the switch is completed. Comparing the new detection results with the results before the switch allows for a direct assessment of whether the DNS switch effectively resolved the network problem (e.g., whether the packet loss rate has decreased to 0%, and whether the HTTP status of critical domains has recovered to 200). Regardless of success or failure, all key information from this complete detection, decision-making, execution, and verification process, including timestamps, egress IPs, detection details, decision basis, executed switch commands, and verification results, will be recorded in detail in the log file for subsequent operation and maintenance analysis and auditing.

[0088] Compared with the prior art, the technical solution proposed in this invention has the following significant advantages:

[0089] It achieves a high degree of automation, greatly improving operational efficiency. The complex troubleshooting and repair process, which originally required specialized knowledge and multiple steps, has been simplified into a "one-click run" or a fully automated background process. Ordinary users can resolve common DNS-related issues without needing to understand network details, significantly lowering the technical barrier and manual intervention costs, and enabling fault recovery within minutes or even seconds.

[0090] The detection mechanism is scientific, comprehensive, and accurate. By combining network layer (ICMP Ping) and application layer (TCP / HTTP) detection, it overcomes the limitations of single-protocol detection (such as false positives caused by ICMP being blocked by firewalls). Enhanced Ping (multi-packet) improves the accuracy of basic network quality parameters (packet loss rate, latency) measurements. The multi-dimensional comprehensive evaluation model (threshold grading, weighted calculation) can more scientifically and comprehensively reflect the true health status of the network, avoiding arbitrary judgments based on a single indicator.

[0091] The repair strategy is flexible, intelligent, and effective. The introduction of a "tiered DNS strategy" and a log-based "state persistence" mechanism enables the system to remember and perform hierarchical attempts. It does not give up after the first failed switch, nor does it blindly loop between several DNS addresses. Instead, it attempts according to a preset priority order and records the attempt status in the log, thereby improving the final success rate of the repair.

[0092] It possesses excellent observability and traceability. The system automatically generates detailed reports containing rich information, such as egress IP, carrier information, raw detection data for each domain name, calculated score level, specific reasons for triggering the switchover, executed switchover actions, and verification results. These logs provide valuable data support for subsequent network quality trend analysis, root cause location of faults, and strategy optimization.

[0093] It has a wide range of applications and flexible deployment. The method and system of this invention mainly run on user terminals (such as Windows PCs) without changing existing network infrastructure (such as routers and firewalls). It can be deployed as a standalone operation and maintenance tool or integrated into a unified enterprise operation and maintenance management platform to quickly improve the network experience of end users.

[0094] Figure 2 This is a system architecture diagram of the browser connector service in the DNS switching system for multi-dimensional network detection of this invention. (See diagram for example.) Figure 2 As shown, the DNS switching system for multi-dimensional network detection of the present invention includes:

[0095] The network environment module 51 obtains the exit IP address of the current network environment, identifies the current network operator based on the IP address database, and reads the local network configuration to obtain the list of currently used DNS server addresses.

[0096] The comprehensive detection module 52 performs multi-dimensional comprehensive detection. By loading a preset list of key business domain names, it performs enhanced Ping detection and TCP / HTTP connectivity detection in parallel or sequentially for each domain name in the list. The enhanced Ping detection includes sending N ICMP packets to the target domain name and calculating the packet loss rate based on the number of packets sent and received, and calculating the average latency based on the round-trip time of each packet. The TCP / HTTP connectivity detection includes attempting to establish a TCP connection with the target domain name or sending an HTTP / HTTPS request, and recording whether the connection is successful or not or the HTTP response status code.

[0097] The decision logic module 53 performs network quality assessment on each domain name. The network quality assessment includes: comparing the packet loss rate, average latency, and HTTP response status with preset threshold ranges to obtain their respective level values; performing weighted calculations on the level values ​​according to preset weight coefficients to obtain the comprehensive score and network quality level of the domain name, and determining the DNS tier strategy.

[0098] The repair module 54 is executed to identify the currently active network adapter; according to the DNS tier policy, the underlying operating system command is invoked to modify the DNS server address of the active network adapter to the preset DNS address of the corresponding tier;

[0099] After the DNS address is modified, the log management module 55 automatically executes the DNS cache refresh command. After the switch and cache refresh are completed, the multi-dimensional comprehensive detection steps described in step S120 are immediately re-executed to verify the network repair effect, and the details of this operation are recorded in the log file.

[0100] In a preferred embodiment, the integrated detection module 52 is further configured to send an ICMP packet N greater than or equal to 6 in enhanced Ping detection. TCP / HTTP connectivity detection preferentially uses the HTTPS protocol, falling back to the HTTP protocol when the HTTPS connection fails, but is not limited to this.

[0101] In a preferred embodiment, the decision logic module 53 is further configured to set an excellent packet loss rate threshold and a good packet loss rate threshold. If the packet loss rate is less than or equal to the excellent packet loss rate threshold, the packet loss rate level is first level. If the packet loss rate is greater than the excellent packet loss rate threshold but less than or equal to the good packet loss rate threshold, the packet loss rate level is second level. If the packet loss rate is greater than the good packet loss rate threshold, the packet loss rate level is third level. An excellent latency threshold and a good latency threshold are also set. If the average latency is less than or equal to the excellent latency threshold, the latency level is first level. If the average latency is greater than the excellent latency threshold but less than or equal to the good latency threshold, the latency level is second level. If the average latency is greater than the good latency threshold, the latency level is third level. An HTTP success status code range is also set. If the HTTP request succeeds and the response status code is within the success status code range, the HTTP response level is first level. If the HTTP request succeeds but the response status code is within a preset warning status code range, the HTTP response level is second level. If the HTTP request fails or the response status code is within a preset error status code range, the HTTP response level is third level, but not limited to these limits.

[0102] In a preferred embodiment, the decision logic module 53 is further configured to calculate the weighted score using the formula: Comprehensive Score = Packet Loss Rate Weight Coefficient × Packet Loss Rate Level Value + Latency Weight Coefficient × Latency Level Value + HTTP Response Weight Coefficient × HTTP Response Level Value. Wherein, the sum of the packet loss rate weight coefficient, the latency weight coefficient, and the HTTP response weight coefficient is 1, and the packet loss rate weight coefficient is greater than the latency weight coefficient and the HTTP response weight coefficient, but is not limited to this.

[0103] In a preferred embodiment, the decision logic module 53 is further configured to apply at least one short-circuit rule to correct the initially determined network quality level. The short-circuit rule includes forcibly classifying the network as faulty when an HTTP request completely fails, and forcibly classifying it as faulty when the packet loss rate is higher than a first short-circuit threshold and the average latency is higher than a second short-circuit threshold. The number of faulty domains in all domains and the number of faulty domains in a preset set of critical domains are counted, and the global healthy domain ratio is calculated. If at least one faulty domain exists in the set of critical domains, or the global healthy domain ratio is lower than a preset global health rate threshold, or the HTTP response status code for a specific business API is abnormal, a DNS switching process is triggered. The local persistent log file is read, and the DNS tiering strategy to be used is determined based on the status markers recorded therein, but this is not a limitation.

[0104] In a preferred embodiment, the decision logic module 53 is further configured such that the DNS queuing strategy includes at least a first tier and a second tier, where the first tier corresponds to the preferred set of DNS server addresses, and the second tier corresponds to the alternative set of DNS server addresses. A local persistent log file is used to record the tier identifier used during the last DNS switch. If there is no marker in the log or the marker is in the initial state, the first tier is selected. If the marker in the log indicates that the first tier attempt has failed, the second tier is selected, but this is not a limitation.

[0105] In a preferred embodiment, the decision logic module 53 is further configured to determine the network quality level based on a comprehensive score and a preset scoring threshold, including: setting a health score threshold and a suspicious score threshold. If the comprehensive score is less than the health score threshold, the network quality level is initially determined to be healthy. If the comprehensive score is greater than or equal to the health score threshold and less than the suspicious score threshold, the network quality level is initially determined to be suspicious. If the comprehensive score is greater than or equal to the suspicious score threshold, the network quality level is initially determined to be faulty, but this is not a limitation.

[0106] In summary, the multi-dimensional network detection DNS switching system of the present invention can automatically, intelligently, and hierarchically diagnose problems and perform DNS switching and system repair when network resolution or connectivity failures occur.

[0107] This invention also provides a DNS switching device for multi-dimensional network detection, including a processor and a memory storing executable instructions for the processor. The processor is configured to execute steps of a DNS switching method for multi-dimensional network detection by executing the executable instructions.

[0108] As shown above, the DNS switching device for multi-dimensional network detection of this invention in this embodiment can automatically, intelligently, and hierarchically diagnose problems and perform DNS switching and system repair when network resolution or connectivity failures occur.

[0109] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "platform."

[0110] Figure 3 This is a schematic diagram of the DNS switching device for multi-dimensional network detection according to the present invention. See below for reference. Figure 3 To describe an electronic device 600 according to this embodiment of the present invention. Figure 3The electronic device 600 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0111] like Figure 3 As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.

[0112] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the method section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.

[0113] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.

[0114] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0115] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.

[0116] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0117] This invention also provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of a DNS switching method for multi-dimensional network detection. In some possible implementations, various aspects of this invention can also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the above-described method section of this specification according to various exemplary embodiments of the invention.

[0118] As shown above, the DNS switching system for multi-dimensional network detection of this invention in this embodiment can automatically, intelligently, and in a tiered manner diagnose problems and perform DNS switching and system repair when network resolution or connectivity failures occur.

[0119] Figure 4 This is a schematic diagram of the structure of the computer-readable storage medium of the present invention. (Reference) Figure 4 As shown, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0120] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0121] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0122] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0123] In summary, the purpose of this invention is to provide a DNS switching method, system, device, and storage medium for multi-dimensional network detection, which can automatically, intelligently, and hierarchically diagnose problems and perform DNS switching and system repair when network resolution or connectivity failures occur.

[0124] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. A DNS switching method based on multi-dimensional network detection, characterized in that, Includes the following steps: S110. Obtain the exit IP address of the current network environment, identify the current network operator according to the IP address database, and read the local network configuration to obtain the list of currently used DNS server addresses; S120, multi-dimensional comprehensive detection, by loading a preset list of key business domain names, for each domain name in the list, enhanced Ping detection and TCP / HTTP connectivity detection are performed in parallel or sequentially; The enhanced Ping detection includes sending N ICMP packets to the target domain name, calculating the packet loss rate based on the number of packets sent and received, and calculating the average latency based on the round-trip time of each packet; the TCP / HTTP connectivity detection includes attempting to establish a TCP connection with the target domain name or sending an HTTP / HTTPS request, and recording whether the connection is successful or not or the HTTP response status code. S130. Perform network quality assessment on each domain name. The network quality assessment includes: comparing packet loss rate, average latency, and HTTP response status with preset threshold ranges to obtain their respective level values; performing weighted calculation on the level values ​​according to preset weight coefficients to obtain the comprehensive score and network quality level of the domain name, and determining the DNS tier strategy. S140. Identify the currently active network adapter; according to the DNS tier policy, call the underlying operating system command to modify the DNS server address of the active network adapter to the preset DNS address of the corresponding tier; S150. After the DNS address is modified, the DNS cache refresh command is automatically executed. After the switch and cache refresh are completed, the multi-dimensional comprehensive detection steps described in step S120 are immediately re-executed to verify the network repair effect, and the details of this operation are recorded in the log file.

2. The DNS switching method for multi-dimensional network detection according to claim 1, characterized in that, In step S120, the number of ICMP packets N sent in the enhanced Ping detection is greater than or equal to 6; the TCP / HTTP connectivity detection prioritizes the use of the HTTPS protocol and falls back to the HTTP protocol when the HTTPS connection fails.

3. The DNS switching method for multi-dimensional network detection according to claim 1, characterized in that, In step S130, comparing the packet loss rate, average latency, and HTTP response status with preset threshold ranges to obtain their respective level values ​​specifically includes: Set an excellent packet loss rate threshold and a good packet loss rate threshold; if the packet loss rate is less than or equal to the excellent packet loss rate threshold, the packet loss rate level is level one; if the packet loss rate is greater than the excellent packet loss rate threshold but less than or equal to the good packet loss rate threshold, the packet loss rate level is level two; if the packet loss rate is greater than the good packet loss rate threshold, the packet loss rate level is level three. Set an excellent latency threshold and a good latency threshold; if the average latency is less than or equal to the excellent latency threshold, the latency level is Level 1; if the average latency is greater than the excellent latency threshold but less than or equal to the good latency threshold, the latency level is Level 2; if the average latency is greater than the good latency threshold, the latency level is Level 3. Set the range of HTTP success status codes; if the HTTP request is successful and the response status code is within the range of success status codes, the HTTP response level is Level 1; if the HTTP request is successful but the response status code is within the preset warning status code range, the HTTP response level is Level 2; if the HTTP request fails or the response status code is within the preset error status code range, the HTTP response level is Level 3.

4. The DNS switching method for multi-dimensional network detection according to claim 3, characterized in that, The weighted calculation uses the following formula: Comprehensive score = Packet loss rate weight coefficient × Packet loss rate level value + Delay weight coefficient × Delay level value + HTTP response weight coefficient × HTTP response level value; where the sum of the packet loss rate weight coefficient, the delay weight coefficient and the HTTP response weight coefficient is 1, and the packet loss rate weight coefficient is greater than the delay weight coefficient and the HTTP response weight coefficient.

5. The DNS switching method for multi-dimensional network detection according to claim 1, characterized in that, The step of determining the DNS tier strategy in step S130 includes: The network quality level initially determined is corrected by applying at least one short-circuit rule. The short-circuit rule includes forcibly determining the network quality level when an HTTP request fails completely, and forcibly determining the network quality level when the packet loss rate is higher than a first short-circuit threshold and the average latency is higher than a second short-circuit threshold. Count the number of domains at the fault level among all domains and the number of domains at the fault level in the preset set of key domains, and calculate the global healthy domain ratio; If there is at least one fault-level domain in the set of critical domains, or the proportion of global healthy domains is lower than the preset global health rate threshold, or the HTTP response status code for a specific business API is abnormal, the DNS switching process will be triggered. Read the local persistent log file and determine the DNS queuing policy to be used based on the status flags recorded therein.

6. The DNS switching method for multi-dimensional network detection according to claim 5, characterized in that, In step S130, the DNS tiering policy includes at least a first tier and a second tier. The first tier corresponds to the set of DNS server addresses that are preferred to be used, and the second tier corresponds to the set of DNS server addresses that are alternatives to be used. The local persistent log file is used to record the tier identifier used during the last DNS switch. If there is no marker in the log or the marker is marked as the initial state, then the first tier is selected; if the marker in the log indicates that the first tier has failed, then the second tier is selected.

7. The DNS switching method for multi-dimensional network detection according to claim 1, characterized in that, In step S130, the network quality level is determined based on the comprehensive score and a preset scoring threshold, including: setting a health score threshold and a suspicious score threshold; if the comprehensive score is less than the health score threshold, the network quality level is initially determined to be healthy; if the comprehensive score is greater than or equal to the health score threshold and less than the suspicious score threshold, the network quality level is initially determined to be suspicious; if the comprehensive score is greater than or equal to the suspicious score threshold, the network quality level is initially determined to be faulty.

8. A DNS switching system for multi-dimensional network detection, used to implement the DNS switching method for multi-dimensional network detection as described in claim 1, characterized in that, include: The network environment module obtains the current network environment's exit IP address, identifies the current network operator based on the IP address database, and reads the local network configuration to obtain the list of currently used DNS server addresses. The comprehensive detection module performs multi-dimensional comprehensive detection. By loading a preset list of key business domain names, it performs enhanced Ping detection and TCP / HTTP connectivity detection in parallel or sequentially for each domain name in the list. The enhanced Ping detection includes sending N ICMP packets to the target domain name, calculating the packet loss rate based on the number of packets sent and received, and calculating the average latency based on the round-trip time of each packet; the TCP / HTTP connectivity detection includes attempting to establish a TCP connection with the target domain name or sending an HTTP / HTTPS request, and recording whether the connection is successful or not or the HTTP response status code. The decision logic module performs network quality assessment on each domain name. The network quality assessment includes: comparing packet loss rate, average latency, and HTTP response status with preset threshold ranges to obtain their respective level values; performing weighted calculations on the level values ​​according to preset weight coefficients to obtain the comprehensive score and network quality level of the domain name, and determining the DNS tier strategy. The repair module is executed to identify the currently active network adapter; according to the DNS tier policy, the underlying operating system commands are invoked to modify the DNS server address of the active network adapter to the preset DNS address of the corresponding tier; After the DNS address is modified, the log management module automatically executes the DNS cache refresh command. After the switch and cache refresh are completed, the multi-dimensional comprehensive detection steps described in step S120 are immediately re-executed to verify the network repair effect, and the details of this operation are recorded in the log file.

9. A DNS switching device for multi-dimensional network detection, characterized in that, include: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the DNS switching method for multi-dimensional network detection according to any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps of the DNS switching method for multi-dimensional network detection as described in any one of claims 1 to 7.