Data management device, data management method, and program

JP2024128734AInactive Publication Date: 2024-09-24CANON KK

Patent Information

Application Number
JP2023037898
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Benefits of technology

【0008】 本発明によれば、ローカルデータベースのマージに伴う索引情報の不整合の発生を抑制することが出来る。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024128734000001
    Figure 2024128734000001
Patent Text Reader

Abstract

To prevent the occurrence of a mismatch between pieces of index information associated with the merge of local databases.SOLUTION: A data management device of the present invention manages a plurality of local databases corresponding respectively to three or more regions, a global database managing information on an index to data in the plurality of local databases, backup data of the plurality of local databases, and backup data of the global database. The data management device has detection means that detects conflict by using the backup data of the global database and data in the global database, in merge processing of merging the backup data of the local database corresponding to a first region with the local database of a second region different from the first region.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a data management device, a data management method, and a program for managing a plurality of local databases. [Background technology]

[0002] When providing Internet-based services across multiple countries and regions, it is becoming common to use data centers installed in the countries and regions of the users.

[0003] This is due to the need to improve usability by improving response speed, the widespread availability of cloud services that are deployed in many countries and regions, and the need to comply with the laws and regulations of each country regarding personal information. An independent region where a data center exists is called a region. In each region, data stores such as storage and databases, and information processing devices that process data in the data stores are placed. These information processing devices will be called servers hereafter. A data store that stores data within a region will be called a local database hereafter. In addition, a database may be required for the purpose of searching in which region data exists at high speed and with low load, or for adjusting constraints on data across regions at high speed and with low load. In this case, a database with the function of automatically replicating to multiple specified regions is placed, or a database for achieving the purpose is placed in a representative region. This database will be called a global database hereafter. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2014-191672 A [Patent Document 2] Special Publication No. 2013-542513 Summary of the Invention [Problem to be solved by the invention]

[0005] Patent Document 1 describes merging in the Git version control system. Version control systems such as Git and Patent Document 1 perform a process of merging two files into one based on change history information and line-by-line difference information.

[0006] Patent Document 2 describes a method of presenting a list of backup data to a user, extracting some objects specified by the user from the backup data, and restoring them to a database. However, the technology in the above prior document has the following problem in a system consisting of local databases deployed in three or more regions and a global database that stores index information for data in the local databases. That is, when a problem occurs in a certain region, data inconsistency occurs when the backup data of that region is restored to another region for operation. Specifically, it may not be possible to satisfy that the data of a region that is operating normally remains in the same state and that the index information from the global database to the local database is consistent. The present invention has been made in consideration of the above problem, and aims to suppress the occurrence of index information inconsistency due to merging of local databases. [Means for solving the problem]

[0007] The present invention is a data management device that manages a plurality of local databases corresponding to three or more regions, a global database that manages index information for data of the plurality of local databases, backup data of the plurality of local databases, and backup data of the global database, and is characterized in that in a merge process of merging backup data of a local database corresponding to a first region into a local database of a second region different from the first region, the data management device has a detection means that detects a conflict using the backup data of the global database and the data of the global database, a first restore means that restores the backup data of the global database to the global database based on the conflict detected by the detection means, and a second store means that restores the backup data of the local database corresponding to the first region to the local database corresponding to the second region based on the conflict detected by the detection means. Effect of the Invention

[0008] According to the present invention, it is possible to prevent the occurrence of inconsistencies in index information that accompany the merging of local databases. [Brief description of the drawings]

[0009] [Figure 1] System configuration before merging [Diagram 2] Global Database [Diagram 3] Database server configuration diagram [Figure 4] Database Tables [Diagram 5] System configuration after merging [Figure 6] Data update status [Figure 7] Flowchart of the first embodiment [Figure 8] Flowchart of the second embodiment [Figure 9]Flowchart of the third embodiment DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] (Embodiment 1) In the first embodiment, the global database merge process and the local database merge process are processed by a database server in the same region.

[0011] It is envisioned that the user information management system for the globally deployed service will be provided in three regions: the US region, Canada region, and Japan region.

[0012] Here, a region refers to the area in which a data center is located.

[0013] In such a data management system, assume that a problem occurs in the database service or database storage in the Canadian region. In the situation where the Canadian region becomes unavailable, it is considered to restore the backup data to the U.S. region and continue the service of the user management system to users in the Canadian region.

[0014] In order to comply with various laws regarding personal information, it is necessary to ensure that personal information is not transferred across regions.

