CN109672717B - Method, device, storage medium and apparatus for maintaining system consistency - Google Patents

Method, device, storage medium and apparatus for maintaining system consistency Download PDF

Info

Publication number
CN109672717B
CN109672717B CN201811120850.XA CN201811120850A CN109672717B CN 109672717 B CN109672717 B CN 109672717B CN 201811120850 A CN201811120850 A CN 201811120850A CN 109672717 B CN109672717 B CN 109672717B
Authority
CN
China
Prior art keywords
backup
application
main
data
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811120850.XA
Other languages
Chinese (zh)
Other versions
CN109672717A (en
Inventor
方振宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201811120850.XA priority Critical patent/CN109672717B/en
Publication of CN109672717A publication Critical patent/CN109672717A/en
Application granted granted Critical
Publication of CN109672717B publication Critical patent/CN109672717B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Abstract

The invention discloses a method, a device, a storage medium and a device for maintaining system consistency, wherein the method comprises the following steps: monitoring whether a main application program of a main data center issues first application data or not; when it is monitored that the main application program issues first application data, the first application data are obtained and synchronized to a backup application program of a backup data center; determining a configuration difference item between the backup application program and the main application program according to a preset differentiation rule; and calling a preset differentiation tool to correct the configuration difference item in the backup application program according to a preset differentiation rule. In the invention, when the main application program issues the first application data, the first application data is synchronized into the backup application program, so that the backup application program of the backup data center is in a real-time available state and can be switched and used at any time, and the backup application program can continuously provide services when the main application program has a catastrophic event.

Description

Method, device, storage medium and apparatus for maintaining system consistency
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, a device, a storage medium, and an apparatus for maintaining system consistency.
Background
From the protection degree of the system, the disaster recovery system can be divided into: data disaster tolerance and application disaster tolerance.
Data disaster tolerance refers to establishing a data system at a different place, wherein the system is an available copy of local key application data. When the local data and the whole application system have disasters, the system at least stores a piece of available data of key services in different places. This data may be a full real-time copy of the local production data, or may be slightly behind the local data, but must be available. The application disaster recovery is to establish a set of complete backup application systems (which can be mutual backups) equivalent to the local production system in different places on the basis of data disaster recovery. The set-up of such a system is relatively complex, requiring not only a copy of the available data, but also resources including network, host, application and IP, and good coordination between the resources. The main techniques include load balancing and clustering techniques.
MD5, message-Digest Algorithm 5 (fifth edition of the information-Digest Algorithm), has the following characteristics: the calculated MD5 value length is fixed for data with any length; the MD5 value can be easily calculated from the original data; the original data is changed, even if only 1 byte is modified, the obtained MD5 values are very different; knowing the original data and its MD5 value, it is very difficult to find a data with the same MD5 value (i.e., counterfeit data).
There are few Information Technology (IT) system consistency platforms in the financial industry. An IT system consistency platform in the same industry mainly focuses on a bottom operating system or a network layer, detection means for a service system are few, and when a current service system fails, service systems of other data centers cannot be guaranteed to replace the current service system to perform data processing. Therefore, when a service system fails, how to ensure that the disaster recovery environment of the service system of the backup data center is in a real-time available state is an urgent technical problem to be solved.
The above is only for the purpose of assisting understanding of the technical solution of the present invention, and does not represent an admission that the above is the prior art.
Disclosure of Invention
The invention mainly aims to provide a method, equipment, a storage medium and a device for maintaining system consistency, and aims to solve the technical problem that the disaster tolerance environment of a service system of a backup data center cannot be guaranteed to be in a real-time available state in the prior art.
In order to achieve the above object, the present invention provides a method for maintaining system consistency, comprising the following steps:
monitoring whether a main application program of a main data center issues first application data or not;
when it is monitored that the main application program issues first application data, the first application data are obtained, and the first application data are synchronized into a backup application program of a backup data center;
determining a configuration difference item between the backup application program and the main application program according to a preset differentiation rule;
and calling a preset differentiation tool to correct the configuration difference item in the backup application program according to the preset differentiation rule.
Preferably, before determining the configuration difference item between the backup application and the main application according to the preset difference rule, the method for maintaining system consistency further includes:
acquiring second application data for realizing synchronization in the backup application program of the backup data center;
calculating a fifth version value of a first message digest algorithm of the first application data and a fifth version value of a second message digest algorithm of the second application data;
judging whether the fifth version value of the first message digest algorithm is consistent with the fifth version value of the second message digest algorithm;
and if the data are consistent, the second application data are judged to be successfully synchronized.
Preferably, after determining whether the fifth version value of the first message digest algorithm is consistent with the fifth version value of the second message digest algorithm, the method for maintaining system consistency further includes:
if the data are inconsistent, the second application data are determined to be failed to be synchronized;
comparing the second application data with the first application data to obtain an application data difference item in the second application data;
and correcting the application data difference item according to the first application data.
Preferably, after the calling a preset differentiation tool modifies the configuration difference item in the backup application according to the preset differentiation rule, the method for maintaining system consistency further includes:
acquiring main operating system parameters of the main data center and backup operating system parameters of the backup data center;
comparing the backup operating system parameters with the main operating system parameters to obtain operating system parameter difference items in the backup operating system parameters;
and correcting the operating system parameter difference item according to the main operating system parameter.
Preferably, after the operating system parameter difference item is corrected according to the main operating system parameter, the method for maintaining system consistency further includes:
acquiring main network parameters of the main data center and backup network parameters of the backup data center;
comparing the main network parameters with the backup network parameters to obtain network parameter difference items in the backup network parameters;
and correcting the network parameter difference item according to the main network parameter.
Preferably, before the monitoring whether the primary application of the primary data center issues the first application data, the method for maintaining system consistency further includes:
acquiring a first application file of a main server of the main data center and a second application file of a backup server of the backup data center;
comparing the first application file with the second application file to obtain a difference dimension;
and setting corresponding preset differentiation rules for the difference dimensionality.
Preferably, the invoking a preset differentiation tool to correct the configuration difference item in the backup application according to the preset differentiation rule includes:
performing rule matching on the configuration difference items in the backup application program according to the preset differentiation rule;
and calling a preset differentiation tool to correct the configuration difference items which are not matched.
Furthermore, to achieve the above object, the present invention further provides a device for maintaining system consistency, which includes a memory, a processor, and a program for maintaining system consistency stored in the memory and running on the processor, wherein the program for maintaining system consistency is configured to implement the steps of the method for maintaining system consistency as described above.
Furthermore, to achieve the above object, the present invention further provides a storage medium having a system consistency maintaining program stored thereon, wherein the system consistency maintaining program, when executed by a processor, implements the steps of the method for maintaining system consistency as described above.
In addition, to achieve the above object, the present invention further provides a system consistency maintaining apparatus, including: the monitoring module is used for monitoring whether a main application program of the main data center issues first application data or not;
the synchronization module is used for acquiring first application data and synchronizing the first application data to a backup application program of a backup data center when the situation that the main application program issues the first application data is monitored;
the determining module is used for determining a configuration difference item between the backup application program and the main application program according to a preset differentiation rule;
and the correcting module is used for calling a preset differentiation tool to correct the configuration difference item in the backup application program according to the preset differentiation rule.
In the invention, whether a main application program of a main data center issues first application data is monitored, when the fact that the main application program issues the first application data is monitored, the first application data is obtained and is synchronized into a backup application program of a backup data center, so that the data in the backup application program of the backup data center can be synchronized at the first time, and the backup application program can be ensured to continuously provide services by replacing the main application program at any time; determining a configuration difference item between the backup application program and the main application program according to a preset difference rule; and calling a preset differentiation tool to correct the configuration difference items in the backup application program according to the preset differentiation rule so as to ensure the correctness of data synchronized to the backup application program, realize that the backup application program of the backup data center is in a real-time available state, can be switched and used at any time, ensure the consistency of multi-system data and ensure the real-time availability of services.
Drawings
Fig. 1 is a schematic structural diagram of a device for maintaining system consistency in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a method for maintaining system consistency according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a method for maintaining system consistency according to the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of a method for maintaining system consistency according to the present invention;
FIG. 5 is a block diagram of a first embodiment of a device for maintaining system consistency according to the present invention.
The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a device for maintaining system consistency in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the apparatus for maintaining system consistency may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), and the optional user interface 1003 may further include a standard wired interface and a wireless interface, and the wired interface for the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory or a Non-volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in FIG. 1 does not constitute a limitation on the apparatus for maintaining system consistency and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in FIG. 1, memory 1005, identified as one type of computer storage medium, may include an operating system, a network communications module, a user interface module, and a system consistency maintenance program.
In the apparatus for maintaining system consistency shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting user equipment; the apparatus for maintaining system consistency calls a program for maintaining system consistency stored in the memory 1005 through the processor 1001 and executes the method for maintaining system consistency according to the embodiment of the present invention.
Based on the above hardware structure, an embodiment of the method for maintaining system consistency according to the present invention is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for maintaining system consistency according to a first embodiment of the present invention.
In a first embodiment, the method for maintaining system consistency comprises the following steps:
step S10: a primary application of a primary data center is monitored for publishing of first application data.
It should be understood that the main implementation body of the present embodiment is a system consistency maintaining device, wherein the system consistency maintaining device may be an electronic device such as a personal computer or a server. In order to ensure that disaster recovery environments of service systems of a plurality of data centers are in a real-time available state, the disaster recovery environments can be switched and used at any time. When the application program of the main data center issues daily application data, the issued first application data needs to be backed up to backup application programs of other backup data centers. The first application data includes: application files and application configuration files. And monitoring the main application program of the main data center in real time, and synchronizing the first application data to a backup application program of a backup data center at the first time when the main application program of the main data center is monitored to issue the first application data.
Step S20: when it is monitored that the main application program issues first application data, the first application data are obtained, and the first application data are synchronized to a backup application program of a backup data center.
It is understood that the backup data center is at least one backup data center, and typically a plurality of backup data centers. The synchronization between the application programs of the main data center and the backup data center can be performed in a mode of presetting a synchronization tool and presetting a differentiation tool. The preset synchronization tool may be configured to: the main server and the backup server can be configured from the dimensions of a directory, a user and a file, and the application program file and the application configuration file are synchronized to the backup server corresponding to the backup data center from the main server corresponding to the main data center.
It should be noted that the preset synchronization tool may use a Remote synchronization (rsync for short) tool to implement synchronization of the active and standby files, where the rsync is a data mirror image backup tool in the linux system, and the Remote synchronization may use a Remote incremental backup tool, remote Sync, and support local replication. In this embodiment, the step S20 includes: when it is monitored that the main application program issues first application data, acquiring the first application data; and synchronizing the first application data to a backup application program of a backup data center through a preset synchronization tool.
Step S30: and determining a configuration difference item between the backup application program and the main application program according to a preset difference rule.
In specific implementation, directories, files, users, permissions, attribute names and backup attribute values of different data centers are different, the directories are application system directories corresponding to the data centers, the users are application system users corresponding to the data centers, the permissions are read-write permissions of the users on corresponding application programs in the data centers, and the attribute names include user names, passwords and the like. The corresponding preset differentiation rule can be preset for the part with the difference, and the difference item between the backup application program and the main application program is corrected according to the preset differentiation rule, so that the backup application program meets the differentiation rule, is suitable for the backup data center and can be called at any time for service processing.
In this embodiment, before the step S10, the method further includes:
acquiring a first application file of a main server of the main data center and a second application file of a backup server of the backup data center;
comparing the first application file with the second application file to obtain a difference dimension;
and setting corresponding preset differentiation rules for the difference dimensionality.
It should be noted that different configuration files are generally read according to different data centers, because different databases, directories, or users connected to different data centers are different, and resource configurations of different data centers are also different. The first application file comprises an application program file and an application configuration file in the main server; the second application file includes an application program file and an application configuration file in the backup server. The difference dimension includes: directory, file, user, authority, attribute name, and backup attribute value. The preset differentiation rules corresponding to each dimension may be set in advance from the difference dimension, for example, a directory, where the directory in the application file configuration of the primary server of the primary data center is: a-b-c, and the directories in the application file configuration of the backup server of the backup data center are as follows: d-e-f-g, the preset differentiation rule that can be set with respect to the dimension of the directory is to modify a-b-c to d-e-f-g. Matching rule by rule according to the preset differentiation rule set in advance so as to determine the configuration difference item between the backup application program and the main application program.
Step S40: and calling a preset differentiation tool to correct the configuration difference item in the backup application program according to the preset differentiation rule.
It should be understood that the preset differentiation tool may be configured with: and the difference item between the first application file configuration in the main server corresponding to the main data center and the second application file configuration in the backup server corresponding to the backup data center. The difference items between the first application file configuration and the second application file configuration can be found by comparing dimensions such as a directory, a file, a user, a right, an attribute name and a backup terminal attribute value. The catalog is an application system catalog corresponding to each data center, the user is an application system user corresponding to each data center, the authority is the read-write authority of the user to the corresponding application program in each data center, the attribute name comprises a user name, a password and the like, corresponding strategies are set for various files in each dimensionality, namely, the preset differentiation rule is set, the configuration difference item between the main application program and the backup application program is determined through the preset differentiation rule, and all second application data synchronized to the backup application program are subjected to rule matching through a self-designed preset differentiation tool according to the preset differentiation rule to execute differentiation correction.
It can be understood that the preset differentiation rule is a rule set from dimensions of a directory, a file, a user, a right, an attribute name and a backup attribute value, the configuration difference items in the backup application program are subjected to rule-by-rule matching according to the preset differentiation rule, and if the configuration difference items in the backup application program cannot match the preset differentiation rule, the configuration difference items which cannot be matched need to be corrected by the preset differentiation tool so as to be in line with a backup server of a backup data center, so that the backup application program is normally operated in the backup data center. In this embodiment, the step S40 includes: performing rule matching on the configuration difference items in the backup application program according to the preset differentiation rule; calling preset differentiation tool pair to be unmatched the above configuration difference term is corrected.
In a first embodiment, whether a main application program of a main data center issues first application data is monitored, when the fact that the main application program issues the first application data is monitored, the first application data is obtained and synchronized into a backup application program of a backup data center, so that data in the backup application program of the backup data center can be synchronized at the first time, and the backup application program can provide services by replacing the main application program continuously at any time; determining a configuration difference item between the backup application program and the main application program according to a preset differentiation rule; and calling a preset differentiation tool to correct the configuration difference item in the backup application program according to the preset differentiation rule so as to ensure the correctness of the data synchronized to the backup application program, realize that the backup application program of the backup data center is in a real-time available state, can be switched and used at any time, ensure the consistency of multi-system data and ensure the real-time availability of services.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for maintaining system consistency according to a second embodiment of the present invention, which is proposed based on the first embodiment illustrated in fig. 2.
In the second embodiment, before the step S30, the method further includes:
step S201: and acquiring second application data for realizing synchronization in the backup application program of the backup data center.
It can be understood that, in order to ensure the accuracy of the synchronization of the first application data when the synchronization of the first application data is performed, the second application data for achieving the synchronization may be acquired from the backup application program of the backup data center, and the accuracy of the second application data may be determined by comparing the first application data with the second application data.
Step S202: and calculating a fifth version value of a first message digest algorithm of the first application data and a fifth version value of a second message digest algorithm of the second application data.
It should be noted that, because any change is made to the original data, even if only 1 byte is modified, the obtained MD5 values are very different, and it is easy to calculate the MD5 value from the original data. Therefore, the fifth version (MD 5) value of the first message digest algorithm of the first application data and the fifth version (MD 5) value of the second message digest algorithm of the second application data can be calculated, and the fifth version value of the first message digest algorithm and the fifth version value of the second message digest algorithm are compared, so that whether the first application data is consistent with the second application data can be judged.
Step S203: and judging whether the fifth version value of the first message digest algorithm is consistent with the fifth version value of the second message digest algorithm.
It should be understood that, since the length of the calculated MD5 value is fixed for any length of data, the fifth version value of the first message digest algorithm may be compared with the fifth version value of the second message digest algorithm to determine whether the fifth version value of the first message digest algorithm is consistent with the fifth version value of the second message digest algorithm, and if so, it indicates that the first application data is consistent with the second application data, and there is no difference.
Step S204: and if the second application data are consistent, the second application data are judged to be successfully synchronized.
In a specific implementation, if the fifth version value of the first message digest algorithm is consistent with the fifth version value of the second message digest algorithm, it indicates that there is no error in data transmission when the first application data is synchronized into the backup application program of the backup data center, and the synchronized second application data in the backup application program is correct and can replace the main application program at any time for performing service processing without correction.
In the second embodiment, after the step S203, the method further includes:
step S205: and if the data are inconsistent, determining that the second application data synchronization fails.
It can be understood that if the fifth version value of the first message digest algorithm is inconsistent with the fifth version value of the second message digest algorithm, it indicates that there is an error in data transmission when the first application data is synchronized to the backup application program of the backup data center, and the second application data synchronized to the backup application program is incorrect and needs to be corrected.
Step S206: and comparing the second application data with the first application data to obtain an application data difference item in the second application data.
It should be noted that, in order to ensure that the backup application program of the backup data center can be called in real time to replace the main application program to implement service continuity service, the second application data and the data items in the first application data may be compared one by one, an application data difference item in the second application data is found out, and then the application data difference item in the second application data is corrected, so that the second application data in the backup application program is consistent with the first application data in the main application program.
Step S207: and correcting the application data difference item according to the first application data.
It should be understood that, in order to make the second application data in the backup application correct, the application data difference item may be modified by the first application data, so that the modified second application data is consistent with the first application data, thereby ensuring that the backup application of the backup data center can be invoked in real time, instead of the main application, to implement a business continuity service.
In a second embodiment, in order to ensure that the accuracy of data synchronization is ensured when the first application data is synchronized, whether MD5 values of application data in the same application program in the primary data center and the backup data center are consistent or not may be determined by calculating MD5 values of application data in the same application program in the primary data center and the backup data center, if so, it is determined that the second application data synchronized by the backup application program is correct, and if not, it is determined that the second application data synchronized by the backup application program is incorrect, and the application difference item needs to be checked and corrected. The method and the device can be used for verifying the application data in the same application program of different data centers and ensuring the integrity of the synchronous data.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for maintaining system consistency according to a third embodiment of the present invention, which is proposed based on the second embodiment shown in fig. 3.
In the third embodiment, after the step S40, the method further includes:
step S401: and acquiring the parameters of a main operating system of the main data center and the parameters of a backup operating system of the backup data center.
It should be understood that the operating system parameters are used to determine whether the system is configured according to a preset standardization and whether a wrong cause system level risk is set. The main operating system parameters of the main data center and the backup operating system parameters of the backup data center can be acquired in the operating system corresponding to the main data center and the operating system corresponding to the backup data center through a self-developed data acquisition tool. The operating system parameters include: CPU, memory, disk space, network card and operating system digit.
Step S402: and comparing the backup operating system parameters with the main operating system parameters to obtain operating system parameter difference items in the backup operating system parameters.
It can be understood that, in order to ensure the consistency of the operating system configurations of the primary data center and the backup data center, the risk of system unavailability caused by the inconsistency of the operating system configurations of the two places after the system is switched is avoided. Comparing the backup operating system parameters with the main operating system parameters, finding out the operating system parameter difference items between the backup operating system parameters and the main operating system parameters, and comparing the backup operating system parameters with the main operating system parameters one by one through a self-development tool so as to obtain difference items, namely the operating system parameter difference items.
Step S403: and correcting the operating system parameter difference item according to the main operating system parameter.
In a specific implementation, in order to keep the backup operating system parameters in the backup data center consistent with the main operating system parameters, the operating system parameter difference items may be modified by the main operating system parameters, so that the modified backup operating system parameters are kept consistent with the main operating system parameters, thereby ensuring that the backup operating system parameters in the backup data center are kept consistent with the main operating system parameters in the main data center, and avoiding a risk of system unavailability due to inconsistency after system switching.
In the third embodiment, after the step S403, the method further includes:
step S404: and acquiring the main network parameters of the main data center and the backup network parameters of the backup data center.
It should be noted that the network parameters are used for viewing a network switch and an F5 Load balancing (Load Balance) application configuration, and the network parameters generally refer to parameters of a four-port network, which include a Z parameter, a Y parameter, an a parameter, a characteristic parameter, and the like. The main network parameters of the main data center and the backup network parameters of the backup data center can be acquired in the network equipment and the F5 load balancing equipment corresponding to the main data center and the network equipment and the F5 load balancing equipment corresponding to the backup data center through a self-developed data acquisition tool.
Step S405: and comparing the main network parameters with the backup network parameters to obtain network parameter difference items in the backup network parameters.
It should be understood that, in order to ensure consistency of the network parameter configurations of the primary data center and the backup data center, the risk that the system is unavailable due to inconsistency of the network parameter configurations of the two places after the system is switched is avoided. Comparing the backup network parameters with the main network parameters, finding out the network parameter difference items between the backup network parameters and the main network parameters, and comparing the backup network parameters with the main network parameters one by one through a self-development tool so as to obtain difference items, namely the network parameter difference items.
Step S406: and correcting the network parameter difference item according to the main network parameter.
It can be understood that, in order to keep the backup network parameters in the backup data center consistent with the main network parameters, the network parameter difference item may be modified by the main network parameters, so as to keep the modified backup network parameters consistent with the main network parameters, thereby ensuring that the backup network parameters in the backup data center are consistent with the network parameters in the main data center, and avoiding the risk of system unavailability due to inconsistency after system switching.
In the third embodiment, after the step S406, the method further includes:
and monitoring whether a main application program of the main data center is normal, and starting the backup application program of the backup data center when the main application program is monitored to be abnormal.
It should be noted that, in order to avoid that the service continuity of the service system is ensured when the main application of the main data center has a catastrophic event, the main application of the main data center may be monitored in real time, and when it is monitored that the main application is abnormal, the backup application of the backup data center may be immediately switched to. The backup application program of the backup data center is consistent with the main application program of the main data center, so that the backup application program and the main application program can be switched and used in real time.
In the third embodiment, the operating system parameters are used for determining whether the system is configured according to the preset standardization and whether the risk of causing the system level by mistake is set; the network parameters are used for checking the network switch and the F5 load balancing application configuration, comparing the operating system and the network parameter configuration corresponding to the main and standby data centers to obtain a difference item, correcting the difference item of the standby data center to a configuration consistent with the main data center, and ensuring the consistency of the application configuration, the network configuration and the load balancing configuration of two places, so that the risk that the system is unavailable due to inconsistency after the system is switched is avoided.
Furthermore, an embodiment of the present invention further provides a storage medium, where a system consistency maintaining program is stored on the storage medium, and the system consistency maintaining program, when executed by a processor, implements the steps of the method for maintaining system consistency as described above.
In addition, referring to fig. 5, an embodiment of the present invention further provides a device for maintaining system consistency, where the device for maintaining system consistency includes: the monitoring module 10 is used for monitoring whether a main application program of the main data center issues first application data;
the synchronization module 20 is configured to, when it is monitored that the primary application program issues first application data, acquire the first application data, and synchronize the first application data to a backup application program in a backup data center;
a determining module 30, configured to determine a configuration difference item between the backup application program and the main application program according to a preset differentiation rule;
and the correcting module 40 is configured to invoke a preset differentiation tool to correct the configuration difference item in the backup application program according to the preset differentiation rule.
In one embodiment, the apparatus for maintaining system consistency further comprises: the acquisition module is used for acquiring second application data which is synchronized in the backup application program of the backup data center;
the calculation module is used for calculating a fifth version value of a first message digest algorithm of the first application data and a fifth version value of a second message digest algorithm of the second application data;
the judging module is used for judging whether the fifth version value of the first message digest algorithm is consistent with the fifth version value of the second message digest algorithm;
and the confirming module is used for confirming that the second application data is successfully synchronized if the second application data is consistent with the second application data.
In an embodiment, the determining module is further configured to determine that the second application data synchronization fails if the second application data synchronization fails;
the device for maintaining system consistency further comprises: the comparison module is used for comparing the second application data with the first application data to obtain an application data difference item in the second application data;
the correcting module 40 is further configured to correct the application data difference item according to the first application data.
In an embodiment, the obtaining module is further configured to obtain a primary operating system parameter of the primary data center and a backup operating system parameter of the backup data center;
the comparison module is further configured to compare the backup operating system parameters with the main operating system parameters to obtain operating system parameter difference items in the backup operating system parameters;
the correcting module 40 is further configured to correct the operating system parameter difference item according to the main operating system parameter.
In an embodiment, the obtaining module is further configured to obtain a main network parameter of the main data center and a backup network parameter of the backup data center;
the comparison module is further configured to compare the main network parameters with the backup network parameters to obtain network parameter difference items in the backup network parameters;
the correcting module 40 is further configured to correct the network parameter difference item according to the main network parameter.
In an embodiment, the obtaining module is further configured to obtain a first application file of a primary server of the primary data center and a second application file of a backup server of the backup data center;
the comparison module is further used for comparing the first application file with the second application file to obtain a difference dimension;
the device for maintaining system consistency further comprises: and the setting module is used for setting corresponding preset differentiation rules for the difference dimensionality.
In one embodiment, the apparatus for maintaining system consistency further comprises: the matching module is used for carrying out rule matching on the configuration difference items in the backup application program according to the preset differentiation rule;
the correcting module 40 is further configured to call a preset differentiation tool to correct the configuration difference item that is not matched.
Other embodiments or specific implementations of the apparatus for maintaining system consistency according to the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or system comprising the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering and these words may be interpreted as names.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (such as a Read Only Memory image (ROM)/Random Access Memory (RAM), a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for maintaining system consistency, the method comprising the steps of:
monitoring whether a main application program of a main data center issues first application data or not;
when it is monitored that the main application program issues first application data, the first application data are obtained, and the first application data are synchronized into a backup application program of a backup data center;
determining a configuration difference item between the backup application program and the main application program according to a preset differentiation rule;
calling a preset differentiation tool to correct the configuration difference item in the backup application program according to the preset differentiation rule;
after the calling a preset differentiation tool modifies the configuration difference item in the backup application program according to the preset differentiation rule, the method for maintaining system consistency further includes:
acquiring main operating system parameters of the main data center and backup operating system parameters of the backup data center;
comparing the backup operating system parameters with the main operating system parameters to obtain operating system parameter difference items in the backup operating system parameters;
correcting the operating system parameter difference item according to the main operating system parameter;
after the operating system parameter difference item is modified according to the main operating system parameter, the method for maintaining system consistency further includes:
acquiring main network parameters of the main data center and backup network parameters of the backup data center;
comparing the main network parameters with the backup network parameters to obtain network parameter difference items in the backup network parameters;
and correcting the network parameter difference item according to the main network parameter.
2. The method for maintaining system consistency of claim 1, wherein before determining the configuration difference item between the backup application and the primary application according to the preset differentiation rule, the method for maintaining system consistency further comprises:
acquiring second application data for realizing synchronization in the backup application program of the backup data center;
calculating a fifth version value of a first message digest algorithm of the first application data and a fifth version value of a second message digest algorithm of the second application data;
judging whether the fifth version value of the first message digest algorithm is consistent with the fifth version value of the second message digest algorithm;
and if the data are consistent, the second application data are judged to be successfully synchronized.
3. The method of claim 2, wherein after determining whether the fifth version of the first message digest algorithm value is consistent with the fifth version of the second message digest algorithm value, the method further comprises:
if the data are inconsistent, the second application data are determined to be failed to be synchronized;
comparing the second application data with the first application data to obtain an application data difference item in the second application data;
and correcting the application data difference item according to the first application data.
4. A method for maintaining system consistency as defined in any one of claims 1 to 3, wherein prior to monitoring whether the primary application of the primary data center publishes the first application data, the method for maintaining system consistency further comprises:
acquiring a first application file of a main server of the main data center and a second application file of a backup server of the backup data center;
comparing the first application file with the second application file to obtain a difference dimension;
and setting corresponding preset differentiation rules for the difference dimensionality.
5. The method according to any one of claims 1 to 3, wherein the invoking a preset differentiation tool to modify the configuration difference item in the backup application according to the preset differentiation rule comprises:
performing rule matching on the configuration difference items in the backup application program according to the preset differentiation rule;
and calling a preset differentiation tool to correct the configuration difference items which are not matched.
6. An apparatus for maintaining system consistency, the apparatus comprising: a memory, a processor and a maintain system consistency program stored on the memory and executable on the processor, the maintain system consistency program when executed by the processor implementing the steps of the maintain system consistency method as claimed in any one of claims 1 to 5.
7. A storage medium having stored thereon a system consistency maintaining program, the system consistency maintaining program when executed by a processor implementing the steps of the method of maintaining system consistency as claimed in any one of claims 1 to 5.
8. An apparatus for maintaining system consistency, the apparatus comprising: the monitoring module is used for monitoring whether a main application program of the main data center issues first application data or not;
the synchronization module is used for acquiring first application data and synchronizing the first application data to a backup application program of a backup data center when the situation that the main application program issues the first application data is monitored;
the determining module is used for determining a configuration difference item between the backup application program and the main application program according to a preset differentiation rule;
the correcting module is used for calling a preset differentiation tool to correct the configuration difference item in the backup application program according to the preset differentiation rule;
the apparatus for maintaining system consistency further comprises: the acquisition module is used for acquiring the parameters of a main operating system of the main data center and the parameters of a backup operating system of the backup data center;
the comparison module is used for comparing the backup operating system parameters with the main operating system parameters to obtain operating system parameter difference items in the backup operating system parameters;
the correction module is further used for correcting the operating system parameter difference item according to the main operating system parameter;
the acquisition module is further configured to acquire a main network parameter of the main data center and a backup network parameter of the backup data center;
the comparison module is further configured to compare the main network parameters with the backup network parameters to obtain network parameter difference items in the backup network parameters;
the correction module is further configured to correct the network parameter difference item according to the main network parameter.
CN201811120850.XA 2018-09-25 2018-09-25 Method, device, storage medium and apparatus for maintaining system consistency Active CN109672717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811120850.XA CN109672717B (en) 2018-09-25 2018-09-25 Method, device, storage medium and apparatus for maintaining system consistency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811120850.XA CN109672717B (en) 2018-09-25 2018-09-25 Method, device, storage medium and apparatus for maintaining system consistency

Publications (2)

Publication Number Publication Date
CN109672717A CN109672717A (en) 2019-04-23
CN109672717B true CN109672717B (en) 2023-02-03

Family

ID=66141622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811120850.XA Active CN109672717B (en) 2018-09-25 2018-09-25 Method, device, storage medium and apparatus for maintaining system consistency

Country Status (1)

Country Link
CN (1) CN109672717B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI772685B (en) * 2019-09-26 2022-08-01 兆豐國際商業銀行股份有限公司 Business message monitoring system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023879A (en) * 2012-11-26 2013-04-03 国电南瑞科技股份有限公司 Method for synchronizing wide area data between data centers based on cache
CN103838646A (en) * 2014-02-13 2014-06-04 中国科学院国家天文台 System and method for big data remote disaster recovery backup of ground application
CN105589961A (en) * 2015-12-21 2016-05-18 武汉达梦数据库有限公司 Method and system for detecting data consistency of real-time synchronous system of database
CN105681078A (en) * 2016-01-11 2016-06-15 努比亚技术有限公司 Network parameter upgrading device and method
CN107908708A (en) * 2017-11-09 2018-04-13 北京锐安科技有限公司 A kind of method, system, equipment and the storage medium of group document synchronization

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101381551B1 (en) * 2006-05-05 2014-04-11 하이버 인크 Group based complete and incremental computer file backup system, process and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023879A (en) * 2012-11-26 2013-04-03 国电南瑞科技股份有限公司 Method for synchronizing wide area data between data centers based on cache
CN103838646A (en) * 2014-02-13 2014-06-04 中国科学院国家天文台 System and method for big data remote disaster recovery backup of ground application
CN105589961A (en) * 2015-12-21 2016-05-18 武汉达梦数据库有限公司 Method and system for detecting data consistency of real-time synchronous system of database
CN105681078A (en) * 2016-01-11 2016-06-15 努比亚技术有限公司 Network parameter upgrading device and method
CN107908708A (en) * 2017-11-09 2018-04-13 北京锐安科技有限公司 A kind of method, system, equipment and the storage medium of group document synchronization

Also Published As

Publication number Publication date
CN109672717A (en) 2019-04-23

Similar Documents

Publication Publication Date Title
CN107729041B (en) Application program hot updating method, device, terminal and storage medium
CN108874644B (en) Data monitoring method and device, computer equipment and storage medium
CN111586147B (en) Node synchronization method, device, equipment and storage medium of block chain
CN111124755A (en) Cluster node fault recovery method and device, electronic equipment and storage medium
CN110737719B (en) Data synchronization method, device, equipment and computer readable storage medium
CN112286728A (en) Data backup method, device, equipment and computer storage medium
CN112596951A (en) NAS data disaster tolerance method, device, equipment and storage medium
CN112214351A (en) Backup data recovery method and device, electronic equipment and storage medium
CN114328029B (en) Backup method and device of application resources, electronic equipment and storage medium
CN105303103A (en) Method for protecting service process in mobile terminal and mobile terminal
CN109672717B (en) Method, device, storage medium and apparatus for maintaining system consistency
CN111694845A (en) Redis-based identifier generation method and device
CN111654522A (en) File synchronization method, file synchronization server and storage medium
WO2020211362A1 (en) Method and apparatus for improving availability of trunking system, and computer device
CN112631839A (en) Method, device and equipment for realizing data backup
CN113869989B (en) Information processing method and device
CN110908801A (en) Data processing method and device based on block chain, computer equipment and storage medium
EP4080827A1 (en) Cloud system migration method and device, and hybrid cloud system
CN115567218A (en) Data processing method and device of security certificate based on block chain and server
CN110809051B (en) Service data processing method and system
CN109325057B (en) Middleware management method, device, computer equipment and storage medium
CN113806138A (en) Backup recovery detection method and device for database, electronic equipment and storage medium
CN111404737A (en) Disaster recovery processing method and related device
CN116185462B (en) Method, system, computer and readable storage medium for front-end application upgrade
CN115016824B (en) Service security updating method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant