Data reconciliation method and device, computer equipment and storage medium

By configuring and adding reconciliation rules in the target database, data reconciliation is realized based on different rules in the same database, solving the problem of complicated reconciliation rules modification and adjustment in the existing technology, and improving the flexibility of data reconciliation and efficiency.

CN119166672APending Publication Date: 2024-12-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310731376.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-19
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the data reconciliation business, if the reconciliation rules or reconciliation data need to be modified and adjusted, multiple steps are usually required to verify and debug, resulting in reduced flexibility in data reconciliation.

Method used

Determine the source data and target data in the target database, and configure matching reconciliation rules in the reconciliation rule table, support the addition of new data and rules, and process it through different reconciliation rules to avoid modifying system configuration and multi-step process.

Benefits of technology

Improves the flexibility of data reconciliation, reduces the steps of reconciliation rules or data modification and adjustment, and improves processing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166672A_ABST
    Figure CN119166672A_ABST
Patent Text Reader

Abstract

The invention relates to a data reconciliation method and device, computer equipment, a storage medium and a computer program product. The method comprises the steps of determining first source data and first target data in a target database, and configuring a first reconciliation rule matched with the first source data and the first target data in a reconciliation rule table; second source data and second target data of newly added data reconciliation are determined in the target database, a second reconciliation rule matched with the second source data and the second target data is added in the reconciliation rule table, and the second reconciliation rule is different from the first reconciliation rule; and performing account checking processing on the first source data and the first target data through the first account checking rule, and performing account checking processing on the second source data and the second target data through the second account checking rule. By adopting the method, the flexibility of data reconciliation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to information processing technology, and in particular to a method, apparatus, computer equipment and storage medium for data reconciliation. Background Art

[0002] With the advancement of technology and the development of big data, more and more data need to be analyzed and processed. Data from different systems can be stored in databases. Considering that there are shared and interdependent data from different systems, it is very important to synchronize the data in the database to ensure consistency between the data.

[0003] At present, corresponding reconciliation systems can be developed for different data reconciliation needs, that is, reconciliation data and reconciliation rules are configured in the reconciliation system, so that data reconciliation processing can be performed through the reconciliation system. However, in the same data reconciliation business, the reconciliation rules are pre-configured. If the reconciliation rules or reconciliation data need to be modified and adjusted, it is usually necessary to perform multi-step verification and adjustment in the existing reconciliation system so that the reconciliation system can reconcile data based on the new reconciliation rules or based on the new reconciliation data, which will reduce the flexibility of data reconciliation. Therefore, how to improve the flexibility of data reconciliation is an urgent problem to be solved. Summary of the invention

[0004] Based on this, it is necessary to provide a data reconciliation method, apparatus, computer equipment and storage medium that can improve the flexibility of data reconciliation in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for data reconciliation. The method comprises:

[0006] Determine first source data and first target data in the target database, and configure a first reconciliation rule matching the first source data and the first target data in the reconciliation rule table;

[0007] Determine the second source data and the second target data for the newly added data reconciliation in the target database, and add a second reconciliation rule that matches the second source data and the second target data in the reconciliation rule table, where the second reconciliation rule is different from the first reconciliation rule;

[0008] The first source data and the first target data are reconciled using the first reconciliation rule, and the second source data and the second target data are reconciled using the second reconciliation rule.

[0009] In a second aspect, the present application also provides a data reconciliation device. The device comprises:

[0010] A reconciliation rule configuration module, used to determine the first source data and the first target data in the target database, and configure a first reconciliation rule matching the first source data and the first target data in the reconciliation rule table;

[0011] A reconciliation rule adding module is used to determine the second source data and the second target data for the reconciliation of the newly added data in the target database, and to add a second reconciliation rule matching the second source data and the second target data in the reconciliation rule table, where the second reconciliation rule is different from the first reconciliation rule;

[0012] The data reconciliation module is used to perform reconciliation processing on the first source data and the first target data according to the first reconciliation rule, and to perform reconciliation processing on the second source data and the second target data according to the second reconciliation rule.

[0013] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0014] Determine first source data and first target data in the target database, and configure a first reconciliation rule matching the first source data and the first target data in the reconciliation rule table;

[0015] Determine the second source data and the second target data for the newly added data reconciliation in the target database, and add a second reconciliation rule that matches the second source data and the second target data in the reconciliation rule table, where the second reconciliation rule is different from the first reconciliation rule;

[0016] The first source data and the first target data are reconciled using the first reconciliation rule, and the second source data and the second target data are reconciled using the second reconciliation rule.

[0017] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0018] Determine first source data and first target data in the target database, and configure a first reconciliation rule matching the first source data and the first target data in the reconciliation rule table;

[0019] Determine the second source data and the second target data for the newly added data reconciliation in the target database, and add a second reconciliation rule that matches the second source data and the second target data in the reconciliation rule table, where the second reconciliation rule is different from the first reconciliation rule;

[0020] The first source data and the first target data are reconciled using the first reconciliation rule, and the second source data and the second target data are reconciled using the second reconciliation rule.

[0021] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0022] Determine first source data and first target data in the target database, and configure a first reconciliation rule matching the first source data and the first target data in the reconciliation rule table;

[0023] Determine the second source data and the second target data for the newly added data reconciliation in the target database, and add a second reconciliation rule that matches the second source data and the second target data in the reconciliation rule table, where the second reconciliation rule is different from the first reconciliation rule;

[0024] The first source data and the first target data are reconciled using the first reconciliation rule, and the second source data and the second target data are reconciled using the second reconciliation rule.

[0025] The above-mentioned data reconciliation method, apparatus, computer equipment, storage medium and computer program product determine the first source data and the first target data in the target database, and configure the first reconciliation rule matching the first source data and the first target data in the reconciliation rule table, determine the second source data and the second target data for the newly added data reconciliation in the target database, and add the second reconciliation rule matching the second source data and the second target data in the reconciliation rule table, and the second reconciliation rule is different from the first reconciliation rule; thereby, the first source data and the first target data are reconciled by the first reconciliation rule, and the second source data and the second target data are reconciled by the second reconciliation rule. The above method can be used to determine the source data and target data that need to be reconciled in the database, and configure the corresponding rules in the reconciliation rule table to provide specific rules for the data reconciliation rules. When new data reconciliation rules need to be added, the new source data and target data are determined and different reconciliation rules are added accordingly, so that the reconciliation rule table can include at least two different reconciliation rules, so that data reconciliation can be performed based on two different reconciliation rules in the same database, avoiding the need to complete the reconciliation by modifying the system configuration and going through multiple processes when the reconciliation rules or reconciliation data need to be modified and adjusted, thereby improving the flexibility of data reconciliation. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 An application environment diagram of a data reconciliation method in an embodiment;

[0027] Figure 2 A schematic diagram of the overall architecture of a data reconciliation system in one embodiment;

[0028] Figure 3 A schematic diagram of an application scenario of a method for data reconciliation in an embodiment;

[0029] Figure 4 A schematic diagram of an application scenario of a virtual data transfer scenario in an embodiment;

[0030] Figure 5 A schematic diagram of a flow chart of a method for data reconciliation in one embodiment;

[0031] Figure 6 A partial flow chart of a method for data reconciliation in one embodiment;

[0032] Figure 7 A schematic diagram of a portion of a flow chart of performing reconciliation processing on first source data and first target data by using a first reconciliation rule in one embodiment;

[0033] Figure 8 A schematic diagram of a portion of the flow chart of reconciliation processing through a program instance in one embodiment;

[0034] Fig. 9 A schematic diagram of a code of a database statement in an embodiment;

[0035] Fig.10 It is a partial flow chart of performing reconciliation processing on first source data and first target data by using a first reconciliation rule in another embodiment;

[0036] Fig.11 A schematic diagram of a partial flow chart of a data partial reconciliation process in one embodiment;

[0037] Fig.12 A schematic diagram of part of the process of performing netting and reconciliation processing in an embodiment;

[0038] Fig.13 A detailed flow chart of netting and reconciliation processing in one embodiment;

[0039] Fig.14 A flowchart comparing a non-netting reconciliation process and a netting reconciliation process in one embodiment;

[0040] Fig.15 A partial flow chart of netting and reconciliation processing in another embodiment;

[0041] Fig.16 A complete flowchart of a method for data reconciliation in one embodiment;

[0042] Fig.17This is a schematic diagram showing a first reconciliation result in an embodiment;

[0043] Fig.18 A structural block diagram of a data reconciliation device in an embodiment;

[0044] Fig.19 It is a structural block diagram of a data reconciliation device in another embodiment;

[0045] Fig. 20 It is a structural block diagram of a data reconciliation device in yet another embodiment;

[0046] Fig.21 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] With the advancement of science and technology and the development of big data, more and more data need to be analyzed and processed, and data from different systems can be stored in a database. Considering that there are data that are shared and interdependent but come from different systems, it is very important to synchronize the data in the database to ensure the consistency between the data. At present, corresponding reconciliation systems can be developed for different data reconciliation needs, that is, reconciliation data and reconciliation rules are configured in the reconciliation system, so as to perform data reconciliation processing through the reconciliation system. However, in the same data reconciliation business, the reconciliation rules are pre-configured. If the reconciliation rules or reconciliation data need to be modified and adjusted, it is usually necessary to perform modification, debugging and verification steps in the existing reconciliation system before data reconciliation can be performed based on the new reconciliation rules or the new reconciliation data, which will reduce the flexibility of data reconciliation. Therefore, in view of the above-mentioned problems, the embodiment of the present application provides a method for data reconciliation that can improve the flexibility of data reconciliation.

[0049] Based on this, the data reconciliation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other servers.

[0050] Specifically, the data reconciliation method provided in the embodiment of the present application is applied to the server 104 as an example for explanation. The server 104 first determines the first source data and the first target data in the target database, and configures the first reconciliation rule matching the first source data and the first target data in the reconciliation rule table. The aforementioned target database can be a built-in database of the server 104, or a database in a data storage system that is in communication connection with the server 104, which is not limited here. Based on this, when it is necessary to configure new reconciliation data and new reconciliation rules, the server 104 determines the second source data and the second target data for the newly added data reconciliation in the target database, and adds a second reconciliation rule matching the second source data and the second target data in the reconciliation rule table, and the second reconciliation rule is different from the first reconciliation rule. As a result, the server 104 can reconcile the first source data and the first target data through the first reconciliation rule, and reconcile the second source data and the second target data through the second reconciliation rule. Therefore, the server can reconcile data based on two different reconciliation rules in the same database, avoiding the need to modify the system configuration and go through multiple processes to complete the reconciliation when the reconciliation rules or reconciliation data need to be modified or adjusted, thereby improving the flexibility of data reconciliation.

