Data synchronization checking method and device, equipment and storage medium

By automatically determining the table name required for data synchronization in the version control system and checking the table structure consistency of the original database and the target database, the problem of inefficient manual inspection in the existing technology is solved, and the automated inspection and efficiency of data synchronization results are achieved.

CN119848134APending Publication Date: 2025-04-18INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411906223.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In the prior art, data synchronization requires manual checking of the table structure consistency of the original database and the target database, which is inefficient and may have omissions.

Method used

By determining the current submitted data of the current production version in the submission data of the version control system, and determining the table name in the list of the data synchronization table to be data through file name matching, we will automatically check the table structure consistency of the data to be checked in the original database and the target database.

Benefits of technology

Automatic inspection of data synchronization results is realized, efficiency is improved, and the risk of omission of manual inspection is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848134A_ABST
    Figure CN119848134A_ABST
Patent Text Reader

Abstract

The invention discloses a data synchronization checking method and device, equipment and a storage medium, and relates to the technical field of artificial intelligence, and the method comprises the steps: determining current submitted data corresponding to a current commissioning version in submitted data of a version control system, and determining a submitted file name in the current submitted data, the submitted data is obtained when the version control system receives a data definition statement; for each submitted file name, matching table names in a table list to be subjected to data synchronization corresponding to the original database with table names in the submitted file names in sequence; when it is determined that a table name matched with a table name in the submitted file name exists in the list of the table to be subjected to data synchronization, determining a data table corresponding to the table name as a data table to be checked; and determining a data synchronization result of each to-be-checked data table according to the original database and the table structure of each to-be-checked data table in the target database corresponding to the original database. According to the technical scheme, the data synchronization condition of the database is automatically checked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of artificial intelligence technology, and in particular, to a data synchronization checking method, device, equipment and storage medium. Background Art

[0002] As enterprises pay more attention to data security, they need to synchronize the original database to the target database. When synchronizing data, it is necessary to create tables with the same table structure in the original database and the target database. If the table structure in the original database changes, the table structure in the target database must also be changed at the same time to ensure the consistency of the table structure, otherwise it will cause data synchronization errors. Therefore, checking the data synchronization results has become a technical problem that needs to be solved urgently.

[0003] In the prior art, it is usually necessary to manually determine the original database and the target database and the data to be synchronized based on the data definition statements submitted by the developer, and then check whether the table structures of the data to be synchronized in the original database and the target database are consistent to implement data synchronization result checking.

[0004] However, manual inspection is inefficient and may result in omissions. Summary of the invention

[0005] The present invention provides a data synchronization checking method, device, equipment and storage medium to realize automatic checking of data synchronization results.

[0006] In a first aspect, an embodiment of the present invention provides a data synchronization checking method, comprising:

[0007] Determining current submission data corresponding to the current production version in the submission data of the version control system, and determining a submission file name in the current submission data, wherein the submission data is obtained by the version control system when receiving a data definition statement;

[0008] For each submitted file name, the table name in the list of tables to be synchronized with the original database is matched with the table name in the submitted file name in turn;

[0009] When it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized, determining the data table corresponding to the table name as the data table to be checked;

[0010] The data synchronization result of each of the data tables to be checked is determined according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database.

[0011] The technical solution of an embodiment of the present invention provides a data synchronization checking method, comprising: determining current submitted data corresponding to a current production version in the submitted data of a version control system, and determining a submitted file name in the current submitted data, wherein the submitted data is obtained by the version control system when receiving a data definition statement; for each submitted file name, matching the table name in the list of tables to be synchronized with the table name in the submitted file name in turn; when it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized with the table name, determining the data table corresponding to the table name as the data table to be checked; determining the data synchronization result of each data table to be checked according to the table structure of each data table to be checked in the original database and the target database corresponding to the original database. The above technical solution can first determine the current submitted data corresponding to the current production version in the submitted data of the version control system, and determine the submitted file name in the current submitted data through the suffix of the file name, so as to determine the submitted file name containing the table name of the data table modified by the submitted data in the current submitted data of the current production version. Secondly, the table names in the list of tables to be synchronized with the original database corresponding to the table names in each submitted file name can be matched in turn to determine whether there is a table name matching the table name contained in the submitted file name in the list of tables to be synchronized with the data. After determining that there is a table name matching the table name contained in the submitted file name in the list of tables to be synchronized with the data In this case, it is determined that the data table in the list of tables to be synchronized with data has been modified in the current production version. After the data table in the list of tables to be synchronized with data has been modified, it is necessary to check the synchronization status of the data table in the original database and the target database. Therefore, the data table corresponding to the table name is determined as the data table to be checked, so as to determine the table to be checked that needs to be checked for data synchronization corresponding to the current production version, and then the table structure of the table to be checked in the original database and the target database corresponding to the original database can be compared to determine the data synchronization result of the table to be checked, realize the data synchronization check of the table to be checked, and then realize the automated check of the data synchronization status of the original database.

