Database consistency comparison methods, devices, electronic equipment and storage media
By using application partition numbers and transformation rules to perform data consistency comparison in the distributed core business system, the problems of low efficiency and low accuracy during data switching are solved, achieving fast and accurate data consistency comparison and ensuring system stability.
Patent Information
- Application Number
- CN202311544097.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-11-17
AI Technical Summary
In distributed core business systems, the data consistency comparison between different business systems during data switching is inefficient and inaccurate, posing a significant risk of failure.
By determining the operation record information corresponding to the transaction data, the corresponding operation record information is queried in different system databases using the application partition number, and consistency comparison is performed. Partition number conversion rules and dependency mapping relationships are adopted to improve query efficiency and accuracy.
It enables rapid and accurate consistency comparison of data content across different business systems, reducing switching risks and improving system stability and data consistency.
Smart Images

Figure CN117555879B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data analysis technology, and in particular to a database consistency comparison method, apparatus, electronic device and storage medium. Background Technology
[0002] In distributed core business systems, due to factors such as business system architecture upgrades and physical equipment replacements, situations may arise where transaction data and operation records for processing that data need to be migrated from the old business system to the new one. However, business systems typically involve a massive amount of data, and migrating all the data at once carries a significant risk of failure. Therefore, related technologies often employ a lengthy approach, gradually migrating the data from the old to the new business system. During this gradual migration process, the consistency comparison of data across different business systems is inefficient and inaccurate. Summary of the Invention
[0003] This disclosure aims to at least partially address one of the technical problems in the related art.
[0004] Therefore, this disclosure proposes a database consistency comparison method, apparatus, electronic device, non-transitory computer-readable storage medium storing computer instructions, and computer program product, which can effectively and accurately perform consistency comparison of data content involved in different business systems.
[0005] The database consistency comparison method proposed in the first aspect of this disclosure includes: determining first operation record information corresponding to transaction data, wherein the first operation record information is record information obtained by a first system database from operations on the transaction data; determining a first application partition number based on the first operation record information, wherein the first application partition number is used to query the first operation record information in the first system database; determining a second application partition number based on the first application partition number; querying second operation record information from the second system database based on the second application partition number; and performing a consistency comparison between the first operation record information and the second operation record information to obtain a comparison result.
[0006] The database consistency comparison apparatus proposed in the second aspect of this disclosure includes: a first determining module, configured to determine first operation record information corresponding to transaction data, wherein the first operation record information is record information obtained by a first system database operating on the transaction data; a second determining module, configured to determine a first application partition number based on the first operation record information, wherein the first application partition number is used to query the first operation record information in the first system database; a third determining module, configured to determine a second application partition number based on the first application partition number; a querying module, configured to query second operation record information from the second system database based on the second application partition number; and a comparison module, configured to perform a consistency comparison between the first operation record information and the second operation record information to obtain a comparison result.
[0007] A third aspect of this disclosure provides an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement a database consistency comparison method proposed in a first aspect of this disclosure.
[0008] The fourth aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement a database consistency comparison method proposed in the first aspect of this disclosure.
[0009] The fifth aspect of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements a database consistency comparison method proposed in the first aspect of this disclosure.
[0010] The database consistency comparison method, apparatus, electronic device, non-transitory computer-readable storage medium storing computer instructions, and computer program product provided in this disclosure determine first operation record information corresponding to transaction data, wherein the first operation record information is record information obtained by a first system database from operations on transaction data, and determine a first application partition number based on the first operation record information, wherein the first application partition number is used to query the first operation record information in the first system database, determine a second application partition number based on the first application partition number, query second operation record information in the second system database based on the second application partition number, and perform consistency comparison on the first operation record information and the second operation record information to obtain a comparison result. Since the second application partition number required for querying the second operation record information in the second system database is determined based on the first application partition number used to query the first operation record information in the first system database, and the corresponding operation record information is retrieved based on the corresponding application partition number, the first operation record information and the second operation record information to be compared are retrieved quickly and accurately. Therefore, when consistency comparison is performed based on the retrieved first operation record information and the second operation record information, consistency comparison of data content involved in different business systems can be effectively and accurately performed.
[0011] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0012] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0013] Figure 1 This is a schematic flowchart of a database consistency comparison method proposed in an embodiment of this disclosure;
[0014] Figure 2 This is a schematic flowchart of a database consistency comparison method proposed in another embodiment of this disclosure;
[0015] Figure 3 This is a schematic flowchart of a database consistency comparison method proposed in another embodiment of this disclosure;
[0016] Figure 4 This is a schematic diagram illustrating the synchronization process between the new business system and the old business system in this embodiment of the disclosure;
[0017] Figure 5 This is a schematic diagram of the verification process in an embodiment of this disclosure;
[0018] Figure 6This is a schematic diagram of the structure of a database consistency comparison device proposed in an embodiment of the present disclosure;
[0019] Figure 7 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0020] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are used only to explain this disclosure, and should not be construed as limiting this disclosure. Rather, embodiments of this disclosure include all variations, modifications, and equivalents falling within the spirit and scope of the appended claims.
[0021] Figure 1 This is a schematic flowchart of a database consistency comparison method proposed in an embodiment of this disclosure.
[0022] like Figure 1 As shown, the database consistency comparison method includes:
[0023] S101: Determine the first operation record information corresponding to the transaction data, wherein the first operation record information is the record information obtained by the first system database from operating on the transaction data.
[0024] The various data processed by the business system can be referred to as transaction data. Operation log information refers to information related to the process of processing transaction data in the business system's backend database, such as operation time, operation content, operation method, operation characteristics, etc. The first operation log information refers to the record information obtained by the first system database from operating on the transaction data. The first system database can refer to the backend database of the new business system or the backend database of the old business system. Similarly, the second system database can refer to the backend database of the old business system or the backend database of the new business system. The first and second system databases can also refer to the backend databases of two different business systems to be compared for consistency; there are no restrictions on this.
[0025] In this embodiment of the disclosure, a batch of transaction data can be randomly extracted from the first system database, and the first operation record information corresponding to the transaction data can be extracted to trigger subsequent consistency comparison.
[0026] S102: Determine the first application partition number based on the first operation record information, wherein the first application partition number is used to query the first operation record information in the first system database.
[0027] Following the first operation record information corresponding to the transaction data, the first application partition number can be determined. The first application partition number is the application partition number used to query the first operation record information in the first system database. In a communication system, an application partitioning number (IPN) is an identifier used to divide different applications or services into different partitions or regions. The purpose of the application partition number is to achieve isolation between applications and resource management. Application partition numbers are typically assigned by system administrators or developers and configured in the system. It can be a number, a string, or other unique identifier. Each application or service is assigned a specific application partition number. For example, a service that processes transaction data and generates first operation record information can use its application partition number to identify the corresponding first operation record information. Therefore, it is possible to query the first operation record information from the first system database based on the first application partition number.
[0028] S103: Determine the second application partition number based on the first application partition number.
[0029] The second application partition number refers to the application partition number used to query and process the second operation record information of the same transaction data in the second system database. For an explanation of the second system database, please refer to the above. The second operation record information refers to the record information obtained by the second system database from operations on the transaction data.
[0030] Since different business systems may use different rules to generate application partition numbers in their backend databases, after determining the first application partition number, the second application partition number can be determined based on certain rules. These rules could include transformation rules or artificial intelligence-based transformations.
[0031] S104: Query the second operation record information from the second system database based on the second application partition number.
[0032] In some embodiments, the second application partition number can be used to search the second system database to retrieve the operation record information indexed by the second application partition number as the second operation record information.
[0033] In some embodiments, in order to effectively improve the query efficiency of the second operation record information, the table information of the data table to be queried in the second system can be determined first based on the first operation record information, and the data table to be queried corresponding to the table information in the second system can be determined, and the second operation record information can be queried in the data table to be queried based on the second application partition number.
[0034] In other words, based on certain parsing rules, the data table where the first operation record information might be stored can be determined. This data table can be called the query table, and the table information can be used to describe information related to the query table, such as the table identifier, table name, etc. Then, the second operation record information can be directly queried from the query table based on the table information, which can effectively narrow the query scope, improve query efficiency, and ensure query accuracy.
[0035] S105: Perform a consistency comparison between the first operation record information and the second operation record information to obtain the comparison result.
[0036] After querying the second operation record information from the second system database based on the second application partition number, a consistency comparison can be performed on the first and second operation record information. For example, the consistency comparison between the first and second system databases mainly compares whether the operation records for processing the same transaction data in the backend databases of different business systems are identical, and whether identical operation record information can be obtained. If identical operation record information is obtained, the consistency comparison between the first and second system databases passes; if identical operation record information is not obtained, the consistency comparison between the first and second system databases fails, and other methods need to be intervened to ensure the consistency between the different system databases. The comparison result can then be used to describe the outcome of the consistency comparison.
[0037] In this embodiment, by determining the first operation record information corresponding to the transaction data (the first operation record information is the record information obtained by the first system database from the operation of the transaction data), and determining the first application partition number based on the first operation record information, the first application partition number is used to query the first operation record information in the first system database. Based on the first application partition number, a second application partition number is determined, and the second operation record information is queried from the second system database based on the second application partition number. A consistency comparison is then performed between the first and second operation record information to obtain the comparison result. Since the second application partition number required for querying the second operation record information in the second system database is determined based on the first application partition number used to query the first operation record information in the first system database, and the corresponding operation record information is retrieved based on the corresponding application partition number, the first and second operation record information to be compared can be retrieved quickly and accurately. Therefore, when a consistency comparison is performed based on the retrieved first and second operation record information, the consistency comparison of data content involved in different business systems can be effectively and accurately performed.
[0038] Figure 2This is a schematic flowchart of a database consistency comparison method proposed in another embodiment of this disclosure.
[0039] like Figure 2 As shown, the database consistency comparison method includes:
[0040] S201: Determine the first operation record information corresponding to the transaction data, wherein the first operation record information is the record information obtained by the first system database from operating on the transaction data.
[0041] S202: Determine the first application partition number based on the first operation record information, wherein the first application partition number is used to query the first operation record information in the first system database.
[0042] For a detailed description of S201-S202, please refer to the above embodiments, which will not be repeated here.
[0043] S203: Determine the partition number conversion rules supported by the second system database.
[0044] In some embodiments, the conversion rules that can convert application partition numbers from other system databases to application partition numbers suitable for a second system database can be referred to as partition number conversion rules. Partition number conversion rules can be pre-configured or predefined, or they can be dynamically adjusted according to actual usage needs.
[0045] In some embodiments, the partition number conversion rule is any of the following: a first conversion rule, wherein the first conversion rule indicates that the first application partition number is processed based on a business field in a data table within the second system database; a second conversion rule, wherein the second conversion rule indicates that the first application partition number is converted to a target value; a third conversion rule, wherein the third conversion rule indicates that the first application partition number and the second application partition number are the same; a fourth conversion rule, wherein the fourth conversion rule indicates that the first application partition number is processed based on a custom rule. This effectively supports converting any application partition number into an application partition number suitable for the second system database, thereby supporting the retrieval of accurate second operation record information.
[0046] S204: Process the first application partition number according to the partition number conversion rules to obtain the second application partition number.
[0047] In some embodiments, the first application partition number can be processed based on any of the above partition number conversion rules to obtain the second application partition number.
[0048] In some embodiments, if the partition number conversion rule adapted to the second system database is determined to be the first conversion rule, the first application partition number can be processed based on the first conversion rule to obtain the second application partition number. For example, at least one business field from a data table in the second system database can be obtained, and the field value corresponding to each business field can be determined from the first operation record information. The second application partition number can then be generated based on the at least one business field and the field value corresponding to each business field. Specifically, for example, the first application partition number and multiple field values can be concatenated, and the concatenated result can be used as the second application partition number. This effectively improves the indexing accuracy of the second application partition number and is suitable for personalized conversion scenarios.
[0049] In some embodiments, in order to improve the efficiency of business field retrieval and support the efficiency of overall consistency comparison, when performing the step of obtaining at least one business field in the data table of the second system database, a dependency mapping relationship corresponding to the table information of the data table can also be determined. The dependency mapping relationship represents the association between the table information and at least one candidate business field, and at least one candidate business field in the dependency mapping relationship is used as at least one business field. The dependency mapping relationship can be predefined or configured.
[0050] In some embodiments, if the partition number conversion rule adapted to the second system database is determined to be the second conversion rule, the first application partition number can be processed based on the second conversion rule to obtain the second application partition number. For example, the first application partition number is converted to a target value to obtain the second application partition number. The target value can be, for example, 0, that is, reducing all values of the first application partition number to zero to obtain the second application partition number. This effectively improves the indexing accuracy of the second application partition number and is suitable for personalized conversion scenarios.
[0051] In some embodiments, if the partition number conversion rule adapted to the second system database is determined to be the third conversion rule, the first application partition number can be processed according to the third conversion rule to obtain the second application partition number. For example, the first application partition number can be directly used as the second application partition number. This effectively improves the indexing accuracy of the second application partition number and is suitable for personalized conversion scenarios.
[0052] In some embodiments, if the partition number conversion rule adapted to the second system database is determined to be the fourth conversion rule, the first application partition number can be processed according to the fourth conversion rule to obtain the second application partition number. For example, a custom rule can be obtained, and the first application partition number can be processed according to the custom rule to obtain the second application partition number. This can effectively improve the indexing accuracy of the second application partition number and is suitable for personalized conversion scenarios.
[0053] S205: Query the second operation record information from the second system database based on the second application partition number.
[0054] S206: Perform a consistency comparison between the first operation record information and the second operation record information to obtain the comparison result.
[0055] For a detailed description of S205-S206, please refer to the above embodiments, which will not be repeated here.
[0056] In this embodiment, by determining the first operation record information corresponding to the transaction data (where the first operation record information is the record information obtained by the first system database from the operation of the transaction data), and determining the first application partition number based on the first operation record information, the first application partition number is used to query the first operation record information in the first system database. Based on the first application partition number, a second application partition number is determined, and the second operation record information is queried from the second system database based on the second application partition number. Furthermore, a consistency comparison is performed between the first and second operation record information to obtain the comparison result. This effectively and accurately performs consistency comparisons on data content involved in different business systems. It effectively supports converting any application partition number into an application partition number suitable for the second system database, thereby supporting the retrieval of accurate second operation record information.
[0057] Figure 3 This is a schematic flowchart of a database consistency comparison method proposed in another embodiment of this disclosure.
[0058] like Figure 3 As shown, the database consistency comparison method includes:
[0059] S301: Determine the first operation record information corresponding to the transaction data, wherein the first operation record information is the record information obtained by the first system database from operating on the transaction data.
[0060] S302: Determine the first application partition number based on the first operation record information, wherein the first application partition number is used to query the first operation record information in the first system database.
[0061] S303: Determine the second application partition number based on the first application partition number.
[0062] S304: Based on the information in the first operation record, determine the table information of the data table to be queried in the second system.
[0063] S305: Determine the data table to be queried in the second system that corresponds to the table information.
[0064] For a detailed description of S301-S305, please refer to the above embodiments, which will not be repeated here.
[0065] S306: Determine the initial query primary key for querying the data table to be queried, wherein the initial query primary key includes: the initial application partition number.
[0066] S307: Update the initial application partition number in the initial query primary key to the second application partition number to obtain the target query primary key.
[0067] The initial query primary key is used to query operation record information in the data table to be queried based on the initial application partition number. Due to changes in system architecture and equipment upgrades, the operation record information retrieved based on the initial application partition number in the initial query primary key may not be obtained from processing the same transaction data. Therefore, it is necessary to replace the initial application partition number in the initial query primary key.
[0068] S308: Query the second operation record information in the data table to be queried based on the target query primary key.
[0069] In this embodiment, the initial application partition number in the initial query primary key can be updated to the second application partition number to obtain the target query primary key, and the second operation record information can be queried in the data table to be queried based on the target query primary key. This improves the retrieval accuracy of the second operation record information.
[0070] S309: Perform a consistency comparison between the first operation record information and the second operation record information to obtain the comparison result.
[0071] For a detailed description of S309, please refer to the above embodiments, which will not be repeated here.
[0072] In this embodiment, by determining the first operation record information corresponding to the transaction data (the first operation record information is the record information obtained by the first system database from the operation of the transaction data), and determining the first application partition number based on the first operation record information, the first application partition number is used to query the first operation record information in the first system database. Based on the first application partition number, a second application partition number is determined, and the second operation record information is queried from the second system database based on the second application partition number. Furthermore, a consistency comparison is performed between the first and second operation record information to obtain the comparison result. This effectively and accurately performs consistency comparisons on the data content involved in different business systems. By updating the initial application partition number in the initial query primary key to the second application partition number, the target query primary key is obtained, and the second operation record information is queried in the data table to be queried based on the target query primary key. This improves the retrieval accuracy of the second operation record information.
[0073] Examples of the above embodiments can be illustrated as follows:
[0074] By employing a special application partition number processing method, the consistency of transaction data is ensured during the switchover between the old and new systems (i.e., the new business system and the old business system), thereby achieving reliable data verification, reducing labor costs, and improving the system stability of the new system. For example... Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the synchronization process between the new and old business systems in this embodiment. After a transaction is sent to the old system and a database operation occurs, the old system sends the database operation record and other information for this transaction to the message center. The message center then forwards this information to the heterogeneous unit. The heterogeneous unit uses this message to modify the record in the new system to match the host system, thus achieving record consistency between the two systems. During playback, the heterogeneous unit continues to verify the playback results. It randomly samples records, retrieves a batch of records from the new system, and then retrieves the corresponding records from the old system using the primary key, verifying each field one by one. For example... Figure 5 As shown, Figure 5 This is a schematic diagram of the verification process in this embodiment. Due to the transition between old and new systems, changes often occur in the structure and fields of database tables, and the application partition number rules also change across different systems. Therefore, it's not possible to simply use the primary key of the new system record for queries. Special processing is needed to convert the application partition number of the new system into the application partition number of the corresponding record in the old system database using conversion rules, thus ensuring that the corresponding records in both the old and new systems can be correctly retrieved. When the heterogeneous unit obtains a new system record, it parses the record to extract the corresponding table name and then reads the configuration to obtain the conversion rules for the application partition number of that table. The conversion rules are broadly categorized into four types: The first type involves converting business fields dependent on tables. Since different tables depend on different fields, the corresponding dependent field names need to be obtained through configuration. Then, the field values are retrieved from the new system record using these field names. Finally, the application partition number of the corresponding record in the old system is constructed using these dependent business field values. The second type is all-zero type conversion, where the partition number on the host system is all zeros. The application partition number is directly converted to all zeros. The third type is where the application partition number rules remain unchanged between the old and new systems. No special conversion is needed; the new system's application partition number can be used directly. The last type is extended custom conversion, which only requires configuring a custom converter to perform application partition number conversion according to custom rules, allowing for unlimited functional expansion. After calculating the application partition number corresponding to the old system, the application partition number in the new system record is replaced with the converted application partition number. This allows the primary key value of the corresponding record in the old system to be obtained. The corresponding old system record can then be retrieved through a primary key query for verification and comparison of the same record in both the old and new systems. This ensures data consistency during the switch between the old and new systems. Verification and comparison can also be performed normally for database tables whose application partition numbers have changed. To ensure the stability of the new system, external users can switch without noticing.
[0075] Figure 6 This is a schematic diagram of the structure of a database consistency comparison device proposed in an embodiment of this disclosure.
[0076] like Figure 6 As shown, the database consistency comparison device 60 includes:
[0077] The first determining module 601 is used to determine the first operation record information corresponding to the transaction data, wherein the first operation record information is the record information obtained by the first system database from operating on the transaction data.
[0078] The second determining module 602 is used to determine the first application partition number based on the first operation record information, wherein the first application partition number is used to query the first operation record information in the first system database.
[0079] The third determining module 603 is used to determine the second application partition number based on the first application partition number.
[0080] The query module 604 is used to query the second operation record information from the second system database based on the second application partition number.
[0081] The comparison module 605 is used to perform a consistency comparison between the first operation record information and the second operation record information to obtain the comparison result.
[0082] It should be noted that the foregoing explanation of the database consistency comparison method also applies to the database consistency comparison device of this embodiment, and will not be repeated here.
[0083] In this embodiment, by determining the first operation record information corresponding to the transaction data, wherein the first operation record information is the record information obtained by the first system database from the operation of the transaction data, and determining the first application partition number based on the first operation record information, wherein the first application partition number is used to query the first operation record information in the first system database, determining the second application partition number based on the first application partition number, querying the second operation record information from the second system database based on the second application partition number, and performing a consistency comparison between the first operation record information and the second operation record information to obtain the comparison result, the consistency comparison of data content involved in different business systems can be effectively and accurately performed.
[0084] Figure 7 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 7 The electronic device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0085] like Figure 7As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, memory 28, and bus 18 connecting different system components (including memory 28 and processing unit 16).
[0086] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0087] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0088] Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 7 Not shown; usually referred to as a "hard drive".
[0089] although Figure 7Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.
[0090] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this disclosure.
[0091] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable human interaction with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0092] The processing unit 16 executes various functional applications and data processing by running programs stored in the memory 28, such as implementing the methods mentioned in the foregoing embodiments.
[0093] To implement the above embodiments, this disclosure also proposes a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods proposed in the foregoing embodiments of this disclosure.
[0094] To implement the above embodiments, this disclosure also proposes a computer program product that, when instructions in the computer program product are executed by a processor, performs the method proposed in the foregoing embodiments of this disclosure.
[0095] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in this disclosure all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0096] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.
[0097] This disclosure is intended to provide implementation schemes for users to selectively prevent the use or access to their personal information data. Specifically, this disclosure is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information is de-identified to protect user privacy.
[0098] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0099] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0100] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.
[0101] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0102] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0103] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0104] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this disclosure.
Claims
1. A database consistency comparison method, characterized in that, The method includes: Determine the first operation record information corresponding to the transaction data, wherein the first operation record information is the record information obtained by the first system database from operating the transaction data; Based on the first operation record information, the first application partition number and the table information of the data table to be queried in the second system are determined, wherein the first application partition number is used to query the first operation record information in the first system database. Determine the partition number conversion rules supported by the second system database; The first application partition number is processed according to the partition number conversion rule to obtain the second application partition number. The second application partition number refers to the application partition number used to query and process the second operation record information of the same transaction data in the second system database. Determine the data table to be queried in the second system that corresponds to the table information; Determine the initial query primary key for querying the data table to be queried, wherein the initial query primary key includes: the initial application partition number; Update the initial application partition number in the initial query primary key to the second application partition number to obtain the target query primary key; Based on the target query primary key, query the second operation record information in the data table to be queried; A consistency comparison is performed between the first operation record information and the second operation record information to obtain the comparison result; The partition number conversion rule includes a first conversion rule, wherein the first conversion rule indicates that the first application partition number is processed based on the business fields in the data table of the second system database; the step of processing the first application partition number according to the partition number conversion rule to obtain the second application partition number includes: Determine the dependency mapping relationship corresponding to the table information of the data table, wherein the dependency mapping relationship represents the association relationship between the table information and at least one candidate business field; Use at least one candidate business field in the dependency mapping relationship as at least one of the business fields; Determine the field value corresponding to each of the business fields from the first operation record information; The second application partition number is generated based on at least one of the business fields and the field value corresponding to each of the business fields.
2. A database consistency comparison device, characterized in that, The device includes: The first determining module is used to determine the first operation record information corresponding to the transaction data, wherein the first operation record information is the record information obtained by the first system database from operating the transaction data; The second determining module is used to determine the partition number conversion rules supported by the second system database; process the first application partition number according to the partition number conversion rules to obtain the second application partition number, wherein the first application partition number is used to query the first operation record information in the first system database; The third determining module is used to determine the second application partition number based on the first application partition number. The second application partition number refers to the application partition number used to query the second operation record information of the same transaction data in the second system database. The query module is used to determine the data table to be queried in the second system corresponding to the table information; determine the initial query primary key for querying the data table to be queried, wherein the initial query primary key includes: initial application partition number; update the initial application partition number in the initial query primary key to the second application partition number to obtain the target query primary key; and query the second operation record information in the data table to be queried based on the target query primary key. The comparison module is used to perform a consistency comparison between the first operation record information and the second operation record information to obtain a comparison result; The partition number conversion rule includes a first conversion rule, wherein the first conversion rule indicates that the first application partition number is processed based on the business fields in the data table of the second system database. The second determining module is specifically used for: Determine the dependency mapping relationship corresponding to the table information of the data table, wherein the dependency mapping relationship represents the association relationship between the table information and at least one candidate business field; Use at least one candidate business field in the dependency mapping relationship as at least one of the business fields; Determine the field value corresponding to each of the business fields from the first operation record information; The second application partition number is generated based on at least one of the business fields and the field value corresponding to each of the business fields.
3. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in claim 1.
4. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in claim 1.
5. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of claim 1.
Citation Information
Patent Citations
Data synchronization method and device and storage medium
CN111061740A
Parallel dual-system heterogeneous database comparison method and device, equipment and storage medium
CN116340280A
