Address processing method, device, electronic device and storage medium

By comparing the availability rates of primary and backup addresses in the disaster recovery system, addresses with higher availability rates are selected, solving the problems of low address switching availability and redundant development in existing technologies, and achieving efficient address switching and resource utilization.

CN114422470BActive Publication Date: 2024-11-19CHINA TELECOM CORP LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202111621062.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2024-11-19
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

Existing disaster recovery systems often have low address availability during address switching, leading to issues such as redundant development and resource waste. In particular, when multiple address users request switching simultaneously, it is difficult to accurately select the optimal available address.

Method used

The availability rates of the primary and backup addresses of the address provider are obtained by the working nodes and compared with the preset availability rate thresholds. Based on the comparison, an address processing request is sent to the address user to realize address switching or keep the current address, and to filter out addresses with higher availability rates to avoid redundant development.

Benefits of technology

This improves the effectiveness and availability of address switching, avoids the problem of redundant development for the same address, and ensures the efficiency and reliability of address switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114422470B_ABST
    Figure CN114422470B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides an address processing method, device, electronic device and storage medium. The main address of the address provider and the first address availability of the main address are obtained through the working node of the distributed disaster recovery system. If the first address availability is less than the preset availability threshold, it means that the availability of the main address is low. Then the backup address of the address provider and the second address availability of the backup address are obtained, and the current address of the address user is obtained. If the second address availability is greater than or equal to the preset availability threshold, the working node of the disaster recovery system can send an address processing request to the address user according to the comparison relationship, so that the address user switches the address or maintains the current address according to the address processing request, thereby avoiding repeated development problems such as switching the same address. At the same time, by configuring the availability threshold, addresses with higher availability are screened out, and then the effectiveness and availability of address switching are improved by using addresses with higher availability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an address processing method based on a distributed disaster recovery system, an address processing device based on a distributed disaster recovery system, an electronic device and a computer-readable storage medium. Background Art

[0002] A disaster recovery system refers to two or more IT systems with the same functions established in remote locations. The systems can monitor each other's health status and switch functions. When one system stops working due to an accident (such as fire, earthquake, etc.), the entire application system can be switched to another one so that the system can continue to work normally. Disaster recovery technology is an integral part of the system's high availability technology. The disaster recovery system places more emphasis on dealing with the impact of the external environment on the system, especially the impact of catastrophic events on the entire IT node, and provides node-level system recovery capabilities.

[0003] Based on the needs of the disaster recovery system, most address providers will provide multiple sets of addresses. For example, the address provider can provide a primary address and a backup address, or a primary address and multiple backup addresses. In the existing technology, when the disaster recovery system is in normal working condition, the address user calls the primary address provided by the address provider, and when the disaster recovery system is in abnormal working condition, the address user can call the backup address provided by the address provider. However, this simple way of calling the address according to the working status may cause problems such as the called address is unavailable or has poor availability. In addition, when the address provider has a communication relationship with multiple address users, multiple address users request address switching at the same time, which is prone to repeated development and resource waste such as switching the same address. Summary of the invention

[0004] The embodiment of the present invention provides an address processing method, device, electronic device and computer-readable storage medium based on a distributed disaster recovery system to solve or partially solve the problems of low availability of called addresses, repeated development and waste of resources in the process of address switching based on the disaster recovery system.

[0005] The embodiment of the present invention discloses an address processing method based on a distributed disaster recovery system, wherein the distributed disaster recovery system includes a plurality of nodes, wherein the nodes include working nodes, and the method includes:

[0006] The working node obtains a primary address of an address provider and a first address availability rate of the primary address;

[0007] If the first address availability of the primary address is less than a preset availability threshold, the working node obtains the backup address of the address provider and the second address availability of the backup address;

[0008] The working node obtains the current address of the address user corresponding to the address provider;

[0009] If the second address availability of the backup address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user based on the comparison relationship between the current address and the backup address, so that the address user performs address switching or maintains the current address according to the address processing request.

[0010] Optionally, it also includes:

[0011] If the first address availability of the primary address is greater than or equal to a preset availability threshold, the working node sends an address processing request to the address user based on the comparison relationship between the current address and the primary address, so that the address user switches the address or maintains the current address according to the address processing request.

[0012] Optionally, the address processing request includes an address keeping request and an address switching request, and the working node sends the address processing request to the address user according to a comparison relationship between the current address and the primary address, so that the address user switches the address or maintains the current address according to the address processing request, including:

[0013] The working node obtains the current address name of the current address and the primary address name of the primary address;

[0014] If the current address name is the same as the primary address name, the working node sends an address retention request to the address user, so that the address user retains the current address according to the address retention request;

[0015] If the current address name is different from the primary address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the primary address according to the address switching request.

[0016] Optionally, the working node sends an address processing request to the address user according to a comparison relationship between the current address and the standby address, so that the address user performs address switching or maintains the current address according to the address processing request, including:

[0017] The working node obtains the current address name of the current address and the backup address name of the backup address;

[0018] If the current address name is the same as the backup address name, the working node sends an address retention request to the address user, so that the address user retains the current address according to the address retention request;

