Data processing system and method

By synchronizing multi-point storage data between the main computer room and the backup computer room, and downloading the data to the disk database, the problem of data inconsistency caused by asynchronous replication is solved, the disaster recovery capability and data durability of the computer room are improved, and the computer room is realized Level lossless switching.

CN112417043BActive Publication Date: 2024-08-27BIGO TECH PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011303951.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-19
Publication Date
2024-08-27
Estimated Expiration
2040-11-19

AI Technical Summary

Technical Problem

The existing computer room disaster recovery system uses asynchronous replication technology to disconnect the main computer room from the backup computer room. As a result, some of the latest data cannot be copied to the backup computer room in time, causing data inconsistency and affecting the accuracy of business processing.

Method used

Synchronize multi-point storage data through the cache database in the main computer room and the cache database in at least one backup computer room, and drop the data to the disk drop database in the local computer room to ensure the consistency and persistence of data in multiple computer rooms, using multi-threading and parallel multi-process data storage. Write and coroutine semi-synchronization features to improve data synchronization efficiency.

Benefits of technology

It realizes the synchronization of multi-point storage data, ensures the data consistency of multiple computer rooms, improves the disaster recovery capability of the computer room, ensures the losslessness of data through data disk persistence, and supports lossless switching at the computer room level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112417043B
    Figure CN112417043B
Patent Text Reader

Abstract

The present application discloses a data processing system and method, which belongs to the field of computer technology. The system includes an access gateway and multiple computer rooms, each of which includes a business unit, a resource management unit, a cache database and a disk database; the business unit of the main computer room among the multiple computer rooms is used to receive a first business request from the access gateway; the resource management unit of the main computer room is used to execute the first business logic based on the first business request, and based on the execution of the first business logic, synchronously send a first data write request to the cache database of the main computer room, the disk database of the main computer room and the cache database of at least one standby computer room; the cache database of the main computer room, the disk database of the main computer room and the cache database of the standby computer room are used to store the first data based on the first data write request. The technical solution provided in the embodiment of the present application ensures the consistency of data in multiple computer rooms by synchronizing multi-point data storage across computer rooms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a data processing system and method. Background Art

[0002] In recent years, operation and maintenance incidents at the computer room level have occurred frequently. In order to deal with such problems, people have proposed multi-computer room deployment technology.

[0003] In related technologies, the computer room disaster recovery system uses three computer rooms in the same city to realize multi-active deployment. The three computer rooms include a main computer room and two backup computer rooms. Usually, the main computer room handles the business, and the data is asynchronously copied to the backup computer room. When the main computer room fails, the computer room disaster recovery system switches the business to the backup computer room for processing.

[0004] However, since the main computer room asynchronously replicates data to the backup computer room, when the storage nodes between the main computer room and the backup computer room are disconnected, some of the latest data cannot be replicated to the backup computer room in time, resulting in data inconsistency. Summary of the invention

[0005] The embodiment of the present application provides a data processing system and method, which can synchronize multi-point storage data across computer rooms and local computer room data, ensure data consistency in multiple computer rooms and data persistence, and thus achieve lossless switching of computer room-level data. The technical solution is as follows:

[0006] According to one aspect of an embodiment of the present application, a data processing system is provided, the system comprising an access gateway and multiple computer rooms, each computer room comprising a business unit, a resource management unit, a cache database and a disk database; wherein the cache database is used to provide a data cache function, and the disk database is used to provide a data permanent storage function;

[0007] A service unit of a main computer room among the multiple computer rooms is used to receive a first service request from the access gateway;

[0008] The resource management unit of the main computer room is configured to execute a first business logic based on the first business request, and based on the execution status of the first business logic, synchronously send a first data write request to a cache database of the main computer room, a disk database of the main computer room, and a cache database of at least one standby computer room, wherein the first data write request includes first data requested to be written, and the standby computer room refers to other computer rooms among the multiple computer rooms except the main computer room;

[0009] The cache database of the main computer room, the disk database of the main computer room, and the cache database of the standby computer room are used to store the first data based on the first data write request.

[0010] According to one aspect of an embodiment of the present application, a data processing method is provided, which is applied to a data processing system, wherein the system includes an access gateway and multiple computer rooms, each of which includes a business unit, a resource management unit, a cache database, and a disk database; wherein the cache database is used to provide a data cache function, and the disk database is used to provide a data permanent storage function; the method includes:

[0011] A service unit of a main computer room among the multiple computer rooms receives a first service request from the access gateway;

[0012] The resource management unit of the main computer room executes the first business logic based on the first business request, and based on the execution status of the first business logic, synchronously sends a first data write request to the cache database of the main computer room, the disk database of the main computer room, and the cache database of at least one standby computer room, wherein the first data write request includes the first data requested to be written, and the standby computer room refers to other computer rooms among the multiple computer rooms except the main computer room;

[0013] The cache database of the main computer room, the disk database of the main computer room, and the cache database of the standby computer room store the first data based on the first data write request.

[0014] The technical solution provided in the embodiments of the present application can bring the following beneficial effects:

[0015] By synchronously storing data in the cache database of the main computer room and the cache database of at least one backup computer room, synchronous multi-point storage of data is achieved, ensuring data consistency in multiple computer rooms, thereby improving the disaster recovery capability of the computer rooms.

[0016] In addition, by storing data on disk in the disk database of the computer room, data persistence is achieved, thereby ensuring data integrity. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 It is a schematic diagram of the three-computer room deployment provided by the relevant technology;

[0019] Figure 2 and Figure 3 It is an architectural diagram of a data processing system provided by the relevant technology;

[0020] Figure 4is an architecture diagram of a data processing system provided by an embodiment of the present application;

[0021] Figure 5 is an architecture diagram of a data processing system provided by another embodiment of the present application;

[0022] Figure 6 is a flow chart of a data processing method provided by an embodiment of the present application;

[0023] Figure 7 is a flow chart of a data processing method provided by another embodiment of the present application;

[0024] Figure 8 is an architecture diagram of a data processing system provided by another embodiment of the present application;

[0025] Fig. 9 is a flow chart of a data processing method provided by another embodiment of the present application;

[0026] Fig.10 is an architecture diagram of a data processing system provided by another embodiment of the present application;

[0027] Fig.11 is a flow chart of a data processing method provided by another embodiment of the present application;

[0028] Fig.12 It is a flowchart of a data processing method provided by another embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0030] Please refer to Figure 1 , which presents a schematic diagram of the three-computer room deployment provided by the relevant technology, including:

[0031] Computer room 101, computer room 102 and computer room 103 are mutually primary and backup. User data is divided into three parts, A, B and C, and each part of the data belongs to one of the computer rooms. For example, user data A belongs to computer room 101, user data B belongs to computer room 102, and user data C belongs to computer room 103. User data can be divided according to rules such as region, category, distance, etc.

[0032] Computer room 101 is used to process the services of the user corresponding to user data A, and asynchronously replicates the data to computer rooms 102 and 103. That is, when processing user data A, computer rooms 102 and 103 are backup computer rooms for computer room 101. When computer room 101 fails, computer room 102 or computer room 103 can replace computer room 101 to process the services of the user corresponding to user data A.

[0033] Computer room 102 is used to process the services of the users corresponding to user data B, and asynchronously replicates the data to computer room 101 and computer room 103. That is, when processing user data B, computer room 101 and computer room 103 are backup computer rooms for computer room 102. When computer room 102 fails, computer room 101 or computer room 103 can replace computer room 102 to process the services of the users corresponding to user data B.

[0034] Computer room 103 is used to process the services of the users corresponding to user data C, and asynchronously replicates the data to computer room 101 and computer room 102. That is, when processing user data C, computer room 101 and computer room 102 are backup computer rooms for computer room 103. When computer room 103 fails, computer room 101 or computer room 102 can replace computer room 103 to process the services of the users corresponding to user data C.

[0035] In summary, by deploying multiple computer rooms in a master-backup mode, the disaster recovery capability of the computer room level can be improved.

[0036] Please refer to Figure 2 , which shows an architecture diagram of a data processing system provided by the related art. The data processing system includes an access gateway 201, a main computer room 202, a backup computer room 203 and a backup computer room 204. The three computer rooms all include business units, cache databases and disk databases.

[0037] The access gateway 201 is used to route the user's service request to the service unit of the main computer room 202. The service unit of the main computer room 202 is used to read the corresponding data from the cache database of the main computer room 202 (i.e., "cache database 1") according to the user's service request, and perform logical processing on the data based on the user's service request.

[0038] The business unit of the computer room 202 is also used to cache the new data generated based on the user's business request to the cache database of the computer room 202 (ie, "cache database 1"), and to store the data on disk in the computer room 202's disk database (ie, "disk database 1").

[0039] Optionally, the data processing system synchronizes the above-mentioned newly added data from the cache database of the main computer room 202 (i.e., "cache database 1") to the cache database of the backup computer room 203 (i.e., "cache database 2") and the cache database of the backup computer room 204 (i.e., "cache database 3") through asynchronous replication, and synchronizes the above-mentioned newly added data from the disk database of the main computer room 202 (i.e., "disk database 1") to the disk database of the backup computer room 203 (i.e., "disk database 2") and the disk database of the backup computer room 204 (i.e., "disk database 3").

[0040] refer to Figure 3If the main computer room 202 fails, the access gateway 201 routes the user's service request to the service unit of the backup computer room 203. The service unit of the backup computer room 203 is used to read the corresponding data from the cache database of the backup computer room 203 (i.e., "cache database 2") according to the user's service request, and perform logical processing on the data based on the user's service request.

[0041] The business unit of the backup computer room 203 is also used to cache the new data generated based on the user's business request to the cache database of the backup computer room 203 (ie, "cache database 2"), and to store the data on disk in the backup computer room 203 (ie, "disk database 2").

[0042] Optionally, the data processing system synchronizes the above-mentioned new data from the cache database of the backup computer room 203 (i.e., "cache database 2") to the cache database of the backup computer room 204 (i.e., "cache database 3") by adopting asynchronous replication, and synchronizes the above-mentioned new data from the disk database of the backup computer room 203 (i.e., "disk database 2") to the disk database of the backup computer room 204 (i.e., "disk database 3").

[0043] It should be noted that the backup computer room does not normally process user business requests. It will only process user business requests on behalf of the main computer room when a failure occurs in the main computer room.

