Dial test-based IP address updating method and device, and storage medium
Through the dial-test-based IP address update method, the problem that the server inspection method in the existing technology cannot effectively handle network abnormalities is solved, automatic adjustment of IP addresses and network connectivity monitoring is realized, the risks of service interruptions and data leakage are reduced, and the risks of improvement is improved. The stability and response speed of network services are achieved.
Patent Information
- Application Number
- CN202411050987.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-12-06
AI Technical Summary
Existing server inspection methods cannot be effectively identified and handled when dealing with network exceptions, resulting in security risks of service interruption or data breaches.
Using the IP address update method based on dialing test, the IP address of the domain name to be tested is queried through the domain name system DNS, and the dialing is performed in response to the dialing command, obtain the dialing results, and select the replacement from the alternate address library when access is delayed. IP address, automatically adjust the IP address to ensure network connectivity and service stability.
It realizes intelligent update and automatic adjustment of IP addresses, fully covers the network connectivity status between the client and the server, quickly responds to network problems, reduces service interruptions and data security risks, and improves the reliability and response speed of network services.
Smart Images

Figure CN119094497A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a method, device and storage medium for updating an IP address based on dial-up testing. Background Art
[0002] In the modern network environment, large applications usually provide services to the outside world through the Domain Name System (DNS). For example, behind the domain name www.iqiyi.com of the video sharing website iQiyi, there is actually a complex network architecture consisting of many servers. The role of the Domain Name System (DNS) is to associate these domain names with specific IP addresses to ensure that users from different regions can access the corresponding servers. This process not only improves access efficiency, but also enhances the stability of user experience.
[0003] In order to ensure the quality and security of the service, the server needs to undergo strict security checks, including but not limited to network traffic analysis, system vulnerability scanning, and security performance assessment. Once any abnormal situation is found, such as problems with the server's network connection or malicious attacks, it is necessary to be able to respond in a timely manner and take measures to repair it to prevent security risks such as service interruption or data leakage.
[0004] However, in practical applications, most traditional server inspection methods often have certain limitations, which often make it impossible to achieve the expected results when dealing with network anomalies, and thus fail to effectively identify and handle network anomalies.
[0005] Therefore, there is an urgent need to develop an IP address updating method, device and storage medium based on dial-up testing to solve one or more of the above-mentioned problems. Summary of the invention
[0006] In view of this, in order to solve the above technical problems or part of the technical problems, the embodiments of the present invention provide an IP address processing method, device, electronic device and storage medium based on dialing.
[0007] In a first aspect, the present application provides an IP address processing method based on dial-up testing, the method comprising:
[0008] Use the domain name system DNS to query the first IP address corresponding to the domain name to be tested;
[0009] In response to the dial test instruction, the first IP address is used as a dial test probe point to perform a dial test to obtain a dial test result, wherein the dial test result is used to indicate an access result of the IP address;
[0010] When the dial test result of the first IP address indicates that there is an access delay, a backup address library corresponding to the first IP address is retrieved, and a second IP address is selected from the backup address library to replace the first IP address.
[0011] In a possible implementation manner, selecting a second IP address from the backup address library to replace the first IP address includes:
[0012] Acquire network change information, wherein the network change information includes network type change and access area change;
[0013] According to the network change information, a second IP address is selected from the backup address library to replace the first IP address.
[0014] In a possible implementation, the standby address library includes: a first standby address library and a second standby address library;
[0015] The selecting a second IP address from the backup address library to replace the first IP address according to the network change information includes:
[0016] In the case that both the network type change and the access area change are no, selecting IP addresses with the same network type as the first IP address from the first backup address library to build a first address list, and selecting the IP address with the shortest access time from the first address list as the second IP address;
[0017] In the case that both the network type change and the access area change are yes, selecting an IP address with the shortest access time from the second backup address library as the second IP address;
[0018] When the access area is changed to yes and the network type is changed to no, the second backup address library is used to select IP addresses with the same network type as the first IP address to establish a second address list, and the IP address with the shortest access time is selected from the second address list as the second IP address;
[0019] When the access area is changed to no and the network type is changed to yes, selecting an IP address with the shortest access time from the first backup address library as the second IP address;
[0020] The first IP address is replaced with the second IP address.
[0021] In a possible implementation, before calling the backup address library corresponding to the first IP address, the method further includes:
[0022] Obtaining an access zone of the first IP address;
[0023] Selecting IP addresses in the access area whose dialing test results show that there is no access delay as the first IP address set;
[0024] A first backup address database is established using the first IP address set.
[0025] In a possible implementation, the method further includes:
[0026] Acquire an access zone adjacent to the first IP address;
[0027] Selecting IP addresses in adjacent access areas whose dialing test results show that there is no access delay as the second IP address set;
[0028] A second backup address database is established using the second IP address set.
[0029] In a possible implementation, the method further includes:
[0030] After the first IP address is updated to the second IP address, the first IP address corresponding to the domain name to be tested in the DNS is updated to the second IP address to implement the update of the DNS.
[0031] In a possible implementation manner, querying the first IP address corresponding to the domain name to be tested by using the domain name system DNS includes:
[0032] Sending a query request carrying the domain name to be tested to the DNS, wherein the query request instructs the DNS to query a first IP address corresponding to the domain name to be tested;
[0033] Receive a DNS response packet fed back by the DNS;
[0034] The DNS response packet is parsed to obtain a first IP address corresponding to the domain name to be tested.
[0035] In a second aspect, the present application provides an IP address processing device based on dial-up testing, the device comprising:
[0036] An address query module, used to query the first IP address corresponding to the domain name to be tested by using the domain name system DNS;
[0037] A dialing test module, configured to respond to a dialing test instruction and use the first IP address as a dialing test probe to perform a dialing test to obtain a dialing test result, wherein the dialing test result is used to indicate an access result of the IP address;
[0038] The update module is used to retrieve a backup address library corresponding to the first IP address and select a second IP address from the backup address library to replace the first IP address when the dial test result of the first IP address indicates that there is an access delay.
[0039] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the dial-based IP address processing method described in any one of the embodiments of the first aspect are implemented.
[0040] In a fourth aspect, the present application further provides a computer storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the dial-based IP address processing method described in any embodiment of the first aspect are implemented.
[0041] The above-mentioned technical scheme provided by the embodiment of the present application has the following advantages over the prior art: the IP address updating method based on dialing provided by the embodiment of the present application uses the IP address as a dialing probe point to perform access dialing to obtain a dialing result, and the dialing result is used to indicate the access status of the IP address, and can automatically find servers in adjacent areas and check network connectivity. When the dialing result of the IP address is an access delay, the IP address is used as the first IP address, and the backup address library corresponding to the first IP address is retrieved, and the second IP address is selected from the backup address library to replace the first IP address to realize the update of the IP address and automatic adjustment. Compared with the traditional method of only detecting the availability of the server, it can check the network connectivity from the client to the server, automatically find servers in adjacent areas, ensure network connectivity, and realize automatic adjustment of the IP address. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0043] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0045] Figure 1 A flowchart of an IP address updating method based on dialing test provided in an embodiment of the present application;
[0046] Figure 2A flowchart of another IP address updating method based on dialing test provided in an embodiment of the present application;
[0047] Figure 3 A schematic diagram of the structure of an IP address updating device based on dialing test provided in an embodiment of the present application;
[0048] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0050] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0051] In order to solve the deficiencies in server quality and security in the prior art, especially when these problems are not quickly identified and corresponding measures are not taken to repair them, which may cause serious security risks such as data leakage, the present application provides an IP address processing method, device, electronic device and storage medium based on dial-up testing, which can not only realize the intelligent update and automatic adjustment of IP addresses, but also check the network connectivity from the client to the server compared to the traditional detection of only the availability of the server, further extend the detection range, and comprehensively cover the network connectivity status between the client and the server, so that the system can autonomously detect and quickly respond to any potential network connection problems, actively seek and switch to servers in neighboring areas, so as to ensure the stability and efficiency of network connections, truly realize the automation and intelligence of IP address management, improve response speed and recovery capabilities, effectively reduce service interruptions and data security risks caused by server failures or network problems, and provide users with a smoother and more reliable network service experience.
[0052] Figure 1 A flowchart of an IP address processing method based on dialing test is provided in an embodiment of the present application, such as Figure 1As shown, the method specifically includes:
[0053] S101, querying a first IP address corresponding to the domain name to be tested using a domain name system DNS;
[0054] DNS is a distributed database system that stores the mapping between domain names and IP addresses. When a user tries to access a website, his browser will first send a query request to the DNS server to obtain the IP address corresponding to the website domain name. The DNS server will then return the corresponding IP address. The browser will then establish a connection with the website server based on this address to load and display the web page content. For example, www,iqiyi.com, there are actually a large number of servers behind the domain name. By associating the domain name and IP through DNS software, users in a specified area can access the specified server.
[0055] In this embodiment, the query function of DNS is used to send a request to the corresponding DNS server, quickly retrieve, and return the first IP address that the domain name currently resolves to.
[0056] S102, in response to the dial test instruction, performing a dial test on the first IP address as a dial test probe point to obtain a dial test result, wherein the dial test result is used to indicate an access result of the IP address;
[0057] The dial test results directly reflect the access results of the IP address, quickly discover network problems between the client and the server, and can serve as an important basis for optimizing network services and improving user experience. General dial test results may include:
[0058] Response time: the time from sending a request to receiving a response, which is an important indicator of network latency. Long response times often mean network congestion or insufficient server processing capacity.
[0059] Success rate: the proportion of requests that are successfully responded to, which is directly related to the availability and reliability of the service. A high success rate is the cornerstone of user satisfaction. Packet loss rate: the proportion of data packets lost during data transmission, which reflects the integrity and stability of network transmission. A high packet loss rate may lead to data loss, video freezes and other problems.
[0060] In this embodiment, in response to a dialing test instruction, a probe point is deployed in the same network environment as the client, and the first IP address is used as a dialing test probe point to perform periodic dialing to access the server, and a dialing test result of the access response time is obtained. The access status of the IP address is obtained through the dialing test result, and the access quality of the IP address is fully understood. If the probe point access fails, the network problem can be quickly discovered and adjusted.
[0061] S103: When the dialing test result of the first IP address shows that there is an access delay, retrieve a backup address library corresponding to the first IP address, and select a second IP address from the backup address library to replace the first IP address.
[0062] In this embodiment, when a significant delay problem is detected in the access process of the mentioned first IP address, the backup plan is automatically triggered. At this time, the backup address library associated with the first IP address is quickly called to find an alternative plan, and the second IP address in the backup address library that is most suitable to replace the first IP address is selected to replace the first IP address that is currently experiencing access delay, thereby ensuring the continuity and stability of the service.
[0063] It should be noted that before the dial test, a backup address library corresponding to the first IP address has been established based on the dial test results of other IP addresses; the backup address library is not static and unchanging, but is also updated according to the current network environment. When an IP address in the backup address library changes (for example, it is removed due to a failure or a new and better IP address is discovered), the administrator will re-dial other IP addresses to ensure that each IP address in the backup address library is strictly screened and verified, has no access delay, and can replace the first IP address. The network administrator needs to update the backup address library regularly or as needed to ensure that it always contains the best alternative options.
[0064] In addition, the server address switching process must also follow the pre-specified switching rules, such as the maximum switching frequency of a region. For example, to avoid regional access fluctuations, a maximum of 3 IP addresses are switched within an hour, or at least the original regional IP address of the organization is retained for subsequent access to the region. At this time, it is necessary to monitor and evaluate the network conditions of each region in real time on the basis of following the maximum switching frequency or number of switching times. When it is detected that the network quality in a certain area has dropped sharply and is about to affect the user experience, the system can automatically trigger the switching process, but it does not blindly change the IP address. In addition, it will intelligently select the best server address for switching based on the current network conditions, server load conditions and a pre-set priority list.
[0065] The dialing test-based IP address processing method provided in this embodiment uses the IP address as a dialing test probe point to perform access dialing test to obtain a dialing test result. The dialing test result is used to indicate the access status of the IP address. The server in the adjacent area can be automatically found to check the network connectivity. When the dialing test result of the IP address is an access delay, the IP address is used as the first IP address, and the backup address library corresponding to the first IP address is retrieved. The second IP address is selected from the backup address library to replace the first IP address to realize the update and automatic adjustment of the IP address. Compared with the traditional method of only detecting the availability of the server, it can check the network connectivity from the client to the server and automatically find the server in the adjacent area. By automatically finding a replacement server, the delay in data transmission is further reduced, the response speed of the overall network is improved, and the automatic adjustment of the IP address is realized.
[0066] Figure 2 A flowchart of another IP address processing method based on dialing test provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method specifically includes:
[0067] S201, obtaining network change information, where the network change information includes network type change and access area change;
[0068] S202: Select a second IP address from the backup address library to replace the first IP address according to the network change information.
[0069] In this embodiment, the authorization status of any changes that may affect network performance or services in the network environment is obtained, including but not limited to changes in network operators (such as switching from China Unicom to China Mobile, or upgrading from 4G to 5G) and changes in access areas (such as users moving from one city to another, resulting in changes in the access network node), network change data is collected, and the authorization status of the access area change due to the server network type change is determined based on the network change information, and a second IP address that meets the requirements is selected from the backup address library to replace the first IP address based on the network change authorization status.
[0070] For example, the current IP address of the server belongs to region A, and when the user uses the server to access the domain name, the user must use the IP address of region A to access it. The location area of the second IP address corresponding to the first IP address must also be address A. At this time, the option to change the access area is to reject. At this time, the IP address with access area A should be selected from the backup address library as the second IP address to replace the first IP address.
[0071] The dial-up-based IP address processing method provided in this embodiment builds a complete network monitoring system by acquiring network change information, establishes dynamic selection from the backup address library, and formulates detailed replacement strategies to ensure the continuity and efficiency of network services, thereby providing strong guarantees for the stable operation of the enterprise.
[0072] In an optional solution of the embodiment of the present invention, the standby address library includes: a first standby address library and a second standby address library;
[0073] In this embodiment, according to the access area of the first IP address, a first standby address library for the same access area and a second standby address library for different access areas are established.
[0074] It should be noted that, based on the access experience of server access domain names, when a server in a certain area faces access delay problems, servers in adjacent areas can maintain normal access status, and the access status of servers in separated areas generally also has delays; based on this phenomenon, the area covered by the IP address in the second backup address library is set to be an adjacent area connected to the area where the first IP address is located. When access to the main server is blocked, the backup server can quickly provide a replacement IP address, reduce the jamming caused by address switching, and improve the access experience.
[0075] The selecting a second IP address from the backup address library to replace the first IP address according to the network change information includes:
[0076] In the case that both the network type change and the access area change are no, selecting IP addresses with the same network type as the first IP address from the first backup address library to build a first address list, and selecting the IP address with the shortest access time from the first address list as the second IP address;
[0077] In the case that both the network type change and the access area change are yes, selecting an IP address with the shortest access time from the second backup address library as the second IP address;
[0078] When the access area is changed to yes and the network type is changed to no, the second backup address library is used to select IP addresses with the same network type as the first IP address to establish a second address list, and the IP address with the shortest access time is selected from the second address list as the second IP address;
[0079] When the access area is changed to no and the network type is changed to yes, selecting an IP address with the shortest access time from the first backup address library as the second IP address;
[0080] The first IP address is replaced with the second IP address.
[0081] In this embodiment, by identifying the network type change and access area change information, a matching IP address is selected from a pre-built backup address library as a replacement for the original IP address, that is, the second IP address.
[0082] Specifically, the IP addresses stored in the first backup address library all belong to the same access area as the first IP address, while the IP addresses in the second backup address library belong to a different access area from the first IP address. Furthermore, the two backup address libraries contain both IP addresses of the same network type as the original one and IP addresses of different network types, i.e., IP addresses of the same operator and different operators. Therefore, when selecting a replacement IP address from the backup address library, it is first necessary to decide whether to select from the first backup address library or the second backup address library based on the different access areas. Then, based on the network type of the IP address in each backup library, the corresponding address list is screened out. From the address list, the IP address with the shortest access time is screened out using the dial test results, and it is used as a replacement for the original IP address (i.e., the first IP address), i.e., the second IP address. After fully recognizing and considering the actual needs of server IP update, a set of intelligent and reasonable IP address update strategies are formulated to ensure that the network can be stable and efficient in any case, and provide users with uninterrupted and high-quality network services.
[0083] In addition, in the process of obtaining the second IP address, this embodiment also obtains the blacklist address corresponding to the target domain name and automatically performs exclusion processing to further ensure the availability and security of the selected second IP address.
[0084] Specifically, when building the backup address library, not only the IP addresses that meet the requirements are collected, but also the blacklist address information associated with the target domain name is collected simultaneously. The blacklist address is an address that has been marked as unusable due to abuse or security vulnerabilities. When the second IP address is selected from the backup address library based on the network change information, a blacklist comparison will be performed first. If an IP address exists in the blacklist, the system will automatically skip the address to avoid selecting an IP that may cause problems, effectively improving the accuracy and reliability of IP address replacement and reducing service interruptions or security risks caused by IP address problems.
[0085] In an optional solution of the embodiment of the present invention, before calling the backup address library corresponding to the first IP address, the method further includes:
[0086] Obtaining an access zone of the first IP address;
[0087] In this embodiment, different servers are configured for the same domain name in multiple geographical areas to ensure that each area can correspond to a different access address. The area of the access domain name can be determined by the access address. For these areas, matching detection points are deployed, and the operating status of the server is regularly inspected to ensure the stability and availability of the service.
[0088] Furthermore, in order to distinguish the differences between different regions and network types, each type of server is assigned an independent IP address. For example, region A mobile: 1.1.1.1; region A telecom: 1.1.1.2; region B mobile: 2.2.2.,1; region C mobile: 3.3.3.1. Users of region A telecom will definitely access 1.1.1.2.
[0089] Selecting IP addresses in the access area whose dialing test results show that there is no access delay as the first IP address set;
[0090] In this embodiment, the access area of the IP addresses to be screened is first clearly defined, and the access area of the first IP address is used as the access area for this screening. Then, a professional network testing tool is used to perform dialing tests on the IP addresses in the access area. The dialing test content includes but is not limited to key indicators such as delay time, packet loss rate, and bandwidth utilization. Through dialing test analysis, the network performance of each IP address can be intuitively understood. Based on the dialing test results, IP addresses with extremely low or almost zero delay times are selected, and this type of address is used as the first IP address set. This type of address has good network connectivity and stability.
[0091] A first backup address database is established using the first IP address set.
[0092] In this embodiment, a first backup address library is established using IP addresses in the first IP address set. The access addresses in the first backup address library are all high-quality IP addresses that are in the same access area as the first IP address and have no access delay. This provides a high-quality alternative solution for subsequent updates and replacements of the first IP address, further realizing the intelligent and refined dynamic adjustment of the server IP address, improving the response speed of the overall network, and realizing automatic adjustment of the IP address.
[0093] In an optional solution of the embodiment of the present invention, the method further includes:
[0094] Acquire an access zone adjacent to the first IP address;
[0095] In this embodiment, different servers are configured for the same domain name in multiple geographical areas to ensure that each area can correspond to a different access address. According to the access experience of the server accessing the domain name, when a server in a certain area faces the problem of access delay, the server in the adjacent area can maintain a normal access status. The access status of the server in the separated area is generally delayed. The access area adjacent to the first IP address is obtained;
[0096] For example, the access area of the first IP address is region A, and the adjacent access areas of region A are region B and region C, and the IP addresses of region B and region C are obtained.
[0097] Selecting IP addresses in adjacent access areas whose dialing test results show that there is no access delay as the second IP address set;
[0098] In this embodiment, the adjacent access areas of the IP addresses are first clearly screened, and the adjacent access areas of the first IP address are used as the access areas for this screening. Then, a professional network testing tool is used to perform dialing tests on the IP addresses in the access areas. The dialing test content includes but is not limited to key indicators such as delay time, packet loss rate, and bandwidth utilization. Through the dialing test analysis, the network performance of each IP address can be intuitively understood. Based on the dialing test results, IP addresses with extremely low or almost zero delay times are selected, and this type of address is used as the first IP address set. This type of address has good network connectivity and stability.
[0099] For example, region B adjacent to region A has mobile IP: 2.2.2.1, telecom IP: 2.2.2.2 and Unicom IP: 2.2.2.3, and adjacent region C has mobile IP: 3.3.3.1, telecom IP: 3.3.3.2 and Unicom IP: 3.3.3.3. At this time, all IP addresses of region B and region C are taken as the second IP address set.
[0100] A second backup address database is established using the second IP address set.
[0101] In this embodiment, a second backup address library is established using IP addresses in the second IP address set. The access addresses in the second backup address library are all high-quality IP addresses that are adjacent to the access area of the first IP address and have no access delay, providing a high-quality alternative solution for subsequent updates and replacements of the first IP address, further realizing the intelligent and refined dynamic adjustment of the server IP address, improving the response speed of the overall network, and realizing automatic adjustment of the IP address.
[0102] It should be noted that in this embodiment, the second backup address library is constructed with the IP addresses of adjacent areas. In specific applications, it is not limited to adjacent addresses. When access across large areas is allowed and the access to the interval areas is not affected, the adjacent addresses can be expanded to nearby areas or designated areas to enhance the diversity and fault tolerance of IP address replacement.
[0103] For example, in some cases, backup IP addresses in a single region or adjacent regions may be affected simultaneously due to unforeseen factors such as natural disasters and network failures, resulting in severe challenges to service continuity. In order to cover a wider geographical area and provide more reliable alternatives, multiple cross-region access areas with stable network connections and relatively independent of the current first IP address are identified based on historical access data, network topology information and geographic location analysis to ensure that services can be quickly taken over in an emergency.
[0104] For each selected cross-regional access area, a network testing tool is used to perform dialing tests to screen out high-quality IP addresses with extremely low latency, low packet loss rate and high bandwidth utilization. These IP addresses are used to establish a cross-regional backup address library. At the same time, a regular update mechanism is established to dynamically adjust the cross-regional backup address library according to changes in network status and new test data to ensure that the IP addresses in the library are always kept in the best state. In the subsequent IP address switching process, the IP addresses in the cross-regional address library can be selected for replacement.
[0105] In addition, this embodiment further refines the maintenance and management strategy of the backup address library to ensure the availability and timeliness of IP addresses. For example, a timed update mechanism is introduced to automatically perform dial tests on the first backup address library and the second backup address library on a regular basis (such as daily, weekly, or according to actual needs) to re-evaluate the network performance of each IP address. Once it is found that an IP address that originally performed well has problems such as increased access delay, increased packet loss rate, or abnormal bandwidth utilization, the system will automatically remove it from the corresponding backup address library and re-select qualified IP addresses from the area or adjacent areas to supplement it, so as to keep the IP addresses in the backup address library always in the best state.
[0106] In order to cope with emergencies, such as regional network interruptions caused by natural disasters, network failures, etc., this embodiment also designs an emergency backup address library. This library stores highly available IP addresses across multiple geographical regions and has been strictly screened. When the main server and the two backup address libraries cannot provide stable access, the system will automatically switch to the emergency backup address library to ensure that service continuity is not affected.
[0107] In an optional solution of the embodiment of the present invention, the method further includes:
[0108] After the first IP address is updated to the second IP address, the first IP address corresponding to the domain name to be tested in the DNS is updated to the second IP address to implement the update of the DNS.
[0109] In this embodiment, the DNS associates the domain name with the IP. When the IP address changes, the IP address record corresponding to the domain name needs to be updated on the DNS server to ensure that the user can successfully access the website.
[0110] Specifically, when the first IP address is updated to the second IP address, after ensuring that the new second IP address is available and the corresponding network service has been configured, find the A record corresponding to the domain name to be tested in the DNS management interface (the A record is a standard DNS record that maps the domain name to the IPv4 address), and change the IP address it points to from the first IP address to the second IP address, thereby ensuring that the domain name resolution points to the latest and better-performing server address.
[0111] In addition, in order to further enhance the robustness and fault tolerance of the system, this embodiment also introduces DNS load balancing technology. By configuring multiple IP addresses as candidates for responding to the same domain name at the DNS level, the DNS server can intelligently distribute user requests to different servers according to preset algorithms (such as polling, minimum number of connections, etc.). Even if a server has a short-term performance fluctuation or failure, user requests can be automatically directed to other healthy servers, thereby avoiding the impact of single point failures on the overall service availability.
[0112] In an optional solution of the embodiment of the present invention, querying the first IP address corresponding to the domain name to be tested by using the domain name system DNS includes:
[0113] Sending a query request carrying the domain name to be tested to the DNS, wherein the query request instructs the DNS to query a first IP address corresponding to the domain name to be tested;
[0114] In this embodiment, after the DNS query request is transmitted to the DNS server through the network, the server will start to perform a series of complex search operations. First, it will search whether there is a record of the domain name in the cache. If not, the server will initiate a query to the root domain name server, and the root domain name server will return the address of the authoritative DNS server responsible for the top-level domain name (such as .com, .net, etc.). Then, the DNS server will initiate queries to these authoritative DNS servers until it finds a DNS server containing the domain name record to be tested.
[0115] Receive a DNS response packet fed back by the DNS;
[0116] The DNS response packet is parsed to obtain a first IP address corresponding to the domain name to be tested.
[0117] In this embodiment, after receiving the DNS response packet, the original query requester (usually a browser or operating system) will parse the response packet and extract the IP address of the domain name to be tested. Then, this IP address will be used in subsequent network communications so that the browser can send an HTTP request to the server corresponding to the IP address to obtain the web page content.
[0118] The method provided in this embodiment uses DNS, a powerful network infrastructure, to build a more efficient, secure and reliable network application.
[0119] Figure 3 A structural diagram of another IP address processing device based on dial-up testing provided in an embodiment of the present application, such as Figure 3 As shown, the device specifically includes:
[0120] The address query module 301 is used to query the first IP address corresponding to the domain name to be tested by using the domain name system DNS;
[0121] The dialing test module 302 is used to respond to the dialing test instruction and use the first IP address as a dialing test probe to perform a dialing test to obtain a dialing test result, wherein the dialing test result is used to indicate an access result of the IP address;
[0122] The updating module 303 is used to retrieve a backup address library corresponding to the first IP address and select a second IP address from the backup address library to replace the first IP address when the dialing test result of the first IP address indicates that there is an access delay.
[0123] In a possible implementation, the update module 303 is further used to obtain network change information, which includes network type change and access area change; and select a second IP address from the backup address library to replace the first IP address according to the network change information.
[0124] In one possible implementation, the update module 303 is further used to, when both the network type change and the access area change are no, select from the first backup address library IP addresses with the same network type as the first IP address to construct a first address list, and select from the first address list the IP address with the shortest access time as the second IP address; when both the network type change and the access area change are yes, select from the second backup address library the IP address with the shortest access time as the second IP address; when the access area change is yes and the network type change is no, select from the second backup address library IP addresses with the same network type as the first IP address to construct a second address list, and select from the second address list the IP address with the shortest access time as the second IP address; when the access area change is no and the network type change is yes, select from the first backup address library the IP address with the shortest access time as the second IP address; and replace the first IP address with the second IP address.
[0125] In one possible implementation, module 304 is established to obtain the access area of the first IP address; select IP addresses in the access area whose dialing results show that there is no access delay as the first IP address set; and use the first IP address set to establish a first backup address library.
[0126] In one possible implementation, the establishment module 304 is also used to obtain an access area adjacent to the first IP address; select IP addresses in the adjacent access area whose dialing results show that there is no access delay as a second IP address set; and use the second IP address set to establish a second backup address library.
[0127] In a possible implementation, the updating module 305 is configured to update the first IP address corresponding to the domain name to be tested in the DNS to the second IP address after updating the first IP address to the second IP address, so as to implement the update of the DNS.
[0128] In a possible implementation, the address query module 301 is also used to send a query request carrying the domain name to be tested to the DNS, wherein the query request instructs the DNS to query the first IP address corresponding to the domain name to be tested; receive a DNS response packet fed back by the DNS; and parse the DNS response packet to obtain the first IP address corresponding to the domain name to be tested.
[0129] The IP address processing device based on dialing test provided in this embodiment can be as follows: Figure 3 The IP address processing device based on dialing test shown in can execute the following steps: Figure 1-2 All steps of IP address processing based on dial-up testing are implemented Figure 1-2The technical effect of IP address processing based on dial-up test is shown in the figure. For details, please refer to Figure 1-2 For the sake of brevity, the relevant description is not repeated here.
[0130] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, an embodiment of the present application provides an electronic device, including a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404; the memory 403 is used to store computer programs; the processor 401 is used to execute the program stored in the memory 403, and implement the steps of the IP address processing method based on dialing provided by any of the above method embodiments:
[0132] The domain name system DNS is used to query the first IP address corresponding to the domain name to be tested; in response to the dialing test instruction, the first IP address is used as a dialing test probe point to obtain a dialing test result, and the dialing test result is used to indicate the access result of the IP address; when the dialing test result of the first IP address is that there is a delay in access, the backup address library corresponding to the first IP address is called, and a second IP address is selected from the backup address library to replace the first IP address.
[0133] In a possible implementation, network change information is obtained, the network change information including a network type change and an access area change; and according to the network change information, a second IP address is selected from the backup address library to replace the first IP address.
[0134] In one possible implementation, when both the network type change and the access area change are no, IP addresses with the same network type as the first IP address are screened from the first backup address library to construct a first address list, and the IP address with the shortest access time is selected from the first address list as the second IP address; when both the network type change and the access area change are yes, the IP address with the shortest access time is selected from the second backup address library as the second IP address; when the access area change is yes and the network type change is no, IP addresses with the same network type as the first IP address are screened from the second backup address library to construct a second address list, and the IP address with the shortest access time is selected from the second address list as the second IP address; when the access area change is no and the network type change is yes, the IP address with the shortest access time is selected from the first backup address library as the second IP address; the first IP address is replaced by the second IP address.
[0135] In a possible implementation, obtaining an access area of the first IP address;
[0136] Select IP addresses in the access area whose dialing test results show that there is no access delay as a first IP address set; and use the first IP address set to establish a first backup address library.
[0137] In one possible implementation, an access area adjacent to the first IP address is obtained; an IP address with a dial test result of no access delay in the adjacent access area is selected as a second IP address set; and a second backup address library is established using the second IP address set.
[0138] In a possible implementation, after the first IP address is updated to the second IP address, the first IP address corresponding to the domain name to be tested in the DNS is updated to the second IP address to implement the update of the DNS.
[0139] In one possible implementation, a query request carrying the domain name to be tested is sent to the DNS, wherein the query request instructs the DNS to query a first IP address corresponding to the domain name to be tested; a DNS response packet fed back by the DNS is received; and the DNS response packet is parsed to obtain the first IP address corresponding to the domain name to be tested.
[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0141] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0142] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for processing an IP address based on dialing, characterized in that: include: Use the domain name system DNS to query the first IP address corresponding to the domain name to be tested; In response to the dial test instruction, the first IP address is used as a dial test probe point to perform a dial test to obtain a dial test result, wherein the dial test result is used to indicate an access result of the IP address; When the dial test result of the first IP address indicates that there is an access delay, a backup address library corresponding to the first IP address is retrieved, and a second IP address is selected from the backup address library to replace the first IP address.
2. The method according to claim 1, characterized in that The selecting a second IP address from the backup address library to replace the first IP address includes: Acquire network change information, wherein the network change information includes network type change and access area change; According to the network change information, a second IP address is selected from the backup address library to replace the first IP address.
3. The method according to claim 2, characterized in that The standby address library comprises: a first standby address library and a second standby address library; The selecting a second IP address from the backup address library to replace the first IP address according to the network change information includes: In the case that both the network type change and the access area change are no, selecting IP addresses with the same network type as the first IP address from the first backup address library to build a first address list, and selecting the IP address with the shortest access time from the first address list as the second IP address; In the case that both the network type change and the access area change are yes, selecting an IP address with the shortest access time from the second backup address library as the second IP address; When the access area is changed to yes and the network type is changed to no, the second backup address library is used to select IP addresses with the same network type as the first IP address to establish a second address list, and the IP address with the shortest access time is selected from the second address list as the second IP address; When the access area is changed to no and the network type is changed to yes, selecting an IP address with the shortest access time from the first backup address library as the second IP address; The first IP address is replaced with the second IP address.
4. The method according to claim 3, characterized in that Before calling the backup address library corresponding to the first IP address, the method further includes: Obtaining an access zone of the first IP address; Selecting IP addresses in the access area whose dialing test results show that there is no access delay as the first IP address set; A first backup address library is established using the first IP address set.
5. The method according to claim 4, characterized in that The method further comprises: Acquire an access zone adjacent to the first IP address; Selecting IP addresses in adjacent access areas whose dialing test results show that there is no access delay as the second IP address set; A second backup address database is established using the second IP address set.
6. The method according to claim 1, characterized in that The method further comprises: After the first IP address is updated to the second IP address, the first IP address corresponding to the domain name to be tested in the DNS is updated to the second IP address to implement the update of the DNS.
7. The method according to claim 1, characterized in that The querying the first IP address corresponding to the domain name to be tested by using the domain name system DNS includes: Sending a query request carrying the domain name to be tested to the DNS, wherein the query request instructs the DNS to query a first IP address corresponding to the domain name to be tested; Receive a DNS response packet fed back by the DNS; The DNS response packet is parsed to obtain a first IP address corresponding to the domain name to be tested.
8. An IP address processing device based on dial-up detection, characterized in that: include: An address query module, used to query the first IP address corresponding to the domain name to be tested by using the domain name system DNS; A dialing test module, configured to respond to a dialing test instruction and use the first IP address as a dialing test probe to perform a dialing test to obtain a dialing test result, wherein the dialing test result is used to indicate an access result of the IP address; The update module is used to retrieve a backup address library corresponding to the first IP address and select a second IP address from the backup address library to replace the first IP address when the dial test result of the first IP address indicates that there is an access delay.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the IP address processing method based on dialing according to any one of claims 1 to 7 are implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the IP address processing method based on dialing according to any one of claims 1 to 7 are implemented.
