CN116466960A - Method, device, equipment and medium for multi-activity deployment of database - Google Patents

Method, device, equipment and medium for multi-activity deployment of database Download PDF

Info

Publication number
CN116466960A
CN116466960A CN202310401894.4A CN202310401894A CN116466960A CN 116466960 A CN116466960 A CN 116466960A CN 202310401894 A CN202310401894 A CN 202310401894A CN 116466960 A CN116466960 A CN 116466960A
Authority
CN
China
Prior art keywords
data
data center
center
access request
database
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
CN202310401894.4A
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.)
Beijing Xinghan Future Network Technology Co ltd
Original Assignee
Beijing Xinghan Future Network Technology 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 Beijing Xinghan Future Network Technology Co ltd filed Critical Beijing Xinghan Future Network Technology Co ltd
Priority to CN202310401894.4A priority Critical patent/CN116466960A/en
Publication of CN116466960A publication Critical patent/CN116466960A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • 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/1471Saving, restoring, recovering or retrying involving logging of persistent data for recovery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a method, a device, equipment and a medium for multi-activity deployment of a database, wherein the method comprises the following steps: acquiring an access request of the main data center, wherein the access request is used for changing the content stored in the main data center; updating the access request to a data recovery center, wherein the data recovery center is used for storing real-time database change data; and responding to an instruction for establishing a target data center, acquiring corresponding full data backup from the data recovery center, and establishing the target data center. According to the method and the device for intercepting the data, the data can be intercepted before each request enters the database of the main data center, access control to the database is achieved, the auxiliary data center is automatically built, and therefore efficiency of multi-activity deployment is improved.

Description