[0044] It can be seen that the relevant technology uses asynchronous replication to synchronize the newly added data to the backup computer room. When the main computer room fails, since the asynchronous replication method does not synchronize the newly added data in real time, some of the newly added data will not be synchronized to the backup computer room in time, resulting in the problem that the data in the cache database of the backup computer room is inconsistent with the data in the cache database of the main computer room, resulting in the loss of some of the latest data, which in turn affects the accuracy of the data processing system in processing the user's business request. For example, in the order processing scenario, the user modified the original order A and generated a new order A, and the relevant data of the new order A was stored in the main computer room. Before the relevant data of the new order A was asynchronously copied to the backup computer room, the main computer room failed, and the relevant data of the new order A was not fully synchronized to the backup computer room. If the user needs to modify the new order A, the backup computer room will provide the user with the relevant data of the new order A, but the backup computer room only has incomplete relevant data of the new order A, so the data provided to the user by the backup computer room is inaccurate.

[0045] The technical solution provided in the embodiment of the present application realizes synchronous multi-point storage of data by synchronously storing data in the cache database of the main computer room and the cache database of at least one backup computer room, thereby ensuring data consistency in multiple computer rooms. The technical solution provided in the embodiment of the present application can be used in any system that requires computer room-level switching, such as video processing systems, order processing systems, shopping platform systems, data storage systems, information query systems, etc., and the embodiment of the present application does not limit this.

[0046] The technical solution of the present application is introduced and explained below through several embodiments.

[0047] Please refer to Figure 4 , which shows an architecture diagram of a data processing system provided by an embodiment of the present application. The data processing system may include: an access gateway 401 and multiple computer rooms, each of which includes a business unit, a resource management unit, a cache database and a disk database.

[0048] Among them, the cache database is used to provide a data cache function, and the disk database is used to provide a permanent data storage function. The cache database refers to a database used for data caching. Optionally, the cache database can be a Redis (Remote Dictionary Server) open source database or a Redis cluster, so that the concurrency capability of the data processing system and the data caching speed can be guaranteed. The disk database refers to a database used for permanent storage of data. Optionally, the disk database can be a Pika open source database or a Pika cluster used for persistent large-capacity storage of data, so that the capacity of the disk database of the data processing system and the persistence of the disk data can be guaranteed.

[0049] The service unit of the main computer room 402 in the multiple computer rooms is used to receive the first service request from the access gateway 401. The main computer room 402 can be any one of the multiple computer rooms. The deployment location of the main computer room 402 can be the optimal location for data transmission in the computer room. For example, the main computer room is used to provide services for the target city, and the optimal location can be the center of the target city, so that the data transmission time to each area of ​​the target city can be substantially the same. The access gateway 401 refers to a gateway device connected to the user host at the edge of the network, which is used to receive the first service request from the user host and route the first service request to the service unit of the main computer room 402. The first service request refers to a request for the service required by the user. The first service request may include requests for upload, access, modification, etc. For example, in the scenario of short video processing, the first service request may be such as a request to browse the target short video, a request to upload the target short video, a request to modify the target short video, etc. In the scenario of order processing, the first service request may be such as a request to modify product information, a request to modify merchant information, a request to modify personal information, etc., which is not limited in the embodiments of the present application.

[0050] The resource management unit of the main computer room 402 refers to a data distribution transfer station, which is used to execute the first business logic based on the first business request, and based on the execution status of the first business logic, synchronously send a first data write request to the cache database of the main computer room 402 (i.e., "cache database 1"), the disk database of the main computer room 402 (i.e., "disk database 1"), and the cache database of at least one standby computer room, wherein the first data write request includes the first data requested to be written, and the standby computer room refers to other computer rooms among the multiple computer rooms except the main computer room 402. Among them, the cache database of the above-mentioned at least one standby computer room refers to the cache databases of one or more standby computer rooms. Taking the three-computer room deployment as an example, the cache database of at least one standby computer room may only include the cache database of standby computer room 1. The cache database of at least one standby computer room may only include the cache database of standby computer room 2. The cache database of at least one standby computer room may also include the cache databases of standby computer room 1 and standby computer room 2 at the same time.

[0051] Optionally, the synchronization method of the first data can also be to first complete the data synchronization storage of the cache database and disk database of the main computer room and the cache database of one or more backup computer rooms in a multi-threaded parallel multi-write manner, and then synchronize and store the data in the cache database of the remaining backup computer rooms in a serial multi-line write manner. In this way, the number of cache databases that need data synchronization can be reduced, and the burden on system operation can be reduced. When the main computer room fails, the backup computer room with complete data can be replaced, and the data synchronization of multiple computer rooms can be completed.

[0052] Optionally, the synchronization method of the first data mentioned above can utilize the semi-synchronous characteristics of the coroutine to realize real-time and rapid diffusion of data to multiple computer rooms in a multi-threaded parallel multi-write manner, avoiding the overall time-consuming problem of serial multi-point writing, thereby improving the overall performance of the data processing system.

[0053] Among them, serial multi-point writing refers to the method of writing data to multiple targets in a predetermined order. Taking the three-computer room deployment as an example, the serial multi-point writing method is used to synchronize the data of the main computer room to the backup computer room 1 and the backup computer room 2 in sequence, that is, after completing the synchronization of data to the backup computer room 1, the data is synchronized to the backup computer room 2. When the data is synchronized to the backup computer room 2, the data synchronization operation is completed, and the overall time consumption is high.

[0054] Multi-threaded parallel multi-write refers to the method of writing data to multiple targets simultaneously in multi-threaded parallel mode. Taking the three-computer room deployment as an example, the multi-threaded parallel multi-write method is used to synchronize the data in the main computer room to the backup computer room 1 and the backup computer room 2, that is, the data synchronization operation on the backup computer room 1 and the data synchronization operation on the backup computer room 2 are performed at the same time.

[0055] The first business logic refers to the rules and processes for processing the data required for the first business request. For example, in the scenario of browsing short videos, if the user's business request is to browse the target short video, the system obtains the data corresponding to the target short video, decrypts and decodes the data, and then sends it to the user's host for the user to browse.

[0056] The first data refers to a series of data generated by a user service request. For example, the first data may be data corresponding to the information that user A browsed short video B, data generated when user A sent barrage C while browsing short video B, or data generated when user A uploaded short video B, etc., which is not limited in the embodiments of the present application.

[0057] Optionally, the cache database of the main computer room 402 (ie, "cache database 1"), the disk database of the main computer room 402 (ie, "disk database 1"), and the cache database of the above-mentioned backup computer room are used to store the first data based on the first data write request.

[0058] Optionally, the data processing system stores the first data in the cache database and the disk database of the computer room in the form of Key-Value pairs. Each key corresponds to a unique value, which can increase the storage capacity of the database and facilitate fast data reading.

[0059] Optionally, the resource management unit of the main computer room 402 is further used to determine that the first data is written successfully upon receiving a first write success response fed back by the cache database of the main computer room 402 (i.e., "cache database 1"), the disk database of the main computer room 402 (i.e., "disk database 1"), and the cache database of at least one backup computer room. Taking the three-computer room deployment as an example, upon receiving a write success response fed back by the cache database and disk database of the main computer room, and the cache database of backup computer room 1, it can be determined that the data is written successfully. Upon receiving a write success response fed back by the cache database and disk database of the main computer room, and the cache database of backup computer room 2, it can be determined that the data is written successfully. It can also be determined that the data is written successfully upon receiving a write success response fed back by the cache database of the main computer room, the disk database of the main computer room, the cache database of backup computer room 1, and the cache database of backup computer room 2.

[0060] Optionally, after determining that the first data is written successfully, the first data is synchronized to the cache database of the standby computer room that has not fed back a first write success response and the cache databases of other standby computer rooms to which no data has been written by asynchronous replication.

[0061] The first write success response is used to indicate that the first data is successfully written into the corresponding database. For example, after successfully writing the first data, the cache database (i.e., "cache database 1") of the computer room 402 feeds back the first write success response to the resource management unit of the computer room 402. The first success response includes corresponding database identification information, and the identification information is used to distinguish databases.

[0062] Optionally, the resource management unit of the main computer room 402 is further used to synchronize the first data from the disk database of the main computer room 402 (i.e., "disk database 1") to the disk databases of each backup computer room by using an asynchronous replication method. The asynchronous replication method refers to a method of synchronizing the first data from the disk database of the main computer room 402 (i.e., "disk database 1") to the disk databases of each backup computer room by using a background synchronization method. The asynchronous replication process is a non-real-time replication process, which can ensure that the disk data of the main computer room 402 (i.e., "disk database 1") and the data in the disk databases of multiple backup computer rooms are eventually consistent, and does not affect the processing of the first business request by the business unit of the main computer room 402.

[0063] refer to Figure 5When the main computer room 402 fails, the service unit of the target standby computer room 403 among the multiple computer rooms is used to receive a second service request from the access gateway 401, and the second service request is sent by the access gateway 401 to the target standby computer room 403 when the main computer room fails. The target standby computer room 403 can be any one of the multiple standby computer rooms, and is used to replace the main computer room 402 to perform data reading and writing when the main computer room fails. The above-mentioned second service request may include a service request that is not completed by the first service request, a new service request after the first service request, etc.

[0064] The resource management unit of the target backup computer room 403 is used to execute the second business logic based on the second business request, and based on the execution status of the second business logic, synchronously send a second data write request to the cache database of the target backup computer room 403 (i.e., "cache database 2"), the disk database of the target backup computer room 403 (i.e., "disk database 2"), and the cache database of at least one other backup computer room, wherein the second data write request includes the second data requested to be written. The cache database of the target backup computer room 403 (i.e., "cache database 2"), the disk database of the target backup computer room 403 (i.e., "disk database 2"), and the cache databases of the other backup computer rooms are used to store the second data based on the second data write request. Among them, the second business logic refers to the rules and processes for processing the data required for the second business request. The second data refers to a series of data generated by the second business request.

