CN114900532A - Power data disaster tolerance method, system, device, computer equipment and storage medium - Google Patents

Power data disaster tolerance method, system, device, computer equipment and storage medium Download PDF

Info

Publication number
CN114900532A
CN114900532A CN202210496130.3A CN202210496130A CN114900532A CN 114900532 A CN114900532 A CN 114900532A CN 202210496130 A CN202210496130 A CN 202210496130A CN 114900532 A CN114900532 A CN 114900532A
Authority
CN
China
Prior art keywords
server
power data
processed
power
data
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.)
Pending
Application number
CN202210496130.3A
Other languages
Chinese (zh)
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.)
China Southern Power Grid Big Data Service Co ltd
Original Assignee
China Southern Power Grid Big Data Service 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 China Southern Power Grid Big Data Service Co ltd filed Critical China Southern Power Grid Big Data Service Co ltd
Priority to CN202210496130.3A priority Critical patent/CN114900532A/en
Publication of CN114900532A publication Critical patent/CN114900532A/en
Pending legal-status Critical Current

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Abstract

The application relates to a power data disaster tolerance method, a system, a device, a computer device, a storage medium and a computer program product. When the second server fails, the to-be-processed power service request which is processed by the second server is obtained. The first server processes the pending power service request according to the same service processing logic as the second server and stores the pending power data as stored power data, wherein the stored power data and the service processing logic in the first server are synchronized with the first server when the second server stores the pending power data. And when the second server is detected to run again, the first server and the second server perform data recovery. Compared with the traditional backup disaster recovery mode based on the local disk, the scheme performs data disaster recovery backup by using the first server which has the same stored power data and service processing logic as the second server, thereby realizing non-inductive processing of services and improving backup efficiency of power data disaster recovery.

Description