[0019] If the current address name is different from the backup address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the backup address according to the address switching request.

[0020] Optionally, if the current address name is different from the backup address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the backup address according to the address switching request, including:

[0021] If the current address name is different from the names of the multiple standby addresses, the working node obtains the availability of each second address corresponding to the multiple standby address names, and sorts the standby addresses according to the size of the availability of each second address;

[0022] The working node selects a standby address as a target standby address according to the order of the standby addresses, and sends an address switching request to the address user, so that the address user switches the current address to the target standby address according to the address switching request.

[0023] Optionally, the plurality of nodes further include at least one spare node, and the method further includes:

[0024] If it is detected that the working node is down, any standby node is selected from the at least one standby node as the target working node.

[0025] Optionally, it also includes:

[0026] When the working node resumes normal operation, the working node is automatically converted to a target standby node.

[0027] The embodiment of the present invention discloses a distributed disaster recovery system, wherein the disaster recovery system includes a plurality of nodes, and the disaster recovery system includes:

[0028] A first address availability acquisition module, used by the working node to acquire the primary address of the address provider and the first address availability of the primary address;

[0029] A second address availability acquisition module, configured to, if the first address availability of the primary address is less than a preset availability threshold, enable the working node to acquire the backup address of the address provider and the second address availability of the backup address;

[0030] A current address acquisition module, used by the working node to acquire the current address of the address user corresponding to the address provider;

[0031] The first address processing module is used to send an address processing request to the address user by the working node according to the comparison relationship between the current address and the backup address if the second address availability of the backup address is greater than or equal to the preset availability threshold, so that the address user switches the address or maintains the current address according to the address processing request.

[0032] Optionally, the disaster recovery system further includes:

[0033] The second address processing module is used to send an address processing request to the address user according to the comparison relationship between the current address and the primary address if the first address availability of the primary address is greater than or equal to a preset availability threshold, so that the address user switches the address or maintains the current address according to the address processing request.

[0034] Optionally, the address processing request includes an address keeping request and an address switching request, and the second address processing module is specifically configured to:

[0035] The working node obtains the current address name of the current address and the primary address name of the primary address;

[0036] If the current address name is the same as the primary address name, the working node sends an address retention request to the address user, so that the address user retains the current address according to the address retention request;

[0037] If the current address name is different from the primary address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the primary address according to the address switching request.

[0038] Optionally, the first address processing module includes:

[0039] A standby address name acquisition submodule, used to acquire the current address name of the current address and the standby address name of the standby address;

[0040] A current address keeping submodule, used for sending an address keeping request to the address user if the current address name is the same as the standby address name, so that the address user keeps the current address according to the address keeping request;

[0041] The current address switching submodule is used to send an address switching request to the address user if the current address name is different from the backup address name, so that the address user switches the current address to the backup address according to the address switching request.

[0042] Optionally, the current address switching submodule is specifically used for:

[0043] If the current address name is different from the names of the multiple standby addresses, obtaining the availability of each second address corresponding to the names of the multiple standby addresses, and sorting the standby addresses according to the availability of each second address;

[0044] The working node selects a standby address as a target standby address according to the order of the standby addresses, and sends an address switching request to the address user, so that the address user switches the current address to the target standby address according to the address switching request.

[0045] Optionally, the plurality of nodes further include at least one spare node, and the disaster recovery system further includes:

[0046] The target working node determination module is used to select any spare node from the at least one spare node as the target working node if it is detected that the working node is down.

[0047] Optionally, the disaster recovery system further includes:

[0048] The target standby node conversion module is used to automatically convert the working node into a target standby node when the working node resumes normal operation.

[0049] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0050] The memory is used to store computer programs;

[0051] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0052] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0053] The embodiments of the present invention include the following advantages:

[0054] In an embodiment of the present invention, a distributed disaster recovery system includes a plurality of nodes, and a working node of the node obtains a primary address of an address provider and a first address availability of the primary address, and compares the first address availability of the primary address with a preset availability threshold. If the first address availability of the primary address is less than the preset availability threshold, it is determined that the availability of the primary address is low, and the working node needs to obtain a backup address of the address provider and a second address availability of the backup address, and obtain the current address of the address user corresponding to the address provider. If the second address availability of the backup address is greater than or equal to the preset availability threshold, the working node obtains the current address of the address user corresponding to the address provider. If the second address availability of the backup address is greater than or equal to the preset availability threshold, the working node obtains the current address of the address user corresponding to the address provider according to the comparison relationship between the current address and the backup address. , send an address processing request to the address user so that the address user switches the address or maintains the current address according to the address processing request, and screen out addresses with higher availability by comparing the availability of the first address with the availability of the second address, and compare the current address with the primary address or backup address with higher availability. The working node can send an address processing request to the address provider based on the comparison relationship so that the address provider maintains the current address or automatically switches the address, thereby avoiding repeated development problems such as switching the same address. At the same time, by configuring the availability threshold, addresses with higher availability are screened out, and then the effectiveness and availability of address switching are improved by using addresses with higher availability. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a flowchart of a method for address processing based on a distributed disaster recovery system provided in an embodiment of the present invention;