[0065] Optionally, the resource management unit of the target standby computer room 403 is also used to determine that the second data is written successfully when receiving a second write success response fed back from the cache database of the target standby computer room 403 (i.e., "cache database 2"), the disk database of the target standby computer room 403 (i.e., "disk database 2"), and the cache database of at least one other standby computer room. The second write success response is used to indicate that the second data is successfully written into the corresponding database. Optionally, the synchronization method of the second data can utilize the semi-synchronous characteristics of the coroutine to achieve real-time and rapid diffusion of data to multiple computer rooms in a multi-threaded parallel multi-write manner. Optionally, the synchronization method of the second data can also be to first complete the data synchronization storage of the cache database and the disk database of the target standby computer room, as well as the cache databases of one or more other standby computer rooms in a multi-threaded parallel multi-write manner, and then synchronize the data to the cache databases of the remaining standby computer rooms in a serial multi-line write manner.

[0066] Optionally, each computer room also includes a compensation disk placement unit. The compensation disk placement unit of the target standby computer room 403 among the multiple computer rooms is used to obtain the latest synchronization timestamp in the disk placement database (i.e., "disk placement database 2") of the target standby computer room 403 when a failure is detected in the main computer room 402. The latest synchronization timestamp refers to the timestamp of the most recent data synchronization. According to the latest synchronization timestamp, the incremental un-placed-to-disk data is obtained from the cache database (i.e., "cache database 2") of the target standby computer room 403. The incremental un-placed-to-disk data refers to the newly added data in the cache database (i.e., "cache database 2") of the target standby computer room 403 compared to the disk placement database (i.e., "disk placement database 2") of the target standby computer room 403. The incremental un-placed-to-disk data is stored in the disk placement database (i.e., "disk placement database 2") of the target standby computer room 403. For example, after obtaining the latest synchronization timestamp A in the disk database of the target backup computer room 403 (i.e., "disk database 2"), obtain data with the latest synchronization timestamp A as the starting point from the cache database of the target backup computer room 403 (i.e., "cache database 2"), that is, the incremental data that has not been flushed to the disk, and then store the data in the disk database of the target backup computer room 403 (i.e., "disk database 2").

[0067] Optionally, the compensation disk placement unit of each computer room is also used to periodically write synchronization timestamps in the disk placement database and cache database of each computer room, and the period can be set according to the application scenario of the system. The synchronization timestamp is used to identify and distinguish the data that has been placed in the disk placement database of each computer room at different time points.

[0068] Optionally, the compensation disk placement unit of each computer room is also used to detect the heartbeat information of the disk placement database and cache database of each computer room, and the heartbeat information is used to identify the operating status of the disk placement database and cache database of each computer room. It can be determined whether the computer room is faulty based on the heartbeat information. When the compensation unit of the computer room cannot detect the heartbeat information of any one of the disk placement database and cache database in the computer room, it can be determined that the computer room is faulty. For example, when the compensation disk placement unit of the main computer room 402 cannot detect the heartbeat information of the disk placement database (i.e., "disk placement database 1") of the main computer room 402, it can be determined that the main computer room 402 is faulty. When the compensation disk placement unit of the main computer room 402 cannot detect the heartbeat information of the cache database (i.e., "cache database 1") of the main computer room 402, it can be determined that the main computer room 402 is faulty, and the compensation disk placement unit of the target standby computer room 403 is activated.

[0069] Optionally, the resource management unit of the target standby computer room 403 is further used to synchronize the incremental un-written data from the written-to-disk database (i.e., "written-to-disk database 2") of the target standby computer room 403 to the written-to-disk databases of other standby computer rooms by using an asynchronous replication method. For example, periodically, after obtaining the latest synchronization timestamp in the written-to-disk databases of other standby computer rooms, the latest synchronization time point of the incremental un-written data is determined, and the incremental un-written data starting from the latest synchronization timestamp is pulled from the written-to-disk database (i.e., "written-to-disk database 2") of the target standby computer room 403, and synchronized to the written-to-disk databases of other standby computer rooms.

[0070] It should be noted that the step of synchronizing the first data from the disk database (ie, "disk database 1") of the main computer room 402 to the disk databases of each backup computer room also adopts the above method.

[0071] To sum up, the technical solution provided by the embodiment of the present application realizes synchronous multi-point storage of data by synchronously storing data in the cache database of the main computer room and the cache database of at least one backup computer room, thereby ensuring data consistency in multiple computer rooms and improving the disaster recovery capability of the computer room.

[0072] In addition, by storing data on disk in the disk database of the computer room, data persistence is achieved, thereby ensuring data integrity.

[0073] In addition, the compensation disk placement unit pulls the incremental un-placed data from the cache database of the target backup computer room and compensates it to the disk placement database of the target backup computer room, thereby achieving data losslessness and persistence, and further realizing lossless switching of computer room-level data.

[0074] Please refer to Figure 6 , which shows a flow chart of a data processing method provided by an embodiment of the present application. The method can be applied to the data processing system introduced in the above embodiment. The method can include the following steps (601-603):

[0075] Step 601: A service unit in a main computer room among multiple computer rooms receives a first service request from an access gateway.

[0076] Step 602: The resource management unit of the main computer room executes the first business logic based on the first business request, and based on the execution status of the first business logic, synchronously sends a first data write request to the cache database of the main computer room, the disk database of the main computer room, and the cache database of at least one backup computer room, wherein the first data write request includes the first data requested to be written, and the backup computer room refers to other computer rooms among multiple computer rooms except the main computer room.