Power data disaster tolerance method, system, device, computer equipment and storage medium
Technical Field
The present application relates to the field of power security technologies, and in particular, to a power data disaster recovery method, system, apparatus, computer device, storage medium, and computer program product.
Background
With the development of big data and artificial intelligence, the fundamental change of production, operation, management and service modes is promoted by taking digitalization as core power. The big data is used as a data core of the production system, comprises relational data, analytical data and unstructured data, and plays a role of a business data base. The unstructured data are frequently used in the business of the power industry and occupy the important position of the power industry, so how to ensure the safety and credibility of the unstructured data of the power becomes the primary problem to be solved by power production. At present, when the power data is subjected to natural disasters or artificial damages, the power data is usually copied by a local disk. However, the disaster recovery method using the local disk is likely to cause the situation that the backup data is inconsistent with the actual data.
Therefore, the existing power data disaster recovery method has the defect of low backup efficiency.
Disclosure of Invention
In view of the above, it is necessary to provide a power data disaster recovery method, system, apparatus, computer device, storage medium, and computer program product capable of improving backup efficiency.
In a first aspect, the present application provides a power data disaster recovery method, applied to a first server, where the method includes:
detecting fault information of a second server, and acquiring a to-be-processed power service request of the second server; the power service request to be processed comprises power data to be processed; the first server stores the same stored power data and business processing logic as the second server; the stored power data and service processing logic is obtained by performing data synchronization with the first server when the second server stores the power data to be processed in the power service request sent by the user terminal;
and processing the to-be-processed power service request according to the service processing logic, and storing the to-be-processed power data into a first database of the first server as stored power data.
In one embodiment, the method further comprises:
receiving a multi-copy replication request sent by the second server; the multi-copy replication request comprises processed power data obtained after the second server processes a power service request sent by the user terminal;
acquiring processed power data in the multiple copy requests and storing the processed power data in a first database to obtain stored power data;
sending storage completion information to the second server; and the second server is used for receiving the storage completion information and returning the electric power service processing completion information to the user terminal.
In one embodiment, after the processing the pending power service request according to the service processing logic and storing the pending power data in the first database of the first server as the stored power data, the method further comprises:
and receiving the operation recovery information sent by the second server, and synchronizing the stored electric power data in the first database with the stored electric power data in the second database of the second server through an object storage gateway service.
In a second aspect, the present application provides a power data disaster tolerance method, which is applied to a second server, and the method includes:
detecting the fault information of the second server, and sending a to-be-processed power service request including to-be-processed power data sent by a user terminal to the first server; the first server is used for processing the power service request to be processed according to the same service processing logic as the second server and storing the power data to be processed into a first database of the first server as stored power data;
and detecting the recovery operation information of the second server, and synchronizing the stored electric power data in the first database with the stored electric power data in the second database of the second server through an object storage gateway service.
In one embodiment, the method further comprises:
receiving a power service request sent by a user terminal, and acquiring to-be-processed power data in the power service request;
processing the power service request according to the service processing logic to obtain processed power data, and storing the processed power data to a second database of the second server as stored power data;
sending a multi-copy replication request including the processed power data to the first server; the first server is used for acquiring the processed power data in the multi-copy replication request and storing the processed power data in a first database to obtain the stored power data.
In one embodiment, after the sending the multiple copy replication request including the processed power data to the first server, the method further includes:
receiving storage completion information sent by the first server;
and returning electric power service processing completion information corresponding to the electric power service to the user terminal.
In a third aspect, the present application provides a power data disaster recovery system, including: the system comprises a user terminal, a first server and a second server;
the user terminal is used for sending a to-be-processed power service request comprising to-be-processed power data to the second server;
the second server is used for detecting the fault information of the second server and sending a to-be-processed power service request including to-be-processed power data sent by the user terminal to the first server;
the first server is used for processing the electric power service request to be processed according to the same service processing logic as the second server, and storing the electric power data to be processed into a first database of the first server as stored electric power data.
In a fourth aspect, the present application provides an electric power data disaster recovery device, which is applied to a first server, and includes:
the first acquisition module is used for detecting the fault information of a second server and acquiring a to-be-processed power service request of the second server; the power service request to be processed comprises power data to be processed; the first server stores the same stored power data and business processing logic as the second server; the stored power data and the service processing logic are obtained by performing data synchronization with the first server when the second server stores the power data to be processed in the power service request sent by the user terminal;
and the processing module is used for processing the power service request to be processed according to the service processing logic and storing the power data to be processed into a first database of the first server as stored power data.
In a fifth aspect, the present application provides an electric power data disaster recovery device, which is applied to a second server, and the device includes:
the sending module is used for detecting the fault information of the second server and sending a to-be-processed power service request which is sent by the user terminal and comprises to-be-processed power data to the first server; the first server is used for processing the power service request to be processed according to the same service processing logic as the second server and storing the power data to be processed into a first database of the first server as stored power data;
and the recovery module is used for detecting the recovery operation information of the second server and synchronizing the stored electric power data in the first database with the stored electric power data in the second database of the second server through an object storage gateway service.
In a sixth aspect, the present application provides a computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when the processor executes the computer program.
In a seventh aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method described above.
In an eighth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the method described above.
According to the power data disaster tolerance method, the system, the device, the computer equipment, the storage medium and the computer program product, when the second server is detected to be out of order, the to-be-processed power service request which is processed by the second server is obtained. The first server stores stored power data and service processing logic which are the same as those of the second server, and the stored power data and the service processing logic are obtained by performing data synchronization with the first server when the second server stores the to-be-processed power data in the power service request. The first server processes the power service request to be processed according to the service processing logic, stores the power data to be processed into the first database as stored power data, and when the second server is detected to restore operation, the first server can also perform data synchronization with the second server to restore the data of the second server. Compared with the traditional backup disaster recovery mode based on the local disk, the scheme utilizes the first server which has the same stored power data and service processing logic as the second server to process the power service request which is processed by the second server when the second server fails, thereby realizing the non-inductive processing of the service and improving the backup efficiency of the power data disaster recovery.
Drawings
Fig. 1 is an application environment diagram of a power data disaster recovery method according to an embodiment;
FIG. 2 is a flow chart illustrating a power data disaster recovery method according to an embodiment;
fig. 3 is a schematic flow chart of a power data disaster recovery method according to another embodiment;
fig. 4 is a schematic flow chart of a power data disaster recovery method according to another embodiment;
fig. 5 is a block diagram of a power data disaster recovery apparatus according to an embodiment;
fig. 6 is a block diagram of a power data disaster recovery apparatus according to another embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The power data disaster recovery method provided by the application can be applied to the application environment shown in fig. 1. Wherein the first server 102 communicates with the second server 104 over a network. The first server 102 and the second server 104 may be arranged in a distributed storage dual active architecture, and the second server 104 may normally receive a pending power service request sent from a user terminal and process the power service request. The first server 102 may obtain the pending power service request of the second server 104 when the failure information of the second server 104 is detected, and process the pending power service based on the same stored power data as the second server 104 and by using the same service logic as the second server 104, store the pending power data in the pending power service request to form stored power data. The first server 102 and the second server 104 may be implemented by independent servers or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, a power data disaster tolerance method is provided, which is described by taking the method as an example applied to the first server in fig. 1, and includes the following steps:
step S202, detecting the fault information of the second server, and acquiring a to-be-processed power service request of the second server; the pending power service request comprises pending power data; the first server stores the same stored power data and service processing logic as the second server; the stored power data and the service processing logic are obtained by performing data synchronization with the first server when the second server stores the power data to be processed in the power service request sent by the user terminal.
The user terminal can be a terminal held by a user needing to perform the power service, and the user can perform the corresponding power service through the user terminal; the second server may be a primary server and the first server may be a backup server. The second server 104 may receive the pending power service request from the user terminal under normal conditions, and process the pending power service request sent by the user terminal through the service processing logic of the second server 104 based on the stored power data in the second database of the second server 104. The first server 102 and the second server 104 may be disposed in the same distributed storage dual live architecture.
The first server 102 and the second server 104 may be communicatively connected, and may implement bidirectional synchronization of data and services, when the second server 104 fails, for example, when encountering a natural disaster or a human damage, the second server 104 may send failure information to the first server 102, and the first server 104 may detect the failure information of the second server 104 and perform disaster recovery processing by the first server 102. When the second server 104 fails, the first server 102 may obtain pending power service requests of the second server 104 that are being processed. Wherein, the pending power service request includes pending power data. Because a double-center synchronous mode is adopted between the first server 102 and the second server 104, data processing can be simultaneously performed between the main server and the standby server, and real-time increment is realized, so that the same stored electric power data and the same service processing logic as those of the second server 104 are stored in the first server 102. The stored power data represents power data formed by storing the obtained processed power data after the first server 102 or the second server 104 processes the power service to be processed, that is, the stored power data is power data stored in a database. The service processing logic may be processing logic for the pending power service request, for example, the pending power service may be a data write request, and the first server 102 and the second server 104 have the same storage principle for the pending power service request.
When the second server 104 finishes storing the to-be-processed power data, before returning a processing result to the user terminal, data synchronization may be initiated to the first server 102, and then the first server 102 and the second server 104 may synchronize the service processing logic and the stored power data, thereby ensuring data consistency and processing logic consistency between the first server 102 and the second server 104.
Step S204, the electric power service request to be processed is processed according to the service processing logic, and the electric power data to be processed is stored in a first database of the first server and serves as the stored electric power data.
The service processing logic of the first server 102 may be the same as the service processing logic of the second server 102, the first server 102 serves as a standby server, when the second server 102 fails, the to-be-processed power service request being processed by the second server 102 may be processed according to the same service processing logic as the second server 104, the to-be-processed power service request includes to-be-processed power data, the first server 102 processes the to-be-processed power data to obtain processed power data, the first server 102 may store the processed power data in the first database of the first server 102 as new stored power data, update of the database is achieved, processing of the to-be-processed power service of the user terminal is completed, disaster tolerance processing of the power data is achieved, and when the second server 104 serving as a main server fails, disaster tolerance processing of the power data may also be performed by the first server 102 And the non-inductive switching and the non-inductive processing of the power service are realized.
The various power data may be unstructured power data, and the processing of the power data disaster tolerance may be a data disaster tolerance method based on unstructured data, because the amount of unstructured data is large, and the storage of individual files is large, the first server 102 and the second server 104 may adopt a double-center synchronization mode, thereby ensuring disaster recovery capability, reducing data loss, and realizing real-time increment of power data. Through the double-center synchronization mode, data between the first server 102 and the second server 104 are not different, and the service system can be used after being switched, so that the risk of data loss is reduced, and the long-term stable operation of the service system is ensured.
In the power data disaster recovery method, when the second server is detected to be out of order, the to-be-processed power service request which is being processed by the second server is acquired. The first server stores stored power data and service processing logic which are the same as those of the second server, and the stored power data and the service processing logic are obtained by performing data synchronization with the first server when the second server stores the to-be-processed power data in the power service request. The first server processes the power service request to be processed according to the service processing logic, stores the power data to be processed into the first database as stored power data, and when the second server is detected to restore operation, the first server can also perform data synchronization with the second server to restore the data of the second server. Compared with the traditional backup disaster recovery mode based on the local disk, the scheme utilizes the first server which has the same stored power data and service processing logic as the second server to process the power service request which is processed by the second server when the second server fails, thereby realizing the non-inductive processing of the service and improving the backup efficiency of the power data disaster recovery.
In one embodiment, further comprising: receiving a multi-copy replication request sent by a second server; the multiple copy requests comprise processed power data obtained after the second server processes the power service request sent by the user terminal; acquiring processed power data in the multiple copy requests and storing the processed power data in a first database to obtain stored power data; sending storage completion information to a second server; the second server is used for receiving the storage completion information and returning the electric power service processing completion information to the user terminal.
In this embodiment, the second server 104 may serve as a main server to receive the power service request of the user terminal under a normal operation condition, and the second server 104 may obtain the processed power data after processing the power service request. The first server 102 and the second server 104 may be designed according to a distributed storage (Ceph) live architecture, Ceph is a unified distributed storage system, and is designed to provide better performance, reliability and expandability. The second server 104 may send a multiple copy request to the first server 102 after storing the processed power data in the pending power service request and before feeding back the processing completion information to the user terminal, and the first server 102 may receive the multiple copy request sent by the second server 104. Among them, the existence of multiple copies is a necessary means to improve the reliability, availability, performance and scalability of a distributed system. Replication may increase system reliability, and multiple replicas may be used for offloading, such as a master-to-multiple-slave structure of a database, and may also be used to speed response times, such as cdn, which may allow replication to have utility for enhancing system availability and scalability.
The first server 102 may receive multiple copies of the replication request sent by the second server 104. The multiple copy requests may include processed power data obtained by the second server processing the power service request sent by the user terminal. The first server 102 may obtain the processed power data in the multiple copy request and store the processed power data in the first database of the first server 102 to obtain the stored power data stored in the first server 102. Thereby achieving real-time data synchronization of the first server 102 and the second server 104. After the first server 102 synchronizes the power data that has just been processed by the second server 104, the first server 102 may send storage completion information to the second server 104, and after the second server 104 receives the storage completion information sent by the first server 102, the second server 104 may return the power service processing completion information to the user terminal after receiving the storage completion information, which represents that the real-time synchronization of the data between the first server 102 and the second server 104 is completed. After receiving the electric power service processing completion information, the user terminal can generate corresponding prompt information, so that the user knows that the electric power service processing is completed. The power service processing completion information may be information in a code form.
For example, taking the power service as power data writing as an example, when a service request writes data, the service request is directed to the primary center, that is, the second server 104, by default through the load device, after the second server 104 finishes storing, a multi-copy replication request may be sent to the standby center, that is, the first server 102, and after the first server 102 finishes replicating the multi-copy, the second server 104 may return 200OK information to the user terminal to prompt that the data writing of the user terminal has been completed.
Through this embodiment, the first server 102 may perform data synchronization of multiple copies with the second server 104 when the second server 104 completes processing of the power service, so that there is no difference between the primary and secondary servers, and real-time increment is implemented, thereby improving backup efficiency of power data disaster tolerance.
In one embodiment, after processing the pending power service request according to the service processing logic and storing the pending power data in the first database of the first server as the stored power data, the method further comprises: and receiving the operation recovery information sent by the second server, and synchronizing the stored power data in the first database with the stored power data in the second database of the second server through the object storage gateway service.
In this embodiment, the first server 102 may process the power service being processed by the second server 104 when the second server 104 fails. The first server 102 may store the power data therein after processing the power service request, so as to obtain the stored power data. At this point, the stored power data at the time of the first server 102 and the stored power data at the time of the second server 104 may be different because the second server 104 may be failing. When the second server 104 resumes normal operation, the first server 102 may receive the resumed operation information sent by the second server 104, and synchronize the stored power data in the first database with the stored power data in the second database of the second server 104 through an RGW (radio Gateway) service. The synchronization between the first database and the second database may be a bidirectional synchronization based on an RGW service in a distributed storage dual live structure, where the RGW service is a storage service supported by a Ceph overall architecture. The data synchronization process between the main server and the standby server and the service request belong to asynchronous operation, and the synchronization time cannot be guaranteed, so that data synchronization can be timely completed between the main server and the standby server through an internal consistency check mechanism, and the consistency of power data is guaranteed.
Through the embodiment, the first server 102 may perform data synchronization of the stored power data with the second server 104 after the second server 104 recovers to operate normally, so as to improve the efficiency of disaster recovery backup of the power data and ensure data consistency between the main server and the standby server.
In one embodiment, as shown in fig. 3, a power data disaster recovery method is provided, which is described by taking the method as an example applied to the second server in fig. 1, and includes the following steps:
step S302, detecting the fault information of the second server, and sending a pending power service request including pending power data sent by the user terminal to the first server; the first server is used for processing the power service request to be processed according to the same service processing logic as the second server, and storing the power data to be processed into a first database of the first server as stored power data.
The user terminal can be a terminal held by a user needing to perform the power service, and the user can perform the corresponding power service through the user terminal; the second server may be a primary server and the first server may be a backup server. The second server 104 may receive the pending power service request from the user terminal under normal conditions, and process the pending power service request sent by the user terminal through the service processing logic of the second server 104 based on the stored power data in the second database of the second server 104. The first server 102 and the second server 104 may be disposed in the same distributed storage dual live architecture.
The first server 102 and the second server 104 may be communicatively connected, and may implement bidirectional synchronization of data and services, when the second server 104 fails, for example, when encountering a natural disaster or a human damage, the second server 104 may send failure information to the first server 102, and the first server 104 may detect the failure information of the second server 104 and perform disaster recovery processing by the first server 102. When the second server 104 fails, the first server 102 may obtain pending power service requests of the second server 104 that are being processed. Wherein, the pending power service request includes pending power data. Because a double-center synchronous mode is adopted between the first server 102 and the second server 104, data processing can be simultaneously performed between the main server and the standby server, and real-time increment is realized, so that the same stored electric power data and the same service processing logic as those of the second server 104 are stored in the first server 102. The stored power data represents power data formed by storing the obtained processed power data after the first server 102 or the second server 104 processes the power service to be processed, that is, the stored power data is power data stored in a database. The service processing logic may be processing logic for the pending power service request, for example, the pending power service may be a data write request, and the first server 102 and the second server 104 have the same storage principle for the pending power service request.
The service processing logic of the first server 102 may be the same service processing logic as that of the second server 102, the first server 102 serves as a standby server, when the second server 102 fails, the pending power service request being processed by the second server 102 may be processed according to the same service processing logic as that of the second server 104, the pending power service request includes pending power data, the first server 102 processes the pending power data to obtain processed power data, the first server 102 may store the processed power data in the first database of the first server 102 as new stored power data, update of the database is implemented, complete processing of the pending power service of the user terminal, implement disaster recovery processing of the power data, and enable the second server 104 serving as a main server to perform disaster recovery processing of the power data through the first server 102 when the second server 104 fails, and the non-inductive switching and the non-inductive processing of the power service are realized.
Step S304, detecting the operation recovery information of the second server, and synchronizing the stored electric power data in the first database with the stored electric power data in the second database of the second server through the object storage gateway service.
The first server 102 may process the power service being processed by the second server 104 when the second server 104 fails. The first server 102 may store the power data therein after processing the power service request, so as to obtain the stored power data. At this point, the stored power data at the time of the first server 102 and the stored power data at the time of the second server 104 may be different because the second server 104 may be failing. When the second server 104 resumes normal operation, the first server 102 may receive the resumed operation information sent by the second server 104, and synchronize the stored power data in the first database with the stored power data in the second database of the second server 104 through an RGW (object storage Gateway) service. The synchronization between the first database and the second database may be a bidirectional synchronization based on an RGW service in a distributed storage dual live structure, where the RGW service is a storage service supported by a Ceph overall architecture. The data synchronization process between the main server and the standby server and the service request belong to asynchronous operation, and the synchronization time cannot be guaranteed, so that data synchronization can be timely completed between the main server and the standby server through an internal consistency check mechanism, and the consistency of power data is guaranteed.
In the power data disaster recovery method, when the second server is detected to be out of order, the to-be-processed power service request which is being processed by the second server is acquired. The first server stores stored power data and service processing logic which are the same as those of the second server, and the stored power data and the service processing logic are obtained by performing data synchronization with the first server when the second server stores the to-be-processed power data in the power service request. The first server processes the power service request to be processed according to the service processing logic, stores the power data to be processed into the first database as stored power data, and when the second server is detected to restore operation, the first server can also perform data synchronization with the second server to restore the data of the second server. Compared with the traditional backup disaster recovery mode based on the local disk, the scheme utilizes the first server which has the same stored power data and service processing logic as the second server to process the power service request which is processed by the second server when the second server fails, thereby realizing the non-inductive processing of the service and improving the backup efficiency of the power data disaster recovery.
In one embodiment, further comprising: receiving a power service request sent by a user terminal, and acquiring to-be-processed power data in the power service request; processing the power service request according to the service processing logic to obtain processed power data, and storing the processed power data to a second database of a second server as stored power data; sending a multi-copy replication request including processed power data to a first server; the first server is used for acquiring the processed power data in the multiple copy replication requests and storing the processed power data in the first database to obtain the stored power data.
In this embodiment, the second server 104 may receive the power service request sent by the user terminal under the normal operation condition, and process and store the to-be-processed power data in the power service request, when the second server 104 completes storing the to-be-processed power data, before returning the processing result to the user terminal, data synchronization may be initiated to the first server 102, and then the first server 102 and the second server 104 may synchronize the service processing logic and the stored power data, thereby ensuring data consistency and processing logic consistency between the first server 102 and the second server 104.
Specifically, the second server 104 may serve as a main server to receive a power service request from the user terminal under a normal operation condition, the second server 104 may receive the power service request sent by the user terminal and obtain the to-be-processed power data in the request, the second server 104 may process the power service request according to the service processing logic and obtain the processed power data, and the second server 104 may store the processed power data in a second database of the second server 104 as the stored power data. After the second server 104 processes the power service request, the processed power data can be obtained. The first server 102 and the second server 104 may be designed according to a distributed storage (Ceph) live architecture, Ceph is a unified distributed storage system, and is designed to provide better performance, reliability and expandability. The second server 104 may send a multiple copy request to the first server 102 after storing the processed power data in the pending power service request and before feeding back the processing completion information to the user terminal, and the first server 102 may receive the multiple copy request sent by the second server 104. Among them, the existence of multiple copies is a necessary means to improve the reliability, availability, performance and scalability of a distributed system. Replication may increase system reliability, and multiple replicas may be used for offloading, such as a master-to-multiple-slave structure of a database, and may also be used to speed response times, such as cdn, which may allow replication to have utility for enhancing system availability and scalability.
The first server 102 may receive multiple copies of the replication request sent by the second server 104. The multiple copy requests may include processed power data obtained by the second server processing the power service request sent by the user terminal. The first server 102 may obtain the processed power data in the multiple copy request and store the processed power data in the first database of the first server 102 to obtain the stored power data stored in the first server 102. Thereby achieving real-time data synchronization of the first server 102 and the second server 104. After the first server 102 stores the processed power data, corresponding processing completion information may also be returned to the second server 104 to notify the second server 104 of the next processing.
Through this embodiment, the first server 102 may perform data synchronization of multiple copies with the second server 104 when the second server 104 completes processing of the power service, so that there is no difference between the primary and secondary servers, and real-time increment is implemented, thereby improving backup efficiency of power data disaster tolerance.
In one embodiment, after sending the multiple copy replication request including the processed power data to the first server, the method further includes: receiving storage completion information sent by a first server; and returning the electric power service processing completion information corresponding to the electric power service to the user terminal.
In this embodiment, after the first server 102 performs the multi-copy replication, corresponding storage completion information may be returned to the second server 104. The second server 104 may receive the storage completion information sent by the first server 102, and return the electric power service processing completion information corresponding to the electric power service to the user terminal. And the user terminal can generate corresponding prompt information based on the service processing completion information to prompt the user that the service processing is completed.
Specifically, after the first server 102 synchronizes the power data that has just been processed by the second server 104, the first server 102 may send storage completion information to the second server 104, and after the second server 104 receives the storage completion information sent by the first server 102, the second server 104 may return the power service processing completion information to the user terminal after receiving the storage completion information, where the storage completion information represents that the real-time synchronization of the data between the first server 102 and the second server 104 is completed. After receiving the electric power service processing completion information, the user terminal can generate corresponding prompt information, so that the user knows that the electric power service processing is completed. The power service processing completion information may be information in a code form.
For example, taking the power service as power data writing as an example, when a service request writes data, the service request is directed to the primary center, that is, the second server 104, by default through the load device, after the second server 104 finishes storing, a multi-copy replication request may be sent to the standby center, that is, the first server 102, and after the first server 102 finishes replicating the multi-copy, the second server 104 may return 200OK information to the user terminal to prompt that the data writing of the user terminal has been completed.
Through this embodiment, the first server 102 may perform data synchronization of multiple copies with the second server 104 when the second server 104 completes processing of the power service, so that there is no difference between the primary and secondary servers, and real-time increment is implemented, thereby improving backup efficiency of power data disaster tolerance, and the second server 104 sends service processing completion information to the user terminal after the first server 102 completes multiple copies, thereby ensuring that the first server 102 and the second server 104 can maintain consistency of data and service logic, and improving efficiency of power data disaster tolerance.
In one embodiment, as shown in fig. 4, fig. 4 is a schematic flow chart of a power data disaster recovery method in another embodiment. As can be seen from fig. 4, the second server 104(Cluster1) and the first server 102(Cluster2) are designed in a distributed storage dual active architecture, two-way synchronization of data can be performed between the first server 102 and the second server 104 through the RGW service, and the servers and the user terminals can be connected through load balancing. Take the service request as an example of writing power data. When the service request writes data, the data is directed to the primary center, that is, the second server 104, by default through the load device, and after the primary center stores the multiple copies that are copied to the standby center (the first server 102), the second server 104 returns 200OK to the user terminal on the service side, thereby completing data writing. Meanwhile, data synchronization from the main center cluster to the standby center cluster can be performed, service data disaster tolerance is achieved, and storage and network efficiency are optimized. When the main center fails, the load transfers the service request to the standby center, and the storage principle of the standby center is consistent with that of the data center. After the data center is recovered, data synchronization can be carried out between the main center and the standby center to ensure the consistency of the data of the double centers.
The main and standby data synchronization process and the service request belong to asynchronous operation, and the synchronization time cannot be guaranteed, so that data synchronization can be completed between the main and standby clusters in time through an internal consistency check mechanism to guarantee the consistency of data.
Through the embodiment, the first server which has the same stored power data and service processing logic with the second server is used for processing the power service request which is processed by the second server when the second server fails, so that the non-inductive processing of the service is realized, and the backup efficiency of power data disaster tolerance is improved. Moreover, for disaster recovery of the unstructured power data, the operation of the service system can be recovered in a short time through the embodiment, the requirement of the service on the reliability of the information system is met, and finally, when the main center encounters natural disasters or artificial damages, the main center can be realized. In addition, seamless or quick switching of the service can be realized, thereby ensuring the service continuity. Due to the double-center synchronous mode, data processing is carried out between the main and standby devices at the same time, and real-time increment is achieved. And because the data is not different, the main and standby can be switched, the service is realized noninductively, and the switched main and standby can be used.
In one embodiment, a power data disaster recovery system is provided, wherein the system comprises: the system comprises a user terminal, a first server and a second server; the user terminal is used for sending a to-be-processed power service request comprising to-be-processed power data to the second server; the second server is used for detecting the fault information of the second server and sending a to-be-processed power service request which is sent by the user terminal and comprises to-be-processed power data to the first server; and the first server is used for processing the electric power service request to be processed according to the same service processing logic as the second server and storing the electric power data to be processed into a first database of the first server as stored electric power data.
For specific limitations of the power data disaster recovery system, reference may be made to the above limitations of the power data disaster recovery method, and details are not described herein again. All or part of each module in the power data disaster recovery system can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
It should be understood that although the various steps in the flowcharts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternatively with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 5, there is provided a power data disaster recovery apparatus, including: a first obtaining module 500 and a processing module 502, wherein:
a first obtaining module 500, configured to detect fault information of a second server, and obtain a to-be-processed power service request of the second server; the pending power service request comprises pending power data; the first server stores the same stored power data and service processing logic as the second server; the stored power data and the service processing logic are obtained by performing data synchronization with the first server when the second server stores the power data to be processed in the power service request sent by the user terminal.
The processing module 502 is configured to process the pending power service request according to the service processing logic, and store the pending power data in the first database of the first server as the stored power data.
In one embodiment, the above apparatus further comprises: the first synchronization module is used for receiving a multi-copy replication request sent by the second server; the multiple copy requests comprise processed power data obtained after the second server processes the power service request sent by the user terminal; acquiring processed power data in the multiple copy requests and storing the processed power data in a first database to obtain stored power data; sending storage completion information to a second server; the second server is used for receiving the storage completion information and returning the electric power service processing completion information to the user terminal.
In one embodiment, the above apparatus further comprises: and the second synchronization module is used for receiving the operation recovery information sent by the second server and synchronizing the stored electric power data in the first database with the stored electric power data in the second database of the second server through the object storage gateway service.
In one embodiment, as shown in fig. 6, there is provided a power data disaster recovery apparatus, including: a sending module 600 and a processing module 602, wherein:
a sending module 600, configured to detect fault information of the second server, and send a pending power service request including pending power data sent by a user terminal to the first server; the first server is used for processing the power service request to be processed according to the same service processing logic as the second server, and storing the power data to be processed into a first database of the first server as stored power data.
The recovery module 602 is configured to detect recovery operation information of the second server, and synchronize the stored power data in the first database with the stored power data in the second database of the second server through the object storage gateway service.
In one embodiment, the above apparatus further comprises: the request receiving module is used for receiving a power service request sent by a user terminal and acquiring to-be-processed power data in the power service request; processing the power service request according to the service processing logic to obtain processed power data, and storing the processed power data to a second database of a second server as stored power data; sending a multi-copy replication request including processed power data to a first server; the first server is used for acquiring the processed power data in the multiple copy replication requests and storing the processed power data in the first database to obtain the stored power data.
In one embodiment, the above apparatus further comprises: the notification module is used for receiving storage completion information sent by the first server; and returning the electric power service processing completion information corresponding to the electric power service to the user terminal.
For specific limitations of the power data disaster recovery device, reference may be made to the above limitations of the power data disaster recovery method, and details are not described herein again. All or part of each module in the power data disaster recovery device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store power data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a power data disaster recovery method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the power data disaster recovery method when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when executed by a processor, implements the above-described power data disaster recovery method.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the power data disaster recovery method described above.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A power data disaster recovery method is applied to a first server, and comprises the following steps:
detecting fault information of a second server, and acquiring a to-be-processed power service request of the second server; the power service request to be processed comprises power data to be processed; the first server stores the same stored power data and business processing logic as the second server; the stored power data and service processing logic is obtained by performing data synchronization with the first server when the second server stores the power data to be processed in the power service request sent by the user terminal;
and processing the to-be-processed power service request according to the service processing logic, and storing the to-be-processed power data into a first database of the first server as stored power data.
2. The method of claim 1, further comprising:
receiving a multi-copy replication request sent by the second server; the multi-copy replication request comprises processed power data obtained after the second server processes a power service request sent by the user terminal;
acquiring processed power data in the multiple copy requests and storing the processed power data in a first database to obtain stored power data;
sending storage completion information to the second server; and the second server is used for receiving the storage completion information and returning the electric power service processing completion information to the user terminal.
3. The method of claim 2, wherein after processing the pending power service request according to the service processing logic and storing the pending power data in the first database of the first server as stored power data, further comprising:
and receiving the operation recovery information sent by the second server, and synchronizing the stored electric power data in the first database with the stored electric power data in the second database of the second server through an object storage gateway service.
4. A power data disaster recovery method is applied to a second server, and comprises the following steps:
detecting the fault information of the second server, and sending a to-be-processed power service request including to-be-processed power data sent by a user terminal to the first server; the first server is used for processing the power service request to be processed according to the same service processing logic as the second server and storing the power data to be processed into a first database of the first server as stored power data;
and detecting the recovery operation information of the second server, and synchronizing the stored electric power data in the first database with the stored electric power data in the second database of the second server through an object storage gateway service.
5. The method of claim 4, further comprising:
receiving a power service request sent by a user terminal, and acquiring to-be-processed power data in the power service request;
processing the power service request according to the service processing logic to obtain processed power data, and storing the processed power data to a second database of the second server as stored power data;
sending a multi-copy replication request including the processed power data to the first server; the first server is used for acquiring the processed power data in the multi-copy replication request and storing the processed power data in a first database to obtain the stored power data.
6. The method of claim 5, wherein after sending the request to the first server to copy the multiple copies of the processed power data, further comprising:
receiving storage completion information sent by the first server;
and returning electric power service processing completion information corresponding to the electric power service to the user terminal.
7. A power data disaster recovery system, the system comprising: the system comprises a user terminal, a first server and a second server;
the user terminal is used for sending a to-be-processed power service request comprising to-be-processed power data to the second server;
the second server is used for detecting the fault information of the second server and sending a to-be-processed power service request including to-be-processed power data sent by the user terminal to the first server;
the first server is used for processing the electric power service request to be processed according to the same service processing logic as the second server, and storing the electric power data to be processed into a first database of the first server as stored electric power data.
8. An electric power data disaster recovery device, which is applied to a first server, the device comprising:
the first acquisition module is used for detecting the fault information of a second server and acquiring a to-be-processed power service request of the second server; the power business request to be processed comprises power data to be processed; the first server stores the same stored power data and business processing logic as the second server; the stored power data and the service processing logic are obtained by performing data synchronization with the first server when the second server stores the power data to be processed in the power service request sent by the user terminal;
and the processing module is used for processing the power service request to be processed according to the service processing logic and storing the power data to be processed into a first database of the first server as stored power data.
9. An electric power data disaster recovery device, which is applied to a second server, the device comprising:
the sending module is used for detecting the fault information of the second server and sending a to-be-processed power service request which is sent by the user terminal and comprises to-be-processed power data to the first server; the first server is used for processing the power service request to be processed according to the same service processing logic as the second server and storing the power data to be processed into a first database of the first server as stored power data;
and the recovery module is used for detecting the recovery operation information of the second server and synchronizing the stored electric power data in the first database with the stored electric power data in the second database of the second server through an object storage gateway service.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 6 when executing the computer program.
CN202210496130.3A 2022-05-09 2022-05-09 Power data disaster tolerance method, system, device, computer equipment and storage medium Pending CN114900532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210496130.3A CN114900532A (en) 2022-05-09 2022-05-09 Power data disaster tolerance method, system, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210496130.3A CN114900532A (en) 2022-05-09 2022-05-09 Power data disaster tolerance method, system, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114900532A true CN114900532A (en) 2022-08-12