[0056] Figure 2 It is a flowchart of a method for address processing based on a distributed disaster recovery system provided in an embodiment of the present invention;

[0057] Figure 3 It is a flowchart of a method for address processing based on a distributed disaster recovery system provided in an embodiment of the present invention;

[0058] Figure 4 It is a flowchart of a method for address processing based on a distributed disaster recovery system provided in an embodiment of the present invention;

[0059] Figure 5 It is a structural block diagram of an address processing device based on a distributed disaster recovery system provided in an embodiment of the present invention;

[0060] Figure 6 is a block diagram of an electronic device provided in an embodiment of the present invention;

[0061] Figure 7 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0062] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0063] With the continuous development of science and technology, in order to cope with various unexpected situations of computer systems, for example, when computer systems suffer from irresistible natural disasters such as fire, flood, earthquake, war, and man-made disasters such as computer crimes, computer viruses, power failures, network / communication failures, hardware / software errors, and human operation errors, technical personnel have designed disaster recovery systems that can protect the security of user data, provide users with uninterrupted application services, and realize the function of data storage and backup. Among them, disaster recovery systems can be divided into data disaster recovery and application disaster recovery. The so-called data disaster recovery refers to the establishment of an off-site data system, which is an available copy of local key application data. When a disaster occurs to local data and the entire application system, the system at least saves a copy of the available key business data off-site. The data can be a complete real-time copy of the local production data, or it can lag slightly behind the local data, but it must be available. The main technologies used are data backup and data replication technology. The so-called application disaster recovery is to establish a complete backup application system equivalent to the local production system in a different location on the basis of data disaster recovery (they can be backups of each other). Establishing such a system is relatively complex. It requires not only a copy of the available data, but also resources including networks, hosts, applications, and even IP, as well as good coordination between various resources. The main technologies include load balancing and clustering technology. Data disaster recovery is the basis of application disaster recovery, and application disaster recovery is the goal of data disaster recovery.

[0064] In the existing disaster recovery system, the address provider will provide multiple sets of addresses, such as one primary address and one backup address, or one primary address and multiple backup addresses. The address user can directly call the primary address. When the primary address is unavailable, the address user will call the corresponding backup address. However, this method of directly calling the primary address or the backup address may result in the situation that the called primary address or the backup address has poor availability or is unavailable. When there are multiple address users requesting address switching, it is not only easy to cause duplicate development, but also when the criteria for determining address availability are inconsistent, it may also cause the problem that some of the called addresses are available and some are unavailable. Therefore, the existing disaster recovery system cannot accurately select the address with the best availability from the multiple sets of addresses provided by the address provider.

[0065] In this regard, one of the core invention points of the embodiment of the present invention is to obtain the primary address of the address provider and the first address availability of the primary address through the working node of the node, and compare the first address availability of the primary address with the preset availability threshold. If the first address availability of the primary address is less than the preset availability threshold, it is determined that the availability of the primary address is low, and the working node needs to obtain the backup address of the address provider and the second address availability of the backup address, and obtain the current address of the address user corresponding to the address provider. If the second address availability of the backup address is greater than or equal to the preset availability threshold, the working node sends a request to the address user based on the comparison relationship between the current address and the backup address. The address user sends an address processing request so that the address user switches the address or maintains the current address according to the address processing request. By comparing the availability of the first address with the availability of the second address, an address with a higher availability is screened out, and the current address is compared with the primary address or backup address with a higher availability. The working node can send an address processing request to the address provider based on the comparison relationship so that the address provider maintains the current address or automatically switches the address, thereby avoiding repeated development problems such as switching the same address. At the same time, by configuring the availability threshold, addresses with a higher availability are screened out, and then the effectiveness and availability of address switching are improved by using addresses with a higher availability.

[0066] Reference Figure 1 , shows a flowchart of the steps of an address processing method based on a distributed disaster recovery system provided in an embodiment of the present invention, wherein the distributed disaster recovery system includes a plurality of nodes, wherein the nodes include working nodes, and specifically may include the following steps:

[0067] Step 101, the working node obtains the primary address of the address provider and the first address availability of the primary address;

[0068] In an embodiment of the present invention, the disaster recovery system can determine the working node through the zookeeper cluster, and then use the working node to obtain the primary address of the address provider, and then use the address availability calculation model to calculate the first address availability of the primary address.

[0069] Optionally, the reliable coordination system of distributed systems (zookeeper) is a distributed, open source distributed application coordination service. It is a software that provides consistency services for distributed applications. The functions provided include: configuration maintenance, domain name services, distributed synchronization, group services, etc. ZooKeeper's goal is to encapsulate complex and error-prone key services, and provide users with simple and easy-to-use interfaces and high-performance, stable systems. The basic operation process of zookeeper is: 1. Elect Leader; 2. Synchronize data; 3. There are many algorithms in the process of electing Leader, but the election standards to be achieved are consistent; 4. The leader must have the highest execution ID, similar to root permissions; 5. Most machines in the cluster respond and accept the elected leader.