Method, device, equipment and medium for multi-activity deployment of database
Technical Field
The embodiment of the application relates to the field of multi-activity deployment of databases, in particular to a method, a device, equipment and a medium for multi-activity deployment of databases.
Background
With the development of networks, in order to guarantee the security of data for critical infrastructures such as finance, multiple active deployment of databases, i.e. deployment of multiple internet data centers (Internet Data Center, IDC) is required. That is, after one IDC fails, such as when an outage, an optical cable is dug, and floods are encountered, critical infrastructure and services can still provide services, and if deployed in a plurality of IDCs, when one IDC fails, the traffic can be automatically switched to other normal IDCs, so as to avoid completely inaccessible situations. For business, the key to multi-activity deployment is the multi-activity deployment of the database. Multiple active deployment of databases requires that a complete set of databases, including both master and slave, be deployed at each IDC, so that each IDC can independently provide services to the outside independent of the other IDCs.
In the related technology, the number of databases is planned in advance for each independent IDC, so that multiple copies are required for multiple activities, the machine cost is multiplied, and the deployment by the deep technicians is required, so that the operation and maintenance cost is high.
Therefore, how to improve the efficiency of multi-active deployment and reduce the operation and maintenance costs becomes a problem to be solved.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a medium for multi-activity deployment of a database, which can intercept at least before each request enters the database of a main data center, realize access control on the database, and automatically establish a slave data center, thereby improving the efficiency of multi-activity deployment and reducing the operation and maintenance cost.
In a first aspect, the present application provides a method for multi-active deployment of a database, applied to a primary data center in a target device, the method including: acquiring an access request of the main data center, wherein the access request is used for changing the content stored in the main data center; updating the access request to a data recovery center, wherein the data recovery center is used for storing real-time database change data; and responding to an instruction for establishing a target data center, acquiring corresponding full data backup from the data recovery center, and establishing the target data center.
Therefore, unlike the prior art that a new target data center needs to be manually obtained, the access request is synchronized to the data recovery center by the multi-activity deployment module by installing the multi-activity deployment module before the database, the data is obtained from the data recovery center under the condition that the target data center needs to be established, a new data center is established, interception can be performed before each request enters the database of the main data center, and automatic overall control of the database is realized, so that the efficiency of multi-activity deployment is improved, and the operation and maintenance cost is reduced.
With reference to the first aspect, in an implementation manner of the present application, the target device further includes a first slave data center, where the first slave data center is a data center that is standby for any one of the target devices; after the obtaining the access request of the primary data center, the method further comprises: synchronously forwarding the access request to a message forwarding component, wherein the message forwarding component is used for forwarding messages among data centers of the target equipment; the message forwarding component sends the access request to the first slave data center to synchronize data by the first slave data center based on the access request.
Therefore, the embodiment of the application can realize real-time database change by synchronizing the information among the data centers through the message forwarding component, and prevent the database information from being lost due to untimely message synchronization.
With reference to the first aspect, in an implementation manner of the present application, after the obtaining the access request of the primary data center, the method further includes: ordering all access requests corresponding to the same line of data according to a time sequence to obtain an access request sequence, wherein each access request comprises a request synchronized from a first slave data center to the master data center and/or a request directly acquired by the master data center; updating data according to the access requests corresponding to the time sequence in the access request sequence.
Therefore, the embodiment of the application uniformly issues the write requests synchronously sent by other IDCs and the write requests in the IDCs so as to ensure that the main database is updated according to the time sequence when the main database is updated, thereby solving the problem that the modification sequence is inconsistent possibly existing in different IDCs.
With reference to the first aspect, in an implementation manner of the present application, after the establishing the target data center, the method further includes: and when the currently used main data center fails, changing the database of the target data center into a new main database so as to switch the operation of the main data center into the new main database.
Therefore, in the embodiment of the application, under the condition that the main data center fails, the operation of the main data center is automatically switched to the new main database, and the databases of other data centers can be timely used for replacing the current main database, so that the operation and maintenance cost is reduced.
With reference to the first aspect, in an embodiment of the present application, the first slave data center performs database update by: the first slave data center accesses the data recovery center of the master data center at preset time to acquire data stored in the data recovery center; and updating the database based on the data stored in the data recovery center.
Therefore, the embodiment of the application can unify all database data in the equipment by updating the database at the preset time, and prevent the occurrence of database data deletion.
In a second aspect, the present application provides an apparatus for multi-active deployment of a database, applied to a primary data center in a target device, the apparatus comprising: a request acquisition module configured to acquire an access request of the main data center, wherein the access request is used for changing content stored in the main data center; the data updating module is configured to update the access request to a data recovery center, wherein the data recovery center is used for storing real-time database change data; and the multi-activity deployment module is configured to respond to an instruction for establishing a target data center, acquire corresponding full data backup from the data recovery center and establish the target data center.
With reference to the second aspect, in one embodiment of the present application, the target device further includes a first slave data center, where the first slave data center is a data center that is standby for any one of the target devices; the multi-living deployment module is further configured to: synchronously forwarding the access request to a message forwarding component, wherein the message forwarding component is used for forwarding messages among data centers of the target equipment; the message forwarding component sends the access request to the first slave data center to synchronize data by the first slave data center based on the access request.
With reference to the second aspect, in an embodiment of the present application, the multi-active deployment module is further configured to: ordering all access requests corresponding to the same line of data according to a time sequence to obtain an access request sequence, wherein each access request comprises a request synchronized from a first slave data center to the master data center and/or a request directly acquired by the master data center; updating data according to the access requests corresponding to the time sequence in the access request sequence.
With reference to the second aspect, in an embodiment of the present application, the multi-active deployment module is further configured to: and when the currently used main data center fails, changing the database of the target data center into a new main database so as to switch the operation of the main data center into the new main database.
With reference to the second aspect, in one embodiment of the present application, the first slave data center performs database update by: the first slave data center accesses the data recovery center of the master data center at preset time to acquire data stored in the data recovery center; and updating the database based on the data stored in the data recovery center.
In a third aspect, the present application provides an electronic device, including: a processor, a memory, and a bus; the processor is connected to the memory via the bus, the memory storing a computer program which, when executed by the processor, performs the method according to any embodiment of the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed, performs a method according to any embodiment of the first aspect.
Drawings
FIG. 1 is a schematic diagram of a system for multi-active deployment of a database according to an embodiment of the present application;
FIG. 2 is one of the flow charts of a method for database multi-lived deployment shown in an embodiment of the present application;
FIG. 3 is a second flowchart of another method for database multi-activity deployment according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a device composition for multiple active deployment of a database according to an embodiment of the present application;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application based on the embodiments of the present application.
In order to improve the problems in the background art, in some embodiments of the present application, a multi-activity deployment module is deployed on a node where each database is located, so as to intercept all requests to the database, thereby implementing access control to the database, and automatically performing data backup. For example: in some embodiments of the present application, the multi-activity deployment module synchronizes the access request to the data recovery center, and under the condition that the target data center needs to be established, obtains data from the data recovery center, establishes a new data center, and can intercept each request before entering the database of the main data center, so as to realize automatic overall control of the database, thereby improving the efficiency of multi-activity deployment and reducing the operation and maintenance costs.
The method steps in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
FIG. 1 provides a block diagram of a system for database multi-active deployment in some embodiments of the present application, including a Web layer 110, a primary data center 120, a data recovery center 130, and a target data center 140.Web layer 110 sends access requests (e.g., add, delete, and modify data in the database) for applications to the primary data center, a multi-active deployment module in primary data center 120 synchronizes the access requests into data recovery center 130, obtains a full data backup in data recovery center 130 if a new data center needs to be established, and establishes target data center 140 using the full data backup.
Different from the embodiment of the application, in the related technology, the number of databases is planned in advance for each independent IDC, so that multiple copies are required for multiple activities, the machine cost is increased exponentially, and the operation and maintenance cost is high because of the deployment of the senior technicians. According to the method and the system, the multi-activity deployment module is installed before the database, the multi-activity deployment module synchronizes the access request to the data recovery center, data is acquired from the data recovery center under the condition that the target data center needs to be established, a new data center is established, interception can be carried out before each request enters the database of the main data center, automatic overall control of the database is achieved, and therefore multi-activity deployment efficiency is improved, and operation and maintenance cost is reduced.
The method for multi-activity deployment of a database provided in some embodiments of the present application is exemplarily described below by taking a multi-activity deployment module in a main data center as an example. It will be appreciated that the primary data center of embodiments of the present application may be deployed on any target device, such as a server.
In at least one embodiment of the present application, as shown in fig. 2, some embodiments of the present application provide a method for multiple active deployment of a database, the method including:
s210, acquiring an access request of the main data center.
It should be noted that, in the present application, a multi-activity deployment module is set before nodes of databases of all data centers (including a master data center and at least one slave data center), an access request for accessing the databases first enters the multi-activity deployment module before entering the databases, and the multi-activity deployment module performs unified overall (including backup data, synchronous data, etc. according to the access request) on the access request entering the databases, so as to realize access control on the databases.
That is, a set of databases is independently deployed in each IDC (data center), including a master database and a plurality of slave databases, and a multi-activity deployment module is deployed on a database node, so as to intercept all database accesses, and realize stock and incremental data backup of the master database and elastic capacity expansion of the slave databases. Specifically, the Web layer sends an access request to the main data center due to service requirements, so that the operation can be performed on the database of the main data center, for example, the access request is to read certain data, and then the operation performed on the database of the main data center by the Web layer is to read the data. The multi-activity deployment module obtains the access request sent to the main data center before the access request enters the database, and then the multi-activity deployment module performs unified management on the current access request.
It is understood that the access request is used to make changes to the content stored in the primary data center, e.g., add data, delete data, modify data, etc.
S220, updating the access request to the data recovery center.
It will be appreciated that the data recovery center is configured to store database change data in real time. For example, if the current access request is to delete a certain line of data, the data recovery center stores the current access request.
That is, to be able to ensure that the data stored in each data center is consistent, the multi-activity deployment module, after receiving the access request, sends the access request to the data recovery center, and then the data recovery center operates on the stored data according to the current access request to ensure that the backup data in the data recovery center corresponds to the data in the main data center.
S230, responding to an instruction for establishing a target data center, acquiring corresponding full data backup from the data recovery center, and establishing the target data center.
That is, after synchronizing the real-time access request to the data recovery center, if the primary data center fails at this time and a new data center (i.e., a target data center) needs to be established, the target device responds to the instruction for establishing the target data center, and the multi-activity deployment module automatically acquires the full-volume data backup from the data recovery center, thereby establishing the target data center using the full-volume data backup. Because the data stored in the data recovery center is updated in real time along with the main data center, the data which is the same as the main data center exists in the data recovery center, and when a new data center needs to be established, the content stored in the main data center does not need to be copied, so that the efficiency of multi-activity deployment can be improved. In other words, if a new IDC database is to be replicated, only the data recovery center of the main IDC needs to be requested, a full database backup is obtained, and then the data is recovered.
In one embodiment of the present application, the target device further includes a first slave data center, wherein the first slave data center is a data center that is standby for any one of the target devices. After the multi-activity deployment module obtains the access request to the master data center, firstly, synchronously forwarding the access request to a message forwarding component, wherein the message forwarding component is used for forwarding messages among the data centers of the target equipment, and then, the message forwarding component sends the access request to a first slave data center so that the first slave data center can perform data synchronization based on the access request.
That is, the write requests in each IDC are synchronized to other IDCs through the message forwarding component in addition to updating the master database of the present IDC, and the write requests synchronized by other IDCs are processed in each IDC in addition to the write requests in the present IDC, thereby ensuring that the master database data in each IDC is complete.
In one embodiment of the present application, after the multi-activity deployment module obtains an access request to the primary data center, in order to ensure that each data center processes a plurality of access requests of the same line of data correctly, the present application sorts each access request corresponding to the same line of data according to a time sequence, obtains an access request sequence, and then updates data according to the access request corresponding to the time sequence in the access request sequence.
It will be appreciated that each access request includes a request for a first slave data center to master data center synchronization and a request for master data center direct acquisition, or each access request includes only a request for a first slave data center to master data center synchronization, or each access request includes only a request for master data center direct acquisition.
That is, there may be multiple access requests to the same line of data, for example, the access request of the first line of data includes adding and modifying, and the times of the multiple access requests are relatively similar, but since the sequence of receiving the multiple access requests by the data centers is different, for example, the access request that occurs before is the last one, if the data synchronization is performed according to the time received by each data center, the information stored in each data center is different, so the multiple-activity deployment module of each data center in the present application sorts the received multiple access requests according to the time entering the target device, and when the data synchronization, the time in the sequence is ordered according to the time sequence, and the data is synchronized according to the time sequence. For example, the same line of data is modified and then added according to the time sequence.
In one embodiment of the present application, after the target data center is established, in the event of a failure of the currently used master data center, the database of the target data center is changed to a new master database so that the operation for the master data center is switched to the new master database.
That is, after the target data center is established, there is also a master database in the target data center, and since the currently used master data center fails, the master database of the master data center cannot be used any more, at this time, the master database in the established target data center is replaced with a new master database, and the interfaces and the like are placed on the new master database.
In one embodiment of the present application, any one of the slave data centers (i.e., the first slave data center) accesses the data recovery center of the master data center at a preset time, acquires data stored in the data recovery center, and performs database update based on the data stored in the data recovery center.
That is, one of the data centers is selected as the main data center, all the change operations on the database request the main data center, then the data center is synchronized to the data recovery center through the multi-activity deployment module, the data recovery center stores the complete backup of the main database, the other data centers carry out complete reconstruction from the backup data of the data recovery center of the main data center in the low peak period every day, and the request is switched to the new reconstructed database and the original database is disconnected. Other data centers may also be manually raised to the primary data center if the primary data center fails.
As a specific embodiment of the application, as shown in FIG. 3, the target device includes a master data center and slave data centers, each of which can accept external traffic, and the slave data centers are deployed independently from the Web layer to the database layer without mutual dependence. Specifically, the access request enters a first proxy of the Web layer, the first proxy forwards the access request to the Web application, the Web application inputs the access request to a second proxy, the second proxy inputs the access request to a multi-active deployment module of Mysql, the multi-active deployment module sends the write request to the master database, inputs the read request to the slave database, and synchronizes the access request to the data recovery center and to the message forwarding component (GMB).
Specifically, the multi-living deployment includes the following embodiments:
each data center independently provides service to the outside, and the flow passes through the respective web layer and then accesses the respective database layer, wherein all requests are forwarded through the multi-active deployment module and then access the database. The multiple active deployment module has two main roles: firstly, synchronously forwarding the write request of each data center to a message forwarding component, wherein the message forwarding component is responsible for the synchronization of the write request of each multi-activity deployment module, and secondly, writing all the database writing and changing into the data recovery center so as to ensure that the data of the data recovery center is always kept up to date.
If a new data center database is to be copied, only a data recovery center of the main data center is required to be requested, a full database backup is obtained, and then the data is recovered.
Warming up occurs prior to accessing the newly replicated data center database, and recent database requests may be counted by the multi-activity deployment module and then progressively accessed to warm up the database.
Because the main databases in different data centers read and write respectively, the problem that the data difference gradually becomes larger is necessarily caused as time goes by, in order to reduce the difference, a set of new databases can be built from the data recovery center of the main data center in the period of low business peak every day, and then the flow is migrated to the new databases.
The write requests of different data centers are mutually synchronous through the message forwarding component, but if the write requests are modified for the same line of data in the same second at adjacent moments, the problem of inconsistent modification sequence can exist in different data centers, so that the write requests synchronously transmitted by other data centers and the write requests in the data center are required to be uniformly transmitted, and the update of the main database according to the sequence is ensured.
If the main data center fails, the system automatically switches the database in any data center to the main database, and the operation of the main data center is switched to a new main data center database.
Therefore, the method aims at the problems that the machine cost is increased by times and the deployment is only performed by the senior technicians in the existing database multi-activity deployment scheme, and provides the database multi-activity deployment scheme based on server. The scheme is transparent to the database, does not need to operate the database, does not need participation of operation and maintenance personnel, and can automatically perform multi-activity deployment of the database.
Therefore, the method and the system have the advantages that multiple sets of databases are required to be copied according to the scale of the existing data center, one set of database can be copied from the data recovery center of the main data center at any time, reconstruction can be completed within one hour, the slave database can be dynamically expanded and contracted according to actual needs, and therefore cost of a multi-activity deployed server can be reduced to the minimum; meanwhile, all changes and requests to the database are taken over by the multi-activity deployment module, and then data synchronization is realized in a plurality of data centers by the message forwarding component, so that the whole process is automatic, and no manual intervention is required by professional technicians, thereby reducing the operation and maintenance cost.
Having described the specific embodiments of a method for database multi-activity deployment provided herein, a device for database multi-activity deployment will be described.
As shown in fig. 4, some embodiments of the present application provide an apparatus 400 for a database multi-active deployment, the apparatus comprising: request acquisition module 410, data update module 420, and multi-living deployment module 430.
A request acquisition module 410 configured to acquire an access request of the main data center, wherein the access request is used for changing content stored in the main data center; a data update module 420 configured to update the access request to a data recovery center, wherein the data recovery center is configured to store real-time database change data; the multi-activity deployment module 430 is configured to obtain a corresponding full-volume data backup from the data recovery center in response to an instruction to establish a target data center, and establish the target data center.
In one embodiment of the present application, the target device further includes a first slave data center, where the first slave data center is a data center that is standby for any one of the target devices; the multi-living deployment module 430 is further configured to: synchronously forwarding the access request to a message forwarding component, wherein the message forwarding component is used for forwarding messages among data centers of the target equipment; the message forwarding component sends the access request to the first slave data center to synchronize data by the first slave data center based on the access request.
In one embodiment of the present application, the multi-living deployment module 430 is further configured to: ordering all access requests corresponding to the same line of data according to a time sequence to obtain an access request sequence, wherein each access request comprises a request synchronized from a first slave data center to the master data center and/or a request directly acquired by the master data center; updating data according to the access requests corresponding to the time sequence in the access request sequence.
In one embodiment of the present application, the multi-living deployment module 430 is further configured to: and when the currently used main data center fails, changing the database of the target data center into a new main database so as to switch the operation of the main data center into the new main database.
In one embodiment of the present application, the first slave data center performs database updates by: the first slave data center accesses the data recovery center of the master data center at preset time to acquire data stored in the data recovery center; and updating the database based on the data stored in the data recovery center.
In the embodiment of the present application, the module shown in fig. 4 can implement each process in the embodiments of the methods of fig. 1, fig. 2, and fig. 3. The operation and/or function of the individual modules in fig. 4 are for the purpose of realizing the respective flows in the method embodiments in fig. 1, 2 and 3, respectively. Reference is specifically made to the description in the above method embodiments, and detailed descriptions are omitted here as appropriate to avoid repetition.
As shown in fig. 5, an embodiment of the present application provides an electronic device 500, including: a processor 510, a memory 520 and a bus 530, the processor being connected to the memory by means of the bus, the memory storing computer readable instructions which, when executed by the processor, are adapted to carry out the method according to any one of the above-mentioned embodiments, in particular with reference to the description of the above-mentioned method embodiments, and detailed descriptions are omitted here as appropriate to avoid redundancy.
Wherein the bus is used to enable direct connection communication of these components. The processor in the embodiment of the application may be an integrated circuit chip, which has a signal processing capability. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory has stored therein computer readable instructions which, when executed by the processor, perform the method described in the above embodiments.
It will be appreciated that the configuration shown in fig. 5 is illustrative only and may include more or fewer components than shown in fig. 5 or have a different configuration than shown in fig. 5. The components shown in fig. 5 may be implemented in hardware, software, or a combination thereof.
The embodiments of the present application further provide a computer readable storage medium, on which a computer program is stored, which when executed by a server, implements the method according to any one of the foregoing embodiments, and specifically reference may be made to the description in the foregoing method embodiments, and detailed descriptions are omitted here as appropriate to avoid redundancy.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of database multi-activity deployment, for application to a primary data center in a target device, the method comprising:
acquiring an access request of the main data center, wherein the access request is used for changing the content stored in the main data center;
updating the access request to a data recovery center, wherein the data recovery center is used for storing real-time database change data;
and responding to an instruction for establishing a target data center, acquiring corresponding full data backup from the data recovery center, and establishing the target data center.
2. The method of claim 1, wherein the target device further comprises a first slave data center, wherein the first slave data center is a data center that is reserved for any one of the target devices;
after the obtaining the access request of the primary data center, the method further comprises:
synchronously forwarding the access request to a message forwarding component, wherein the message forwarding component is used for forwarding messages among data centers of the target equipment;
the message forwarding component sends the access request to the first slave data center to synchronize data by the first slave data center based on the access request.
3. The method according to claim 1 or 2, wherein after said obtaining an access request of the primary data center, the method further comprises:
ordering all access requests corresponding to the same line of data according to a time sequence to obtain an access request sequence, wherein each access request comprises a request synchronized from a first slave data center to the master data center and/or a request directly acquired by the master data center;
updating data according to the access requests corresponding to the time sequence in the access request sequence.
4. The method of claim 1 or 2, wherein after the establishing the target data center, the method further comprises:
and when the currently used main data center fails, changing the database of the target data center into a new main database so as to switch the operation of the main data center into the new main database.
5. A method according to claim 1 or 2, wherein the first slave data centre is database updated by:
the first slave data center accesses the data recovery center of the master data center at preset time to acquire data stored in the data recovery center;
and updating the database based on the data stored in the data recovery center.
6. An apparatus for multiple active deployment of a database, for application to a primary data center in a target device, the apparatus comprising:
a request acquisition module configured to acquire an access request of the main data center, wherein the access request is used for changing content stored in the main data center;
the data updating module is configured to update the access request to a data recovery center, wherein the data recovery center is used for storing real-time database change data;
and the multi-activity deployment module is configured to respond to an instruction for establishing a target data center, acquire corresponding full data backup from the data recovery center and establish the target data center.
7. The apparatus of claim 6, wherein the target device further comprises a first slave data center, wherein the first slave data center is a data center that is reserved for any one of the target devices;
the multi-living deployment module is further configured to:
synchronously forwarding the access request to a message forwarding component, wherein the message forwarding component is used for forwarding messages among data centers of the target equipment;
the message forwarding component sends the access request to the first slave data center to synchronize data by the first slave data center based on the access request.
8. The apparatus of claim 6 or 7, wherein the multi-living deployment module is further configured to:
ordering all access requests corresponding to the same line of data according to a time sequence to obtain an access request sequence, wherein each access request comprises a request synchronized from a first slave data center to the master data center and/or a request directly acquired by the master data center;
updating data according to the access requests corresponding to the time sequence in the access request sequence.
9. An electronic device, comprising: a processor, a memory, and a bus;
the processor is connected to the memory via the bus, the memory storing a computer program which, when executed by the processor, performs the method according to any of claims 1-5.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed, implements the method according to any of claims 1-5.
CN202310401894.4A 2023-04-14 2023-04-14 Method, device, equipment and medium for multi-activity deployment of database Pending CN116466960A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310401894.4A CN116466960A (en) 2023-04-14 2023-04-14 Method, device, equipment and medium for multi-activity deployment of database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310401894.4A CN116466960A (en) 2023-04-14 2023-04-14 Method, device, equipment and medium for multi-activity deployment of database