[0051] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0052] Furthermore, the overall architecture of the data reconciliation system in the embodiment of the present application is described in detail below. Figure 2As shown, the data reconciliation system is constructed based on the big data platform 201 and the relational database 202. When data reconciliation is required, the data table 203 and the data table 204 participating in the data reconciliation are first determined from the relational database 202, and then the data table 203 and the data table 204 are respectively sent out to the message queue 205 through the relational database 203. The message queue 205 then performs storage processing on the data table 203 and the data table 204, that is, the data table 203 and the data table 204 are transmitted to the big data platform 201. Platform 201 enables the big data platform 201 to perform data reconciliation processing on data table 203 and data table 204 based on the reconciliation rule table, and when the data reconciliation is completed, the big data platform 201 can output the reconciliation result table, and in the event of reconciliation inconsistency, such as: data that exists in data table 203 but does not exist in data table 204, or data that does not exist in data table 203 but exists in data table 204, the big data platform 201 can determine the aforementioned difference data to output the reconciliation imbalance data table.

[0053] Secondly, the embodiments of the present application can be specifically applied to application scenarios such as virtual data transfer, order synchronization, business verification, etc., which require synchronization of data of business participants with data of business suppliers. Figure 3 As shown, data reconciliation is performed between the business provider's data 302 and the business participant's data 304. Taking the scenario of virtual data transfer as an example, Figure 4 As shown, in the displayed virtual data mall page 402, if it is necessary to consume virtual data from the business supplier 404, that is, it is necessary to transfer the virtual data of the business participant to the business supplier 404, then it is necessary to perform data reconciliation processing on the consumed virtual data, that is, to perform data reconciliation processing on the virtual data transferred from the business participant to the business supplier 404 and the virtual data received by the business supplier 404. It can be understood that the above examples are only used to understand the specific application scenarios of the present solution, and should not be understood as specific limitations on the application scenarios.

[0054] Based on the above introduction, the following is an introduction to a specific embodiment of how to reconcile data: In one embodiment, if Figure 5 As shown, a data reconciliation method is provided, which is applied to Figure 1 The server 104 in the example is used for explanation. It is understandable that the method can also be applied to the terminal 102, and can also be applied to a system including the terminal 102 and the server 104, and is implemented through the interaction between the terminal 102 and the server 104. In this embodiment, the method includes the following steps:

[0055] Step 502: determine first source data and first target data in the target database, and configure a first reconciliation rule matching the first source data and the first target data in a reconciliation rule table.

[0056] Wherein, the first source data and the first target data are both data for data reconciliation, then the first source data and the first target data correspond to the data of the same business, and the first source data and the first target data can be data from different sources under the same business. Taking the application scenario of data synchronization between a business participant and a business supplier as an example, for example: the first source data can be the data of a business participant, then the first target data is the data of the business supplier, or the first source data is the data of the business supplier, then the first target data is the data of the business participant.

[0057] Secondly, the reconciliation rule table is a table set in the server, and the reconciliation rule table is used to store the reconciliation rules, that is, the reconciliation rule table in the embodiment of the present application includes at least one reconciliation rule, and the reconciliation rule has corresponding reconciliation data information, and the reconciliation data information is used to describe the data required for data reconciliation. For example, the reconciliation rule A1 has corresponding reconciliation data information B1, and the reconciliation data information B1 specifically includes the order number, then the data reconciliation is performed under the reconciliation rule A1, that is, the data reconciliation is performed specifically for the order number in the data. Secondly, if the reconciliation rule A2 has corresponding reconciliation data information B2, and the reconciliation data information B2 specifically includes the order number and the value, then the data reconciliation is performed under the reconciliation rule A2, that is, the data reconciliation is performed specifically for the order number and the value in the data. It should be understood that the above examples are only used to understand this solution, and should not be understood as a specific limitation of this solution. Based on this, the first reconciliation rule is specifically: a rule for data reconciliation of the first source data and the first target data.

[0058] Specifically, when it is necessary to reconcile the first source data with the first target data, the server first determines the first source data and the first target data in the target database, that is, the source data and the target data are specifically the data of the target database. The target database can be a built-in database of the server, or a database in a data storage system that is in communication connection with the server, and the data in the target database can come from different systems, that is, the source data and the target data can come from source files, or copy data obtained by copying the data in the source files. The aforementioned source files can include but are not limited to: big data platforms, business system databases, offline files, and the Internet of Things (IoT), etc., which are not limited here.

[0059] Furthermore, the server configures a first reconciliation rule that matches the first source data and the first target data in the reconciliation rule table. The server configuration specifically reconciles specific data fields of the first source data and the first target data, that is, the server specifically configures corresponding first reconciliation data information for the first source data and the first target data, and the first reconciliation data information is used to describe: the data required for data reconciliation in the first source data and the first target data, and then constructs a first reconciliation rule that matches the first source data and the first target data based on the first reconciliation data information. For example, the server configures the order number and the value as the first reconciliation data information. At this time, the corresponding first reconciliation rule can be constructed based on the order number and the value, that is, the first reconciliation rule that matches the first source data and the first target data specifically describes: data reconciliation is performed on the order number and the value in the first source data and the order number and the value in the first target data.

[0060] Step 504, determining the second source data and the second target data for the newly added data reconciliation in the target database, and adding a second reconciliation rule matching the second source data and the second target data in the reconciliation rule table, wherein the second reconciliation rule is different from the first reconciliation rule.

[0061] Among them, the second source data and the second target data are also data for data reconciliation. In this case, the second source data and the second target data correspond to data of the same business, and the second source data and the second target data can be data with different data sources under the same business. The second source data and the second target data can be: data under the same business as the first source data and the first target data, or data under a different business from the first source data and the first target data. For example, if the first source data and the first target data are data under business C1, then the second source data and the second target data can also be data under business C1, or the second source data and the second target data can be data under business C2.

[0062] Secondly, in practical applications, the second source data may also be the first source data, and the second target data may be the first target data. For example, if the first source data is data D1, and the first target data is data D2, then the second source data may be data D3 and the second target data may be data D4, or the second source data may be data D1 and the second target data may be data D4, or the second source data may be data D3 and the second target data may be data D2. Alternatively, in a scenario where data reconciliation under different reconciliation rules is required for the same data, the second source data may be data D1 and the second target data may be data D2.

[0063] Secondly, similar to the above introduction, the reconciliation rule table is a table set in the server, and the reconciliation rule table is used to store the reconciliation rules, that is, the reconciliation rule table in the embodiment of the present application includes at least one reconciliation rule, and the reconciliation rule has corresponding reconciliation data information, and the reconciliation data information is used to describe the data required for data reconciliation. Based on this, the second reconciliation rule is specifically: a rule for data reconciliation of the second source data and the second target data. And the second reconciliation rule is different from the first reconciliation rule, and the above difference is that the second reconciliation data information corresponding to the second reconciliation rule is different from the first reconciliation data information corresponding to the first reconciliation rule.

[0064] Specifically, in the case where a new reconciliation rule is required, the server will not modify, adjust or calibrate the first reconciliation rule, and since the source data and the target data are specifically the data of the target database, the server will first determine the second source data and the second target data for the newly added data reconciliation in the target database. Further, the server adds a second reconciliation rule that matches the second source data and the second target data in the reconciliation rule table. That is, the server configuration specifically reconciles the specific data fields of the second source data and the second target data, that is, the server specifically configures the corresponding second reconciliation data information for the second source data and the second target data, and the second reconciliation data information is used to describe: the data required for data reconciliation in the second source data and the second target data, and then constructs a second reconciliation rule that matches the second source data and the second target data based on the second reconciliation data information. For example, the server configures the order number as the second reconciliation data information, and at this time, the corresponding second reconciliation rule can be constructed based on the order number, that is, the second reconciliation rule that matches the second source data and the second target data specifically describes: data reconciliation is performed on the order number in the second source data and the order number in the second target data.

[0065] Step 506 , reconcile the first source data and the first target data using the first reconciliation rule, and reconcile the second source data and the second target data using the second reconciliation rule.

[0066] Among them, the reconciliation processing is specifically used to compare the data involved in the data reconciliation between the original data and the target data. Specifically, the server performs reconciliation processing on the first source data and the first target data through the first reconciliation rule, and performs reconciliation processing on the second source data and the second target data through the second reconciliation rule. And through the above example, it can be seen that the first reconciliation rule has a corresponding first reconciliation data information, that is, the server specifically determines the data for data reconciliation from the first source data and the first target data based on the first reconciliation data information corresponding to the first reconciliation rule, and then compares the data for data reconciliation determined in the first source data and the first target data to complete the reconciliation processing. Similarly, the second reconciliation rule has a corresponding second reconciliation data information, that is, the server specifically determines the data for data reconciliation from the second source data and the second target data based on the second reconciliation data information corresponding to the second reconciliation rule, and then compares the data for data reconciliation determined in the second source data and the second target data to complete the reconciliation processing.

[0067] It can be understood that all the examples in this embodiment are only used to understand the present solution, but should not be understood as specific limitations of the present solution.

[0068] In the above-mentioned data reconciliation method, the source data and target data that need to be reconciled can be determined in the database, and the corresponding rules can be configured in the reconciliation rule table to provide specific rules for the data reconciliation rules. When it is necessary to add new data reconciliation rules, by determining new source data and target data and adding different reconciliation rules accordingly, the reconciliation rule table can include at least two different reconciliation rules, so that data reconciliation can be performed based on two different reconciliation rules in the same database, avoiding the situation where the reconciliation rules or reconciliation data need to be modified and adjusted, and the reconciliation can be completed by modifying the system configuration and going through multiple processes, thereby improving the flexibility of data reconciliation.

[0069] In one embodiment, Figure 6 As shown, the first reconciliation rule has corresponding first reconciliation data information, which is used to describe the data required for data reconciliation; and the second reconciliation rule has corresponding second reconciliation data information, which is different from the first reconciliation data information.

[0070] Among them, the reconciliation data information is used to describe the data required for data reconciliation. For example, in the above example, if reconciliation rule A1 has corresponding reconciliation data information B1, and reconciliation data information B1 specifically includes the order number, then data reconciliation is performed under reconciliation rule A1, that is, data reconciliation is performed specifically on the order number in the data. Secondly, if reconciliation rule A2 has corresponding reconciliation data information B2, and reconciliation data information B2 specifically includes the order number and the value, then data reconciliation is performed under reconciliation rule A2, that is, data reconciliation is performed specifically on the order number and the value in the data.

[0071] Based on this, if the first reconciliation rule is reconciliation rule A1, the first reconciliation data information is the reconciliation data information B1 corresponding to reconciliation rule A1, that is, the first reconciliation data information is the order number. If the second reconciliation rule is reconciliation rule A2, then the second reconciliation data information is the reconciliation data information B2 corresponding to reconciliation rule A2, that is, the second reconciliation data information is the order number and the value. It can be understood that the above examples are only used to understand the reconciliation data information in this solution, but should not be understood as a specific limitation of the reconciliation data information.

[0072] Based on this, reconciliation processing is performed on the first source data and the first target data using the first reconciliation rule, and reconciliation processing is performed on the second source data and the second target data using the second reconciliation rule, including:

[0073] Step 602: Based on the first reconciliation data information, determine a first source reconciliation field from the first source data, and determine a first target reconciliation field from the first target data.

[0074] Since data is usually stored in the form of fields, the data must have corresponding fields. Therefore, the first source reconciliation field is specifically: the field corresponding to the data required for data reconciliation in the first source data, and the first target reconciliation field is specifically: the field corresponding to the data required for data reconciliation in the first target data.

[0075] Specifically, based on the first reconciliation data information, the server determines the first source reconciliation field from the first source data, and determines the first target reconciliation field from the first target data. Since the reconciliation data information is used to describe the data required for data reconciliation, and the first reconciliation data information corresponds to the first reconciliation rule, the first reconciliation data information is specifically used to describe the data required for data reconciliation in the first source data, and the data required for data reconciliation in the first target data. As a result, the server determines the field corresponding to the data required for data reconciliation in the first source data as the first source reconciliation field, and determines the field corresponding to the data required for data reconciliation in the first target data as the first target reconciliation field.

[0076] It is understandable that the data required for data reconciliation may be data of multiple types, or multiple data of one type. Taking the first reconciliation data information as the order number as an example, the first source reconciliation field is: the field corresponding to the order number in the first source data, and the first source reconciliation field may specifically include: the fields corresponding to order number 1, order number 2, and order number 3. The first target reconciliation field is similar to the above example and will not be repeated here.

[0077] Step 604: Based on the second reconciliation data information, determine a second source reconciliation field from the second source data, and determine a second target reconciliation field from the second target data.

[0078] Among them, the second source reconciliation field is specifically: the field corresponding to the data required for data reconciliation in the second source data, and the second target reconciliation field is specifically: the field corresponding to the data required for data reconciliation in the second target data.

[0079] Specifically, based on the second reconciliation data information, the server determines the second source reconciliation field from the second source data, and determines the second target reconciliation field from the second target data. Similar to the above-mentioned embodiment, since the reconciliation data information is used to describe the data required for data reconciliation, and the second reconciliation data information corresponds to the second reconciliation rule, the second reconciliation data information is specifically used to describe the data required for data reconciliation in the second source data, and the data required for data reconciliation in the second target data. As a result, the server determines the field corresponding to the data required for data reconciliation in the second source data as the second source reconciliation field, and determines the field corresponding to the data required for data reconciliation in the second target data as the second target reconciliation field.

[0080] It is understandable that the data required for data reconciliation may be data of multiple types, or multiple data of one type. Taking the second reconciliation data information as the order number and the value as an example, the second source reconciliation field is: the fields corresponding to the order number and the value in the second source data, respectively. The second source reconciliation field may specifically include: the fields corresponding to the order number 1 and the value 1 in the second source data, respectively. The second target reconciliation field is similar to the above example and will not be described in detail here.

[0081] Step 606: reconcile the first source reconciliation field and the first target reconciliation field using the first reconciliation rule, and reconcile the second source reconciliation field and the second target reconciliation field using the second reconciliation rule.

[0082] Specifically, the server performs reconciliation processing on the first source reconciliation field and the first target reconciliation field through the first reconciliation rule, and performs reconciliation processing on the second source reconciliation field and the second target reconciliation field through the second reconciliation rule. That is, the server compares the first source reconciliation field in the first source data with the first target reconciliation field in the first target data through the first reconciliation rule, so that the server can obtain the reconciliation result for the first source data and the first target data based on the above reconciliation processing. Similarly, the server compares the second source reconciliation field in the second source data with the second target reconciliation field in the second target data through the second reconciliation rule, so that the server can obtain the reconciliation result for the second source data and the second target data based on the above reconciliation processing.

[0083] Furthermore, the server specifically performs a Cartesian product operation on each reconciliation field to perform reconciliation processing. Based on this, the first source reconciliation field and the first target reconciliation field are reconciled through the first reconciliation rule, and the second source reconciliation field and the second target reconciliation field are reconciled through the second reconciliation rule, specifically including: performing a Cartesian product operation on the first source reconciliation field and the first target reconciliation field. Then, the second source reconciliation field and the second target reconciliation field are reconciled through the Cartesian product operation.

[0084] That is, the server specifically performs a Cartesian product operation on the first source reconciliation field in the first source data and the first target reconciliation field in the first target data, and performs a Cartesian product operation on the second source reconciliation field in the second source data and the second target reconciliation field in the second target data. Exemplarily, taking the first reconciliation data information as the order number as an example, the first source reconciliation field is: the field corresponding to the order number in the first source data, and the first target reconciliation field is: the field corresponding to the order number in the first target data, if the first source reconciliation field specifically includes: fsrc_order_field1, fsrc_order_field2, still fdst_order_field3, and the first target reconciliation field specifically includes: fdst_order_field1, fdst_order_field2, fsrc_order_field3, then at this time, the order number field included in the aforementioned first source reconciliation field and the order number field included in the aforementioned first target reconciliation field can be Cartesian product operation to complete the reconciliation processing. The processing methods of the second source reconciliation field and the second target reconciliation field are similar and will not be described here. In the above example, the specific example is to perform a Cartesian product operation on three order numbers belonging to two data. In actual applications, the Cartesian product operation of the reconciliation field composed of multiple fields can be supported. Therefore, the example in this embodiment should not be understood as a specific limitation of this solution.

[0085] In this embodiment, the data involved in the data reconciliation is determined from the source data and the target data through the reconciliation data information, and the reconciliation fields of the data involved in the data reconciliation are further determined, so that in the actual reconciliation process, only the reconciliation fields need to be reconciled, thereby improving the efficiency and accuracy of the data reconciliation. Secondly, the source reconciliation field and the target reconciliation field are processed specifically through the Cartesian product operation, so that the data reconciliation can be completed more comprehensively and accurately, thereby improving the reliability and feasibility of the data reconciliation.

[0086] In actual applications, both the source data and the target data are data determined from the target database, which may include some data that is not used for reconciliation or may affect the data reconciliation. Therefore, screening the data during the data reconciliation process can more effectively ensure the efficiency of the data reconciliation. The specific embodiments are as follows: In one embodiment, if Figure 7 As shown, reconciliation processing is performed on the first source data and the first target data using the first reconciliation rule, including:

[0087] Step 702: Filter the first source data using the first source filtering condition in the first reconciliation rule to obtain filtered first source data.

[0088] Among them, each reconciliation rule is configured to include an active screening condition, which is used to screen the source data, and the source screening condition includes at least one of the following: data integrity screening, reconciliation data related screening, data integrity screening is used to determine whether each data in the source data is complete and without missing, and reconciliation data related screening is used to determine whether each data in the source data is related to the reconciliation data. It can be understood that in actual applications, the source data condition is specifically determined based on actual application requirements and is not limited here. Based on this, there is a corresponding first source screening condition in the first reconciliation rule, and the first source screening condition is used to screen the first source data.

[0089] Specifically, the server first searches for the first reconciliation rule in the reconciliation rule table, and then determines the configured first source screening condition included in the first reconciliation rule, so that the server can filter the first source data according to the first source screening condition to obtain the filtered first source data. For example, the first source data includes data E1, data E2, data E3, data E4, and data E5. If the first source screening condition includes data complete screening and reconciliation data related screening, and it is determined that data E1 is incomplete data based on data complete screening, and data E1, data E2, data E3, and data E4 are related to reconciliation data based on reconciliation data related screening, then it can be determined that the data that meets the above two screening conditions is data E2, data E3, and data E4, so it can be determined that the filtered first source data includes data E2, data E3, and data E4.

[0090] Step 704 , the first target data is screened using the first target screening condition in the first reconciliation rule to obtain screened first target data.

[0091] Among them, each reconciliation rule is configured to include a target screening condition, which is used to screen the target data, and the target screening condition is similar to the source screening condition introduced in the previous embodiment, and will not be repeated here. Based on this, there is a corresponding first target screening condition in the first reconciliation rule, and the first target screening condition is used to screen the first target data. Specifically, the server first finds the first reconciliation rule in the reconciliation rule table, and then determines the configured first target screening condition included in the first reconciliation rule, so that the server can filter the first target data according to the first target screening condition to obtain the filtered first target data.

[0092] Step 706: reconcile the filtered first source data and the filtered first target data using the first reconciliation rule.

[0093] Specifically, the server uses a similar method as described in the aforementioned embodiment to reconcile the filtered first source data and the filtered first target data. It can be understood that this embodiment only describes in detail how to reconcile the first source data and the first target data through the first reconciliation rule. Similarly, the server can also reconcile the second source data and the second target data through the second reconciliation rule based on a similar method, that is, the server filters the second source data through the second source filtering condition in the second reconciliation rule to obtain the filtered second source data, and filters the second target data through the second target filtering condition in the second reconciliation rule to obtain the filtered second target data, thereby reconciling the filtered second source data and the filtered second target data through the second reconciliation rule. Since the screening and processing methods are similar, they will not be repeated here.

[0094] In this embodiment, by filtering the source data and the target data separately, it can be ensured that the filtered source data and target data avoid the influence of redundant data such as data affecting data reconciliation on the data reconciliation result, thereby ensuring the accuracy and reliability of the data reconciliation, and the filtered source data and target data can accurately include data related to the reconciliation data, that is, there is no need to process redundant data, so the efficiency of data reconciliation can also be improved.

[0095] Based on the above embodiments, it can be known that in the reconciliation rule table, each reconciliation rule can have corresponding reconciliation data information, and can also have corresponding source filtering conditions and target filtering conditions. Then in actual applications, the reconciliation rule can also have a corresponding reconciliation rule identifier and reconciliation name, and the matched source data and target data will also be described in the reconciliation rule, and in the reconciliation process, the data specifically involved in the reconciliation also needs to be matched, for example, reconciliation between the source reconciliation field F1 and the target reconciliation field G1, reconciliation between the source reconciliation field F2 and the target reconciliation field G2, and reconciliation between the source reconciliation field F3 and the target reconciliation field G3, that is, the reconciliation rule should also include the mapping relationship between the source data and the target data. The configuration of a reconciliation rule in the specific reconciliation rule table is as follows:

[0096] CREATE TABLE t_yy_checkaccount_rule(

[0097] fruleid INT COMMENT 'rule identifier',

[0098] frulename STRING COMMENT 'Account name',

[0099] fsrc_table STRING COMMENT'source table',

[0100] fdst_table STRING COMMENT 'target table',

[0101] fsrc_value_field STRING COMMENT'Source table reconciliation value field',

[0102] fdst_value_field STRING COMMENT 'Target reconciliation value field',

[0103] fsrc_order_field1 STRING COMMENT'Source statement number field 1',

[0104] fsrc_order_field2 STRING COMMENT'Source statement number field 2',

[0105] fsrc_order_field3 STRING COMMENT'Source statement number field 3',

[0106] fdst_order_field1 STRING COMMENT 'Destination statement number field 1',

[0107] fdst_order_field2 STRING COMMENT'Target statement number field 2',

[0108] fdst_order_field3 STRING COMMENT 'Destination statement number field 3',

[0109] fsrc_filter STRING COMMENT 'Source filter conditions',

[0110] fdst_filter STRING COMMENT'target filter condition',

[0111] fmapping_type STRING COMMENT 'The mapping relationship between the source and target tables: 1:1 / 1:n / m:n', ....)