[0012] Furthermore, the current submission data corresponding to the current production version is determined in the submission data of the version control system, including:

[0013] Determine the current version library corresponding to the current production version;

[0014] The submitted data of the version control system is queried using the current production version and the current version library as query conditions, and the query result is determined as the current submitted data corresponding to the current production version.

[0015] Further, determining the submission file name in the current submission data includes:

[0016] Filter the currently submitted data according to the file format corresponding to the file name to obtain the file name in the currently submitted data;

[0017] The file name in the current submission data is determined as the submission file name.

[0018] Furthermore, the table names in the list of tables to be synchronized with the original database are matched with the table names in the submitted file name in sequence, including:

[0019] Determining, in the submitted file name, a table name corresponding to the submitted file name;

[0020] Based on a regular expression loop, regular matching is performed between the table names in the to-be-synchronized table list corresponding to the original database and the table names corresponding to the submitted file names to obtain a matching result.

[0021] Further, determining the data synchronization result of each of the data tables to be checked according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database includes:

[0022] If the table structures of the data table to be checked in the original database and the target database corresponding to the original database are inconsistent, the data synchronization result of the data table to be checked is determined to be unsynchronized or synchronization failed; otherwise, the data synchronization result of the data table to be checked is determined to be synchronization successful.

[0023] Further, after determining the data synchronization result of each of the data tables to be checked according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database, the method further includes:

[0024] The data synchronization result of each of the to-be-checked data tables is sent to a user terminal of a corresponding person in charge.

[0025] In a second aspect, an embodiment of the present invention further provides a data synchronization checking device, including:

[0026] A determination module, used to determine the current submission data corresponding to the current production version in the submission data of the version control system, and determine the submission file name in the current submission data, wherein the submission data is obtained by the version control system when receiving the data definition statement;

[0027] A matching module, for matching, for each submitted file name, the table name in the list of tables to be synchronized with the data corresponding to the original database with the table name in the submitted file name in sequence;

[0028] an execution module, configured to, if it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized with data, determine the data table corresponding to the table name as the data table to be checked;

[0029] The checking module is used to determine the data synchronization result of each of the data tables to be checked according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database.

[0030] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0031] at least one processor; and a memory communicatively coupled to the at least one processor;

[0032] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data synchronization checking method as described in any one of the first aspects.

[0033] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the data synchronization checking method as described in any one of the first aspects.

[0034] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed on a computer, the computer executes the data synchronization checking method provided in the first aspect.

[0035] It should be noted that the above computer instructions may be stored in whole or in part on a computer-readable storage medium, wherein the computer-readable storage medium may be packaged together with the processor of the data synchronization checking device, or may be packaged separately from the processor of the data synchronization checking device, which is not limited in this application.

[0036] The description of the second, third, fourth and fifth aspects in this application can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second, third, fourth and fifth aspects can refer to the beneficial effect analysis of the first aspect, which will not be repeated here.

[0037] In this application, the name of the above-mentioned data synchronization checking device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of this application, they fall within the scope of the claims of this application and their equivalent technologies.

[0038] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 A flowchart of a data synchronization checking method provided by an embodiment of the present invention;

[0041] Figure 2 A flowchart of another data synchronization checking method provided by an embodiment of the present invention;

[0042] Figure 3 A schematic diagram of a version control system in another data synchronization checking method provided by an embodiment of the present invention;

[0043] Figure 4 A schematic diagram of the structure of a data synchronization checking device provided by an embodiment of the present invention;

[0044] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0046] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0047] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0048] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0049] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.

[0050] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0051] In the description of the present application, unless otherwise specified, “plurality” means two or more.

[0052] In the prior art, when checking the data synchronization status of an original database and a target database corresponding to the original database, it is necessary to manually check whether the submitted data of the version control system contains data definition statements for the data tables in the list of data tables to be synchronized with the original database, which is inefficient and may result in omissions. After determining that the submitted data contains data definition statements for the data tables in the list of data tables to be synchronized with the original database, it is still necessary to manually check whether the table structure of the data table in the database and the target database is consistent, and the inspection results need to be manually summarized, resulting in a low degree of automation.

[0053] Therefore, the present application proposes a data synchronization checking method to realize automatic checking of data synchronization results.

[0054] The data synchronization checking method provided by the present application will be described in detail below with reference to diagrams and embodiments.

[0055] Figure 1This is a flow chart of a data synchronization checking method provided by an embodiment of the present invention. This embodiment can be applied to situations where the efficiency of data synchronization checking needs to be improved. The method can be executed by a data synchronization checking device, such as Figure 1 As shown, the specific steps include:

[0056] Step 110: Determine the current submission data corresponding to the current production version in the submission data of the version control system, and determine the submission file name in the current submission data.

[0057] The submission data is obtained by the version control system when receiving a data definition statement.

[0058] A version control system is a tool used to manage the modification history of files, directories, or projects. Version control systems can be Git, SVN, etc., and can be used to manage the modification history of databases. Developers can modify the original database or the target database corresponding to the original database by writing data definition statements, and submit the data definition statements to the version control system. During the operation of the version control system, data submitted to the version control system can be captured based on hooks, and the captured data can be stored in the submission information management node.

[0059] In order to check the data synchronization status of the original database and the target database corresponding to the original database, it is necessary to determine whether the currently submitted data contains data definition statements for the data tables in the list of tables to be synchronized with the original database, and when it is determined to be included, determine the data synchronization results of the original database and the target database corresponding to the original database by checking the table structures of these data tables in the original database and the target database corresponding to the original database.

[0060] Specifically, you can first obtain the submission data of the version control system in the submission information management node. These submission data contain the data of each production version, and these submission data are stored according to the production version and the version library name. Therefore, you can determine the current submission data of the current production version in the submission data of the version control system based on the current production version and the version library name corresponding to the current production version.

[0061] The current submission data of the current production version includes all programs in the current version library corresponding to the current production version. Therefore, the submission file name can be determined in the current submission data. Since the submission file name contains the sql suffix, the current submission data can be filtered based on the sql suffix, and the text containing the sql suffix can be determined as the submission file name, thereby determining the submission file name in the current submission data of the current production version.

[0062] In an embodiment of the present invention, after the current submitted data corresponding to the current production version is determined in the submitted data of the version control system, the submitted file name is determined in the current submitted data by the suffix of the file name, so that the submitted file name is determined in the current submitted data of the current production version, and the submitted file name includes the table name of the data table modified by the submitted data. Therefore, a data basis is provided for determining whether the submitted data modifies the data table in the list of tables to be synchronized with the original database.

[0063] Step 120: For each submitted file name, the table name in the list of tables to be synchronized with the original database is matched with the table name in the submitted file name in turn.

[0064] In order to reduce the cost of data synchronization, it is not necessary to synchronize all the data in the original database. Only part of the data needs to be synchronized to the target database. Moreover, after this part of the data in the original database is changed in real time, the target database also needs to be changed accordingly.

[0065] The list of tables to be synchronized corresponding to the original database contains the table names of all data tables in the original database that need to be synchronized to the target database.

[0066] Specifically, after determining the submission file name in the current submission data, the table name contained in each submission file name can be determined, and specifically, the prefix in each submission file name can be determined as the table name contained in each submission file name. For each submission file name, the table name in the list of tables to be synchronized with the original database corresponding to the table name contained in the submission file name can be matched in turn, and the matching result is determined to be that there is a table name matching the table name contained in the submission file name in the list of tables to be synchronized with the data, or there is no table name matching the table name contained in the submission file name in the list of tables to be synchronized with the data.

[0067] In actual applications, the similarities between the table names in the list of tables to be synchronized with the original database and the table names contained in the submitted file name can be determined in turn, and the matching results can be determined based on the similarities. For example, if the similarity is greater than a preset threshold, the matching result is determined to be that the table name in the list of tables to be synchronized with the table name contained in the submitted file name exists; otherwise, the matching result is determined to be that the table name in the list of tables to be synchronized with the table name contained in the submitted file name does not exist.

[0068] The matching result is that there is a table name in the list of tables to be synchronized that matches the table name contained in the submitted file name, indicating that the current production version modifies the data tables in the list of tables to be synchronized; the matching result is that there is no table name in the list of tables to be synchronized that matches the table name contained in the submitted file name, indicating that the current production version does not modify the data tables in the list of tables to be synchronized.

[0069] In an embodiment of the present invention, by matching the table names in the list of tables to be synchronized with the original database with the table names in each submitted file name in turn, it is possible to determine whether there is a table name in the list of tables to be synchronized with the table name contained in the submitted file name. The existence of a table name in the list of tables to be synchronized with the table name contained in the submitted file name indicates that the current production version has modified the data tables in the list of tables to be synchronized with the data, and after the data tables in the list of tables to be synchronized with the data are modified, it is necessary to check the synchronization status of the data tables in the original database and the target database, thereby providing a basis for automatically determining the data tables that need to be checked for data synchronization.

[0070] Step 130: When it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized, determine the data table corresponding to the table name as the data table to be checked.

