Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method and a system for disaster recovery of ENUM-DNS in an IMS network, which can avoid the problem of data loss during the alternate operation of ENUM-DNS servers in the main and standby rooms, thereby improving the reliability of services.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a telephone number mapping working group ENUM-domain name system DNS disaster tolerance method in IP multimedia system IMS network, the method includes: the main overhead account process module periodically synchronizes data in a local database to the standby overhead account process module; further comprising:
in the system operation process, when the main overhead account process module fails, the standby overhead account process module executes data synchronization operation and then replaces the main overhead account process module to work;
after the main overhead account process module returns to normal, the standby overhead account process module synchronizes data in the local database to the main overhead account process module; the main overhead account process module executes data synchronization operation and then replaces the standby overhead account process module to work.
In the above scheme, the process of the main accounting process module periodically synchronizing the data in the local database to the standby accounting process module is as follows:
setting a timing backup script on a machine where a sybase database of an ENUM-DNS server of a main computer room is located, wherein the script regularly backs up data in the sybase database to a fixed directory;
a main overhead account process module reads each zone serial number in a domain name table from a sybase database corresponding to the main overhead account process module regularly and writes the zone serial numbers into a fixed directory binary file of a local machine;
the main accounting process module is provided with a File Transfer Protocol (FTP) script and periodically transmits a fixed directory binary file of the ENUM-DNS server of the main computer room to a fixed directory of the standby accounting process module through the FTP.
In the above scheme, the data synchronization operation flow is as follows:
the accounting process module reads a binary file under a self fixed directory and acquires a zone serial number in another accounting process module sybase database;
the overhead account process module queries a zone serial number in a self sybase database;
the accounting process module compares the zone serial number of the accounting process module with the zone serial number of another accounting process module, if the zone serial number of the accounting process module is larger than or equal to the zone serial number of the another accounting process module, the data synchronization operation is ended; otherwise, the overhead account process module leads the backup file in the other overhead account process module sybase database under the fixed directory into the local sybase database;
wherein, the overhead account process module is: a main overhead account process module or a standby overhead account process module.
In the above scheme, the method further comprises:
and the standby overhead account process module determines the failure or recovery of the main overhead account process module through a hypertext transfer protocol (HTTP) heartbeat message between the standby overhead account process module and the main overhead account process module.
In the above scheme, the method for determining that the main overhead account process module fails by the standby overhead account process module is as follows:
the standby account opening and canceling process module sends HTTP heartbeat request information to the main account opening and canceling process module at regular time, if the receiving and monitoring port of the standby account opening and canceling process module is closed and HTTP heartbeat response information of the main account opening and canceling process module is not received for n times continuously, the standby account opening and canceling process module determines that the main account opening and canceling process module breaks down; wherein n is a positive integer.
In the above scheme, the method for determining the failure recovery of the main overhead account process module by the standby overhead account process module is as follows:
and the standby account opening process module sends HTTP heartbeat request messages to the main account opening process module at regular time, and if the standby account opening process module receives HTTP heartbeat response messages returned by the main account opening process module and a receiving monitoring port of the standby account opening process module is in an open state, the standby account opening process module determines that the main account opening process module has recovered from faults.
An ENUM-DNS disaster recovery system in an IMS network, the system comprising: a main overhead account process module and a standby overhead account process module; wherein,
the main overhead account process module is used for periodically synchronizing data in a local database to the standby overhead account process module; after the self fault is recovered, executing data synchronization operation, and then replacing a spare overhead account process module to work;
the backup overhead account process module is used for executing data synchronization operation when the main overhead account process module fails in the system operation process and then replacing the main overhead account process module to work; and after the main overhead account process module is recovered to be normal, synchronizing the data in the local database to the main overhead account process module.
In the above scheme, the backup overhead account process module is further configured to determine a failure or recovery of the main overhead account process module through an HTTP heartbeat message with the main overhead account process module; accordingly, the method can be used for solving the problems that,
and the main overhead account process module is also used for communicating with the standby overhead account process module through HTTP heartbeat messages.
An ENUM-DNS server comprising an overhead process module for periodically synchronizing data in a local database to an overhead process module in another ENUM-DNS server; after self-failure recovery, data synchronization operation is performed, and then work is performed instead of an overhead process module in another ENUM-DNS server.
In the above solution, the ENUM-DNS server is further configured to communicate with an overhead account process module in another ENUM-DNS server through an HTTP heartbeat message.
An ENUM-DNS server comprises an overhead process module, which is used for executing data synchronization operation when an overhead process module in another ENUM-DNS server goes wrong in the running process of a system and then replaces the overhead process module in another ENUM-DNS server to work; and after the overhead account process module in the other ENUM-DNS server is recovered to be normal, synchronizing the data in the local database to the overhead account process module in the other ENUM-DNS server.
In the above solution, the ENUM-DNS server is further configured to determine, through an HTTP heartbeat message with an overhead process module in another ENUM-DNS server, a failure or recovery of an overhead process module in another ENUM-DNS server.
The invention provides a disaster recovery method and a system of an ENUM-DNS in an IMS network.A main invoicing process module periodically synchronizes data in a local database to a standby invoicing process module; in the system operation process, when the main overhead account process module fails, the standby overhead account process module executes data synchronization operation and then replaces the main overhead account process module to work; after the main overhead account process module returns to normal, the standby overhead account process module synchronizes data in the local database to the main overhead account process module; the main overhead account process module executes data synchronization operation and then replaces the standby overhead account process module to work. In the invention, when the main overhead account process module fails or the main overhead account process module recovers from a fault, the standby overhead account process module or the main overhead account process module can perform data synchronization operation to ensure that the overhead account information in the currently running ENUM-DNS server is the latest, so that the problem of data loss in the process of the alternate running of the ENUM-DNS servers in the main machine room and the standby machine room can be avoided, and the reliability of the service is further improved.
In addition, the standby overhead process module determines the fault or recovery of the main overhead process module through the heartbeat message between the standby overhead process module and the main overhead process module, and the occurrence and elimination of the fault of the main overhead process module can be determined in time through the heartbeat mechanism, so that the fault can be eliminated in time, and the smooth operation of the telecommunication service is ensured.
Detailed Description
The basic idea of the invention is: the main overhead account process module periodically synchronizes data in a local database to the standby overhead account process module; in the system operation process, when the main overhead account process module fails, the standby overhead account process module executes data synchronization operation and then replaces the main overhead account process module to work; after the main overhead account process module returns to normal, the standby overhead account process module synchronizes data in the local database to the main overhead account process module; the main overhead account process module executes data synchronization operation and then replaces the standby overhead account process module to work.
In the present invention, the main overhead account process module is: an account opening and canceling process module of an ENUM-DNS server in the main computer room; the backup overhead account process module is as follows: and an account opening and canceling process module of the ENUM-DNS server in the standby machine room.
Further, the standby overhead account process module determines the failure or recovery of the main overhead account process module through the heartbeat message between the standby overhead account process module and the main overhead account process module.
The invention is described in further detail below with reference to the figures and the embodiments.
Fig. 1 is a schematic flow chart of an implementation process of an ENUM-DNS disaster recovery method in an IMS network according to the present invention, as shown in fig. 1, including the following steps:
step 101: the main overhead account process module periodically synchronizes data in a local database to the standby overhead account process module;
the method specifically comprises the following steps: a timed backup script may be placed on the machine where the sybase database of the main room ENUM-DNS server resides, periodically, for example: at 1 am each day, data in the sybase database was written using the bcp command, as: 4 main tables in the database are backed up to a fixed directory; in the present invention, the 4 main tables may include: an Id identification table (eds _ identity), a domain name table (zone table), a number formal table (exist _ res), and a parameter table (net _ param _ conf); the master overhead account process module periodically, for example: reading each zone serial number in a domain name table from a sybase database corresponding to each zone serial number at 1 point every morning, and writing the zone serial numbers into a fixed directory binary file of a local machine; the main account opening and closing process module is provided with a File Transfer Protocol (FTP) script, and a fixed directory binary file of an account opening and closing process module of the ENUM-DNS server of the main computer room is periodically transmitted to a fixed directory of the standby account opening and closing process module through the FTP.
Step 102: in the system operation process, when the main overhead account process module fails, the standby overhead account process module executes data synchronization operation and then replaces the main overhead account process module to work;
in the invention, the main and standby account opening and canceling process modules determine who works through a heartbeat mechanism, specifically, the main and standby account opening and canceling process modules ensure that only the main account opening and canceling process module or the standby account opening and canceling process module opens the receiving and monitoring port of an account opening and canceling at the same time through heartbeat messages, and when the account opening and canceling process module at one side finds that the receiving and monitoring port of the account opening and canceling process module at the other side is not monitoring, the receiving and monitoring port of the account opening and canceling process module is automatically opened. When the method is realized, the following method can be adopted:
and timing a backup account canceling process module, such as: and 3 minutes, sending a hypertext transfer protocol (HTTP) heartbeat request message to the main overhead account process module, and sending an HTTP heartbeat response message after the main overhead account process module receives the HTTP heartbeat request message. If the receiving and monitoring port of the standby overhead account process module is closed and continues for n times, n is a positive integer and can be set to 3, and the standby overhead account process module does not receive the HTTP heartbeat response message of the main overhead account process module, the standby overhead account process module determines that the main overhead account process module has a fault, and the standby overhead account process module opens the receiving and monitoring port of the standby overhead account process module. Wherein, whether the receiving listening port is closed or not can be determined by the corresponding identification.
In the invention, the receiving and monitoring port of the main overhead and sales process module defaults to an open state, and when the overhead and sales process module is started, the receiving and monitoring port defaults to a closed state. Besides, the configuration of the receiving and monitoring port of the backup overhead account process module is the same as that of the receiving and monitoring port of the main overhead account process module.
Step 103: after the main overhead account process module returns to normal, the standby overhead account process module synchronizes data in the local database to the main overhead account process module;
the method specifically comprises the following steps: if the receiving monitoring port of the standby overhead account process module is in an open state and a heartbeat response message sent by the main overhead account process module is received, determining that the main overhead account process module is recovered to be normal; and the standby accounting process module exports 4 main tables in a sybase database in the standby computer room ENUM-DNS server to a fixed directory to generate a binary file, and transmits the binary file to the fixed directory of the main accounting process module through the FTP.
Step 104: the main overhead account process module executes data synchronization operation and then replaces the standby overhead account process module to work.
In the present invention, the flow of the data synchronization operation in step 102 and step 104 is shown in fig. 2, and includes the following steps:
step 201: the accounting process module reads a binary file under a self fixed directory and acquires a zone serial number in another accounting process module sybase database;
here, if the reading fails, the current data synchronization operation is ended, i.e., step 205 is performed.
Step 202: the overhead account process module queries a zone serial number in a self sybase database;
here, if the query fails, the current data synchronization operation is ended, i.e., step 205 is performed.
Step 203: comparing the zone serial number of the account opening process module with the zone serial number of another account opening process module, and if the zone serial number of the account opening process module is larger than or equal to the zone serial number of another account opening process module, executing step 205; otherwise, go to step 204;
here, if the zone serial number of the present overhead process module is greater than or equal to the zone serial number of the other overhead process module, it indicates that the overhead message in the present overhead process module is the latest, that is, is newer than the overhead message in the other overhead process module; otherwise, the account opening and canceling message in the account opening and canceling process module needs to be updated.
Step 204: the invoicing process module imports the backup file in another invoicing process module sybase database under the fixed directory into the local sybase database, and then executes the step 205;
here, the backup file may be a backup file of 4 main tables.
Step 205: the data synchronization operation ends.
In the above flow, the accounting process module is: a main overhead account process module or a standby overhead account process module; in step 102, the accounting process module is a standby accounting process module, and in step 104, the accounting process module is a main accounting process module.
The process of the present invention is described in further detail below with reference to specific examples.
Fig. 3 is a schematic flowchart of a method when a master overhead account process module fails according to an embodiment of the present invention, and as shown in fig. 3, the implementation steps of the flow are as follows:
step 301: the standby overhead account process module sends HTTP heartbeat request information to the main overhead account process module;
step 302: if the standby account canceling process module receives that the monitoring port is closed and does not receive the heartbeat response message for 3 times continuously, the main account canceling process module is confirmed to be in fault;
step 303: the backup overhead process module executes data synchronization operation;
step 304: after the data synchronization operation of the process module for preparing the account opening and closing is successful, a notification message of loading the file is sent to a self business foreground module;
step 305: the service foreground module sends a response message of loading files to the backup account opening process module;
step 306: if the service foreground returns a response message of successful loading, the backup cancellation account process module informs the self service background module to load the file;
step 307: and the standby account opening and canceling process module receives the response message of the service background module, if the loading is successful, the standby account opening and canceling process module informs the communication agent process module to open the receiving and monitoring port and informs the service foreground module to start, and the standby account opening and canceling process module starts to receive the account opening and canceling message.
In the above process, if there is a failure condition in steps 304 to 307, the backup cancellation account process module sends an alarm message to the alarm module, and the process ends.
Fig. 4 is a schematic flowchart of a method for recovering a failure of a master overhead account process module according to an embodiment of the present invention, and as shown in fig. 4, the implementation steps of the flow are as follows:
step 401: the standby overhead account process module sends HTTP heartbeat request information to the main overhead account process module;
step 402: the standby overhead account process module receives an HTTP heartbeat response message returned by the main overhead account process module, and if a receiving monitoring port of the standby overhead account process module is in an open state, the standby overhead account process module determines that the main overhead account process module has recovered from the fault;
step 403: the backup accounting process module closes a receiving and monitoring port of the local machine;
step 404: the backup account cancellation process module informs the self business foreground module, namely: the standby service foreground module stops using;
step 405: the standby account opening and closing process module informs the main account opening and closing process module that the service foreground module of the main account opening and closing process module stops using and the receiving monitoring port is closed;
step 406: the backup overhead and sales process module exports 4 main tables in a sybase database of the backup overhead and sales process module to a fixed directory, generates a binary file and transmits the binary file to the fixed directory of the main overhead and sales process module through FTP (file transfer protocol);
step 407: the standby overhead account process module informs the main overhead account process module to import the binary file into the sybase database;
step 408: the main overhead account process module executes data synchronization operation;
step 409: a main account opening and canceling process module sends a request message for acquiring a sequence number of a current number formal table (exist _ res) to a standby account opening and canceling process module;
here, the purpose of the main overhead account process module obtaining the current exit _ res sequence number from the standby overhead account process module is as follows: and ensuring that the data in the main overhead account progress module is up to date.
Step 410: the standby account opening and canceling process module sends a response message for acquiring the current exit _ res serial number to the main account opening and canceling process module;
here, if this step is successful, the response message includes an exist _ res sequence number sent by the back-up account cancellation process module.
Step 411: the main account opening and closing process module informs the self business foreground module, namely: the main business foreground module loads data;
step 412: the main service foreground module sends a data loading response message to the main invoicing process module;
step 413: if the main service foreground module successfully loads data, the main opening and canceling process module informs the service background module of itself, namely: loading data by a main service background module;
step 414: the main service background module sends a data loading response message to the main account opening and canceling process module;
step 415: if the main service background module successfully loads the data, the main overhead account process module informs the communication agent process module to open the receiving and monitoring port, informs the main service foreground module to start and prepare to receive the overhead account information.
Here, if step 410 fails, the main overhead account process module sends an alarm to the alarm module and goes to step 411; if either step 413 or step 414 fails, then the current flow ends.
In order to implement the above method, the present invention further provides an ENUM-DNS disaster recovery system in an IMS network, as shown in fig. 5, the system includes a main accounting-opening process module disposed in an ENUM-DNS server of a main room and a standby accounting-opening process module disposed in an ENUM-DNS server of a standby room; wherein,
the main overhead account process module is used for periodically synchronizing data in a local database to the standby overhead account process module; after the self fault is recovered, executing data synchronization operation, and then replacing a spare overhead account process module to work;
the backup overhead account process module is used for executing data synchronization operation when the main overhead account process module fails in the system operation process and then replacing the main overhead account process module to work; and after the main overhead account process module is recovered to be normal, synchronizing the data in the local database to the main overhead account process module.
The backup overhead account process module is also used for determining the fault or recovery of the main overhead account process module through HTTP heartbeat messages between the backup overhead account process module and the main overhead account process module; accordingly, the method can be used for solving the problems that,
and the main overhead account process module is also used for communicating with the standby overhead account process module through HTTP heartbeat messages.
The invention also provides an ENUM-DNS server, which comprises an overhead process module, a data synchronization module and an overhead process module, wherein the overhead process module is used for periodically synchronizing data in a local database to the overhead process module in another ENUM-DNS server; after self-failure recovery, data synchronization operation is performed, and then work is performed instead of an overhead process module in another ENUM-DNS server.
The ENUM-DNS server is also used for communicating with an overhead account process module in another ENUM-DNS server through HTTP heartbeat messages.
The invention also provides an ENUM-DNS server, which comprises an overhead process module, a data synchronization module and a data synchronization module, wherein the overhead process module is used for executing data synchronization operation when an overhead process module in another ENUM-DNS server fails in the system operation process and then replacing the overhead process module in another ENUM-DNS server to work; and after the overhead account process module in the other ENUM-DNS server is recovered to be normal, synchronizing the data in the local database to the overhead account process module in the other ENUM-DNS server.
The ENUM-DNS server is also used for determining the failure or recovery of the overhead process module in the other ENUM-DNS server through HTTP heartbeat messages with the overhead process module in the other ENUM-DNS server.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.