[0113] COMMENT'

Operation

[0114] It is understandable that in actual applications, when configuring a reconciliation rule in the reconciliation rule table, it can also include descriptive information on whether incremental reconciliation or full reconciliation is specifically performed, or a description of the source data import type and the target data import type, and the aforementioned import types include at least: daily storage of incremental data and daily storage of full data. Furthermore, considering that some businesses need to pay attention to time, the reconciliation rules can also include reconciliation date fields for describing the source data and target data, respectively, as well as descriptive information on the data source types for the source data and target data, and each reconciliation rule can also include configuration time information of the reconciliation rules, etc. All information carried in the reconciliation rules is not described here, and specific configuration needs to be flexibly based on actual conditions. And the aforementioned code examples are only used to understand this solution, and should not be understood as specific limitations on this solution.

[0115] Based on this, the following will describe in detail how to perform reconciliation processing based on the underlying program instance in actual application: In one embodiment, Figure 8 As shown, the data reconciliation method also includes:

[0116] Step 802: Use a preset reflection mechanism to reflect the reconciliation rule table into a corresponding program instance.

[0117] Among them, the preset reflection mechanism can be a Java reflection mechanism or a reflection mechanism in Python, and the setting of the reflection mechanism needs to be determined based on the program running environment and business requirements. Secondly, considering that the preset reflection mechanism is the reflection mechanism in Python, the source data and the target data in this embodiment are both relational data tables, and the relational data table is specifically a data table of a relational model, that is, the relational data table is specifically a two-dimensional table.

[0118] Specifically, the server uses a preset reflection mechanism to reflect the reconciliation rule table as a corresponding program instance. In this embodiment, the preset reflection mechanism is introduced as a reflection mechanism in Python as an example. At this time, the source data and the target data in this embodiment are both relational data tables. Since the relational data table can be compared using a general structured query language (SQL), the server specifically uses the reflection mechanism in Python to reflect the reconciliation rule table as a corresponding Python program class instance, so that the server can compare the relational data table one by one through the Python program class instance (program instance).

[0119] Based on this, reconciliation processing is performed on the first source data and the first target data using the first reconciliation rule, including:

[0120] Step 804, through the program instance, the first source data and the first target data are respectively processed for total amount statistics, and a first database statement corresponding to the first source data and a second database statement corresponding to the first target data are respectively generated. The first database statement is used to describe the first data volume information and the first time information in the first source data, and the second database statement is used to describe the second data volume information and the second time information in the first target data.

[0121] Among them, the first database statement is used to describe the first data volume information and the first time information in the first source data, and the second database statement is used to describe the second data volume information and the second time information in the first target data. The aforementioned data volume information specifically includes: the total number of data items, and the total amount of data information, and the aforementioned time information includes at least one of the following: creation time, modification time and data date. Based on this, the first data volume information specifically includes the total number of first source data items, and the total amount of the first source data information, and the first time information includes at least one of the following: creation time of the first source data, modification time of the first source data and data date of the first source data. Similarly, the second data volume information specifically includes the total number of first target data items, and the total amount of the first target data information, and the second time information includes at least one of the following: creation time of the first target data, modification time of the first target data and data date of the first target data.

[0122] Specifically, the server performs total amount statistical processing on the first source data and the first target data through the program instance, and generates a first database statement corresponding to the first source data and a second database statement corresponding to the first target data. It can be seen from the above embodiments that the server uses a preset reflection mechanism to reflect the reconciliation rule table into a corresponding program instance, so the server specifically performs total amount statistical processing on the first source data and the first target data through the programming language in the program instance to generate a first database statement and a second database statement.

[0123] For example, the reflection mechanism in Python is used as an example again. Then, the server obtains a Python program class instance (program instance) through the Python reflection mechanism. The first database statement and the second database statement are automatically generated for the first source data and the first target data through the Python program class instance. The first database statement and the second database statement are both SQL. For ease of understanding, the source data and the target data are both relational data tables as an example. Fig. 9 As shown, the source data table 901 and the target data table 902 both include corresponding data information, and the reconciliation rule table includes the first reconciliation rule 903 of the source data table 901 and the target data table 902, thereby obtaining the database statement 904 through the Python program class instance, and the database statement 904 specifically includes the first database statement and the second database statement.

[0124] Step 806, through the program instance, the first database statement is compared with the second database statement to perform a data total reconciliation process.

[0125] Specifically, the server specifically compares the first database statement with the second database statement through the program instance to perform data total reconciliation processing. Exemplarily, the preset reflection mechanism is the reflection mechanism in Python as an example for introduction, and the source data and the target data in this embodiment are both relational data tables, and the relational data tables have JOIN characteristics. Therefore, the server specifically uses the JOIN characteristics of the relational data table through the Python program class instance (program instance) to perform the reconciliation operation of the first database statement and the second database statement.

[0126] For example, for the first source data, the server specifically needs to calculate the total amount of the source table, that is, the server automatically generates an SQL statement (first database statement) through a Python program class instance as follows:

[0127] SELECT count(1)cnt,

[0128] sum(cast(fsrc_amt as bigint))

[0129] FROM t_src_demo

[0130] WHERE fimport_date = 20230327

[0131] AND fcreate_time>20230101AND fupdate_time>20230101

[0132] Secondly, for the first target data, the server specifically needs to count the total amount of the target table, that is, the server automatically generates an SQL statement (the second database statement) through the Python program class instance as follows:

[0133] SELECT count(1)cnt,

[0134] sum(cast(fdst_amt as bigint))

[0135] FROM t_dst_demo

[0136] WHERE fimport_date = 20230327

[0137] AND fcreate_time>20230101AND fupdate_time>20230101

[0138] Based on this, the server compares the aforementioned first database statement with the second database statement, that is, the server specifically matches the first time information described in the first database statement with the second time information described in the second database statement, and specifically compares the data volume information described in the first database statement with the second data volume information described in the second database statement to complete the data total reconciliation processing. It can be understood that the aforementioned code examples and related examples are only used to understand this solution, and should not be understood as specific limitations of this solution.

[0139] In this embodiment, by creating a program instance, normal and reliable operation in actual applications can be guaranteed, and by comparing the data volume information and time information in the database statement, accurate matching and comparison of the data in the total data reconciliation processing can be guaranteed, further improving the reliability and feasibility of the data reconciliation processing.

[0140] In one embodiment, Fig.10As shown, reconciliation processing is performed on the first source data and the first target data by using the first reconciliation rule, and further includes:

[0141] Step 1002, through the program instance, according to the first reconciliation data information corresponding to the first reconciliation rule, generate a third database statement corresponding to the first source data and a fourth database statement corresponding to the first target data, the third database statement is used to describe the first reconciliation field related to the first reconciliation data information in the first source data, and the fourth database statement is used to describe the second reconciliation field related to the first reconciliation data information in the first target data.

[0142] Among them, the third database statement is used to describe the first reconciliation field related to the first reconciliation data information in the first source data, and the fourth database statement is used to describe the second reconciliation field related to the first reconciliation data information in the first target data. It can be seen from the above embodiments that the field corresponding to the data required for data reconciliation in the first source data is the first source reconciliation field, and the field corresponding to the data required for data reconciliation in the first target data is the first target reconciliation field. Based on this, the data related to the reconciliation data information at least includes: the data required for data reconciliation, and the data related to the data required for data reconciliation. For example, if the data related to the reconciliation data information is the order number data, then the data related to the data required for data reconciliation may include the order number entry time, or the business corresponding to the order number, etc.

[0143] It can be seen that the data related to the first reconciliation data information in the first source data at least includes: the data required for data reconciliation in the first source data, and the data related to the data required for data reconciliation in the first source data. Similarly, the data related to the first reconciliation data information in the first target data at least includes: the data required for data reconciliation in the first target data, and the data related to the data required for data reconciliation in the first target data.

[0144] Based on this, the aforementioned data corresponds to the reconciliation field, that is, the field corresponding to the data related to the first reconciliation data information in the first source data is the first reconciliation field, and the field of the data related to the first reconciliation data information in the first target data is the second reconciliation field. It can be understood that, in the case where the data related to the data required for data reconciliation includes multiple sub-data, the reconciliation field can specifically be a reconciliation sub-field corresponding to the multiple sub-data, that is, the first reconciliation field can be composed of multiple first reconciliation sub-fields, and the second reconciliation field can be composed of multiple second reconciliation sub-fields. For example, the data related to the first reconciliation data information in the first source data includes data E1, data E2, and data E3, then data E1 can correspond to the first reconciliation sub-field H1, data E2 can correspond to the first reconciliation sub-field H2, and data E3 can correspond to the first reconciliation sub-field H3, that is, the first reconciliation field corresponding to the data related to the first reconciliation data information in the first source data is specifically composed of the first reconciliation sub-field H1, the first reconciliation sub-field H2, and the first reconciliation sub-field H3. The second reconciliation field is similar and is not limited here.

[0145] Specifically, the server generates a third database statement corresponding to the first source data and a fourth database statement corresponding to the first target data through a program instance according to the first reconciliation data information corresponding to the first reconciliation rule. It can be seen from the above embodiments that the server uses a preset reflection mechanism to reflect the reconciliation rule table into a corresponding program instance, and the first reconciliation data information is specifically used to describe the data required for data reconciliation in the first source data and the data required for data reconciliation in the first target data. Therefore, the server automatically generates a third database statement corresponding to the first source data and a fourth database statement corresponding to the first target data according to the first reconciliation data information corresponding to the first reconciliation rule through the programming language in the program instance.

[0146] Exemplarily, the preset reflection mechanism is taken as the reflection mechanism in Python as an example for introduction again. Then, the server obtains a Python program class instance (program instance) through the Python reflection mechanism. The Python program class instance is used to locate the data required for data reconciliation in the first source data and the data required for data reconciliation in the first target data based on the first reconciliation data information, thereby realizing automatic generation of the third database statement and the fourth database statement based on the first reconciliation data information, and the third database statement and the fourth database statement are both SQL.

[0147] Step 1004, through the program instance, the third database statement is compared with the fourth database statement to perform partial data reconciliation processing.

[0148] Specifically, the server specifically compares the third database statement with the fourth database statement through the program instance to perform partial data reconciliation processing. Exemplarily, the preset reflection mechanism is the reflection mechanism in Python as an example for introduction again, and the source data and the target data in this embodiment are both relational data tables, and the relational data tables have JOIN characteristics. Therefore, the server specifically uses the JOIN characteristics of the relational data table through the Python program class instance (program instance) to perform the reconciliation operation of the third database statement and the fourth database statement.