[0015] For this reason, personal information is managed in a local database installed in each region, and anonymized personal information is managed in the global database. For example, the global database stores the hash value of the login name.

[0016] FIG. 1 is a system configuration diagram before merging. The system operates in three regions: a US region 120, a Canadian region 130, and a Japanese region 140. In each region, database servers 121, 131, and 141 exist, and read / write and backup processes are performed on local databases 122, 132, and 142. Backup data 123, 133, and 143 of the local databases created by backup processing of the database servers are stored in a storage that stores backup data. In the first embodiment, an example is shown in which backup data is stored in a storage in the same region, but backup data may be replicated and stored in storage in multiple regions, including other regions.

[0017] The global region 110 is a virtual region. In the global region, a virtual database server 111 exists, and performs read / write and backup processing on a virtual global database 112. Backup data 113 of the global database created by the backup processing of the database server is stored in a storage that stores backup data. Communication between the database servers is performed by a Web API via the Internet 101 using the HTTPS protocol.

[0018] In the first embodiment, an example of communication via the Internet is shown, but communication may be performed via a dedicated line. In the first embodiment, a configuration in which a database server exists in each region is shown, but there may be multiple servers. Multiple servers may be used to increase the parallelism of processing, or separate servers may be used for each data processing or service content.

[0019] FIG. 2 is an explanatory diagram of a global database. The global database is virtual, and the virtual database server 111, the virtual global database 112, and the virtual backup data 113 actually exist in a data center in a predetermined region. In the case of the multi-master global database of the configuration (a), the global databases 213, 223, and 233 exist in each region. When the database servers 211, 221, and 231 of each region, which correspond to the virtual database server 111, update the data of the global databases 213, 223, and 233 of their own region, the updated contents are automatically reflected in the global databases 213, 223, and 233 of the other regions. For example, when the database server 221 of the US region adds data to the global database 213 of the US region, the added data is also added to the global database 223 of the Canadian region and the global database 233 of the Japanese region. When the database server 231 of the Japanese region adds data to the global database 233 of the Japanese region, the added data is also added to the global database 213 of the US region and the global database 233 of the Canadian region. On the other hand, data operations are performed within each region for the local databases 212, 222, and 232. For example, when the database server 211 in the U.S. region adds data to the local database 212 in the U.S. region, the data is not affected by the local database 222 in the Canadian region or the local database 222 in the Japanese region.

[0020] In the case of the single master global database of the configuration (b), global databases 214, 224, and 234 exist in each region. One of the global databases is the master database, and the other global databases are slave databases. Here, the global database 234 in the Japan region is the master database, and the global database 214 in the U.S. region and the global database 224 in the Canada region are slave databases. The database servers 211, 221, and 231 in each region, which correspond to the virtual database server 111, refer to the global databases 214, 224, and 234 in their own regions when referring to the global databases. When updating data in the global databases, the global database 234 in the Japan region, which is the master database, is updated. When data in the global database 234 in the Japan region is updated, the update is reflected in the global database 214 in the U.S. region and the global database 224 in the Canada region.

[0021] In the case of a single global database of configuration (c), the global database is placed in one of the multiple regions present in the system. For example, a global database 235 is placed in the Japan region. The database servers 211, 221, 231 in each region access the global database 235 in the Japan region both when referencing and updating data. This access is performed via the database server 231 in the Japan region, which corresponds to the virtual database server 111. The global region 110, database server 111, global database 112, and backup data 113 in FIG. 1 represent a virtual configuration including various configurations of the global database described in FIG. 2.

[0022] FIG. 3 is a configuration diagram of a database server.

[0023] The database server 310 is composed of a CPU (Central Processing Unit) 311, a network interface 312, a RAM (Random Access Memory) 313, and a storage device 314. The database management system, processing programs, and database data are stored in the storage device 314, and are loaded into the RAM 313 when used, and processed by the CPU 311. The storage device 314 is typically a non-volatile storage device, specifically an HDD (Hard Disk Drive) or an SSD (Solid State Drive). An external storage may also be used as the storage device. The CPU 311 may use other types of processor devices such as a GPU (Graphic Processing Unit).

[0024] FIG. 4 shows examples of tables in the local and global databases.

[0025] Table (a) of the local database stores various data about users.

[0026] For example, it is a user ID, a login name, a name, a hash value of a password, a date of birth, an email address, etc. In the system of the first embodiment, it is assumed that there is a constraint that the login name must be unique in the system across regions.

[0027] Table (b) of the global database stores index information for reverse lookup to determine in which region the user's data resides.

[0028] For example, the hash value of a login name that is unique in the system, information on the region in which the user data exists, etc.

[0029] By having such data in the local database and the global database, a Web page can be published with a globally unified URL, and a user can log in with a login name and a password. When a user performs a login operation with a login name and a password, the user information management system refers to the global table (b), searches for a hash value of the login name, and identifies a region in which the user data exists. Then, it refers to the local table (b) of the region in which the data of the user who performed the login operation exists, refers to a hash value of the password corresponding to the login name, compares the character string hashed from the password entered by the user, and determines whether to permit the login. In a login operation after the first time, when the first login is successful, the region in which the user data exists may be recorded in the cache of the Web browser, and the cache may be referred to to directly access the region in which the user data exists. Also, when the region in which the user data exists is accessed using the cache, if the user data is not present in that region, the global database may be accessed again to search for the region in which the user data exists.

[0030] Fig. 5 is a configuration diagram of the system after merging. A virtual database server 111 and a virtual global database 514 are placed in the virtual global region 110 described in Fig. 2 above. Backup data of the local database in the Canadian region (backup data 133 in Fig. 1) is merged into the local database 524 in the US region while considering data consistency. Backup data of the global database (backup data 113 in Fig. 1) is merged into the global database 514 in the global region while considering data consistency.

[0031] The update transition of user data stored in the local database will be explained using the table in Figure 6. The login name is used by the user for login processing, and is restricted to be unique in all regions. The user ID is an ID assigned to identify individuals who use the same login name in this explanation. When an individual deletes a user account, the login name used by that user in the system becomes unused. In this state, if another individual registers an unused login name again, the other individual will use the same login name as the login name of the user who deleted the account, but this is used to identify and explain these two individuals. The region represents the region in which the user data exists. A user in the Canadian region is initially present in the local database of the Canadian region, but after the backup data is merged into the US region, it is moved to the US region.

[0032] Step 1 to Step 4 represent the state of data at a certain point in time.

[0033] Steps 1 to 3 are the period when the three regions, US region, Canada region, and Japan region, are operating normally. Step 4 is the period when a problem occurs in the Canada region and only the US region and Japan region are operating. In Step 1, a backup of the data is created. In Steps 2 and 3, the data is updated, respectively.

[0034] A problem occurs in the Canadian region between Step 3 and Step 4. Step 4 shows the state of the data when the user information in the Canadian region is merged into the US region using the backup data created in Step 1.

[0035] The meaning of each symbol in the table is as follows: ○: Indicates that user data exists and is maintained. ●: Indicates that a new user was created using the normal user creation operation. ×: This indicates that the user was deleted using the normal user deletion operation. ◎: This indicates that a user in the Canadian region has been created in the local database 524 in the US region by merging the backup data. *: The backup data created in Step 1 included users in the Canadian region, but as a result of ensuring data consistency during the process of merging the backup data, Canadian region users were not created in the US region. ─:This indicates that the data was in local database 132 in the Canadian region as of Step 3, but was no longer accessible due to a malfunction in the Canadian region. Grayed out: This indicates that an outage has occurred in the Canadian region and services in the Canadian region are unavailable.

[0036] The data transitions for each login name in the table will be explained below.

[0037] Aries: User u001, who existed in the Canadian region in Step 1, is recorded in the backup data in Step 1, and moves to the US region using the backup data in Step 4.

[0038] Taurus: User u002, who existed in the Canadian region in Step 1, is recorded in the backup data in Step 1 and is deleted by normal operations in Step 2. In Step 4, the user is moved to the US region using the backup data.

[0039] Gemini: User u003, who existed in the US region in Step 1, is deleted by normal operations in Step 2. User u004 with the same name is created by normal operations in Step 3. User u004 created in Step 3 is not included in the backup data in Step 1, so it is not moved to the US region in Step 4.

[0040] Cancer: User u005, who existed in the Japan region in Step 1, is deleted by normal operations in Step 2. User u006 with the same name is created by normal operations in Step 3. User u006 created in Step 3 is not included in the backup data in Step 1, so it is not moved to the US region in Step 4.

[0041] Leo: In Step 1, user u007 in the Canadian region is recorded in the backup data, and in Step 2, it is deleted by normal operations. At this point, the login name is unused, so in Step 3, another individual creates a new user u008 with the same login name in the US region. In Step 4, a data merge operation that prioritizes users in regions that are operating normally is performed, so the backup data for user u007 is not merged, user u008 is allowed to continue, and data consistency is maintained.

[0042] Virgo: In Step 1, user u009 in the Canadian region is recorded in the backup data, and is deleted by normal operations in Step 2. At this point, the login name becomes unused, so in Step 3, another individual creates a new user u010 with the same login name in the Canadian region. Since both user u009 and user u010 are users in the Canadian region that will be stopped due to the failure, in Step 4, the backup data is merged in the US region and user u009 is created.

[0043] Libra: In Step 1, user u011 in the Canadian region is recorded in the backup data, and in Step 2, it is deleted by normal operations. At this point, the login name is unused, so in Step 3, another individual creates a new user u012 with the same login name in the Japanese region. In Step 4, a data merge operation that prioritizes users in regions that are operating normally means that the backup data for user u011 is not merged, and user u012 is allowed to continue, ensuring data consistency.

[0044] Figure 7 is a flowchart of a database server in the US region that merges backup data into a database. This flowchart assumes the following configurations of the global database described in Figure 2: (a) a multi-master global database configuration, (b) a single master global database configuration in which the master global database is located in the US region, and (c) a single global database configuration in which the global database is located in the US region.

[0045] The US region 120 is composed of a database server 211, a local database 212, and a master global database 213. For backup data, backup data 113 of the global database and backup data 133 of the local database of the Canadian region are used. As described in Fig. 2, in the multi-master global database, data operations on the master global database 213 of the US region are automatically reflected in the master global database 233 of the Japan region.

[0046] The flow chart 701 is made up of a conflict detection subroutine S710, a global database merging subroutine S720, and a local database merging subroutine S730, and each subroutine is executed in sequence.

[0047] The conflict detection subroutine S710 will now be described.

[0048] In step S711, data (A) whose region is Canada is extracted from the backup data 113 of the global database. In step S712, data (B) whose region is other than Canada is extracted from the current global database. Loop processing S713 is a loop processing for the extracted backup data (A).

[0049] In the determination process S714, it is determined whether the i-th data (A) exists in the data (B).

[0050] If it exists, the process proceeds to step S715, where the hash value of the login name of the i-th data (A) is recorded as conflict data.

[0051] If not, proceed to the next loop.

[0052] Completing the above loop makes it possible to obtain a list of conflict data when merging the backup data 113. The following describes the global database merging subroutine S720. In step S721, the list of conflict data is loaded.

[0053] In step S722, data (A) of the region Canada is extracted from the backup data 113 of the global database. Since this process is the same as that of step S711, data (A) may be saved in step S711 and used. In step S723, the data of the region Canada is deleted from the current global database.

[0054] The loop process S724 is a loop process for the extracted backup data (A).

[0055] In the judgment process S725, it is judged whether the j-th backup data (A) exists in the list of conflict data. If it exists, it is conflict data, so the process proceeds to the next loop without restoring the backup data. If it does not exist, the reference region information of the local database is updated to the US region, and the j-th backup data (A) is registered in the global database. The above is repeated until the loop is completed.

[0056] The local database merging subroutine S730 will now be described.

[0057] In step S731, a list of conflict data is loaded. In loop process S732, the backup data of the Canadian local database is processed.

[0058] In the judgment process S733, the hash value of the login name of the k-th backup data is obtained, and it is judged whether it exists in the list of conflict data. If it exists, it is conflict data, so the backup data is not restored and the process proceeds to the next loop. If it does not exist, the process proceeds to step S734, where the k-th backup data is registered in the local database of the US region. The above is repeated until the loop is completed.

[0059] By using the method described above with reference to Figs. 1 to 7, data is managed in local databases deployed in three or more regions. Index information for data in local databases with unique constraints is managed in a global database. By managing the index information, it becomes possible to merge backup data in one region with a local database in another region and the global database while maintaining data consistency.

[0060] (Embodiment 2) In the second embodiment, a configuration will be described in which the conflict detection process and the global database merging process are performed by a server in the same region, and the local database merging process is performed by a server in another region. The configuration of the global database is either (b) a single master global database or (c) a single global database in FIG. 2. In the case of (b) a single master global database, the master global database is installed in the Japan region. In the case of (c) a single global database, the global database is installed in the Japan region.

[0061] The situation in which backup data of a local database in the Canadian region is merged into the US region is the same as in embodiment 1. FIG.

[0062] A flow chart 801 is a flow chart for the database server in the Japan region.

[0063] A conflict detection subroutine S710 and a global DB merging subroutine S720 are executed in sequence.

[0064] The contents of the subroutine S710 and the subroutine S720 are similar to those described with reference to FIG.

[0065] A list of detected conflict data is stored in a location accessible to a database server in the US region.

[0066] Flowchart 802 is a flow chart for the database server in the US region.

[0067] A local database merging subroutine S730 is executed.

[0068] The contents of the subroutine S730 are similar to those described in FIG.

[0069] The list of conflict data stored in the database server in the Japan region is loaded and processed.

[0070] (Embodiment 3) In the third embodiment, a configuration will be described in which the conflict detection process and the local database merging process are performed by a server in the same region, and the global database merging process is performed by a server in another region. The configuration of the global database is a single master global database as shown in (b) of Fig. 2. A master global database is installed in the Japan region, and a slave global database is installed in the US region.

[0071] 9 is a flowchart of the third embodiment. Flowchart 901 is a flowchart of the database server in the US region. In subroutine S710, conflict detection is performed by referring to the slave global database in the US region. Then, in subroutine S730, merging of local databases is performed.

[0072] The contents of subroutine S710 and subroutine S730 are the same as those described in FIG. 7 of embodiment 1. A list of detected conflict data is saved in a location accessible by the database server in the Japan region. Flowchart 902 is a flowchart of the database server in the Japan region. A subroutine S720 for merging the global database is executed. The contents of subroutine S720 are the same as those described in FIG. 7 of embodiment 1. The list of conflict data saved by the database server in the US region is loaded and processing is executed.

[0073] (Embodiment 4) In the above embodiment, the database server executes a program for restoring the backup data, but a separate server for restoring the backup data may be installed. This server is referred to as a restore server. As in embodiment 1, the restore server may be located in the region where the backup data is restored. Also, as in embodiment 2 and embodiment 3, the restore server may be located in the region where the backup data is restored and in a region according to the configuration of the global database.

[0074] (Other embodiments) The present invention can also be realized by executing the following process: That is, software (programs) that realize the functions of the above-described embodiments are supplied to a system or device via a network or various storage media, and the computer (or CPU, MPU, etc.) of the system or device reads and executes the programs.

Claims

1. A data management device that manages a plurality of local databases corresponding to three or more regions, a global database that manages index information for data in the plurality of local databases, backup data for the plurality of local databases, and backup data for the global database, In a merge process of merging backup data of a local database corresponding to a first region into a local database of a second region different from the first region, a detection means for detecting a conflict using backup data of the global database and data of the global database; a first restore means for restoring backup data of the global database to the global database based on the conflict detected by the detection means; a second storing means for restoring backup data of the local database corresponding to the first region to a local database corresponding to the second region based on the conflict detected by the detecting means; A data management device comprising:

2. Based on a constraint that the data managed by the global database is unique, 2. The data management apparatus according to claim 1, wherein the first restore means and the second restore means perform processing.

3. A server having the detection means, the first restoration means, and the second restoration means.

3. The data management device according to claim 2, further comprising:

4. a first server having the detection means and the first restoration means; a second server having the second restore means; 3. The data management device according to claim 2, further comprising:

5. a first server having the detection means and the second restoration means; a second server having the first restore means; 3. The data management device according to claim 2, further comprising:

6. A data management method for managing a plurality of local databases corresponding to three or more regions, a global database for managing index information for data in the plurality of local databases, backup data for the plurality of local databases, and backup data for the global database, comprising: In a merge process of merging backup data of a local database corresponding to a first region into a local database of a second region different from the first region, a detection step of detecting a conflict using the backup data of the global database and the data of the global database; a first restore step of restoring backup data of the global database to the global database based on the conflict detected in the detection step; a second storing step of restoring backup data of the local database corresponding to the first region to a local database corresponding to the second region based on the conflict detected in the detecting step; A data management device comprising:

7. Computer, A data management device that manages a plurality of local databases corresponding to three or more regions, a global database that manages index information for data in the plurality of local databases, backup data for the plurality of local databases, and backup data for the global database, In a merge process of merging backup data of a local database corresponding to a first region into a local database of a second region different from the first region, a detection means for detecting a conflict using backup data of the global database and data of the global database; a first restore means for restoring backup data of the global database to the global database based on the conflict detected by the detection means; a second storing means for restoring backup data of the local database corresponding to the first region to a local database corresponding to the second region based on the conflict detected by the detecting means; A program for causing the device to function as a data management device, comprising:

Citation Information

Patent Citations

  • Methods and systems for performing individual database restores from differential backups

    JP2013542513A

  • Program and version management method

    JP2014191672A

Cited By

  • Method and device for merging remote databases, electronic equipment and storage medium

    CN119903109A