[0070] In the specific implementation, several nodes also include at least one backup node. The disaster recovery system can obtain the working node through the consistency algorithm of the temporary node of Zookeeper, and if it is detected that the working node is down, any backup node is selected from at least one backup node as the target working node. When the working node resumes normal operation, the working node is automatically converted to the target backup node.

[0071] As an example, each ZooKeeper node in the ZooKeeper cluster needs to be deployed on different servers. Figure 2 The data processing process between each zookeeper node and each disaster recovery service in the disaster recovery system is shown, and the zookeeper backup node is created by a disaster recovery service. Therefore, a disaster recovery service can be deployed in each computer room in the three regions of A, B, and C, and a zookeeper cluster can be built respectively. The consistency algorithm of the zookeeper temporary node is used to ensure that only one disaster recovery service is working. When the working node goes down, one of the other two backup nodes can be selected as the target working node to continue working. After the down working node is restored, it automatically becomes a backup node. Then, the real-time data synchronization function of zookeeper is used to ensure that each disaster recovery service node can obtain the same data. The specific implementation process is as follows:

[0072] 1. When a disaster recovery service A finds that there is no temporary node in Zookeeper, it will actively detect other disaster recovery services B and C and record the detection time;

[0073] 2. If disaster recovery service B or disaster recovery service C cannot be detected, it will elect itself as the master node and create a temporary node in Zookeeper;

[0074] 3. If there are detection records, a vote is initiated to other services, and all detection records are included in the voting information;

[0075] 4. When a node receives voting information from all detected nodes or the waiting time has expired, it will elect the node with the largest number of detection services as the master node. If the number is the same, it will elect the node with the shortest time consumption as the master node. The master node will create a temporary node in Zookeeper by itself.

[0076] 5. When a temporary node is created and it is found that it already exists, the votes and time consumption of this temporary node are determined. If it has more votes than the existing one, or the votes are the same but the time consumption is shorter, the existing master node is replaced. In this way, the consistency algorithm of the zookeeper cluster and the data backup and synchronization function are used to avoid the situation where the system cannot obtain the address of the address provider in time after the working node goes down.

[0077] Among them, refer to the instructions attached Figure 3 The work cooperation process between the disaster recovery system and the address provider and address user is shown. The address provider can provide a primary address and multiple backup addresses to the address user or address detector, etc. After the disaster recovery service working node of the disaster recovery system obtains the primary address of the address provider, the address availability calculation module can be used to calculate the first address availability of the primary address. The address user can call the primary address of the service provider by default, and provide the address detector with the current address that needs to be switched. When receiving a notification from the address detector that an address switch is required, the user can switch according to the notified switch address.

[0078] Specifically, the disaster recovery system can obtain the primary address of the address provider, as well as characteristic parameters corresponding to the address provider, such as the unit cycle (C), access success rate (ASR) and the number of predetermined values ​​(TV). According to the needs of the address user, the characteristic parameters of the address provider are input into the address availability calculation model to output the first address availability corresponding to the primary address, such as 30%, 40%, 50%, etc.

[0079] The calculation method of the address availability calculation model can be: overall A (availability) = ST (number of successes) / [ST (number of successes) + FT (number of failures)].

[0080] Among them, ST (number of successes) is the number of times the access success rate (ASR) is greater than the preset value (TV) within the unit cycle (C). FT (number of failures) is the number of times the access success rate (ASR) is less than the preset value (TV) within the unit cycle (C). The unit cycle (C, generally 30 minutes) is evenly divided into multiple unit times (t, generally 1 minute). The access success rate (ASR) is the ratio of successful access per unit time (t, generally 10 visits). The access success rate (ASR) = AST (number of successful accesses) / [AST (number of successful accesses) + AFT (number of failed accesses)]. The access timeout (timeout) needs to be calculated based on the average timeout time (t1) of the service user and the average processing time (t2) of the service provider. The weight is determined according to the actual processing time of the user.

[0081] As an example, if the address user requires a fast page response, the weight of t1 needs to be increased and the weight of t2 needs to be reduced, such as timeout = t1*0.8+t2*0.2. Assume that C is 30 minutes, t is 1 minute, and there are 10 visits per unit time. In the first t, AST = 10, AFT = 0, and if TV = 0.9, then ASR = 1>TV = 0.9, ST = ST+1. If TV = 1.1, then ASR = 1 <TV = 1.1, FT = FT+1.

[0082] Step 102: If the first address availability of the primary address is less than a preset availability threshold, the working node obtains the backup address of the address provider and the second address availability of the backup address;

[0083] In the embodiment of the present invention, the preset availability threshold may be an availability preset by a technician according to actual needs or design purposes. For example, the preset availability threshold may be set to 45%, 50%, 55%, and the like.

[0084] In one embodiment of the present invention, after the disaster recovery system obtains the primary address and the first address availability of the address provider, it determines that the first address availability of the primary address is less than a preset availability threshold. The working node of the disaster recovery system can obtain the backup address of the address provider, and then input the characteristic parameters corresponding to the backup address into the address availability calculation model to obtain the second address availability of the backup address.