[0149] For example, taking the first reconciliation data information as the order number as an example, the server performs one-to-one matching and reconciliation according to the order number (i.e., the first reconciliation data information) through the Python program class instance as follows:

[0150]

[0151]

[0152] Based on this, the server compares the aforementioned third database statement with the fourth database statement, that is, the server specifically compares the first reconciliation field in the third database statement with the second reconciliation field in the fourth database statement to complete the partial data reconciliation processing.

[0153] It is understandable that the aforementioned code examples and related examples are only used to understand the present solution, and should not be understood as specific limitations of the present solution.

[0154] In this embodiment, on the basis of creating a program instance, it can ensure normal and reliable operation in actual applications, and then by comparing the reconciliation fields related to the reconciliation data information in the database statement, it can ensure that the data of the partial reconciliation processing is accurately matched and compared, thereby further improving the reliability and feasibility of the data reconciliation processing.

[0155] In one embodiment, Fig.11 As shown, the first reconciliation field has a corresponding first combined index, and the first combined index includes: first field indexes corresponding to multiple first reconciliation sub-fields constituting the first reconciliation field; the second reconciliation field has a corresponding second combined index, and the second combined index includes: second field indexes corresponding to multiple second reconciliation sub-fields constituting the second reconciliation field.

[0156] Among them, the combined index is composed of at least one field index, and the field index is used to describe the index relationship between the corresponding data field and other data fields, and the fields with the index relationship perform corresponding reconciliation processing in this embodiment. In this embodiment, the data field is specifically a field corresponding to the data related to the data required for data reconciliation, so the combined index includes the field index corresponding to each subfield in the corresponding reconciliation field, and the field index specifically indexes the data field in the source data and the data field in the target data.

[0157] Based on this, the first combined index includes: first field indexes corresponding to the multiple first reconciliation subfields constituting the first reconciliation field, and the first field index specifically describes: the index relationship between the corresponding first reconciliation subfield and the second reconciliation subfield. And the second combined index includes: second field indexes corresponding to the multiple second reconciliation subfields constituting the second reconciliation field, and the second field index specifically describes: the index relationship between the corresponding second reconciliation subfield and the first reconciliation subfield.

[0158] Exemplarily, further introduced with the example of the aforementioned embodiment, the first reconciliation field corresponding to the data related to the first reconciliation data information in the first source data is specifically composed of the first reconciliation subfield H1, the first reconciliation subfield H2 and the first reconciliation subfield H3, if the second reconciliation field corresponding to the data related to the first reconciliation data information in the first target data is specifically composed of the second reconciliation subfield I1, the second reconciliation subfield I2 and the second reconciliation subfield I3, then the first combined index may include: the first field index J1 corresponding to the first reconciliation subfield H1, the first field index J2 corresponding to the first reconciliation subfield H2, and the first field index J3 corresponding to the first reconciliation subfield H3, and the first field index J1 is used to describe: the index relationship between the first reconciliation subfield H1 and the second reconciliation subfield I1, the first field index J2 is used to describe: the index relationship between the first reconciliation subfield H2 and the second reconciliation subfield I2, and the first field index J3 is used to describe: the index relationship between the first reconciliation subfield H3 and the second reconciliation subfield I3. The second field index is similar and will not be described here.

[0159] Based on this, the third database statement is compared with the fourth database statement through a program example to perform partial data reconciliation processing, including:

[0160] Step 1102: Through the program instance, field index matching is performed between each first field index in the first combined index and each second field index in the second combined index.

[0161] Among them, field index matching is used to describe: matching the index relationship between fields described by different field indexes. Specifically, the server matches the first field indexes in the first combined index with the second field indexes in the second combined index through the program instance. That is, the server automatically matches the index relationship described by each first field index with the index relationship of each second field index through the Python program class instance.

[0162] Exemplarily, the above example is used for introduction, such as the first field index J1 is used to describe: the index relationship between the first reconciliation subfield H1 and the second reconciliation subfield I1, the first field index J2 is used to describe: the index relationship between the first reconciliation subfield H2 and the second reconciliation subfield I2, and the first field index J3 is used to describe: the index relationship between the first reconciliation subfield H3 and the second reconciliation subfield I3. If the second combined index corresponding to the second reconciliation field may include: the second field index K1 corresponding to the second reconciliation subfield I1, the second field index K2 corresponding to the second reconciliation subfield I2, and the second field index K3 corresponding to the second reconciliation subfield I3, then the second field index K1 is used to describe: the index relationship between the second reconciliation subfield I1 and the first reconciliation subfield H1, the second field index K2 is used to describe: the index relationship between the second reconciliation subfield I2 and the first reconciliation subfield H2, and the second field index K3 is used to describe: the index relationship between the second reconciliation subfield I3 and the first reconciliation subfield H3. At this time, the first field index J1 to the first field index J3 are matched with the second field index K1 to the second field index K3 respectively.

[0163] Step 1104 , compare the first reconciliation subfield corresponding to the successfully matched first field index with the second reconciliation subfield corresponding to the second field index to perform partial data reconciliation processing.

[0164] The first field index and the second field index that are successfully matched are specifically: the first field index and the second field index that describe the same index relationship.

[0165] Specifically, after performing the aforementioned field index matching, the server is able to determine the first field index and the second field index that have been successfully matched. The server will then further compare the first reconciliation subfield corresponding to the first field index with the second reconciliation subfield corresponding to the second field index to perform partial data reconciliation processing.

[0166] Exemplarily, the server matches the first field index J1 to the first field index J3 with the second field index K1 to the second field index K3, that is, the server matches the index relationship described by the first field index J1 with the index relationship described by the second field index K1, and it can be determined that the first field index J1 and the second field index K1 both describe the index relationship between the second reconciliation subfield I1 and the first reconciliation subfield H1. At this time, it can be determined that the first field index J1 and the second field index K1 are matched successfully, so the second reconciliation subfield I1 will be specifically compared with the first reconciliation subfield H1. If the server matches the index relationship described by the first field index J1 with the index relationship described by the second field index K2, it can be determined that they do not describe the same index relationship, that is, the first field index J1 and the second field index K2 fail to match.

[0167] By analogy, the server matches the index relationship described by the first field index J2 with the index relationship described by the second field index K2, and can determine that the first field index J2 and the second field index K2 both describe the index relationship between the second reconciliation subfield I2 and the first reconciliation subfield H2. At this time, it can be determined that the first field index J2 and the second field index K2 are successfully matched, so the second reconciliation subfield I2 will be specifically compared with the first reconciliation subfield H2. And the server matches the index relationship described by the first field index J3 with the index relationship described by the second field index K3, and can determine that the first field index J3 and the second field index K3 both describe the index relationship between the second reconciliation subfield I3 and the first reconciliation subfield H3. At this time, it can be determined that the first field index J3 and the second field index K3 are successfully matched, so the second reconciliation subfield I3 will be specifically compared with the first reconciliation subfield H3.

[0168] In this embodiment, by matching field indexes with field indexes, the specific fields to be compared can be determined more quickly through index matching, thereby ensuring correct comparison between multiple fields. On the basis of improving the accuracy of data reconciliation processing, the efficiency of data reconciliation processing can also be improved.

[0169] In one embodiment, Fig.12 As shown, the data reconciliation method also includes:

[0170] Step 1202, obtaining a first reconciliation result obtained by performing partial data reconciliation processing, the first reconciliation result at least including: first difference data in the first source data, and second difference data in the first target data.

[0171] Among them, the first difference data is used to describe: data that exists in the reconciliation field related to the first reconciliation data information in the first source data, but does not exist in the reconciliation field related to the first reconciliation data information in the first target data; the second difference data is used to describe: data that exists in the reconciliation field related to the first reconciliation data information in the first target data, but does not exist in the reconciliation field related to the first reconciliation data information in the first source data.

[0172] Specifically, the server performs partial data reconciliation processing, and can determine data that exists in the reconciliation field related to the first reconciliation data information in the first source data, but does not exist in the reconciliation field related to the first reconciliation data information in the first target data, and determine data that exists in the reconciliation field related to the first reconciliation data information in the first target data, but does not exist in the reconciliation field related to the first reconciliation data information in the first source data. Thus, a first reconciliation result is obtained, and the first reconciliation result includes the first difference data in the first source data and the second difference data of the first target data.

[0173] For example, the data related to the first reconciliation data information in the first source data include data E1, data E2, and data E3, and the data related to the first reconciliation data information in the first target data include data E1, data E3, and data E4. Then, through the data partial reconciliation processing, it can be determined that: data E2 exists in the data related to the first reconciliation data information in the first source data, but does not exist in the data related to the first reconciliation data information in the first target data, and data E4 exists in the data related to the first reconciliation data information in the first target data, but does not exist in the data related to the first reconciliation data information in the first source data. That is, data E2 is determined to be the first difference data in the first source data, and data E4 is determined to be the second difference data in the first target data.

[0174] Further, taking the first reconciliation data information as a single number as an example, for the first source data, the server can automatically generate a reconciliation statement through a Python program class instance to determine the data that exists in the reconciliation field related to the first reconciliation data information in the first source data, but does not exist in the reconciliation field related to the first reconciliation data information in the first target data. The specific code example is as follows:

[0175]

[0176]

[0177] Similarly, for the first target data, the server can also automatically generate reconciliation statements through Python program class instances to determine whether the reconciliation field related to the first reconciliation data information in the first target data exists, but the reconciliation field related to the first reconciliation data information in the first source data does not exist. The specific code is similar to the previous example and will not be repeated here.

[0178] Based on this, by executing the above code through the Python program class instance, the first difference data in the first source data and the second difference data in the first target data can be recorded and determined, thereby generating a first reconciliation result including the first difference data and the second difference data. It can be understood that the above code example is only used to understand this solution, and should not be understood as a specific limitation of this solution.

[0179] Step 1204, performing netting and reconciliation processing based on the first difference data and the second difference data.

[0180] Specifically, the server performs a netting and reconciliation process based on the first difference data and the second difference data. The netting and reconciliation process is a method of adding difference data to the initial data for reconciliation. In this embodiment, by recording and determining the first difference data and the second difference data, the data with differences can be further considered in the process of the netting and reconciliation process, and the data can be supplemented through the difference data to ensure the reliability and accuracy of the data reconciliation.

[0181] In one embodiment, Fig.13 As shown, the first source data is data generated by the first data source in the first time period, and the first target data is data generated by the second data source in the first time period.

[0182] The first source data and the first target data are essentially data generated by different data sources for the same business in the same time period. The first time period can be a time period with a time interval of 1 day, or a time period with a time interval of 3 days. For example, the first time period is from 0:00 on May 30 to 0:00 on May 31, or the first time period is from 0:00 on May 27 to 0:00 on May 31. The length of the time period and the specific time period are not limited here.

[0183] Based on this, netting and reconciliation processing is performed based on the first difference data and the second difference data, including:

[0184] Step 1302: update the third source data in a second time period adjacent to the first time period based on the first difference data to obtain updated third source data, wherein the second time period is later than the first time period.