[0077] Optionally, the resource management unit of the main computer room determines that the first data is written successfully upon receiving a first write success response fed back by the cache database of the main computer room, the disk database of the main computer room, and the cache database of at least one backup computer room.

[0078] Optionally, the resource management unit of the main computer room adopts an asynchronous replication method to synchronize the first data from the disk-located database of the main computer room to the disk-located databases of each backup computer room.

[0079] Step 603: the cache database of the main computer room, the disk database of the main computer room, and the cache database of the backup computer room store the first data based on the first data write request.

[0080] Please refer to Figure 7 , which shows a flow chart of a data processing method provided by another embodiment of the present application. The method can be applied to the data processing system introduced in the above embodiment. The method can include the following steps (701-703):

[0081] Step 701: A service unit of a target standby computer room among multiple computer rooms receives a second service request from an access gateway. The second service request is sent by the access gateway to the target standby computer room when a failure occurs in the main computer room.

[0082] In step 702, the resource management unit of the target backup computer room executes the second business logic based on the second business request, and based on the execution status of the second business logic, synchronously sends a second data write request to the cache database of the target backup computer room, the disk database of the target backup computer room, and the cache database of at least one other backup computer room, wherein the second data write request includes the second data requested to be written.

[0083] Optionally, the resource management unit of the target standby computer room determines that the second data is written successfully upon receiving a second write success response fed back by the cache database of the target standby computer room, the disk database of the target standby computer room, and the cache database of at least one other standby computer room.

[0084] Step 703: The cache database of the target standby computer room, the disk database of the target standby computer room, and the cache databases of other standby computer rooms store the second data based on the second data write request.

[0085] Optionally, each computer room also includes a compensation disk placement unit. When the compensation disk placement unit of the target standby computer room among multiple computer rooms detects a failure in the main computer room, it obtains the latest synchronization timestamp in the disk placement database of the target standby computer room. The latest synchronization timestamp refers to the timestamp of the most recent data synchronization. The compensation disk placement unit of the target standby computer room obtains incremental un-placed-to-disk data from the cache database of the target standby computer room based on the latest synchronization timestamp. The incremental un-placed-to-disk data refers to the data newly added to the cache database of the target standby computer room compared to the disk placement database of the target standby computer room. The compensation disk placement unit of the target standby computer room stores the incremental un-placed-to-disk data in the disk placement database of the target standby computer room.

[0086] Optionally, the resource management unit of the target standby computer room adopts an asynchronous replication method to synchronize the incremental data that has not been written to disk from the written-to disk database of the target standby computer room to the written-to disk databases of each other standby computer room.

[0087] To sum up, the technical solution provided by the embodiment of the present application realizes synchronous multi-point storage of data by synchronously storing data in the cache database of the main computer room and the cache database of at least one backup computer room, thereby ensuring data consistency in multiple computer rooms and improving the disaster recovery capability of the computer room.

[0088] In addition, by storing data on disk in the disk database of the computer room, data persistence is achieved, thereby ensuring data integrity.

[0089] In addition, the compensation disk placement unit pulls the incremental un-placed data from the cache database of the target backup computer room and compensates it to the disk placement database of the target backup computer room, thereby achieving data losslessness and persistence, and further realizing lossless switching of computer room-level data.

[0090] In an exemplary embodiment, reference Figure 8 Taking the data processing system of three computer rooms in the same city as an example, the data processing system includes access gateway 801, main computer room 802, backup computer room 803 and backup computer room 804. The three computer rooms all include business units, resource management units, cache databases, disk databases and compensation disk units.

[0091] The access gateway 801 is used to route the user's service request to the service unit of the computer room 802. The service unit of the computer room 802 is used to receive the service request from the access gateway 801.

[0092] The resource management unit of the main computer room 802 is used to execute business logic based on business requests, and based on the execution of the business logic, synchronously send data write requests to the cache database of the main computer room 802, the disk database of the main computer room 802 and the cache database of the backup computer room 803.

[0093] The cache database of the main computer room 802, the disk database of the main computer room 802, and the cache database of the backup computer room 803 are used to store the newly added data based on the data write request. The resource management unit of the main computer room 802 is used to determine that the newly added data is written successfully when receiving the write success response fed back by the cache database of the main computer room 802, the disk database of the main computer room 802, and the cache database of the backup computer room 803. The resource management unit of the main computer room 802 adopts an asynchronous replication method to synchronize the newly added data from the disk database of the main computer room 802 to the disk databases of the backup computer rooms 803 and 804.

[0094] refer to Fig. 9 , the detailed work contents of the resource management unit 805 of the computer room 802 are as follows:

[0095] Based on the business request, the resource management unit 805 pulls the data required for the business request from the cache database of the main computer room 802, and processes the data according to the actual business logic. The resource management unit 805 simultaneously initiates writing of the required saved data to the disk database of the main computer room 802, the cache database of the main computer room 802, the cache database of the backup computer room 803, and the cache database of the backup computer room 804. Upon receiving the write success response fed back by the disk database and the cache database of the main computer room 802, and the write success response fed back by the cache database of either the backup computer room 803 or the backup computer room 804, the resource management unit 805 determines that the new data is written successfully.