[0085] As an example, the address provider provides a primary address and three backup addresses, which are backup address A, backup address B, and backup address C. The disaster recovery system monitors the primary address of the address provider in real time through the address detector, and inputs the characteristic parameters of the primary address into the address availability calculation module, outputs the first address availability of 30%, and determines that the first address availability is less than the preset availability threshold of 40%. Then the working node of the disaster recovery system obtains the backup address A, backup address B, and backup address C of the address user, and the second address availability corresponding to the backup address A, backup address B, and backup address C is 30%, 35%, and 45%, respectively.

[0086] Step 103, the working node obtains the current address of the address user corresponding to the address provider;

[0087] In an embodiment of the present invention, after the working node of the disaster recovery system obtains the primary address, the first address availability corresponding to the primary address, the backup address and the second address availability of the backup address, it can obtain the current address of the address user corresponding to the address provider.

[0088] Step 104: If the second address availability of the backup address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user based on the comparison relationship between the current address and the backup address, so that the address user performs address switching or maintains the current address according to the address processing request.

[0089] In an embodiment of the present invention, the comparison relationship between the current address of the address user and the backup address of the address provider may be whether the address name of the current address is the same as the address name of the backup address, the address processing request may include an address switching request and an address retention request, and the address processing request is associated with the comparison relationship.

[0090] In a specific implementation, if the second address availability of the backup address is greater than or equal to a preset availability threshold, the working node sends an address processing request to the address user based on the comparison relationship between the current address and the backup address, so that the address user switches the address or maintains the current address according to the address processing request.

[0091] In one embodiment of the present invention, after the disaster recovery system obtains the primary address and the first address availability of the address provider, it determines that the first address availability of the primary address is greater than or equal to a preset availability threshold. If the first address availability of the primary address is greater than or equal to the preset availability threshold, and the address name of the current address is different from the address name of the primary address, it indicates that the current address needs to be switched to the primary address. If the first address availability of the primary address is greater than or equal to the preset availability threshold, but the address name of the current address is the same as the address name of the primary address, it indicates that the current address is the primary address, and the current address is maintained.

[0092] In a specific implementation, the disaster recovery system can obtain the current address name of the current address and the primary address name of the primary address. If the current address name is the same as the primary address name, an address retention request can be sent to the address user so that the address user maintains the current address according to the address retention request. If the current address name is not the same as the primary address name, an address switching request can be sent to the address user so that the address user switches the current address to the primary address according to the address switching request.

[0093] Specifically, if the current address name is different from multiple main address names, the availability of each second address corresponding to the main address name can be obtained, and the main addresses are sorted according to the size of each second address availability. The working node selects the main address as the target main address according to the order of the main addresses, and sends an address switching request to the address user, so that the address user switches the current address to the target main address according to the address switching request.

[0094] As an example, the address provider provides a primary address and three backup addresses, which are backup address A, backup address B, and backup address C. The disaster recovery system monitors the primary address of the address provider in real time through the address detector, and inputs the characteristic parameters of the primary address into the address availability calculation module. The output of the first address availability is 50%. If it is determined that the first address availability is greater than the preset availability threshold of 40%, the address name d corresponding to the primary address is obtained, and it is determined that the current address i is different from the address name d, then an address switching request is sent to the address user. The address user receives the address switching request and switches the current address to the primary address.

[0095] In another embodiment of the present invention, if the second address availability of the backup address is greater than or equal to the preset availability threshold, and the address name of the current address is different from the address name of the backup address, it means that the current address needs to be switched to the backup address; if the second address availability of the backup address is greater than or equal to the preset availability threshold, but the address name of the current address is the same as the address name of the backup address, indicating that the current address is the backup address, the current address is maintained.

[0096] In a specific implementation, the disaster recovery system can obtain the current address name of the current address and the backup address name of the backup address. If the current address name is the same as the backup address name, an address retention request can be sent to the address user so that the address user maintains the current address according to the address retention request. If the current address name is not the same as the backup address name, an address switching request can be sent to the address user so that the address user switches the current address to the backup address according to the address switching request.

[0097] Specifically, if the current address name is different from multiple backup address names, the availability of each second address corresponding to the multiple backup address names can be obtained, and the backup addresses can be sorted according to the size of each second address availability. The working node selects the backup address as the target backup address according to the order of the backup addresses, and sends an address switching request to the address user, so that the address user switches the current address to the target backup address according to the address switching request.

[0098] As an example, the address provider provides a primary address and three backup addresses, which are backup address A, backup address B, and backup address C. The disaster recovery system monitors the primary address of the address provider in real time through the address detector, and inputs the characteristic parameters of the primary address into the address availability calculation module. The output of the first address availability is 30%. It is judged that the first address availability is less than the preset availability threshold of 40%. Then, the backup address A, backup address B, and backup address C are obtained respectively, and the second address availability corresponding to the backup address A, backup address B, and backup address C is 35%, 40%, and 50%. It is judged that the availability of the second address corresponding to the backup address B and backup address C is 35%, 40%, and 50%. If the availability of the second address corresponding to address C is greater than or equal to the preset availability threshold, the current address i of the address provider, the address name b of the backup address B, and the address name a of the backup address C are obtained, and it is determined that the current address i is different from the address name b and the address name a, then the backup address B and the backup address C are sorted according to the size of the second address availability: backup address B ≥ backup address C, and then the working node of the disaster recovery system can obtain the backup address B in sequence, and use the backup address B as the target backup address, and then send an address switching request to the address user. The address user receives the address switching request and switches the current address to the target backup address.

[0099] In another embodiment of the present invention, after the disaster recovery system obtains the primary address and determines that the first address availability of the primary address is less than a preset availability threshold, it obtains the backup address and the second availability of the backup address. If the second address availability of the backup address is less than the preset availability threshold, it means that both the primary address and the backup address of the address provider are unavailable, and the disaster recovery system maintains the current address without the need for address switching.

[0100] In an embodiment of the present invention, a distributed disaster recovery system includes a plurality of nodes, and a working node of the node obtains a primary address of an address provider and a first address availability of the primary address, and compares the first address availability of the primary address with a preset availability threshold. If the first address availability of the primary address is less than the preset availability threshold, it is determined that the availability of the primary address is low, and the working node needs to obtain a backup address of the address provider and a second address availability of the backup address, and obtain the current address of the address user corresponding to the address provider. If the second address availability of the backup address is greater than or equal to the preset availability threshold, the working node obtains the current address of the address user corresponding to the address provider. If the second address availability of the backup address is greater than or equal to the preset availability threshold, the working node obtains the current address of the address user corresponding to the address provider according to the comparison relationship between the current address and the backup address. , send an address processing request to the address user so that the address user switches the address or maintains the current address according to the address processing request, and screen out addresses with higher availability by comparing the availability of the first address with the availability of the second address, and compare the current address with the primary address or backup address with higher availability. The working node can send an address processing request to the address provider based on the comparison relationship so that the address provider maintains the current address or automatically switches the address, thereby avoiding repeated development problems such as switching the same address. At the same time, by configuring the availability threshold, addresses with higher availability are screened out, and then the effectiveness and availability of address switching are improved by using addresses with higher availability.

[0101] In order to enable those skilled in the art to better understand the technical solution of the embodiment of the present invention, an example is given below, and reference is made to the attached specification. Figure 4 The flowchart shown illustrates an embodiment of the present invention:

[0102] S41, the disaster recovery system can use the address detector to monitor the primary address in real time and obtain the characteristic parameters of the primary address, input the characteristic parameters into the address availability calculation module to calculate the first address availability of the primary address, and then determine whether the first address availability is greater than or equal to the preset availability threshold.

[0103] S42, if the availability of the first address is greater than or equal to the preset availability threshold, determine whether the address name of the primary address is the same as the current address name of the address user. If they are the same, the disaster recovery system sends an address retention request to the address provider to maintain the current address. If they are not the same, the disaster recovery system sends an address switching request to the address provider to notify the address provider to switch the current address to the primary address.

[0104] S43, if the first address availability is less than the preset availability threshold, each backup address is monitored in real time, and the characteristic parameters of each backup address are obtained, and the characteristic parameters are input into the address availability calculation module to calculate the second address availability of each backup address, and then it is determined whether the second address availability of each backup address is greater than or equal to the preset availability threshold.

[0105] S44, if the second address availability of each backup address is greater than or equal to the preset availability threshold, it is determined whether the address name of the backup address is the same as the current address name of the address user. If they are the same, the disaster recovery system sends an address retention request to the address provider to maintain the current address. If they are not the same, the disaster recovery system sends an address switching request to the address provider to notify the address provider to switch the current address to the backup address.

[0106] S45, if the second address availability of each backup address is less than a preset availability threshold, the disaster recovery system sends an address retention request to the address provider to retain the current address.

[0107] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0108] Reference Figure 5 , shows a structural block diagram of a distributed disaster recovery system provided in an embodiment of the present invention, the disaster recovery system includes several nodes, and specifically may include the following modules:

[0109] A first address availability acquisition module 501, configured for the working node to acquire a primary address of an address provider and a first address availability of the primary address;

[0110] A second address availability acquisition module 502, configured to, if the first address availability of the primary address is less than a preset availability threshold, enable the working node to acquire the backup address of the address provider and the second address availability of the backup address;

[0111] The current address acquisition module 503 is used for the working node to acquire the current address of the address user corresponding to the address provider;

[0112] The first address processing module 504 is used to send an address processing request to the address user by the working node according to the comparison relationship between the current address and the backup address if the second address availability of the backup address is greater than or equal to the preset availability threshold, so that the address user switches the address or maintains the current address according to the address processing request.

[0113] In an optional embodiment of the present invention, the disaster recovery system further includes:

[0114] The second address processing module is used to send an address processing request to the address user according to the comparison relationship between the current address and the primary address if the first address availability of the primary address is greater than or equal to a preset availability threshold, so that the address user switches the address or maintains the current address according to the address processing request.