[0185] The third source data is data generated in a different time period for the same business as the first source data. The second time period is later than the first time period and is adjacent to the first time period. The time interval of the second time period can be the same as or different from the time interval of the first time period. For example, if the first time period is from 0:00 on May 30 to 0:00 on May 31, the second time period can be from 0:00 on May 31 to 0:00 on June 1.

[0186] Specifically, the server updates the third source data in the second time period adjacent to the first time period based on the first difference data to obtain the updated third source data. The server specifically merges the first difference data into the third source data to obtain the updated third source data. For example, based on the above example, data E2 is the first difference data in the first source data. If the third source data in the second time period includes data E6, data E7, data E8, data E9 and data E10, then the first difference data (i.e., data E2) is merged into the third source data to obtain the updated third source data, and the updated third source data specifically includes: data E2, data E6, data E7, data E8, data E9 and data E10.

[0187] Step 1304: Update the third target data within the second time period based on the second difference data to obtain updated third target data.

[0188] The third target data is data generated in a different time period for the same business as the first target data. Specifically, the server updates the third target data in the second time period based on the first difference data to obtain updated third target data. The server specifically merges the first difference data into the third target data to obtain updated third target data.

[0189] Exemplarily, based on the above example, data E4 is the second difference data of the first target data. If the third target data within the second time period includes data E6, data E7, data E8, data E9 and data E11, then the second difference data (i.e., data E4) is merged into the third target data to obtain the updated third target data, and the updated third target data specifically includes: data E4, data E6, data E7, data E8, data E9 and data E11.

[0190] Step 1306: During the second time period, reconcile the updated third source data and the updated third target data using the first reconciliation rule.

[0191] Specifically, the server performs reconciliation processing on the updated third source data and the updated third target data through the first reconciliation rule within the second time period. The specific manner of performing the reconciliation processing is similar to that of the aforementioned embodiment and will not be repeated here.

[0192] For ease of understanding, Fig.14 As shown, Fig.14 Figure (A) shows the process of non-netting reconciliation. Fig.14 The diagram (B) shows the process of non-netting reconciliation, that is, in the process of netting reconciliation, when reconciliation is performed in the next time period, the first source data and the first target data are updated based on the first difference data and the second difference data in the reconciliation result, so as to perform reconciliation on the updated third source data and the updated third target data. And in essence, the reconciliation of the first source data and the first target data is also compared with the reconciliation of the first source data and the first target data of the difference data in the previous time period.

[0193] It can be understood that all the examples in this embodiment are only used to understand the present solution, and should not be understood as specific limitations of the present solution.

[0194] In this embodiment, the data of the next time period is updated by the difference data determined in the previous time period, so as to avoid the problem of incomplete data caused by data omissions during data collection, thereby ensuring the integrity of the reconciliation data, and the difference data is specifically the difference data in the data to be reconciled, so the introduction of redundant data can be avoided, thereby further improving the reliability and efficiency of data reconciliation processing.

[0195] In one embodiment, Fig.15 As shown, the data reconciliation method also includes:

[0196] Step 1502, obtaining a second reconciliation result corresponding to the reconciliation processing of the first source data and the first target data according to the first reconciliation rule, the second reconciliation result at least including: third difference data in the first source data, and fourth difference data in the first target data.

[0197] The third difference data is used to describe: data that exists in the first source data but does not exist in the first target data, and the fourth difference data is used to describe: data that exists in the first target data but does not exist in the first source data.

[0198] Specifically, the server performs reconciliation processing on the first source data and the first target data according to the first reconciliation rule, and can determine the data that exists in the first source data but does not exist in the first target data, and the data that exists in the first target data but does not exist in the first source data. Thus, a second reconciliation result is obtained, and the second reconciliation result includes the data that exists in the first source data but does not exist in the first target data (i.e., the third difference data), and the data that exists in the first target data but does not exist in the first source data (i.e., the fourth difference data).

[0199] Step 1504, performing netting and reconciliation processing based on the third difference data and the fourth difference data.

[0200] Specifically, the server performs netting and reconciliation processing based on the third difference data and the fourth difference data. The method of netting and reconciliation processing is similar to that of the aforementioned embodiment and will not be described again here.

[0201] In this embodiment, by performing a reconciliation process on the difference data in the full amount of data, the integrity of the reconciliation data can also be ensured, thereby further improving the reliability of the data reconciliation process.

[0202] In the previous embodiments, various implementation methods of reconciling the first source data and the first target data by using the first reconciliation rule are specifically described, and the method of reconciling the second source data and the second target data by using the second reconciliation rule is similar to the previous embodiments, so it will not be repeated here.

[0203] Based on the detailed description of the above embodiments, the complete process of the method for data reconciliation in the embodiments of the present application will be described below. In one embodiment, Fig.16 As shown, a data reconciliation method is provided, which is applied to Figure 1 The server 104 in the example is used for explanation. It is understandable that the method can also be applied to the terminal 102, and can also be applied to a system including the terminal 102 and the server 104, and is implemented through the interaction between the terminal 102 and the server 104. In this embodiment, the method includes the following steps:

[0204] Step 1601: determine first source data and first target data in a target database, and configure a first reconciliation rule matching the first source data and the first target data in a reconciliation rule table.

[0205] Among them, the first source data and the first target data are both data for data reconciliation, so the first source data and the first target data correspond to the data of the same business, and the first source data and the first target data can be data with different data sources under the same business. Secondly, the reconciliation rule table is a table set in the server, and the reconciliation rule table is used to store reconciliation rules, that is, the reconciliation rule table in the embodiment of the present application includes at least one reconciliation rule, and the reconciliation rule has corresponding reconciliation data information, and the reconciliation data information is used to describe the data required for data reconciliation. Based on this, the first reconciliation rule is specifically: a rule for data reconciliation of the first source data and the first target data.

[0206] Specifically, when data reconciliation between the first source data and the first target data is required, the server first determines the first source data and the first target data in the target database, that is, the source data and the target data are specifically data of the target database.

[0207] Furthermore, the server configures a first reconciliation rule matching the first source data and the first target data in the reconciliation rule table. The server configuration specifically reconciles specific data fields of the first source data and the first target data, that is, the server specifically configures corresponding first reconciliation data information for the first source data and the first target data, and the first reconciliation data information is used to describe: data required for data reconciliation in the first source data and the first target data, and then constructs a first reconciliation rule matching the first source data and the first target data based on the first reconciliation data information.

[0208] Step 1602: determine the second source data and the second target data for the newly added data reconciliation in the target database, and add a second reconciliation rule that matches the second source data and the second target data in the reconciliation rule table.

[0209] Among them, the second source data and the second target data are also data for data reconciliation. At this time, the second source data and the second target data correspond to the data of the same business, and the second source data and the second target data can be data with different data sources under the same business. The second source data and the second target data can be: data in the same business as the first source data and the first target data, or data in a different business from the first source data and the first target data. Secondly, in actual applications, the second source data can also be the first source data, and the second target data can be the first target data.

[0210] Secondly, similar to the above introduction, the reconciliation rule table is a table set in the server, and the reconciliation rule table is used to store the reconciliation rules, that is, the reconciliation rule table in the embodiment of the present application includes at least one reconciliation rule, and the reconciliation rule has corresponding reconciliation data information, and the reconciliation data information is used to describe the data required for data reconciliation. Based on this, the second reconciliation rule is specifically: a rule for data reconciliation of the second source data and the second target data. And the second reconciliation rule is different from the first reconciliation rule, and the above difference is that the second reconciliation data information corresponding to the second reconciliation rule is different from the first reconciliation data information corresponding to the first reconciliation rule.

[0211] Specifically, in the case where a new reconciliation rule needs to be added, the server will not modify, adjust or calibrate the first reconciliation rule, and since the source data and the target data are specifically the data of the target database, the server will first determine the second source data and the second target data for the newly added data reconciliation in the target database. Furthermore, the server adds a second reconciliation rule that matches the second source data and the second target data in the reconciliation rule table. That is, the server configuration specifically reconciles the specific data fields of the second source data and the second target data, that is, the server specifically configures the corresponding second reconciliation data information for the second source data and the second target data, and the second reconciliation data information is used to describe: the data required for data reconciliation in the second source data and the second target data, and then constructs a second reconciliation rule that matches the second source data and the second target data based on the second reconciliation data information.

[0212] Step 1603: Use a preset reflection mechanism to reflect the reconciliation rule table into a corresponding program instance.

[0213] Among them, the preset reflection mechanism can be a Java reflection mechanism or a reflection mechanism in Python, and the setting of the reflection mechanism needs to be determined based on the program running environment and business requirements. Secondly, considering that the preset reflection mechanism is the reflection mechanism in Python, the source data and the target data in this embodiment are both relational data tables, and the relational data table is specifically a data table of a relational model, that is, the relational data table is specifically a two-dimensional table.

[0214] Specifically, the server uses a preset reflection mechanism to reflect the reconciliation rule table as a corresponding program instance. In this embodiment, the preset reflection mechanism is introduced as a reflection mechanism in Python as an example. At this time, the source data and the target data in this embodiment are both relational data tables. Since the relational data table can be compared using general SQL, the server specifically uses the reflection mechanism in Python to reflect the reconciliation rule table as the corresponding Python program class instance, so that the server can compare the relational data table one by one through the Python program class instance (program instance).

[0215] Step 1604, through the program instance, the first source data and the first target data are respectively processed for total amount statistics, and a first database statement corresponding to the first source data and a second database statement corresponding to the first target data are respectively generated, and the first database statement is compared with the second database statement to perform data total amount reconciliation processing.

[0216] Among them, the first database statement is used to describe the first data volume information and the first time information in the first source data, and the second database statement is used to describe the second data volume information and the second time information in the first target data. The aforementioned data volume information specifically includes: the total number of data items, and the total amount of data information, and the aforementioned time information includes at least one of the following: creation time, modification time and data date. Based on this, the first data volume information specifically includes the total number of first source data items, and the total amount of the first source data information, and the first time information includes at least one of the following: creation time of the first source data, modification time of the first source data and data date of the first source data. Similarly, the second data volume information specifically includes the total number of first target data items, and the total amount of the first target data information, and the second time information includes at least one of the following: creation time of the first target data, modification time of the first target data and data date of the first target data.

[0217] Specifically, the server performs total amount statistical processing on the first source data and the first target data through the program instance, and generates a first database statement corresponding to the first source data and a second database statement corresponding to the first target data. It can be seen from the above embodiments that the server uses a preset reflection mechanism to reflect the reconciliation rule table into a corresponding program instance, so the server specifically automates the total amount statistical processing on the first source data and the first target data through the programming language in the program instance to generate a first database statement and a second database statement respectively. Furthermore, the server specifically compares the first database statement with the second database statement through the program instance to perform data total amount reconciliation processing.

[0218] Exemplarily, the reflection mechanism in Python is used as an example for introduction. Then, the server obtains a Python program class instance (program instance) through the Python reflection mechanism, and the first source data and the first target data are automatically generated by the Python program class instance, and the first database statement and the second database statement are both SQL. Then, the server specifically uses the JOIN feature of the relational data table through the Python program class instance (program instance) to perform the reconciliation operation of the first database statement and the second database statement.

[0219] Step 1605, through the program instance, the second source data and the second target data are respectively processed for total amount statistics, and a fifth database statement corresponding to the second source data and a sixth database statement corresponding to the second target data are respectively generated, and the fifth database statement is compared with the sixth database statement to perform data total amount reconciliation processing.

[0220] Among them, the fifth database statement is used to describe the third data volume information and the third time information in the second source data, and the sixth database statement is used to describe the fourth data volume information and the fourth time information in the second target data. The aforementioned data volume information specifically includes: the total number of data items, and the total amount of data information, and the aforementioned time information includes at least one of the following: creation time, modification time, and data date. Based on this, the third data volume information specifically includes the total number of data items, and the total amount of data information of the second source data, and the third time information includes at least one of the following: creation time of the second source data, modification time of the second source data, and data date of the second source data. Similarly, the fourth data volume information specifically includes the total number of data items, and the total amount of data of the second target data, and the fourth time information includes at least one of the following: creation time of the second target data, modification time of the second target data, and data date of the second target data.

[0221] Specifically, similar to the aforementioned step 1604, the server specifically performs total amount statistical processing on the second source data and the second target data through the program instance, and generates a fifth database statement corresponding to the second source data and a sixth database statement corresponding to the second target data. It can be seen from the aforementioned embodiment that the server uses a preset reflection mechanism to reflect the reconciliation rule table as a corresponding program instance, so the server specifically performs total amount statistical processing on the second source data and the second target data through the programming language in the program instance to generate a fifth database statement and a sixth database statement respectively. Further, the server specifically compares the fifth database statement with the sixth database statement through the program instance to perform data total amount reconciliation processing.

[0222] Step 1606, through the program instance, according to the first reconciliation data information corresponding to the first reconciliation rule, generate a third database statement corresponding to the first source data and a fourth database statement corresponding to the first target data, and compare the third database statement with the fourth database statement to perform partial data reconciliation processing.

[0223] Among them, the third database statement is used to describe the first reconciliation field related to the first reconciliation data information in the first source data, and the fourth database statement is used to describe the second reconciliation field related to the first reconciliation data information in the first target data. It can be seen from the above embodiments that the field corresponding to the data required for data reconciliation in the first source data is the first source reconciliation field, and the field corresponding to the data required for data reconciliation in the first target data is the first target reconciliation field. Based on this, the data related to the reconciliation data information at least includes: the data required for data reconciliation, and the data related to the data required for data reconciliation. For example, if the data related to the reconciliation data information is the order number data, then the data related to the data required for data reconciliation may include the order number entry time, or the business corresponding to the order number, etc.

[0224] Therefore, it can be seen that the data related to the first reconciliation data information in the first source data at least includes: the data required for data reconciliation in the first source data, and the data related to the data required for data reconciliation in the first source data. Similarly, the data related to the first reconciliation data information in the first target data at least includes: the data required for data reconciliation in the first target data, and the data related to the data required for data reconciliation in the first target data. Based on this, the aforementioned data corresponds to the reconciliation field, that is, the field corresponding to the data related to the first reconciliation data information in the first source data is the first reconciliation field, and the field of the data related to the first reconciliation data information in the first target data is the second reconciliation field.

[0225] Specifically, the server generates a third database statement corresponding to the first source data and a fourth database statement corresponding to the first target data through a program instance in accordance with the first reconciliation data information corresponding to the first reconciliation rule. It can be seen from the aforementioned embodiments that the server uses a preset reflection mechanism to reflect the reconciliation rule table into a corresponding program instance, and the first reconciliation data information is specifically used to describe the data required for data reconciliation in the first source data and the data required for data reconciliation in the first target data. Therefore, the server automatically generates a third database statement corresponding to the first source data and a fourth database statement corresponding to the first target data in accordance with the first reconciliation data information corresponding to the first reconciliation rule through the programming language in the program instance. Based on this, the server then compares the third database statement with the fourth database statement through the program instance to perform partial data reconciliation processing.

[0226] Exemplarily, the preset reflection mechanism is again introduced as the reflection mechanism in Python as an example. The server obtains a Python program class instance (program instance) through the Python reflection mechanism. The Python program class instance locates the data required for data reconciliation in the first source data and the data required for data reconciliation in the first target data based on the first reconciliation data information, thereby realizing the automatic generation of the third database statement and the fourth database statement based on the first reconciliation data information, and the third database statement and the fourth database statement are both SQL. Based on this, the server further uses the JOIN feature of the relational data table through the Python program class instance (program instance) to perform the reconciliation operation on the third database statement and the fourth database statement.

[0227] Step 1607, through the program instance, according to the second reconciliation data information corresponding to the second reconciliation rule, generate a seventh database statement corresponding to the second source data and an eighth database statement corresponding to the second target data, and compare the seventh database statement with the eighth database statement to perform partial data reconciliation processing.

[0228] The seventh database statement is used to describe the third reconciliation field related to the second reconciliation data information in the second source data, and the eighth database statement is used to describe the fourth reconciliation field related to the second reconciliation data information in the second target data. The details are similar to the first database statement and the second database statement, and will not be repeated here.

[0229] Specifically, the server generates the seventh database statement corresponding to the second source data and the eighth database statement corresponding to the second target data through the program instance in accordance with the second reconciliation data information corresponding to the second reconciliation rule. It can be seen from the above embodiments that the server uses a preset reflection mechanism to reflect the reconciliation rule table into the corresponding program instance, and the second reconciliation data information is specifically used to describe the data required for data reconciliation in the second source data and the data required for data reconciliation in the second target data. Therefore, the server automatically generates the seventh database statement corresponding to the second source data and the eighth database statement corresponding to the second target data in accordance with the second reconciliation data information corresponding to the second reconciliation rule through the programming language in the program instance. Based on this, the server compares the seventh database statement with the eighth database statement through the program instance to perform partial data reconciliation processing.

[0230] Step 1608, obtaining a first reconciliation result and a third reconciliation result obtained by performing partial data reconciliation processing.

[0231] The reconciliation results can be presented in a data table for easy understanding, such as Fig.17The first reconciliation result shown. Based on this, the first reconciliation result at least includes: the first difference data in the first source data, and the second difference data of the first target data. The first difference data is used to describe: the data that exists in the reconciliation field related to the first reconciliation data information in the first source data, but does not exist in the reconciliation field related to the first reconciliation data information in the first target data, and the second difference data is used to describe: the data that exists in the reconciliation field related to the first reconciliation data information in the first target data, but does not exist in the reconciliation field related to the first reconciliation data information in the first source data.

[0232] Similarly, it can be known that the third reconciliation result at least includes: the fifth difference data in the second source data, and the sixth difference data in the second target data. The fifth difference data is used to describe: data that exists in the reconciliation field related to the second reconciliation data information in the second source data, but does not exist in the reconciliation field related to the second reconciliation data information in the second target data, and the sixth difference data is used to describe: data that exists in the reconciliation field related to the second reconciliation data information in the second target data, but does not exist in the reconciliation field related to the second reconciliation data information in the second source data.

[0233] Specifically, the server performs partial data reconciliation processing, and can determine data that exists in the reconciliation field related to the first reconciliation data information in the first source data, but does not exist in the reconciliation field related to the first reconciliation data information in the first target data, and determine data that exists in the reconciliation field related to the first reconciliation data information in the first target data, but does not exist in the reconciliation field related to the first reconciliation data information in the first source data. Thus, a first reconciliation result is obtained, and the first reconciliation result includes the first difference data in the first source data and the second difference data of the first target data.

[0234] Similarly, the server performs partial reconciliation processing on the data to determine the data that exists in the reconciliation field related to the second reconciliation data information in the second source data but does not exist in the reconciliation field related to the second reconciliation data information in the second target data, and the data that exists in the reconciliation field related to the second reconciliation data information in the second target data but does not exist in the reconciliation field related to the second reconciliation data information in the second source data. Thus, a third reconciliation result is obtained, and the third reconciliation result includes the fifth difference data and the sixth difference data.

[0235] Step 1609: Perform netting and reconciliation processing based on the first difference data and the second difference data in the first reconciliation result, and perform netting and reconciliation processing based on the fifth difference data and the sixth difference data in the third reconciliation result.

[0236] Specifically, the server performs netting and reconciliation processing based on the first difference data and the second difference data in the first reconciliation result, and performs netting and reconciliation processing based on the fifth difference data and the sixth difference data in the third reconciliation result in a similar manner to the above-mentioned embodiment.

[0237] It should be understood that the specific implementations of step 1601 to step 1609 are similar to those in the previous embodiment and will not be repeated here.

[0238] It should be understood that, although the steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0239] Based on the same inventive concept, the embodiment of the present application also provides a data reconciliation device for implementing the data reconciliation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data reconciliation device embodiments provided below can refer to the limitations of the data reconciliation method above, and will not be repeated here.

[0240] In one embodiment, Fig.18 As shown, a data reconciliation device is provided, including: a reconciliation rule configuration module 1802, a reconciliation rule addition module 1804 and a data reconciliation module 1806, wherein:

[0241] A reconciliation rule configuration module 1802 is used to determine first source data and first target data in a target database, and configure a first reconciliation rule matching the first source data and the first target data in a reconciliation rule table;

[0242] A reconciliation rule adding module 1804 is used to determine second source data and second target data for reconciliation of newly added data in the target database, and to add a second reconciliation rule matching the second source data and the second target data in the reconciliation rule table, where the second reconciliation rule is different from the first reconciliation rule;

[0243] The data reconciliation module 1806 is used to perform reconciliation processing on the first source data and the first target data according to the first reconciliation rule, and to perform reconciliation processing on the second source data and the second target data according to the second reconciliation rule.

[0244] In one embodiment, the first reconciliation rule has corresponding first reconciliation data information, and the reconciliation data information is used to describe data required for data reconciliation;

[0245] The second reconciliation rule has corresponding second reconciliation data information, and the second reconciliation data information is different from the first reconciliation data information;

[0246] The data reconciliation module 1806 is specifically used to determine the first source reconciliation field from the first source data and the first target reconciliation field from the first target data based on the first reconciliation data information; determine the second source reconciliation field from the second source data and the second target reconciliation field from the second target data based on the second reconciliation data information; reconcile the first source reconciliation field and the first target reconciliation field through the first reconciliation rule, and reconcile the second source reconciliation field and the second target reconciliation field through the second reconciliation rule.

[0247] In one embodiment, the data reconciliation module 1806 is specifically configured to reconcile the first source reconciliation field and the first target reconciliation field through a Cartesian product operation; and to reconcile the second source reconciliation field and the second target reconciliation field through a Cartesian product operation.