[0071] Specifically, the matching result is that there is a table name in the list of tables to be synchronized that matches the table name contained in the submitted file name, indicating that the current production version modifies the data table in the list of tables to be synchronized. After the data table in the list of tables to be synchronized is modified, it is necessary to perform a data synchronization check on the data table in the original database and the target database. Therefore, the data table corresponding to the table name can be determined as the data table to be checked. Next, a data synchronization check needs to be performed on the data table to be checked to ensure data synchronization between the original database and the target database.

[0072] By matching each submitted file name corresponding to the current production version, the to-be-checked table corresponding to the current production version can be determined according to the matching results corresponding to each submitted file name.

[0073] In the embodiment of the present invention, after determining that the current production version modifies the data table in the table list to be synchronized, the modified data table is determined as the table to be checked, so as to determine the table to be checked that needs to be synchronized with the current production version.

[0074] Step 140: Determine the data synchronization result of each of the data tables to be checked according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database.

[0075] Specifically, after determining the table to be checked corresponding to the current production version, the table structure of each table to be checked can be determined in the original database and the target database corresponding to the original database. For each table to be checked, compare whether the table structure of the table to be checked in the original database and the target database corresponding to the original database is consistent. If it is determined that the table structure of the table to be checked in the original database is consistent with the table structure of the table to be checked in the target database corresponding to the original database, the data synchronization result of the table to be checked is determined to be successful synchronization. Otherwise, the data synchronization result of the table to be checked is determined to be unsynchronized or synchronization failed.

[0076] In the embodiment of the present invention, by comparing the table structure of the table to be checked in the original database and the target database corresponding to the original database, the data synchronization result of the table to be checked is determined, thereby realizing automatic checking of the data synchronization status of the original database.

[0077] The data synchronization checking method provided by an embodiment of the present invention includes: determining the current submitted data corresponding to the current production version in the submitted data of the version control system, and determining the submitted file name in the current submitted data, wherein the submitted data is obtained by the version control system when receiving the data definition statement; for each submitted file name, matching the table name in the list of tables to be synchronized with the table name in the submitted file name in turn; when it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized with the data, determining the data table corresponding to the table name as the data table to be checked; determining the data synchronization result of each data table to be checked according to the table structure of each data table to be checked in the original database and the target database corresponding to the original database. The above technical solution can first determine the current submitted data corresponding to the current production version in the submitted data of the version control system, and determine the submitted file name in the current submitted data through the suffix of the file name, so as to determine the submitted file name containing the table name of the data table modified by the submitted data in the current submitted data of the current production version. Secondly, the table names in the list of tables to be synchronized with the original database corresponding to the table names in each submitted file name can be matched in turn to determine whether there is a table name matching the table name contained in the submitted file name in the list of tables to be synchronized with the data. After determining that there is a table name matching the table name contained in the submitted file name in the list of tables to be synchronized with the data In this case, it is determined that the data table in the list of tables to be synchronized with data has been modified in the current production version. After the data table in the list of tables to be synchronized with data has been modified, it is necessary to check the synchronization status of the data table in the original database and the target database. Therefore, the data table corresponding to the table name is determined as the data table to be checked, so as to determine the table to be checked that needs to be checked for data synchronization corresponding to the current production version, and then the table structure of the table to be checked in the original database and the target database corresponding to the original database can be compared to determine the data synchronization result of the table to be checked, realize the data synchronization check of the table to be checked, and then realize the automated check of the data synchronization status of the original database.

[0078] Figure 2 This is a flow chart of another data synchronization checking method provided by an embodiment of the present invention. This embodiment is specific based on the above embodiment. Figure 2 As shown, in this embodiment, the method may further include:

[0079] Step 210: Determine the current submission data corresponding to the current production version in the submission data of the version control system.

[0080] In one implementation, step 210 may specifically include:

[0081] Determine the current version library corresponding to the current production version; use the current production version and the current version library as query conditions to perform a data query on the submitted data of the version control system, and determine the query result as the current submitted data corresponding to the current production version.

[0082] Figure 3 A schematic diagram of a version control system in another data synchronization checking method provided by an embodiment of the present invention, such as Figure 3 As shown, the version control system includes a local version library, a submission information management node, a difference file name comparison node, and a database used by the submission information management node and the difference file name comparison node to store data. Developers can submit data definition statements based on the local version library. In this process, the version control system can capture data based on hooks and send the captured data to the submission information management node based on HTTP. The submission information management node can store the received data in the database, and the difference file comparison node is used to perform data synchronization checks.

[0083] When the version control system is Git, the version library can be a Git library, and the Git library can contain all relevant information corresponding to the production version.

[0084] Specifically, first, the current version library corresponding to the current production version can be determined according to the production version number of the current production version, that is, the current version library name corresponding to the current production version can be determined. Secondly, data query can be performed in the database of the version control system based on the current production version and the current version library as query conditions, and the queried data can be determined as the current submitted data corresponding to the current production version.

[0085] In the embodiment of the present invention, the current submitted data corresponding to the current production version is determined by querying the current production version and the current version library in the database of the version control system, thereby realizing automatic acquisition of the current submitted data corresponding to the current production version.

[0086] Step 220: Determine the submission file name in the current submission data.

[0087] In one implementation, step 220 may specifically include:

[0088] The currently submitted data is screened according to a file format corresponding to the file name to obtain a file name in the currently submitted data; and the file name in the currently submitted data is determined as the submitted file name.

[0089] The submitted data may include the production version, repository name, submitter information, reviewer information, submitted file name and related comments. The submitted file name is composed of the table name, production version, submission time and sql suffix. The table name indicates the modified data table corresponding to the submitted data. The production version indicates the production version to which the submitted file belongs. The submission time indicates the time when the submitted data is submitted to the version control system. For example, TABLENAME_2412A_20241204.sql means that the submitted data is a modification of the data table TABLENAME in the centralized production version of December 24 submitted on December 4, 2024.

[0090] Specifically, after determining the current submitted data of the current production version, the submission file name can be determined in the current submitted data. Since the file format corresponding to the text name contains the sql suffix, the current submitted data can be filtered based on the sql suffix to obtain the file name in the current submitted data. That is, the text containing the sql suffix in the current submission data can be determined as the file name in the current submission data, and then the file name in the current submission data can be determined as the submission file name, thereby realizing the determination of the submission file name in the current submitted data of the current production version.

[0091] In the embodiment of the present invention, the submission file name is determined in the current submission data by using the file format corresponding to the file name, so that the submission file name is determined in the current submission data of the current production version.

[0092] Step 230: For each submitted file name, the table name in the list of tables to be synchronized with the original database is matched with the table name in the submitted file name in turn.

[0093] In one implementation, step 230 may specifically include:

[0094] For each submitted file name, determine the table name corresponding to the submitted file name in the submitted file name; based on a regular expression loop, perform regular matching on the table name in the list of tables to be synchronized with the original database and the table name corresponding to the submitted file name to obtain a matching result.

[0095] Specifically, after determining the submission file name in the current submission data, the table name corresponding to each submission file name can be determined, and specifically, the prefix in each submission file name can be determined as the table name contained in each submission file name. For each submission file name, the table name in the list of tables to be synchronized with the original database corresponding to the table name contained in the submission file name can be matched in turn. Specifically, the table name in the list of tables to be synchronized with the table name corresponding to the submission file name can be matched based on a regular expression loop, and the matching result is determined to be that there is a table name in the list of tables to be synchronized with the table name contained in the submission file name that matches the table name contained in the submission file name, or there is no table name in the list of tables to be synchronized with the table name contained in the submission file name that matches the table name contained in the submission file name.

[0096] It should be noted that the version control system also includes a difference file comparison node, based on which the table name in the table list to be synchronized corresponding to the original database can be matched with the table name contained in the submitted file name to determine a matching result.

[0097] In the embodiment of the present invention, by sequentially matching the table names in the table list to be synchronized with the table names in each submitted file name, it is determined whether there is a table name in the table list to be synchronized that matches the table name contained in the submitted file name.

[0098] Step 240: When it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized, determine the data table corresponding to the table name as the data table to be checked.

[0099] Specifically, the matching result is that there is a table name in the list of tables to be synchronized that matches the table name contained in the submitted file name, indicating that the current production version modifies the data table in the list of tables to be synchronized. The data table in the list of tables to be synchronized is the data table that needs to be synchronized from the original database to the target database. The current production version modifies the data table in the list of tables to be synchronized. Therefore, it is necessary to perform a data synchronization check on the data table in the original database and the target database, and then the data table corresponding to the table name can be determined as the data table to be checked.

[0100] In the embodiment of the present invention, after determining that the current production version modifies the data table in the table list to be synchronized, the modified data table is determined as the table to be checked, so as to determine the table to be checked that needs to be synchronized with the current production version.

[0101] Step 250: Determine the data synchronization result of each of the data tables to be checked according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database.

[0102] In one implementation, step 250 may specifically include:

[0103] If the table structures of the data table to be checked in the original database and the target database corresponding to the original database are inconsistent, the data synchronization result of the data table to be checked is determined to be unsynchronized or synchronization failed; otherwise, the data synchronization result of the data table to be checked is determined to be synchronization successful.

[0104] Specifically, after determining the table to be checked corresponding to the current production version, the table structure of each table to be checked can be determined in the original database and the target database corresponding to the original database. Specifically, the fields and indexes of each table to be checked can be determined in the original database, and the fields and indexes of each table to be checked can be determined in the target database corresponding to the original database. For each table to be checked, compare whether the fields and indexes of the table to be checked in the original database are consistent with the fields and indexes of the table to be checked in the target database corresponding to the original database. If it is determined that the fields and indexes of the table to be checked in the original database are consistent with the fields and indexes of the table to be checked in the target database corresponding to the original database, determine that the data synchronization result of the table to be checked is successful synchronization; otherwise, determine that the data synchronization result of the table to be checked is not synchronized or synchronization fails.

[0105] After determining the data synchronization results of each table to be checked, the data synchronization results of each table to be checked can be stored in the database of the version control system. Moreover, after the next check on the data synchronization status, the data synchronization results stored in the database of the version control system can be updated to achieve the update of the data synchronization results of the table to be checked.

[0106] In the embodiment of the present invention, by comparing the table structure of the table to be checked in the original database and the target database corresponding to the original database, the data synchronization result of the table to be checked is determined, thereby realizing automatic checking of the data synchronization status of the original database.

[0107] Step 260: Send the data synchronization result of each of the to-be-checked data tables to a user terminal of a corresponding person in charge.

[0108] Among them, the person in charge of the checklist to be checked can be understood as the submitter and reviewer who submits and modifies the checklist.

[0109] Specifically, after determining the data synchronization results of each table to be checked, the data synchronization results of each table to be checked can be sent to the user terminal of the person in charge of each table to be checked. Specifically, the data synchronization results of each table to be checked can be stored in a table form, and after compressing the table, it can be sent to the user terminal of the person in charge of each table to be checked via email.

[0110] In the embodiment of the present invention, the data synchronization result of each to-be-checked data table is sent to the user terminal of the corresponding person in charge, so that the person in charge can know the data synchronization result in time.

[0111] The data synchronization checking method provided by the embodiment of the present invention includes: determining the current submitted data corresponding to the current production version in the submitted data of the version control system; determining the submission file name in the current submitted data; for each submission file name, matching the table name in the list of tables to be synchronized with the original database corresponding to the table name in the submission file name in turn; when it is determined that there is a table name matching the table name in the submission file name in the list of tables to be synchronized with the data, determining the data table corresponding to the table name as the data table to be checked; determining the data synchronization result of each data table to be checked according to the table structure of each data table to be checked in the original database and the target database corresponding to the original database; and sending the data synchronization result of each data table to be checked to the user terminal of the corresponding person in charge. The above technical solution can first determine the current submitted data corresponding to the current production version in the submitted data of the version control system, and determine the submitted file name in the current submitted data through the suffix of the file name, so as to determine the submitted file name containing the table name of the data table modified by the submitted data in the current submitted data of the current production version. Secondly, the table names in the list of tables to be synchronized with the original database corresponding to the table names in each submitted file name can be matched in turn to determine whether there is a table name matching the table name contained in the submitted file name in the list of tables to be synchronized with the data. When it is determined that there is a table name matching the table name contained in the submitted file name in the list of tables to be synchronized with the data, it is determined that the data in the list of tables to be synchronized with the data modified by the submitted file name in the current production version is to be synchronized. The table has been modified. After the data table in the list of tables to be synchronized is modified, it is necessary to check the synchronization status of the data table in the original database and the target database. Therefore, the data table corresponding to the table name is determined as the data table to be checked, so as to determine the table to be checked corresponding to the current production version that needs to be checked for data synchronization. Then, the table structure of the table to be checked in the original database and the target database corresponding to the original database can be compared to determine the data synchronization result of the table to be checked, realize the data synchronization check of the table to be checked, and then realize the automated check of the data synchronization status of the original database. The data synchronization results of each data table to be checked can also be sent to the user terminal of the corresponding person in charge, so that the person in charge can know the data synchronization results in time.

[0112] By analyzing the pain point of the existing technology that requires manual inspection of the table structures in the original database and the target database, the submission data of the database is obtained and stored in the submission information management node to determine whether the current production version modifies the data table in the list of tables to be synchronized with the original database, without the need to manually check the version library for determination, saving time, and facilitating real-time query of the submission status of the production version, solving the problem of inefficiency caused by the need to manually check whether the submission data of the version control system contains data definition statements for the data tables in the list of tables to be synchronized with the original database; the table names in the list of tables to be synchronized with the original database are matched with the table names in the submitted file names in the current submitted data corresponding to the current production version through the difference file comparison node in turn, to determine whether the current production version modifies the data tables in the list of tables to be synchronized with the original database, solving the problem of possible omissions and low efficiency in manual inspection; and, by sending the table generated by summarizing the data synchronization results of each data table to be checked to the user terminal of the corresponding person in charge, the problem of inefficiency caused by the need to manually organize and send is solved, thereby realizing efficient comparison of heterogeneous database table structures.

[0113] Figure 4 This is a schematic diagram of the structure of a data synchronization check device provided by an embodiment of the present invention, which can be applied to situations where the efficiency of data synchronization check needs to be improved. The device can be implemented by software and / or hardware and is generally integrated in an electronic device, such as a computer device.

[0114] like Figure 4 As shown, the device comprises:

[0115] The determination module 410 is used to determine the current submission data corresponding to the current production version in the submission data of the version control system, and determine the submission file name in the current submission data, wherein the submission data is obtained by the version control system when receiving the data definition statement;

[0116] A matching module 420 is used to match, for each submitted file name, the table name in the list of tables to be synchronized with the original database and the table name in the submitted file name in sequence;

[0117] An execution module 430 is used to determine the data table corresponding to the table name as the data table to be checked when it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized with data;

[0118] The checking module 440 is used to determine the data synchronization result of each of the data tables to be checked according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database.

[0119] The data synchronization checking device provided in the present embodiment determines the current submitted data corresponding to the current production version in the submitted data of the version control system, and determines the submitted file name in the current submitted data, wherein the submitted data is obtained by the version control system when receiving the data definition statement; for each submitted file name, the table name in the list of tables to be synchronized with the original database corresponding to the table name in the submitted file name is matched in turn; when it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized with the data, the data table corresponding to the table name is determined as the data table to be checked; the data synchronization result of each data table to be checked is determined according to the table structure of each data table to be checked in the original database and the target database corresponding to the original database. The above technical solution can first determine the current submitted data corresponding to the current production version in the submitted data of the version control system, and determine the submitted file name in the current submitted data through the suffix of the file name, so as to determine the submitted file name containing the table name of the data table modified by the submitted data in the current submitted data of the current production version. Secondly, the table names in the list of tables to be synchronized with the original database corresponding to the table names in each submitted file name can be matched in turn to determine whether there is a table name matching the table name contained in the submitted file name in the list of tables to be synchronized with the data. After determining that there is a table name matching the table name contained in the submitted file name in the list of tables to be synchronized with the data In this case, it is determined that the data table in the list of tables to be synchronized with data has been modified in the current production version. After the data table in the list of tables to be synchronized with data has been modified, it is necessary to check the synchronization status of the data table in the original database and the target database. Therefore, the data table corresponding to the table name is determined as the data table to be checked, so as to determine the table to be checked that needs to be checked for data synchronization corresponding to the current production version, and then the table structure of the table to be checked in the original database and the target database corresponding to the original database can be compared to determine the data synchronization result of the table to be checked, realize the data synchronization check of the table to be checked, and then realize the automated check of the data synchronization status of the original database.

[0120] Based on the above embodiment, the determination module 410 is specifically used for:

[0121] Determine the current version library corresponding to the current production version; use the current production version and the current version library as query conditions to perform a data query on the submitted data of the version control system, and determine the query result as the current submitted data corresponding to the current production version; filter the current submitted data according to the file format corresponding to the file name to obtain the file name in the current submitted data; determine the file name in the current submitted data as the submitted file name.

[0122] Based on the above embodiment, the matching module 420 is specifically used for:

[0123] For each submitted file name, determine the table name corresponding to the submitted file name in the submitted file name; based on a regular expression loop, perform regular matching on the table name in the list of tables to be synchronized corresponding to the original database and the table name corresponding to the submitted file name to obtain a matching result.

[0124] Based on the above embodiment, the checking module 440 is specifically used for:

[0125] If the table structures of the data table to be checked in the original database and the target database corresponding to the original database are inconsistent, the data synchronization result of the data table to be checked is determined to be unsynchronized or synchronization failed; otherwise, the data synchronization result of the data table to be checked is determined to be synchronization successful.

[0126] Based on the above embodiment, the device further includes:

[0127] After determining the data synchronization results of each of the data tables to be checked according to the table structures of each of the data tables to be checked in the original database and the target database corresponding to the original database, the data synchronization results of each of the data tables to be checked are sent to the user terminal of the corresponding person in charge.

[0128] The data synchronization checking device provided in the embodiment of the present invention can execute the data synchronization checking method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the data synchronization checking method.

[0129] It is worth noting that in the embodiment of the above-mentioned data synchronization check device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific name of each functional unit is only for the convenience of distinguishing each other, and is not used to limit the scope of protection of the present invention.

[0130] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 5 A block diagram of an exemplary electronic device 5 suitable for implementing embodiments of the present invention is shown. Figure 5 The electronic device 5 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0131] like Figure 5 As shown, the electronic device 5 is in the form of a general-purpose computing electronic device. The components of the electronic device 5 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0132] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0133] The electronic device 5 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 5, including volatile and non-volatile media, removable and non-removable media.

[0134] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 5 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0135] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0136] The electronic device 5 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the electronic device 5, and / or any device that enables the electronic device 5 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 5 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. Figure 5 As shown, the network adapter 20 communicates with other modules of the electronic device 5 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 5, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0137] The processing unit 16 executes various functional applications and page displays by running the programs stored in the system memory 28, for example, implementing the data synchronization checking method provided by the embodiment of the present invention, the method comprising:

[0138] Determining current submission data corresponding to the current production version in the submission data of the version control system, and determining a submission file name in the current submission data, wherein the submission data is obtained by the version control system when receiving a data definition statement;

[0139] For each submitted file name, the table name in the list of tables to be synchronized with the original database is matched with the table name in the submitted file name in turn;

[0140] When it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized with the original database, the data table corresponding to the table name is determined as the data table to be checked;

[0141] The data synchronization result of each of the data tables to be checked is determined according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database.

[0142] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the data synchronization checking method provided by any embodiment of the present invention.

[0143] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, for example, a data synchronization checking method provided by an embodiment of the present invention is implemented. The method includes:

[0144] Determining current submission data corresponding to the current production version in the submission data of the version control system, and determining a submission file name in the current submission data, wherein the submission data is obtained by the version control system when receiving a data definition statement;

[0145] For each submitted file name, the table name in the list of tables to be synchronized with the original database is matched with the table name in the submitted file name in turn;

[0146] When it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized with the original database, the data table corresponding to the table name is determined as the data table to be checked;

[0147] The data synchronization result of each of the data tables to be checked is determined according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database.

[0148] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0149] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0150] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0151] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0152] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0153] In addition, the acquisition, storage, use, and processing of data in the technical solution of the present invention are in compliance with the relevant provisions of national laws and regulations.

[0154] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A data synchronization checking method, characterized in that: include: Determining current submission data corresponding to the current production version in the submission data of the version control system, and determining a submission file name in the current submission data, wherein the submission data is obtained by the version control system when receiving a data definition statement; For each submitted file name, the table name in the list of tables to be synchronized with the original database is matched with the table name in the submitted file name in turn; When it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized, determining the data table corresponding to the table name as the data table to be checked; The data synchronization result of each of the data tables to be checked is determined according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database.

2. The data synchronization checking method according to claim 1, characterized in that: Determine the current submission data corresponding to the current production version in the submission data of the version control system, including: Determine the current version library corresponding to the current production version; The submitted data of the version control system is queried using the current production version and the current version library as query conditions, and the query result is determined as the current submitted data corresponding to the current production version.

3. The data synchronization checking method according to claim 1, characterized in that: Determining a submission file name in the current submission data includes: Filter the currently submitted data according to the file format corresponding to the file name to obtain the file name in the currently submitted data; The file name in the current submission data is determined as the submission file name.

4. The data synchronization checking method according to claim 1, characterized in that: Match the table names in the list of tables to be synchronized with the table names in the submitted file name in sequence, including: Determining, in the submitted file name, a table name corresponding to the submitted file name; Based on a regular expression loop, regular matching is performed between the table names in the to-be-synchronized table list corresponding to the original database and the table names corresponding to the submitted file names to obtain a matching result.

5. The data synchronization checking method according to claim 1, characterized in that: Determining the data synchronization result of each of the data tables to be checked according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database includes: If the table structures of the data table to be checked in the original database and the target database corresponding to the original database are inconsistent, the data synchronization result of the data table to be checked is determined to be unsynchronized or synchronization failed; otherwise, the data synchronization result of the data table to be checked is determined to be synchronization successful.

6. The data synchronization checking method according to claim 5, characterized in that: After determining the data synchronization results of each of the data tables to be checked according to the table structures of each of the data tables to be checked in the original database and the target database corresponding to the original database, the method further includes: The data synchronization result of each of the to-be-checked data tables is sent to a user terminal of a corresponding person in charge.

7. A data synchronization checking device, characterized in that: include: A determination module, used to determine the current submission data corresponding to the current production version in the submission data of the version control system, and determine the submission file name in the current submission data, wherein the submission data is obtained by the version control system when receiving the data definition statement; A matching module, for matching, for each submitted file name, the table name in the list of tables to be synchronized with the data corresponding to the original database with the table name in the submitted file name in sequence; an execution module, configured to, if it is determined that there is a table name matching the table name in the submitted file name in the list of tables to be synchronized with data, determine the data table corresponding to the table name as the data table to be checked; The checking module is used to determine the data synchronization result of each of the data tables to be checked according to the table structure of each of the data tables to be checked in the original database and the target database corresponding to the original database.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data synchronization checking method as described in any one of claims 1-6.

9. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to perform the data synchronization checking method as described in any one of claims 1-6 when executed by a computer processor.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the data synchronization checking method according to any one of claims 1 to 6.