[0115] In an optional embodiment of the present invention, the address processing request includes an address keeping request and an address switching request, and the second address processing module is specifically configured to:

[0116] The working node obtains the current address name of the current address and the primary address name of the primary address;

[0117] If the current address name is the same as the primary address name, the working node sends an address retention request to the address user, so that the address user retains the current address according to the address retention request;

[0118] If the current address name is different from the primary address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the primary address according to the address switching request.

[0119] In an optional embodiment of the present invention, the first address processing module includes:

[0120] A standby address name acquisition submodule, used for the working node to acquire the current address name of the current address and the standby address name of the standby address;

[0121] A current address keeping submodule, used for, if the current address name is the same as the backup address name, the working node sending an address keeping request to the address user, so that the address user keeps the current address according to the address keeping request;

[0122] The current address switching submodule is used for, if the current address name is different from the backup address name, the working node sending an address switching request to the address user, so that the address user switches the current address to the backup address according to the address switching request.

[0123] In an optional embodiment of the present invention, the current address switching submodule is specifically used for:

[0124] If the current address name is different from the names of the multiple standby addresses, the working node obtains the availability of each second address corresponding to the multiple standby address names, and sorts the standby addresses according to the size of the availability of each second address;

[0125] The working node selects a standby address as a target standby address according to the order of the standby addresses, and sends an address switching request to the address user, so that the address user switches the current address to the target standby address according to the address switching request.

[0126] In an optional embodiment of the present invention, the plurality of nodes further include at least one spare node, and the disaster recovery system further includes:

[0127] The target working node determination module is used to select any spare node from the at least one spare node as the target working node if it is detected that the working node is down.

[0128] In an optional embodiment of the present invention, the disaster recovery system further includes:

[0129] The target standby node conversion module is used to automatically convert the working node into a target standby node when the working node resumes normal operation.

[0130] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0131] In addition, an embodiment of the present invention further provides an electronic device, such as Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.

[0132] Memory 603, used for storing computer programs;

[0133] The processor 601 is used to execute the program stored in the memory 603 to implement the following steps:

[0134] The working node obtains a primary address of an address provider and a first address availability rate of the primary address;

[0135] If the first address availability of the primary address is less than a preset availability threshold, the working node obtains the backup address of the address provider and the second address availability of the backup address;

[0136] The working node obtains the current address of the address user corresponding to the address provider;

[0137] If the second address availability of the backup address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user based on the comparison relationship between the current address and the backup address, so that the address user performs address switching or maintains the current address according to the address processing request.

[0138] In an optional embodiment of the present invention, it also includes:

[0139] If the first address availability of the primary address is greater than or equal to a preset availability threshold, the working node sends an address processing request to the address user based on the comparison relationship between the current address and the primary address, so that the address user switches the address or maintains the current address according to the address processing request.

[0140] In an optional embodiment of the present invention, the address processing request includes an address keeping request and an address switching request, and the working node sends the address processing request to the address user according to the comparison relationship between the current address and the primary address, so that the address user performs address switching or maintains the current address according to the address processing request, including:

[0141] The working node obtains the current address name of the current address and the primary address name of the primary address;

[0142] If the current address name is the same as the primary address name, the working node sends an address retention request to the address user, so that the address user retains the current address according to the address retention request;

[0143] If the current address name is different from the primary address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the primary address according to the address switching request.

[0144] In an optional embodiment of the present invention, the working node sends an address processing request to the address user according to a comparison relationship between the current address and the standby address, so that the address user performs address switching or maintains the current address according to the address processing request, including:

[0145] The working node obtains the current address name of the current address and the backup address name of the backup address;

[0146] If the current address name is the same as the backup address name, the working node sends an address retention request to the address user, so that the address user retains the current address according to the address retention request;

[0147] If the current address name is different from the backup address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the backup address according to the address switching request.

[0148] In an optional embodiment of the present invention, if the current address name is different from the backup address name, the working node sends an address switching request to the address user so that the address user switches the current address to the backup address according to the address switching request, including:

[0149] If the current address name is different from the names of the multiple standby addresses, the working node obtains the availability of each second address corresponding to the multiple standby address names, and sorts the standby addresses according to the size of the availability of each second address;

[0150] The working node selects a standby address as a target standby address according to the order of the standby addresses, and sends an address switching request to the address user, so that the address user switches the current address to the target standby address according to the address switching request.

[0151] In an optional embodiment of the present invention, the plurality of nodes further include at least one standby node, and the method further includes:

[0152] If it is detected that the working node is down, any standby node is selected from the at least one standby node as the target working node.

[0153] In an optional embodiment of the present invention, it also includes:

[0154] When the working node resumes normal operation, the working node is automatically converted to a target standby node.

[0155] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0156] The communication interface is used for communication between the above terminal and other devices.

[0157] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0158] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0159] like Figure 7 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 701 is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the address processing method based on the distributed disaster recovery system described in the above embodiment.

[0160] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the address processing method based on the distributed disaster recovery system described in the above embodiment.