Publications (1)

Publication Number Publication Date
CN116466960A true CN116466960A (en) 2023-07-21

Family

ID=87178403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310401894.4A Pending CN116466960A (en) 2023-04-14 2023-04-14 Method, device, equipment and medium for multi-activity deployment of database

Country Status (1)

Country Link
CN (1) CN116466960A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1445672A (en) * 2002-03-14 2003-10-01 上海网上乐园信息技术有限公司 System for backing up isomerous data in same network and its realization method
JP2008204036A (en) * 2007-02-19 2008-09-04 Worldsky Inc Remote backup system
CN101527656A (en) * 2009-04-15 2009-09-09 烽火通信科技股份有限公司 Emergency switched system of NGN service platform database and realizing method thereof
CN103890736A (en) * 2011-11-02 2014-06-25 国际商业机器公司 Message reconciliation during disaster recovery
CN109635039A (en) * 2018-11-23 2019-04-16 金色熊猫有限公司 Multiple data centers method of data synchronization and system
CN110597910A (en) * 2019-09-12 2019-12-20 聚好看科技股份有限公司 Remote data synchronization method, device and system
CN110674105A (en) * 2019-08-30 2020-01-10 中国人民财产保险股份有限公司 Data backup method, system and server
CN113626528A (en) * 2021-08-18 2021-11-09 卢知白 Database double-activity implementation verification method and system
CN113688035A (en) * 2021-08-06 2021-11-23 北京融信致远科技有限公司 Database double-living center verification method and system based on sandbox environment
CN115146002A (en) * 2022-07-27 2022-10-04 中国工商银行股份有限公司 Cross-data-center data synchronization method and device
CN115617568A (en) * 2021-07-16 2023-01-17 网联清算有限公司 Database recovery method, device and system, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1445672A (en) * 2002-03-14 2003-10-01 上海网上乐园信息技术有限公司 System for backing up isomerous data in same network and its realization method
JP2008204036A (en) * 2007-02-19 2008-09-04 Worldsky Inc Remote backup system
CN101527656A (en) * 2009-04-15 2009-09-09 烽火通信科技股份有限公司 Emergency switched system of NGN service platform database and realizing method thereof
CN103890736A (en) * 2011-11-02 2014-06-25 国际商业机器公司 Message reconciliation during disaster recovery
CN109635039A (en) * 2018-11-23 2019-04-16 金色熊猫有限公司 Multiple data centers method of data synchronization and system
CN110674105A (en) * 2019-08-30 2020-01-10 中国人民财产保险股份有限公司 Data backup method, system and server
CN110597910A (en) * 2019-09-12 2019-12-20 聚好看科技股份有限公司 Remote data synchronization method, device and system
CN115617568A (en) * 2021-07-16 2023-01-17 网联清算有限公司 Database recovery method, device and system, electronic equipment and storage medium
CN113688035A (en) * 2021-08-06 2021-11-23 北京融信致远科技有限公司 Database double-living center verification method and system based on sandbox environment
CN113626528A (en) * 2021-08-18 2021-11-09 卢知白 Database double-activity implementation verification method and system
CN115146002A (en) * 2022-07-27 2022-10-04 中国工商银行股份有限公司 Cross-data-center data synchronization method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
万定生: "《计算机网络技术》", 31 January 2007, 河海大学出版社, pages: 217 - 218 *
王峰: "银行业国产化大数据集群灾难备份体系建设", 《信息技术与标准化》, no. 6 *