[0248] In one embodiment, the data reconciliation module 1806 is specifically used to filter the first source data through the first source filtering condition in the first reconciliation rule to obtain the filtered first source data; filter the first target data through the first target filtering condition in the first reconciliation rule to obtain the filtered first target data; and reconcile the filtered first source data and the filtered first target data through the first reconciliation rule.

[0249] In one embodiment, Fig.19 As shown, the data reconciliation device further includes an instance reflection module 1902;

[0250] An instance reflection module 1902 is used to reflect the reconciliation rule table into a corresponding program instance using a preset reflection mechanism;

[0251] The data reconciliation module 1806 is specifically used to perform total statistical processing on the first source data and the first target data respectively through a program instance, and generate a first database statement corresponding to the first source data and a second database statement corresponding to the first target data respectively. The first database statement is used to describe the first data volume information and the first time information in the first source data, and the second database statement is used to describe the second data volume information and the second time information in the first target data; through the program instance, the first database statement is compared with the second database statement to perform data total reconciliation processing.

[0252] In one embodiment, the data reconciliation module 1806 is also used to generate, through a program instance, a third database statement corresponding to the first source data and a fourth database statement corresponding to the first target data in accordance with the first reconciliation data information corresponding to the first reconciliation rule, wherein the third database statement is used to describe a first reconciliation field related to the first reconciliation data information in the first source data, and the fourth database statement is used to describe a second reconciliation field related to the first reconciliation data information in the first target data; through the program instance, the third database statement is compared with the fourth database statement to perform partial data reconciliation processing.

[0253] In one embodiment, the first reconciliation field has a corresponding first combination index, and the first combination index includes: first field indexes respectively corresponding to a plurality of first reconciliation subfields constituting the first reconciliation field;

[0254] The second reconciliation field has a corresponding second combination index, and the second combination index includes: second field indexes respectively corresponding to a plurality of second reconciliation subfields constituting the second reconciliation field;

[0255] The data reconciliation module 1806 is specifically used to match the first field indexes in the first combination index with the second field indexes in the second combination index through a program instance; compare the first reconciliation sub-field corresponding to the successfully matched first field index with the second reconciliation sub-field corresponding to the second field index to perform partial data reconciliation processing.

[0256] In one embodiment, Fig. 20 As shown, the data reconciliation device further includes a reconciliation result acquisition module 2002;

[0257] The reconciliation result acquisition module 2002 is used to acquire a first reconciliation result obtained by performing partial data reconciliation processing, wherein the first reconciliation result at least includes: first difference data in the first source data, and second difference data in the first target data;

[0258] The data reconciliation module 1806 is further used to perform netting and reconciliation processing based on the first difference data and the second difference data;

[0259] Among them, the first difference data is used to describe: data that exists in the reconciliation field related to the first reconciliation data information in the first source data, but does not exist in the reconciliation field related to the first reconciliation data information in the first target data; the second difference data is used to describe: data that exists in the reconciliation field related to the first reconciliation data information in the first target data, but does not exist in the reconciliation field related to the first reconciliation data information in the first source data.

[0260] In one embodiment, the first source data is data generated by a first data source during a first time period, and the first target data is data generated by a second data source during the first time period;

[0261] The data reconciliation module 1806 is specifically used to update the third source data in a second time period adjacent to the first time period based on the first difference data to obtain updated third source data, the second time period being later than the first time period; update the third target data in the second time period based on the second difference data to obtain updated third target data; and in the second time period, reconcile the updated third source data and the updated third target data using the first reconciliation rule.

[0262] In one embodiment, the reconciliation result acquisition module 2002 is further used to acquire a second reconciliation result corresponding to the reconciliation processing of the first source data and the first target data according to the first reconciliation rule, wherein the second reconciliation result at least includes: third difference data in the first source data, and fourth difference data in the first target data;

[0263] The data reconciliation module 1806 is further used to perform netting and reconciliation processing based on the third difference data and the fourth difference data;

[0264] The third difference data is used to describe: data that exists in the first source data but does not exist in the first target data, and the fourth difference data is used to describe: data that exists in the first target data but does not exist in the first source data.

[0265] Each module in the above-mentioned data reconciliation device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0266] In one embodiment, a computer device is provided. The computer device may be a server or a terminal. In this embodiment, the computer device is a server as an example for explanation. The internal structure diagram thereof may be as follows: Fig.21As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store source data, target data, and reconciliation rule tables and other related data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for data reconciliation is implemented.

[0267] Those skilled in the art will understand that Fig.21 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0268] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0269] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0270] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0271] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0272] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0273] The technical feature information of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical feature information in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical feature information, they should be considered to be within the scope of this specification.

[0274] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for data reconciliation, It is characterized in that include: Determine first source data and first target data in the target database, and configure a first reconciliation rule matching the first source data and the first target data in the reconciliation rule table; Determining, in the target database, second source data and second target data for newly added data reconciliation, and adding, in the reconciliation rule table, a second reconciliation rule that matches the second source data and the second target data, wherein the second reconciliation rule is different from the first reconciliation rule; The first source data and the first target data are reconciled using the first reconciliation rule, and the second source data and the second target data are reconciled using the second reconciliation rule.

2. The method according to claim 1, It is characterized in that The first reconciliation rule has corresponding first reconciliation data information, and the reconciliation data information is used to describe the data required for data reconciliation; The second reconciliation rule has corresponding second reconciliation data information, and the second reconciliation data information is different from the first reconciliation data information; The reconciling the first source data and the first target data by using the first reconciliation rule, and reconciling the second source data and the second target data by using the second reconciliation rule, includes: Based on the first reconciliation data information, determining a first source reconciliation field from the first source data, and determining a first target reconciliation field from the first target data; Based on the second reconciliation data information, determining a second source reconciliation field from the second source data, and determining a second target reconciliation field from the second target data; The first source reconciliation field and the first target reconciliation field are reconciled by the first reconciliation rule, and the second source reconciliation field and the second target reconciliation field are reconciled by the second reconciliation rule.

3. The method according to claim 2, It is characterized in that The reconciliation processing is performed on the first source reconciliation field and the first target reconciliation field according to the first reconciliation rule, and the reconciliation processing is performed on the second source reconciliation field and the second target reconciliation field according to the second reconciliation rule, including: Performing reconciliation processing on the first source reconciliation field and the first target reconciliation field by using a Cartesian product operation; Reconciliation processing is performed on the second source reconciliation field and the second target reconciliation field through a Cartesian product operation.

4. The method according to claim 1, It is characterized in that The reconciling the first source data and the first target data by using the first reconciliation rule includes: The first source data is filtered using the first source filtering condition in the first account reconciliation rule to obtain filtered first source data; The first target data is screened by using the first target screening condition in the first reconciliation rule to obtain screened first target data; The first reconciliation rule is used to reconcile the filtered first source data and the filtered first target data.

5. The method according to claim 1, It is characterized in that The method further comprises: A preset reflection mechanism is used to reflect the reconciliation rule table into a corresponding program instance; The reconciling the first source data and the first target data by using the first reconciliation rule includes: Through the program instance, the first source data and the first target data are respectively processed for total amount statistics, and a first database statement corresponding to the first source data and a second database statement corresponding to the first target data are respectively generated, wherein the first database statement is used to describe first data volume information and first time information in the first source data, and the second database statement is used to describe second data volume information and second time information in the first target data; Through the program instance, the first database statement is compared with the second database statement to perform data total reconciliation processing.

6. The method according to claim 5, It is characterized in that The reconciliation processing of the first source data and the first target data by using the first reconciliation rule further includes: By means of the program instance, according to the first reconciliation data information corresponding to the first reconciliation rule, a third database statement corresponding to the first source data and a fourth database statement corresponding to the first target data are generated, wherein the third database statement is used to describe a first reconciliation field related to the first reconciliation data information in the first source data, and the fourth database statement is used to describe a second reconciliation field related to the first reconciliation data information in the first target data; Through the program example, the third database statement is compared with the fourth database statement to perform partial data reconciliation processing.

7. The method according to claim 6, It is characterized in that The first reconciliation field has a corresponding first combination index, and the first combination index includes: first field indexes respectively corresponding to a plurality of first reconciliation subfields constituting the first reconciliation field; The second reconciliation field has a corresponding second combination index, and the second combination index includes: second field indexes respectively corresponding to a plurality of second reconciliation subfields constituting the second reconciliation field; The third database statement is compared with the fourth database statement through the program instance to perform partial data reconciliation processing, including: Through the program instance, performing field index matching on each of the first field indexes in the first combined index and each of the second field indexes in the second combined index; The first reconciliation subfield corresponding to the successfully matched first field index is compared with the second reconciliation subfield corresponding to the second field index to perform partial data reconciliation processing.

8. The method according to claim 6, It is characterized in that The method further comprises: Acquire a first reconciliation result obtained by performing the partial data reconciliation processing, wherein the first reconciliation result at least includes: first difference data in the first source data, and second difference data in the first target data; Performing netting and reconciliation processing based on the first difference data and the second difference data; Among them, the first difference data is used to describe: data that exists in the reconciliation field related to the first reconciliation data information in the first source data, but does not exist in the reconciliation field related to the first reconciliation data information in the first target data; the second difference data is used to describe: data that exists in the reconciliation field related to the first reconciliation data information in the first target data, but does not exist in the reconciliation field related to the first reconciliation data information in the first source data.

9. The method according to claim 8, It is characterized in that The first source data is data generated by a first data source in a first time period, and the first target data is data generated by a second data source in the first time period; The netting and reconciliation processing based on the first difference data and the second difference data includes: updating third source data in a second time period adjacent to the first time period based on the first difference data to obtain updated third source data, wherein the second time period is later than the first time period; updating the third target data within the second time period based on the second difference data to obtain updated third target data; During the second time period, reconciliation processing is performed on the updated third source data and the updated third target data using the first reconciliation rule.

10. The method according to claim 1, It is characterized in that The method further comprises: Obtaining a second reconciliation result corresponding to reconciliation processing of the first source data and the first target data using the first reconciliation rule, wherein the second reconciliation result at least includes: third difference data in the first source data, and fourth difference data in the first target data; Performing netting and reconciliation processing based on the third difference data and the fourth difference data; The third difference data is used to describe data that exists in the first source data but does not exist in the first target data, and the fourth difference data is used to describe data that exists in the first target data but does not exist in the first source data.

11. A data reconciliation device, It is characterized in that The device comprises: A reconciliation rule configuration module, configured to determine first source data and first target data in a target database, and configure a first reconciliation rule matching the first source data and the first target data in a reconciliation rule table; a reconciliation rule adding module, configured to determine second source data and second target data for reconciliation of newly added data in the target database, and to add a second reconciliation rule matching the second source data and the second target data in the reconciliation rule table, wherein the second reconciliation rule is different from the first reconciliation rule; A data reconciliation module is used to perform reconciliation processing on the first source data and the first target data according to the first reconciliation rule, and to perform reconciliation processing on the second source data and the second target data according to the second reconciliation rule.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

14. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Reconciliation method and system, electronic device and storage medium

    CN114078045A