Automatic reconciliation method, system, medium and device
By defining indicators and preset field indicator mapping tables in the automatic reconciliation system, configurable mapping and parallel collection and comparison of indicators and reconciliation file fields are realized, which solves the problems of low reconciliation automation and poor timeliness in the existing technology. , realizing real-time and dynamic data problem discovery.
Patent Information
- Application Number
- CN202410759652.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-13
AI Technical Summary
In the existing technology, the degree of automation of reconciliation is low, the timeliness of reconciliation is poor, and it is unable to adapt to real-time changes in business data, resulting in untimely discovery of data problems.
By defining indicators and preset field indicator mapping tables in the automatic reconciliation system, configurable mapping between indicators and reconciliation file fields is achieved. Parallel collection and comparison mechanisms are used to dynamically separate in real time and initiate comparisons in real time based on transaction changes. .
It realizes the reusability of indicators and flexible processing of reconciliation file fields, maximizes the reuse of collection and comparison logic, can detect data problems in a timely manner, and improves the timeliness and automation of reconciliation.
Smart Images

Figure CN118333780B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial information processing, and in particular to an automatic reconciliation method, system, medium and equipment. Background Art
[0002] In the prior art, for reconciliation files from different manufacturers, due to differences in the definition of internal field names, it is necessary to write separate code for each manufacturer's reconciliation file and each field in the reconciliation file, which has low reusability. The above processing method is tightly coupled with the manufacturer and the reconciliation file, and cannot provide a unified configuration, and has low configurability. During reconciliation, the collection and processing of the reconciliation file and the collection and processing of the business data need to be triggered and executed sequentially, which has poor timeliness and cannot adapt to real-time changes in business data.
[0003] In the process of realizing the present invention, the applicant discovered that there are at least the following problems in the prior art: low automation level of account reconciliation, poor timeliness of account reconciliation, and delay in discovering data problems. Summary of the invention
[0004] The embodiments of the present invention provide an automatic reconciliation method, system, medium and device, which solve the problems of low automation level of reconciliation, poor timeliness of reconciliation and untimely discovery of data problems.
[0005] To achieve the above-mentioned purpose, in a first aspect, an embodiment of the present invention provides an automatic reconciliation method, which is adopted by an automatic reconciliation system, and the method comprises:
[0006] When a preset timing cycle arrives and / or a change in business data is monitored, an indicator collection record of indicators corresponding to all indicator names in the candidate indicator list is collected from the business data as an indicator collection result corresponding to the candidate indicator list; wherein the candidate indicator list is used to record the indicator names of indicators that meet the preset indicator selection conditions among all indicators of the automatic reconciliation system; each indicator name is globally unique in the automatic reconciliation system; each indicator collection record includes: the business date, indicator name and indicator value corresponding to the indicator collection record;
[0007] Obtaining a reconciliation file of a preset manufacturer, parsing the reconciliation file, and obtaining all reconciliation file line records of the reconciliation file; wherein each reconciliation file line record includes a business date, a field name, and a field value corresponding to the reconciliation file line record;
[0008] For each reconciliation file line record of the reconciliation file, query the indicator name corresponding to the field name in the reconciliation file line record from a preset field indicator mapping table; wherein the field indicator mapping table records the corresponding relationship between the indicator names of all indicators in the automatic reconciliation system and the field names of the fields in the reconciliation files of all manufacturers;
[0009] The queried indicator name is associated with the reconciliation file line record and stored as the file field collection line record corresponding to the reconciliation file line record, and the file field collection line records corresponding to all the reconciliation file line records of the reconciliation file together constitute the file field collection result corresponding to the reconciliation file; wherein each file field collection line record includes the business date, field name, field value and indicator name corresponding to the file field collection line record;
[0010] Compare each file field collection line record in the file field collection result corresponding to the reconciliation file with each indicator collection record in the indicator collection result corresponding to the candidate indicator list, merge the file field collection line records and indicator collection records corresponding to the same business date and indicator name into an indicator file field comparison record, and use all indicator file field comparison records as the comparison result corresponding to the reconciliation file; wherein each indicator file field comparison record includes the business date, field name, indicator name, field value and indicator value corresponding to the indicator file field comparison record.
[0011] In a second aspect, an embodiment of the present invention provides an automatic reconciliation system, including:
[0012] A candidate indicator collection unit is used to collect indicator collection records of indicators corresponding to all indicator names in the candidate indicator list from the business data when a preset timing period arrives and / or when a change in business data is monitored, as indicator collection results corresponding to the candidate indicator list; wherein the candidate indicator list is used to record the indicator names of indicators that meet preset indicator selection conditions among all indicators of the automatic reconciliation system; each indicator name is globally unique in the automatic reconciliation system; each indicator collection record includes: the business date, indicator name and indicator value corresponding to the indicator collection record;
[0013] A reconciliation file collection unit, used to obtain a reconciliation file of a preset manufacturer, parse the reconciliation file, and obtain all reconciliation file line records of the reconciliation file; wherein each reconciliation file line record includes a business date, a field name, and a field value corresponding to the reconciliation file line record;
[0014] An indicator name query unit, used to query, for each reconciliation file line record of the reconciliation file, from a preset field indicator mapping table, an indicator name corresponding to a field name in the reconciliation file line record; wherein the field indicator mapping table records the correspondence between the indicator names of all indicators in the automatic reconciliation system and the field names of the fields in the reconciliation files of all manufacturers;
[0015] A file field collection result generating unit is used to associate the queried indicator name with the reconciliation file line record and store it as the file field collection line record corresponding to the reconciliation file line record, and the file field collection line records corresponding to all the reconciliation file line records of the reconciliation file together constitute the file field collection result corresponding to the reconciliation file; wherein each file field collection line record includes the business date, field name, field value and indicator name corresponding to the file field collection line record;
[0016] A comparison unit is used to compare each file field collection line record in the file field collection result corresponding to the reconciliation file with each indicator collection record in the indicator collection result corresponding to the candidate indicator list, merge the file field collection line records and indicator collection records corresponding to the same business date and indicator name into an indicator file field comparison record, and use all indicator file field comparison records as the comparison result corresponding to the reconciliation file; wherein each indicator file field comparison record includes the business date, field name, indicator name, field value and indicator value corresponding to the indicator file field comparison record.
[0017] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any one of the automatic reconciliation methods described above.
[0018] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising:
[0019] processor;
[0020] a memory for storing instructions executable by the processor;
[0021] The processor is configured to execute the instructions to implement any one of the automatic reconciliation methods described above.
[0022] The above technical solution has the following beneficial effects: by defining indicators and preset field indicator mapping tables in the automatic reconciliation system, the indicators are reusable, and the fields described in the reconciliation files from different manufacturers can be compared using the indicators when the meaning of the definitions is the same as the meaning of the indicator definitions, without the need to define duplicate indicators for the fields. Combined with the preset field indicator mapping table, the mapping relationship between the indicators and the fields of the reconciliation file is configurable, and one definition can be used in multiple places, maximizing the reuse of the collection and comparison processing logic. The (candidate) indicator collection and the reconciliation file collection are executed in parallel, without coupling or association with each other, and are dynamically separated in real time. The comparison process can be initiated in real time based on transaction changes, and data problems can be discovered as early as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 It is a flow chart of an automatic reconciliation method according to one embodiment of the present invention;
[0025] Figure 2 This is an architecture diagram of an automatic reconciliation system according to one embodiment of the present invention;
[0026] Figure 3 This is the data flow diagram of the traditional solution;
[0027] Figure 4 It is a data flow diagram based on an automatic reconciliation system according to one embodiment of the present invention;
[0028] Figure 5 This is another flow chart of an automatic reconciliation method according to one embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] like Figure 1 As shown, an embodiment of the present invention provides an automatic reconciliation method, which is adopted by an automatic reconciliation system, and the method includes:
[0031] Step S10, when the preset timing period arrives and / or when the business data change is monitored, the indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list are collected from the business data as the indicator collection results corresponding to the candidate indicator list; wherein the candidate indicator list is used to record the indicator names of the indicators that meet the preset indicator selection conditions among all the indicators of the automatic reconciliation system; each indicator name is globally unique in the automatic reconciliation system; each indicator collection record includes: the business date, indicator name and indicator value corresponding to the indicator collection record;
[0032] Step S11, obtaining a reconciliation file of a preset manufacturer, parsing the reconciliation file, and obtaining all reconciliation file line records of the reconciliation file; wherein each reconciliation file line record includes a business date, a field name, and a field value corresponding to the reconciliation file line record;
[0033] Step S12, for each reconciliation file line record of the reconciliation file, query the indicator name corresponding to the field name in the reconciliation file line record from a preset field indicator mapping table; wherein the field indicator mapping table records the corresponding relationship between the indicator names of all indicators in the automatic reconciliation system and the field names of the fields in the reconciliation files of all manufacturers;
[0034] Step S13, the queried indicator name is associated with the reconciliation file line record and stored as the file field collection line record corresponding to the reconciliation file line record, and the file field collection line records corresponding to all the reconciliation file line records of the reconciliation file together constitute the file field collection result corresponding to the reconciliation file; wherein each file field collection line record includes the business date, field name, field value and indicator name corresponding to the file field collection line record;
[0035] Step S14, compare each file field collection line record in the file field collection result corresponding to the reconciliation file with each indicator collection record in the indicator collection result corresponding to the candidate indicator list, merge the file field collection line record and indicator collection record corresponding to the same business date and indicator name into an indicator file field comparison record, and use all indicator file field comparison records as the comparison result corresponding to the reconciliation file; wherein each indicator file field comparison record includes the business date, field name, indicator name, field value and indicator value corresponding to the indicator file field comparison record.
[0036] In some embodiments, the triggering execution mechanism for collecting the indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list from the business data may include but is not limited to being triggered at a preset timing period and / or being triggered when a business data change is detected. The two triggering mechanisms can be used separately or simultaneously; when used simultaneously, the collection of the indicators in the candidate indicator list is triggered at a preset timing period. At the same time, if a business data change is detected, even if the preset timing period has not been reached, the collection of the indicators in the candidate indicator list is triggered in real time for the business data change, so as to make a more real-time response and promptly discover problems in the business data and reconciliation files. The candidate indicator list records the indicators that meet the preset indicator selection conditions among all the indicators in the automatic reconciliation system. The preset indicator selection conditions can be limited to all indicators in the automatic reconciliation system, or one or more indicators can be directly selected, or the indicators can be limited by the relevant information corresponding to the indicators, thereby dynamically determining the indicators and other preset indicator selection conditions. Table 1 is an example of a candidate indicator list, where the indicators include loanBalance and currentDayLoanPrcp. loanBalance and currentDayLoanPrcp are indicator names defined within the automatic reconciliation system, representing the loan balance and the loan amount on the day, respectively.
[0037] index loanBalance currentDayLoanPrcp
[0038] Table 1 Example of candidate indicator list
[0039] Table 2 is an example of the indicator collection result. As shown in Table 2, the indicator collection result includes two indicator collection records, each of which includes: the business date, indicator name and indicator value corresponding to the indicator collection record, wherein the business date, i.e., the date on which the business occurs, is May 14, 2024, and the indicator value corresponding to the indicator loanBalance at that time is 2010000, and the indicator value corresponding to the indicator currentDayLoanPrcp is 100000;
[0040] Business Date index Indicator value (actual value) 2024-05-14 LoanBalance 2010000 2024-05-14 currentDayLoanPrcp 100000
[0041] Table 2 Example of indicator collection results
[0042] There is no pre- or post-coupling relationship between obtaining the indicator collection result in step S10 and obtaining the file field collection result in steps S11, S12 and S13, and there is no dependence between them. Therefore, step S10 for obtaining the indicator collection result and steps S11, S12 and S13 for obtaining the file field collection result can be executed independently and in parallel. While executing step S10, steps S11, S12 and S13 are executed in parallel, wherein steps S11, S12 and S13 are executed sequentially.
[0043] There are usually multiple manufacturers, and the reconciliation files of different manufacturers are usually different. For the same indicator within the automatic reconciliation system, each manufacturer may define its own field name, which leads to the diversification of the reconciliation files. By presetting the field indicator mapping table, the different field names of each manufacturer can be mapped to the same indicator name. Therefore, by using the preset field indicator mapping table, the embodiment of the present invention can automatically process the correspondence between the fields in the reconciliation files of different manufacturers and the indicators in the business data, without having to write independent code for each reconciliation file of different manufacturers. Table 3 is an example of a field indicator mapping table. In Table 3, the indicator names include loanBalance and currentDayLoanPrcp, which correspond to the loan balance and the loan amount on the day in the reconciliation file, respectively. In the field indicator mapping table, there is only one column for the indicator name, and the field name of the reconciliation file can have one or more columns, so that the same indicator corresponds to the field names defined by multiple manufacturers.
[0044] Indicator name Field name of the reconciliation file loanBalance Loan balance currentDayLoanPrcp Loan amount on the day
[0045] Table 3 Example of field indicator mapping table
[0046] Each reconciliation file line record is collected from the reconciliation file, and each reconciliation file line record includes the business date, field name and field value corresponding to the reconciliation file line record. Then, according to the field indicator mapping table, the indicator name corresponding to the field name can be determined, and the reconciliation file line record is associated with the obtained indicator name and stored as a file field collection line record. Table 4 is an example of the file field collection result, and the file field collection result includes two file field collection line records. The business date of the first file field collection line record is May 14, 2024, the field name is loan balance, the field value is 2100000, and the corresponding indicator name is loanBalance; the business date of the second file field collection line record is May 14, 2024, the field name is the loan amount on the day, the field value is 100000, and the corresponding indicator name is currentDayLoanPrcp.
[0047] Business Date Field Name Field value (expected value) Indicator name 2024-05-14 Loan balance 2100000 LoanBalance 2024-05-14 Loan amount on the day 100000 currentDayLoanPrcp
[0048] Table 4 Example of file field collection results
[0049] Step S10 for obtaining the indicator collection results and step S11, step S12 and step S13 for obtaining the file field collection results are executed in parallel, and the obtained indicator collection results and file field collection results are independently provided to step S14 for row comparison. The indicator collection records and file field collection row records with the same business date and the same indicator name correspond to the changes in business data caused by the same business operation. The indicator collection records and file field collection row records with the same business date and the same indicator name are merged to obtain the indicator file field comparison record.
[0050] The embodiments of the present invention have the following technical effects: by defining indicators and preset field indicator mapping tables in the automatic reconciliation system, the indicators are reusable, and the fields described in the reconciliation files from different manufacturers can be compared using the indicators when the meaning of the definitions is the same as the meaning of the indicator definitions, without the need to define repeated indicators for the fields. In combination with the preset field indicator mapping table, the mapping relationship between the indicators and the fields of the reconciliation file is configurable, and one definition can be used in multiple places, maximizing the reuse of the collection and comparison processing logic. The (candidate) indicator collection and the reconciliation file collection are executed in parallel without coupling and association with each other, and are dynamically separated in real time. The comparison process can be initiated in real time according to transaction changes, and data problems can be discovered as early as possible.
[0051] Furthermore, before collecting the indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list from the business data in step S10 as the indicator collection results corresponding to the candidate indicator list, the method further includes:
[0052] For all indicators in the automatic reconciliation system, an indicator configuration record for each indicator is pre-established; the indicator configuration record for each indicator includes the indicator name and indicator collection rule of the indicator; the indicator collection rule is used to specify the triggering condition and execution method of the collection operation corresponding to the indicator; the indicator collection rule includes the starting date, time range, time unit, cycle, collection operation type and collection retrieval algorithm; the collection operation type includes SQL, Redis, class call and interface message request, which are used to specify the execution mechanism of the corresponding collection retrieval algorithm; the collection retrieval algorithm includes SQL query statements, key-value pair query statements based on Redis database, class call statements based on Spring Bean mechanism and request message strings;
[0053] Traverse all indicators in the automatic reconciliation system, determine whether the trigger condition specified by the indicator collection rule in the indicator configuration record of each indicator is triggered, and record the indicator name of the indicator whose trigger condition specified by the indicator statistics rule is triggered into the candidate indicator list.
[0054] In some embodiments, an indicator configuration record is established for each indicator in the automatic reconciliation system. After the indicator configuration record is configured, each time the preset timing period arrives and / or the business data change is monitored, all indicators in the automatic reconciliation system are traversed to determine whether the trigger condition specified by the indicator collection rule in the indicator configuration record of each indicator is triggered, and the indicator name of the indicator whose trigger condition specified by the indicator collection rule is triggered is recorded in the candidate indicator list. The indicator collection rules in the indicator configuration record can be configured according to the characteristics of each indicator in the business operation, so that the indicator collection rules can be customized for each indicator to adapt to the change cycle characteristics of each indicator under their respective business operations, avoid frequent collection of indicators that do not change for a long time or use long-term collection strategies for indicators that change frequently, and achieve low-cost, low-resource consumption, timely and accurate collection and monitoring of changes in each indicator.
[0055] Table 5 is an example of an indicator configuration record. In the example of Table 5, the indicator configuration record also includes the Chinese name of the indicator; the indicator collection rule also includes a rule description; Table 5 illustrates two indicator configuration records. The indicator name of the first one is LoanBalance, the Chinese name of the indicator is loan balance, and the start time in the indicator collection rule is July 21, 2023, that is, the indicator collection is performed from this date. The time range of indicator collection is 356 days from July 21, 2023, and the time unit is day. The cycle time is 1, which means that the collection is performed once every day within the time range. The type of collection operation is SQL, and the collection retrieval algorithm is an SQL statement, that is, by querying the SQL database for the SQL statement, the indicator collection record of the indicator is obtained. The second indicator configuration record can be understood based on the explanation of the first indicator configuration record.
[0056]
[0057] Table 5 Example of indicator configuration record
[0058] The embodiments of the present invention have the following technical effects: the indicator collection rules can be customized for each indicator to adapt to the change cycle characteristics of each indicator under its own business operation, avoid frequent collection of indicators that do not change for a long time or use long-cycle collection strategies for indicators that change frequently, and achieve low-cost, low-resource consumption, timely and accurate collection and monitoring of changes in each indicator.
[0059] Furthermore, the indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list collected from the business data in step S10 as the indicator collection results corresponding to the candidate indicator list specifically include:
[0060] For each indicator name in the candidate indicator list, the execution method of the collection operation corresponding to the indicator is obtained from the indicator collection rule in the indicator configuration record of the indicator corresponding to the indicator name, and the collection operation is performed according to the execution method to obtain the execution result of the collection operation. The obtained execution result is used as the indicator collection record of the indicator corresponding to the indicator name. The indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list constitute the indicator collection result corresponding to the candidate indicator list.
[0061] In some embodiments, the indicator collection rules are used to specify the trigger conditions and execution methods of the collection operations corresponding to the indicators; the indicator collection rules include the start date, time range, time unit, cycle period, collection operation type and collection retrieval algorithm; the collection operation types include SQL, Redis, class call and interface message request, which are used to specify the execution mechanism of the corresponding collection retrieval algorithm; the collection retrieval algorithm includes SQL query statements, key-value pair query statements based on Redis database, class call statements based on Spring Bean mechanism and request message strings.
[0062] Acquiring an execution method of a collection operation corresponding to the indicator from an indicator collection rule in an indicator configuration record of the indicator, and executing the collection operation according to the execution method, specifically including:
[0063] For each indicator name in the candidate indicator list, the starting date, time range, time unit, cycle period, collection operation type and collection retrieval algorithm corresponding to the collection operation of the indicator are obtained from the indicator collection rule in the indicator configuration record of the indicator corresponding to the indicator name, and when it is determined that the current date is within the time conditions specified by the starting date, time range and time unit, the collection retrieval algorithm is executed according to the cycle specified by the cycle period and the execution mechanism specified by the collection operation type to obtain the execution result of the collection retrieval algorithm, and the obtained execution result is used as the indicator collection record of the indicator corresponding to the indicator name. The indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list constitute the indicator collection result corresponding to the candidate indicator list.
[0064] The embodiments of the present invention have the following technical effects: the execution method and execution conditions of the collection operation of each indicator can be flexibly configured, the change cycle of the indicator can be flexibly adapted, and the collection operation of the indicator from various different data systems can be supported.
[0065] Furthermore, before obtaining the reconciliation file of the preset manufacturer, parsing the reconciliation file, and obtaining all reconciliation file row records of the reconciliation file in step S11, the method further includes:
[0066] A mapping relationship is established in advance between the field names of all fields used in the reconciliation files of each manufacturer and the indicator names of the indicators in the automatic reconciliation system to obtain the field indicator mapping table.
[0067] In some embodiments, there are usually multiple manufacturers, and the reconciliation files of different manufacturers are usually different. For the same indicator within the automatic reconciliation system, each manufacturer may define its own field name, which leads to the diversification of the reconciliation files. Through the preset field indicator mapping table, the different field names of each manufacturer can be mapped to the same indicator name. Therefore, by using the preset field indicator mapping table, the embodiment of the present invention can automatically process the correspondence between the fields in the reconciliation files of different manufacturers and the indicators in the business data, without the need to independently write code for different manufacturers' reconciliation files and process them separately each time.
[0068] like Figure 2 As shown, an embodiment of the present invention provides an automatic reconciliation system, which includes:
[0069] The candidate indicator collection unit 200 is used to collect indicator collection records of indicators corresponding to all indicator names in the candidate indicator list from the business data when a preset timing period arrives and / or when a change in business data is monitored, as the indicator collection result corresponding to the candidate indicator list; wherein the candidate indicator list is used to record the indicator names of indicators that meet the preset indicator selection conditions among all indicators of the automatic reconciliation system; each indicator name is globally unique in the automatic reconciliation system; each indicator collection record includes: the business date, indicator name and indicator value corresponding to the indicator collection record;
[0070] The reconciliation file collection unit 201 is used to obtain the reconciliation file of the preset manufacturer, parse the reconciliation file, and obtain all the reconciliation file line records of the reconciliation file; wherein each reconciliation file line record includes the business date, field name and field value corresponding to the reconciliation file line record;
[0071] The indicator name query unit 202 is used to query the indicator name corresponding to the field name in the reconciliation file line record from a preset field indicator mapping table for each reconciliation file line record of the reconciliation file; wherein the field indicator mapping table records the corresponding relationship between the indicator names of all indicators in the automatic reconciliation system and the field names of the fields in the reconciliation files of all manufacturers;
[0072] The file field collection result generating unit 203 is used to associate the queried indicator name with the reconciliation file line record and store it as the file field collection line record corresponding to the reconciliation file line record. The file field collection line records corresponding to all the reconciliation file line records of the reconciliation file together constitute the file field collection result corresponding to the reconciliation file; wherein each file field collection line record includes the business date, field name, field value and indicator name corresponding to the file field collection line record;
[0073] The comparison unit 204 is used to compare each file field collection line record in the file field collection result corresponding to the reconciliation file with each indicator collection record in the indicator collection result corresponding to the candidate indicator list, merge the file field collection line record and indicator collection record corresponding to the same business date and indicator name into an indicator file field comparison record, and use all indicator file field comparison records as the comparison result corresponding to the reconciliation file; wherein each indicator file field comparison record includes the business date, field name, indicator name, field value and indicator value corresponding to the indicator file field comparison record.
[0074] Furthermore, the automatic reconciliation system also includes:
[0075] A system indicator configuration unit, used to pre-establish an indicator configuration record for each indicator for all indicators in the automatic reconciliation system; the indicator configuration record for each indicator includes the indicator name and indicator collection rule of the indicator; the indicator collection rule is used to specify the triggering condition and execution method of the collection operation corresponding to the indicator; the collection rule includes a start date, a time range, a time unit, a cycle, a collection operation type, and a collection retrieval algorithm; the collection operation type includes SQL, Redis, a class call, and an interface message request, which are used to specify the execution mechanism of the corresponding collection retrieval algorithm; the collection retrieval algorithm includes an SQL query statement, a key-value pair query statement based on a Redis database, a class call statement based on a Spring Bean mechanism, and a request message string;
[0076] The candidate indicator determination unit is used to traverse all indicators in the automatic reconciliation system, determine whether the trigger condition specified by the indicator collection rule in the indicator configuration record of each indicator is triggered, and record the indicator name of the indicator whose trigger condition specified by the indicator statistics rule is triggered into the candidate indicator list.
[0077] Furthermore, the candidate indicator collection unit 200 is specifically used to: for each indicator name in the candidate indicator list, obtain the execution method of the collection operation corresponding to the indicator from the indicator collection rule in the indicator configuration record of the indicator corresponding to the indicator name, and perform the collection operation according to the execution method to obtain the execution result of the collection operation, and use the obtained execution result as the indicator collection record of the indicator corresponding to the indicator name. The indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list constitute the indicator collection result corresponding to the candidate indicator list.
[0078] Furthermore, the automatic reconciliation system also includes:
[0079] A field indicator mapping table creation unit is used to establish a mapping relationship between the field names of all fields used in the reconciliation files of each manufacturer and the indicator names of the indicators in the automatic reconciliation system in advance to obtain the field indicator mapping table;
[0080] The embodiments of the present invention correspond one-to-one to the embodiments of the aforementioned automatic reconciliation method. The embodiments of the present invention can be understood based on the embodiments of the aforementioned automatic reconciliation method, and will not be described in detail here.
[0081] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, any one of the automatic reconciliation methods described above is implemented.
[0082] The embodiment of the present invention is an embodiment of a computer-readable storage medium storing the aforementioned automatic reconciliation method. The embodiment of the present invention can be understood based on the embodiment of the aforementioned automatic reconciliation method, and will not be described in detail here.
[0083] An embodiment of the present invention further provides an electronic device, comprising:
[0084] processor;
[0085] a memory for storing instructions executable by the processor;
[0086] The processor is configured to execute the instructions to implement any one of the automatic reconciliation methods described above.
[0087] The embodiment of the present invention is an electronic device embodiment that stores and executes the aforementioned automatic reconciliation method. The embodiment of the present invention can be understood based on the aforementioned embodiment of the automatic reconciliation method, and will not be described in detail here.
[0088] The above technical solution of the embodiment of the present invention is described in detail below in conjunction with specific application examples. For technical details not introduced during the implementation process, please refer to the relevant description in the previous text.
[0089] Traditional reconciliation solutions such as Figure 3 As shown, Figure 3 The data flow under the architecture of a traditional reconciliation system is shown, including a reconciliation file field collection unit 300, a business field retrieval unit 301, a reconciliation business comparison unit 302, a comparison result display unit 303, a business data source 304 and a reconciliation trigger unit 305.
[0090] The reconciliation file field collection unit 300 is used to parse the file content line by line from the reconciliation file 306, and each line of the reconciliation file record is passed as input to the next link (business field retrieval unit 301 and reconciliation business comparison unit 302).
[0091] The business field retrieval unit 301 is used to write a SQL script or code logic according to the input reconciliation file record, and extract the value of the amount field from the existing business data source 304 as the business record;
[0092] The reconciliation business comparison unit 302 is used to compare the reconciliation file record and the business record and generate a comparison record, and then re-trigger the reconciliation file field collection unit 300 to compare the next reconciliation file record.
[0093] The comparison result display unit 303 is used to output the specified amount field value of the reconciliation file and the corresponding value in the business data source 304, and the main information expressed includes the business date, the field value of the reconciliation file (expected value), and the business field value (actual value);
[0094] The account reconciliation triggering unit 305 is used to trigger the account reconciliation operation at a fixed time.
[0095] The inventor discovered the problems with the traditional architecture: it is necessary to write a corresponding parsing logic for each reconciliation file in order to associate the fields in the reconciliation file with the fields in the business, and it is also necessary to write a comparison logic between the fields in the reconciliation file and the fields in the business. Reconciliation files from different manufacturers cannot reuse the unified parsing logic and comparison logic; reconciliation lacks flexible configuration and cannot achieve the purpose of configuring one place for multiple uses; reconciliation has poor timeliness and cannot discover data problems as early as possible.
[0096] Based on the above findings, an embodiment of the present invention provides a reconciliation system for real-time dynamic collection and comparison of indicators. The method used in the automatic reconciliation system is a reconciliation method for real-time dynamic collection and comparison of indicators, which is mainly used in the business scenario of reconciliation of file data from different systems in the financial field. For file fields from different manufacturers, the automatic reconciliation system can realize the reuse of comparison logic, realize configurability to reduce the cost of customized development, and realize the early discovery of data problems when the business changes.
[0097] like Figure 4As shown, an embodiment of the present invention provides a reconciliation system for real-time dynamic collection and comparison of indicators, including an indicator file field configuration unit 400 (field indicator mapping table creation unit), a reconciliation file parsing unit 401 (reconciliation file collection unit), an indicator configuration unit 402 (system indicator configuration unit), a candidate indicator list determination unit 403 (candidate indicator determination unit), an indicator collection unit 404 (candidate indicator collection unit), a business source 405, an indicator comparison unit 406 and a change source 407.
[0098] The indicator file field configuration unit 400 is used to map the indicators defined in the automatic reconciliation system with the fields defined in the reconciliation file, and establish an index relationship, so as to find the corresponding reconciliation file field through the indicator, and provide a reconciliation reference for the subsequent indicator comparison system.
[0099] The reconciliation file parsing unit 401 is used to parse the field columns in the reconciliation file line by line according to the agreed format to form a new data structure, namely, the file field collection result 408.
[0100] The file field collection result 408 includes business date, field name, field value and indicator name. The indicator name is found through the correspondence between the field name and the indicator name in the field indicator mapping table configured by the indicator file field configuration unit 400.
[0101] The indicator configuration unit 402 is used to configure the information of the indicator, including: the indicator name, the Chinese name of the indicator, and the rule configuration information of the indicator statistics, such as the statistical time range, the statistical cycle, and the collection algorithm. The indicator is the core element defined and maintained within the reconciliation system. The indicator name is the primary key value used to uniquely identify the indicator. Once established, it cannot be modified to ensure global uniqueness. According to the configuration of the indicator, for the indicator that meets the collection conditions specified in the configuration, the current indicator value of the indicator can be obtained by running the indicator collection algorithm.
[0102] The candidate indicator list determination unit 403 is used to find indicators that meet the operating conditions in the entire indicator set (i.e., all indicators defined in the automatic reconciliation system), which are candidate indicators. Whether the conditions are met is determined based on the following fields: start date, time range, time unit, and cycle period.
[0103] Taking the loan balance indicator as an example, its collection rule is: starting from July 21, 2023, collect once a day for a total of 365 days. If the current date is 2024-05-14, it meets the collection conditions and is added to the candidate indicator list.
[0104] The indicator collection unit 404 is used to determine the strategy for obtaining the indicator value from the indicator extraction type (collection operation type) corresponding to the indicator in the candidate indicator list. The specific strategy includes but is not limited to the extraction indicator strategy (collection operation type) and indicator retrieval algorithm (collection retrieval algorithm) in Table 6.
[0105] Extract indicator strategy Index retrieval algorithm SQL SQL statement to retrieve indicators Redis Retrieve the key-value pairs corresponding to the indicator and access the query statement of the key-value pairs in the Redis database Class call (class) Execution statement of the spring bean mechanism corresponding to the indicator Interface request message (URL) The path and message information of the interface request corresponding to the indicator
[0106] Table 6 Index extraction strategy and index retrieval algorithm
[0107] The indicator collection system (unit) 404 reads business data from the business source 405 and outputs an indicator collection result 409 . The indicator collection result 409 is the indicator value corresponding to each indicator in the candidate indicator list, mainly including business date, indicator name, indicator value, etc.
[0108] The indicator comparison unit 406 is used to take the file field collection result 408 and the indicator collection result 409 as input. The indicator comparison system receives the two results and then compares them. The main comparison process is as follows:
[0109] The received indicator collection result 409 already includes the indicator and the indicator value that meets the collection rule; the received file field collection result 408 already includes the fields and the field values defined in the file; no matter whether the file field collection result 408 or the indicator collection result 409 is received first, the indicator file field comparison result 410 for the corresponding relationship between the indicator and the file field can be established;
[0110] The indicator file field comparison result 410 records a Map data structure with the indicator as the key and the file field as the value. It has the following characteristics: one indicator corresponds to one file field, the indicator corresponds to the indicator collection result, which includes the business date, indicator, indicator value (actual value), and the file field corresponds to the file field collection result, which includes the business date, field name, and field value (expected value); the indicator name and business date are used as the primary key to retrieve the corresponding indicator value (actual value), field name, and field value (expected value) from the indicator collection result and the file field collection result. The data example is shown in Table 7.
[0111] Indicator name Field Name Business Date Expected Value Actual value loanBalance Loan balance 2024-05-14 2100000 2010000
[0112] Table 7 Example of indicator file field comparison results
[0113] The change source 407 is used to activate the collection action. The activation reasons include: a scheduled task for periodic collection and comparison, and / or real-time collection and comparison due to business data changes.
[0114] In another embodiment, if Figure 5As shown, the embodiment of the present invention provides an automatic reconciliation method, which is also a reconciliation method for real-time dynamic collection and comparison of indicators. The execution steps are as follows:
[0115] Step S50, reading the reconciliation file into the reconciliation file parsing unit;
[0116] Step S51, read the field indicator mapping table and input it to the reconciliation file parsing unit, so that the generated file field collection result can be accompanied by the indicator name corresponding to the file field (field name);
[0117] Step S52, reading the records in the reconciliation file line by line in the reconciliation file parsing unit to generate a file field collection result;
[0118] Step S53, sending the file field collection results line by line to the indicator comparison unit;
[0119] Step S54, triggering the action of index collection when the scheduled task or transaction is successful;
[0120] Step S55, the indicator configuration unit generates a list of candidate indicators that meet the collection requirements;
[0121] Step S56, the candidate indicator list is input to the indicator collection unit;
[0122] Step S57, the indicator collection unit generates an indicator collection result according to the collection algorithm of the candidate indicators;
[0123] Step S58, the index collection results are input to the index comparison unit line by line;
[0124] Step S59, the indicator comparison unit creates and updates the comparison list data according to the received indicator collection results and the received file field collection results, and finally generates the indicator file field comparison results;
[0125] Table 8 is a comparison between the traditional architecture and the indicator-oriented architecture of this application:
[0126] characteristic Traditional architecture Metrics-Oriented Architecture Reusability For each file field, the business field value needs to be written separately, which has low reusability. File fields can search and match existing indicator sets, which is highly reusable. Configurability File fields and business fields are processed together, and the configurability is low. The matching of indicator-file fields can be completed through configuration, which is highly configurable Real-time The collection of file fields and business fields must be performed simultaneously, and the comparison can only be triggered at a fixed time, which has poor timeliness. File fields and indicators can be collected and compared separately, and comparison can be triggered by transaction changes, with high real-time performance
[0127] Table 8 Comparison between the traditional architecture and the indicator-oriented architecture of this application
[0128] The embodiments of the present invention have the following technical effects: by defining indicator abstraction, the processing logic of collection and comparison is reused to the maximum extent; by configuring the indicator and the mapping relationship with the file field, one definition can be used in multiple places; real-time collection and comparison are realized through dynamic separation technology; the indicator is reusable; the file field described in the files from different manufacturers can be compared with the indicator when the meaning of the definition is the same as the meaning of the indicator definition, without defining repeated indicators for the field; the indicator is configurable; by specifying the mapping relationship between the indicator and the field of the reconciliation file, the effect of one definition and multiple uses can be achieved; the indicator collection and the file field collection are separated in real time and dynamically; the comparison result is to initiate the comparison in real time according to the transaction changes, so that data problems can be discovered as early as possible.
[0129] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.
[0130] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
[0131] The disclosed embodiments are described above to enable any person skilled in the art to implement or use the present invention. Various modifications of these embodiments are obvious to those skilled in the art, and the general principles defined herein may also be applied to other embodiments without departing from the spirit and scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments given herein, but is consistent with the broadest scope of the principles and novel features disclosed in this application.
[0132] The above description includes examples of one or more embodiments. Of course, it is impossible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including". In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".
[0133] Those skilled in the art may also understand that the various illustrative logical blocks, units, and steps listed in the embodiments of the present invention may be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly demonstrate the interchangeability of hardware and software, the various illustrative components, units, and steps mentioned above have generally described their functions. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the described functions for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present invention.
[0134] The various illustrative logic blocks or units described in the embodiments of the present invention can be implemented or operated by a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of the above. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any conventional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.
[0135] The steps of the method or algorithm described in the embodiments of the present invention can be directly embedded in hardware, a software module executed by a processor, or a combination of the two. The software module can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or other storage media of any form in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC, and the ASIC can be arranged in a user terminal. Optionally, the processor and the storage medium can also be arranged in different components in the user terminal.
[0136] In one or more exemplary designs, the above functions described in the embodiments of the present invention can be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, these functions can be stored on a computer-readable medium, or transmitted in the form of one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media that facilitate the transfer of computer programs from one place to another. The storage medium can be any available medium that can be accessed by any general or special computer. For example, such computer-readable media can include but are not limited to RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that can be used to carry or store program codes in the form of instructions or data structures and other forms that can be read by general or special computers, or general or special processors. In addition, any connection can be appropriately defined as a computer-readable medium, for example, if the software is transmitted from a website site, server or other remote resource through a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wirelessly, such as infrared, wireless and microwave, it is also included in the defined computer-readable medium. The disk and disc include compact disk, laser disk, optical disk, DVD, floppy disk and Blu-ray disk. Disks usually copy data magnetically, while discs usually copy data optically with lasers. Combinations of the above may also be included in computer-readable media.
[0137] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An automatic reconciliation method, characterized in that: Adopted by an automatic reconciliation system, the method comprises: When a preset timing cycle arrives and / or a change in business data is monitored, an indicator collection record of indicators corresponding to all indicator names in the candidate indicator list is collected from the business data as an indicator collection result corresponding to the candidate indicator list; wherein the candidate indicator list is used to record the indicator names of indicators that meet the preset indicator selection conditions among all indicators of the automatic reconciliation system; each indicator name is globally unique in the automatic reconciliation system; each indicator collection record includes: the business date, indicator name and indicator value corresponding to the indicator collection record; Obtaining a reconciliation file of a preset manufacturer, parsing the reconciliation file, and obtaining all reconciliation file line records of the reconciliation file; wherein each reconciliation file line record includes a business date, a field name, and a field value corresponding to the reconciliation file line record; For each reconciliation file line record of the reconciliation file, query the indicator name corresponding to the field name in the reconciliation file line record from a preset field indicator mapping table; wherein the field indicator mapping table records the corresponding relationship between the indicator names of all indicators in the automatic reconciliation system and the field names of the fields in the reconciliation files of all manufacturers; The queried indicator name is associated with the reconciliation file line record and stored as the file field collection line record corresponding to the reconciliation file line record, and the file field collection line records corresponding to all the reconciliation file line records of the reconciliation file together constitute the file field collection result corresponding to the reconciliation file; wherein each file field collection line record includes the business date, field name, field value and indicator name corresponding to the file field collection line record; Compare each file field collection row record in the file field collection result corresponding to the reconciliation file with each indicator collection record in the indicator collection result corresponding to the candidate indicator list, merge the file field collection row record and the indicator collection record corresponding to the same business date and indicator name into an indicator file field comparison record, and use all indicator file field comparison records as the comparison result corresponding to the reconciliation file; wherein each indicator file field comparison record includes the business date, field name, indicator name, field value and indicator value corresponding to the indicator file field comparison record; Wherein, before collecting the indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list from the business data as the indicator collection results corresponding to the candidate indicator list, the method further includes: For all indicators in the automatic reconciliation system, an indicator configuration record for each indicator is pre-established; the indicator configuration record for each indicator includes the indicator name and indicator collection rule of the indicator; the indicator collection rule is used to specify the triggering condition and execution method of the collection operation corresponding to the indicator; Traverse all indicators in the automatic reconciliation system, determine whether the trigger condition specified by the indicator collection rule in the indicator configuration record of each indicator is triggered, and record the indicator name of the indicator whose trigger condition specified by the indicator statistics rule is triggered into the candidate indicator list; The collecting of the indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list from the business data as the indicator collection results corresponding to the candidate indicator list specifically includes: For each indicator name in the candidate indicator list, the execution method of the collection operation corresponding to the indicator is obtained from the indicator collection rule in the indicator configuration record of the indicator corresponding to the indicator name, and the collection operation is performed according to the execution method to obtain the execution result of the collection operation. The obtained execution result is used as the indicator collection record of the indicator corresponding to the indicator name. The indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list constitute the indicator collection result corresponding to the candidate indicator list.
2. The automatic reconciliation method according to claim 1, characterized in that: Before obtaining the reconciliation file of the preset manufacturer, parsing the reconciliation file, and obtaining all reconciliation file row records of the reconciliation file, the method further includes: A mapping relationship is established in advance between the field names of all fields used in the reconciliation files of each manufacturer and the indicator names of the indicators in the automatic reconciliation system to obtain the field indicator mapping table.
3. An automatic reconciliation system, characterized in that: include: A candidate indicator collection unit is used to collect indicator collection records of indicators corresponding to all indicator names in the candidate indicator list from the business data when a preset timing period arrives and / or when a change in business data is monitored, as indicator collection results corresponding to the candidate indicator list; wherein the candidate indicator list is used to record the indicator names of indicators that meet preset indicator selection conditions among all indicators of the automatic reconciliation system; each indicator name is globally unique in the automatic reconciliation system; each indicator collection record includes: the business date, indicator name and indicator value corresponding to the indicator collection record; A reconciliation file collection unit, used to obtain a reconciliation file of a preset manufacturer, parse the reconciliation file, and obtain all reconciliation file line records of the reconciliation file; wherein each reconciliation file line record includes a business date, a field name, and a field value corresponding to the reconciliation file line record; An indicator name query unit, used to query, for each reconciliation file line record of the reconciliation file, from a preset field indicator mapping table, an indicator name corresponding to a field name in the reconciliation file line record; wherein the field indicator mapping table records the correspondence between the indicator names of all indicators in the automatic reconciliation system and the field names of the fields in the reconciliation files of all manufacturers; A file field collection result generating unit is used to associate the queried indicator name with the reconciliation file line record and store it as the file field collection line record corresponding to the reconciliation file line record, and the file field collection line records corresponding to all the reconciliation file line records of the reconciliation file together constitute the file field collection result corresponding to the reconciliation file; wherein each file field collection line record includes the business date, field name, field value and indicator name corresponding to the file field collection line record; A comparison unit is used to compare each file field collection line record in the file field collection result corresponding to the reconciliation file with each indicator collection record in the indicator collection result corresponding to the candidate indicator list, merge the file field collection line record and the indicator collection record corresponding to the same business date and indicator name into an indicator file field comparison record, and use all the indicator file field comparison records as the comparison result corresponding to the reconciliation file; wherein each indicator file field comparison record includes the business date, field name, indicator name, field value and indicator value corresponding to the indicator file field comparison record; The automatic reconciliation system also includes: A system indicator configuration unit, for pre-establishing an indicator configuration record for each indicator for all indicators in the automatic reconciliation system; the indicator configuration record for each indicator includes the indicator name and indicator collection rule of the indicator; the indicator collection rule is used to specify the triggering condition and execution method of the collection operation corresponding to the indicator; A candidate indicator determination unit is used to traverse all indicators in the automatic reconciliation system, determine whether the trigger condition specified by the indicator collection rule in the indicator configuration record of each indicator is triggered, and record the indicator name of the indicator whose trigger condition specified by the indicator statistics rule is triggered into the candidate indicator list; The candidate indicator collection unit is specifically used to: for each indicator name in the candidate indicator list, obtain the execution method of the collection operation corresponding to the indicator from the indicator collection rule in the indicator configuration record of the indicator corresponding to the indicator name, and execute the collection operation according to the execution method to obtain the execution result of the collection operation, and use the obtained execution result as the indicator collection record of the indicator corresponding to the indicator name. The indicator collection records of the indicators corresponding to all the indicator names in the candidate indicator list constitute the indicator collection result corresponding to the candidate indicator list.
4. The automatic reconciliation system according to claim 3, characterized in that: The automatic reconciliation system also includes: The field indicator mapping table creation unit is used to establish a mapping relationship between the field names of all fields used in the reconciliation files of each manufacturer and the indicator names of the indicators in the automatic reconciliation system in advance to obtain the field indicator mapping table.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, an automatic reconciliation method as described in any one of claims 1-2 is implemented.
6. An electronic device, characterized in that: It includes: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the automatic reconciliation method as described in any one of claims 1-2.