Family

ID=82721943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210496130.3A Pending CN114900532A (en) 2022-05-09 2022-05-09 Power data disaster tolerance method, system, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114900532A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115396296A (en) * 2022-08-18 2022-11-25 中电金信软件有限公司 Service processing method and device, electronic equipment and computer readable storage medium
CN115617574A (en) * 2022-09-28 2023-01-17 中国南方电网有限责任公司 Multi-power scheduling system, data transmission method, and computer-readable storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335255A (en) * 2015-12-10 2016-02-17 上海数腾软件科技股份有限公司 System and method capable of achieving quick service recovery
CN205427832U (en) * 2016-03-12 2016-08-03 福建博士通信息有限责任公司 Data storage capacity calamity device
CN107153649A (en) * 2016-03-02 2017-09-12 阿里巴巴集团控股有限公司 A kind of data back up method and device
CN108123831A (en) * 2017-12-15 2018-06-05 安徽长泰信息安全服务有限公司 Disaster tolerance service system and method in a kind of the Internet, applications
CN108964986A (en) * 2018-06-15 2018-12-07 国网上海市电力公司 Cooperative office system application layer dual-active disaster recovery and backup systems
CN109597718A (en) * 2018-12-10 2019-04-09 浪潮(北京)电子信息产业有限公司 A kind of disaster recovery platform and a kind of disaster recovery method
CN111130835A (en) * 2018-11-01 2020-05-08 中国移动通信集团河北有限公司 Data center dual-active system, switching method, device, equipment and medium
CN111327467A (en) * 2020-02-21 2020-06-23 苏州浪潮智能科技有限公司 Server system, disaster recovery backup method thereof and related equipment
CN111858147A (en) * 2019-04-29 2020-10-30 中国移动通信集团贵州有限公司 Disaster tolerance processing method and device, mobile terminal and storage medium
CN112235142A (en) * 2020-10-15 2021-01-15 国网江苏省电力有限公司营销服务中心 Power utilization information acquisition system capable of realizing key business disaster tolerance and operation method thereof
CN114281600A (en) * 2021-11-30 2022-04-05 北京青云科技股份有限公司 Disaster recovery backup and recovery method, device, equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335255A (en) * 2015-12-10 2016-02-17 上海数腾软件科技股份有限公司 System and method capable of achieving quick service recovery
CN107153649A (en) * 2016-03-02 2017-09-12 阿里巴巴集团控股有限公司 A kind of data back up method and device
CN205427832U (en) * 2016-03-12 2016-08-03 福建博士通信息有限责任公司 Data storage capacity calamity device
CN108123831A (en) * 2017-12-15 2018-06-05 安徽长泰信息安全服务有限公司 Disaster tolerance service system and method in a kind of the Internet, applications
CN108964986A (en) * 2018-06-15 2018-12-07 国网上海市电力公司 Cooperative office system application layer dual-active disaster recovery and backup systems
CN111130835A (en) * 2018-11-01 2020-05-08 中国移动通信集团河北有限公司 Data center dual-active system, switching method, device, equipment and medium
CN109597718A (en) * 2018-12-10 2019-04-09 浪潮(北京)电子信息产业有限公司 A kind of disaster recovery platform and a kind of disaster recovery method
CN111858147A (en) * 2019-04-29 2020-10-30 中国移动通信集团贵州有限公司 Disaster tolerance processing method and device, mobile terminal and storage medium
CN111327467A (en) * 2020-02-21 2020-06-23 苏州浪潮智能科技有限公司 Server system, disaster recovery backup method thereof and related equipment
CN112235142A (en) * 2020-10-15 2021-01-15 国网江苏省电力有限公司营销服务中心 Power utilization information acquisition system capable of realizing key business disaster tolerance and operation method thereof
CN114281600A (en) * 2021-11-30 2022-04-05 北京青云科技股份有限公司 Disaster recovery backup and recovery method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115396296A (en) * 2022-08-18 2022-11-25 中电金信软件有限公司 Service processing method and device, electronic equipment and computer readable storage medium
CN115617574A (en) * 2022-09-28 2023-01-17 中国南方电网有限责任公司 Multi-power scheduling system, data transmission method, and computer-readable storage medium
CN115617574B (en) * 2022-09-28 2024-04-16 中国南方电网有限责任公司 Multi-power scheduling system, data transmission method, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
EP3694148A1 (en) Configuration modification method for storage cluster, storage cluster and computer system
US8127174B1 (en) Method and apparatus for performing transparent in-memory checkpointing
CN102411639B (en) Multi-copy storage management method and system of metadata
CN114900532A (en) Power data disaster tolerance method, system, device, computer equipment and storage medium
CN106776130B (en) Log recovery method, storage device and storage node
US11307776B2 (en) Method for accessing distributed storage system, related apparatus, and related system
CN107241430A (en) A kind of enterprise-level disaster tolerance system and disaster tolerant control method based on distributed storage
CN102890716B (en) The data back up method of distributed file system and distributed file system
CN109460438B (en) Message data storage method, device, computer equipment and storage medium
CN112597202B (en) Data query method and device, computer equipment and storage medium
CN108710550B (en) Double-data-center disaster tolerance system for public security traffic management inspection and control system
CN113821376A (en) Cloud disaster backup-based integrated backup disaster recovery method and system
CN111198662B (en) Data storage method, device and computer readable storage medium
CN107943615B (en) Data processing method and system based on distributed cluster
US20150317226A1 (en) Detecting data loss during site switchover
CN102541693A (en) Multi-copy storage management method and system of data
CN105323271B (en) Cloud computing system and processing method and device thereof
CN114238495A (en) Method and device for switching main cluster and standby cluster of database, computer equipment and storage medium
CN104991739A (en) Method and system for refining primary execution semantics during metadata server failure substitution
CN107526652B (en) Data synchronization method and storage device
CN116389233A (en) Container cloud management platform active-standby switching system, method and device and computer equipment
CN103780433B (en) Self-healing type virtual resource configuration management data architecture
CN114328032A (en) Disaster recovery switching processing method and device based on big data double activities and computer equipment
CN112667443A (en) User-oriented variable distributed storage copy fault tolerance method
CN111984592B (en) Method and system for delayed synchronous recovery of metadata operation authority information

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