[0096] refer to Fig.10 When the main computer room 802 fails, the access gateway 801 is used to route the user's service request to the service unit of the backup computer room 803. The service unit of the backup computer room 803 is used to receive the service request from the access gateway 801.

[0097] The resource management unit of the standby computer room 803 is used to execute the business logic based on the business request, and based on the execution of the business logic, synchronously send a data write request to the cache database of the standby computer room 803, the disk database of the standby computer room 803, and the cache database of the standby computer room 804. The cache database of the standby computer room 803, the disk database of the standby computer room 803, and the cache database of the standby computer room 804 are used to store the newly added data based on the data write request. The resource management unit of the standby computer room 803 is also used to determine that the newly added data is written successfully when receiving a write success response fed back by the cache database of the standby computer room 803, the disk database of the standby computer room 803, and the cache database of the standby computer room 804.

[0098] The compensation disk placement unit of the standby computer room 803 is used to obtain the latest synchronization timestamp in the disk placement database of the standby computer room 803 when a failure in the main computer room is detected. The compensation disk placement unit of the standby computer room 803 obtains the incremental un-placed data from the cache database of the standby computer room 803 according to the latest synchronization timestamp, and stores the incremental un-placed data in the disk placement database of the standby computer room 803. The resource management unit of the standby computer room 803 is also used to synchronize the incremental un-placed data from the disk placement database of the standby computer room 803 to the disk placement database of the standby computer room 804 by using an asynchronous replication method.

[0099] refer to Fig.11 The detailed work contents of the resource management unit 806 of the standby room 803 are as follows:

[0100] Based on the business request, the resource management unit 806 pulls the data required for the business request from the cache database of the backup computer room 803, and processes the data according to the actual business logic. The resource management unit 806 simultaneously initiates writing of the required saved data to the disk database of the backup computer room 803, the cache database of the backup computer room 803, and the cache database of the backup computer room 804. Upon receiving the write success response fed back by the disk database of the backup computer room 803, the cache database of the backup computer room 803, and the cache database of the backup computer room 804, the resource management unit 806 determines that the new data is written successfully.

[0101] refer to Fig.12 The detailed working contents of the compensation disk placement unit 807 of the main machine room 802 and the compensation disk placement unit 808 of the standby machine room 803 are as follows:

[0102] The compensation disk placement unit 807 writes synchronization timestamps to the disk placement database and cache database of the main computer room 802. The compensation disk placement unit 807 asynchronously copies the newly added data written with the synchronization timestamp to the disk placement database of the backup computer room 803 and the disk placement database of the backup computer room 804, and performs the above steps periodically.

[0103] When the disk-dropping database of the main computer room 802 fails, in response to not detecting the heartbeat information of the disk-dropping database of the main computer room 802, the compensation disk-dropping unit 807 determines that the main computer room 802 fails, and at the same time, the data processing system activates the compensation disk-dropping unit 808. The compensation disk-dropping unit 808 obtains the latest synchronization timestamp from the disk-dropping database of the backup computer room 803, and pulls the incremental un-dropped data with the latest synchronization timestamp as the starting point from the disk-dropping database of the backup computer room 803 according to the latest synchronization timestamp. The compensation disk-dropping unit 808 drops the incremental un-dropped data to the disk-dropping database of the backup computer room 803, and asynchronously copies the incremental un-dropped data from the disk-dropping database of the backup computer room 803 to the disk-dropping database of the backup computer room 804.

[0104] To sum up, the technical solution provided by the embodiment of the present application realizes synchronous multi-point storage of data by synchronously storing data in the cache database of the main computer room and the cache database of at least one backup computer room, thereby ensuring data consistency in multiple computer rooms and improving the disaster recovery capability of the computer room.

[0105] In addition, by storing data on disk in the disk database of the computer room, data persistence is achieved, thereby ensuring data integrity.

[0106] In addition, the compensation disk placement unit pulls the incremental un-placed data from the cache database of the target backup computer room and compensates it to the disk placement database of the target backup computer room, thereby achieving data losslessness and persistence, and further realizing lossless switching of computer room-level data.

[0107] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.

[0108] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A data processing system, It is characterized in that The system includes an access gateway and multiple computer rooms, each of which includes a business unit, a resource management unit, a compensation disk unit, a cache database and a disk database; wherein the cache database is used to provide a data cache function, and the disk database is used to provide a permanent data storage function; A service unit of a main computer room among the multiple computer rooms is used to receive a first service request from the access gateway; The resource management unit of the main computer room is configured to execute a first business logic based on the first business request, and based on the execution status of the first business logic, synchronously send a first data write request to a cache database of the main computer room, a disk database of the main computer room, and a cache database of at least one standby computer room, wherein the first data write request includes first data requested to be written, and the standby computer room refers to other computer rooms among the multiple computer rooms except the main computer room; The resource management unit of the main computer room is further used to synchronize the first data from the disk-dropped database of the main computer room to the disk-dropped databases of each of the backup computer rooms by using an asynchronous replication method; The cache database of the main computer room, the disk database of the main computer room, and the cache database of the standby computer room are used to store the first data based on the first data write request; wherein the first data is synchronously stored in the cache database of the main computer room, the disk database of the main computer room, and the cache database of the standby computer room in a multi-threaded parallel multi-write manner; The resource management unit of the main computer room is further configured to determine that the first data is written successfully upon receiving a first write success response fed back by the cache database of the main computer room, the disk database of the main computer room, and the cache database of the standby computer room; The compensation disk placement unit of the target standby computer room among the multiple computer rooms is used to obtain the latest synchronization timestamp in the disk placement database of the target standby computer room when a failure is detected in the main computer room, and the latest synchronization timestamp refers to the timestamp of the most recent data synchronization; according to the latest synchronization timestamp, obtain incremental un-placed-to-disk data from the cache database of the target standby computer room, and the incremental un-placed-to-disk data refers to the data newly added to the cache database of the target standby computer room compared with the disk placement database of the target standby computer room; and store the incremental un-placed-to-disk data in the disk placement database of the target standby computer room.