Similar Documents

Publication Publication Date Title
US11360854B2 (en) Storage cluster configuration change method, storage cluster, and computer system
CN108712332B (en) Communication method, system and device
CN112069265B (en) Synchronization method of configuration data, business data system, computer system and medium
CN109101364B (en) Double-center double-activity data processing system and method
CN105224637A (en) A kind of based on PostgreSQL database active and standby/the comprehensive method of cluster application
CN111200532A (en) Method, device, equipment and medium for master-slave switching of database cluster node
CN108616574B (en) Management data storage method, device and storage medium
CN111506592B (en) Database upgrading method and device
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN107404509B (en) Distributed service configuration system and information management method
WO2016177231A1 (en) Dual-control-based active-backup switching method and device
CN109656753A (en) A kind of Redundant backup system applied to track traffic synthetic monitoring system
CN110348826A (en) Strange land disaster recovery method, system, equipment and readable storage medium storing program for executing mostly living
CN103346914A (en) Method and device for topological structure update of distributed file system
CN108920489A (en) Dispositions method, device and the equipment of database
CN105069152A (en) Data processing method and apparatus
CN108710550B (en) Double-data-center disaster tolerance system for public security traffic management inspection and control system
WO2016082594A1 (en) Data update processing method and apparatus
CN110196780B (en) Method, device, storage medium and electronic device for determining server state
CN111694845A (en) Redis-based identifier generation method and device
CN112363868A (en) Method, system, equipment and medium for incremental synchronization of annular two places and three centers
EP3660679B1 (en) Data backup method, device and system
CN111460029B (en) Data synchronization method and device
CN109412828B (en) Method, apparatus and system for network topology discovery in software defined networks
CN113766004A (en) Disaster recovery system, method and storage medium based on multi-cloud platform

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