[0161] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0162] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0163] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0164] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. An address processing method based on a distributed disaster recovery system, characterized in that: The distributed disaster recovery system includes several nodes, the distributed disaster recovery system is used to protect the security of user data, provide uninterrupted application services for users, and realize data storage backup. The nodes include working nodes, and the method includes: The working node obtains a primary address of an address provider and a first address availability rate of the primary address; If the first address availability of the primary address is less than a preset availability threshold, the working node obtains multiple backup addresses of the address provider and the second address availability corresponding to each of the multiple backup addresses; The working node obtains the current address of the address user corresponding to the address provider; If the second address availability of the multiple backup addresses is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user according to the comparison relationship between the current address and the multiple backup addresses, so that the address user performs address switching or maintains the current address according to the address processing request; Wherein, when the current address name of the current address is different from the standby address names of the multiple standby addresses, the working node selects the standby address with the largest second address availability as the target standby address, and sends an address switching request to the address user, so that the address user switches the current address to the target standby address according to the address switching request; The calculation of the availability of any address is: Address availability rate = number of successes / [number of successes + number of failures] Among them, the number of successes is the number of times the access success rate is greater than a predetermined value within a unit period; the number of failures is the number of times the access success rate is less than a predetermined value within a unit period; the access success rate is the ratio of successful accesses per unit time, access success rate = number of successful accesses / [number of successful accesses + number of failed accesses]; the unit period is evenly divided into multiple unit times.

2. The method according to claim 1, characterized in that Also includes: If the first address availability of the primary address is greater than or equal to a preset availability threshold, the working node sends an address processing request to the address user based on the comparison relationship between the current address and the primary address, so that the address user switches the address or maintains the current address according to the address processing request.

3. The method according to claim 2, characterized in that The address processing request includes an address keeping request and an address switching request. The working node sends the address processing request to the address user according to the comparison relationship between the current address and the primary address, so that the address user switches the address or maintains the current address according to the address processing request, including: The working node obtains the current address name of the current address and the primary address name of the primary address; If the current address name is the same as the primary address name, the working node sends an address retention request to the address user, so that the address user retains the current address according to the address retention request; If the current address name is different from the primary address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the primary address according to the address switching request.

4. The method according to claim 1, characterized in that: If the current address name is different from the multiple backup address names, the working node sends an address switching request to the address user, so that the address user switches the current address to the backup address according to the address switching request, including: If the current address name is different from the names of the multiple standby addresses, sorting the multiple standby addresses according to the availability of the second addresses corresponding to the multiple standby addresses; The working node selects a standby address as a target standby address in the order of the multiple standby addresses, and sends an address switching request to the address user, so that the address user switches the current address to the target standby address according to the address switching request.

5. The method according to claim 1, characterized in that The plurality of nodes further include at least one standby node, and the method further includes: If it is detected that the working node is down, any standby node is selected from the at least one standby node as the target working node.

6. The method according to claim 5, characterized in that Also includes: When the working node resumes normal operation, the working node is automatically converted to a target standby node.

7. A distributed disaster recovery system, characterized in that: The disaster recovery system includes several nodes. The distributed disaster recovery system is used to protect the security of user data, provide uninterrupted application services for users, and realize data storage and backup. The nodes include working nodes. The disaster recovery system includes: A first address availability acquisition module, used by the working node to acquire the primary address of the address provider and the first address availability of the primary address; A second address availability acquisition module, configured to, if the first address availability of the primary address is less than a preset availability threshold, enable the working node to acquire multiple backup addresses of the address provider and the second address availability corresponding to each of the multiple backup addresses; A current address acquisition module, used by the working node to acquire the current address of the address user corresponding to the address provider; An address processing module, configured to, if the availability rate of the second address of the plurality of backup addresses is greater than or equal to the preset availability rate threshold, send an address processing request to the address user according to a comparison relationship between the current address and the plurality of backup addresses, so that the address user performs address switching or maintains the current address according to the address processing request; Wherein, when the current address name of the current address is different from the standby address names of the multiple standby addresses, the working node selects the standby address with the largest second address availability as the target standby address, and sends an address switching request to the address user, so that the address user switches the current address to the target standby address according to the address switching request; The calculation of the availability of any address is: Address availability rate = number of successes / [number of successes + number of failures] Among them, the number of successes is the number of times the access success rate is greater than a predetermined value within a unit period; the number of failures is the number of times the access success rate is less than a predetermined value within a unit period; the access success rate is the ratio of successful accesses per unit time, access success rate = number of successful accesses / [number of successful accesses + number of failed accesses]; the unit period is evenly divided into multiple unit times.

8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 6 when executing the program stored in the memory.

9. A computer-readable storage medium, characterized in that: Instructions are stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • A method and system for backup and switching user sessions

    CN102263661A

  • Distributed communication method in distributed application

    CN102739799A

  • Load balancing method and device

    CN111800348A

  • Service unit switching method, system and device

    CN112217843A

  • Network path adjusting method, system and device, electronic equipment and storage medium

    CN112491700A