2. The system according to claim 1, It is characterized in that A service unit of a target standby computer room among the multiple computer rooms, configured to receive a second service request from the access gateway, wherein the second service request is sent by the access gateway to the target standby computer room when a failure occurs in the main computer room; The resource management unit of the target standby computer room is configured to execute a second business logic based on the second business request, and synchronously send a second data write request to a cache database of the target standby computer room, a disk database of the target standby computer room, and a cache database of at least one other standby computer room based on the execution status of the second business logic, wherein the second data write request includes second data requested to be written; The cache database of the target standby computer room, the disk database of the target standby computer room, and the cache databases of the other standby computer rooms are used to store the second data based on the second data write request.

3. The system according to claim 2, It is characterized in that The resource management unit of the target standby computer room is further used to determine that the second data is written successfully upon receiving a second write success response fed back by the cache database of the target standby computer room, the disk database of the target standby computer room, and the cache database of at least one of the other standby computer rooms.

4. The system according to claim 1, It is characterized in that The resource management unit of the target standby computer room is further configured to synchronize the incremental un-written data from the written-to-disk database of the target standby computer room to the written-to-disk databases of each other standby computer room by using an asynchronous replication method.

5. A data processing method, It is characterized in that Applied in a data processing system, the system includes an access gateway and multiple computer rooms, each of which includes a business unit, a resource management unit, a compensation disk unit, a cache database and a disk database; wherein the cache database is used to provide a data cache function, and the disk database is used to provide a permanent data storage function; The method comprises: A service unit of a main computer room among the multiple computer rooms receives a first service request from the access gateway; The resource management unit of the main computer room executes the first business logic based on the first business request, and based on the execution status of the first business logic, synchronously sends a first data write request to the cache database of the main computer room, the disk database of the main computer room, and the cache database of at least one standby computer room, wherein the first data write request includes the first data requested to be written, and the standby computer room refers to other computer rooms among the multiple computer rooms except the main computer room; The resource management unit of the main computer room synchronizes the first data from the disk-dropped database of the main computer room to the disk-dropped databases of each of the backup computer rooms by using an asynchronous replication method; The cache database of the main computer room, the disk database of the main computer room, and the cache database of the standby computer room store the first data based on the first data write request; wherein the first data is synchronously stored in the cache database of the main computer room, the disk database of the main computer room, and the cache database of the standby computer room in a multi-threaded parallel multi-write manner; The resource management unit of the main computer room determines that the first data is written successfully when receiving a first write success response fed back by the cache database of the main computer room, the disk database of the main computer room, and the cache database of the standby computer room; When detecting that a failure occurs in the main computer room, the compensation disk placement unit of the target standby computer room among the multiple computer rooms obtains the latest synchronization timestamp in the disk placement database of the target standby computer room, where the latest synchronization timestamp refers to the timestamp of the most recent data synchronization; based on the latest synchronization timestamp, the compensation disk placement unit obtains incremental un-placed-to-disk data from the cache database of the target standby computer room, where the incremental un-placed-to-disk data refers to data newly added to the cache database of the target standby computer room compared to the disk placement database of the target standby computer room; and stores the incremental un-placed-to-disk data in the disk placement database of the target standby computer room.

6. The method according to claim 5, It is characterized in that The method further comprises: The service unit of the target standby computer room among the multiple computer rooms receives a second service request from the access gateway, where the second service request is sent by the access gateway to the target standby computer room when a failure occurs in the main computer room; The resource management unit of the target standby computer room executes the second business logic based on the second business request, and based on the execution status of the second business logic, synchronously sends a second data write request to the cache database of the target standby computer room, the disk database of the target standby computer room, and the cache database of at least one other standby computer room, wherein the second data write request includes the second data requested to be written; The cache database of the target standby computer room, the disk database of the target standby computer room, and the cache databases of the other standby computer rooms store the second data based on the second data write request.

7. The method according to claim 6, It is characterized in that After the resource management unit of the target standby computer room synchronously sends the second data write request, the method further includes: The resource management unit of the target standby computer room determines that the second data is written successfully when receiving a second write success response fed back by the cache database of the target standby computer room, the disk database of the target standby computer room, and the cache database of at least one of the other standby computer rooms.

8. The method according to claim 5, It is characterized in that The method further comprises: The resource management unit of the target standby computer room adopts an asynchronous replication method to synchronize the incremental un-written data from the written-to-disk database of the target standby computer room to the written-to-disk databases of each other standby computer room.