Transaction data checking method and device, computer device and storage medium

By grouping transaction data into controllable sub-files and processing them in parallel, the problem of low efficiency in verifying large volumes of transaction data in existing technologies is solved, and a high-efficiency, low-cost data verification method is realized.

CN116401265BActive Publication Date: 2025-12-09INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310389222.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-13
Publication Date
2025-12-09
Estimated Expiration
2043-04-13

AI Technical Summary

Technical Problem

Existing technologies are inefficient when processing large volumes of transaction data and have high requirements for database resources, resulting in increased costs and poor scalability.

Method used

The transaction data is grouped into multiple sub-files with controllable data volume, and a one-to-one grouping strategy is adopted. The sub-files with matching identifiers are checked for data, and a queue is used as the link for data processing to support parallel processing.

Benefits of technology

It improves the efficiency of transaction data verification, reduces the requirements for computing resources, enhances the scalability of the method, and reduces resource consumption and costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116401265B_ABST
    Figure CN116401265B_ABST
Patent Text Reader

Abstract

The application relates to a transaction data checking method and device, computer equipment, a storage medium and a computer program product, relates to the technical field of big data, and can be used in the field of financial technology or other fields. The method comprises the following steps: acquiring first batch transaction data of a first system and second batch transaction data of a second system in a current checking period; dividing the first batch transaction data into a plurality of first data groups and dividing the second batch transaction data into a plurality of second data groups; storing transaction data contained in the first data groups into a first queue and storing transaction data contained in the second data groups into a second queue; reading transaction data from each first queue to generate a plurality of first subfiles and reading transaction data from each second queue to generate a plurality of second subfiles; and checking data of matched first subfiles and second subfiles to obtain a transaction data checking result. The method can improve the checking efficiency of large batch transaction data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of big data, and in particular to a transaction data checking method and device, a computer device, a storage medium and a computer program product. BACKGROUND

[0002] In the financial field, when upstream and downstream applications or partners are connected, the results of relevant account processing of the two systems often need to be checked in the form of transaction data files.

[0003] In the related art, the transaction data files of the two systems are generally checked by using a database table insertion method. However, with the development of the economy, the amount of transaction data gradually increases, and when a large amount of transaction data is processed by using the database table method, there is a problem of low efficiency. SUMMARY

[0004] Therefore, it is necessary to provide a transaction data checking method, device, computer device, computer readable storage medium and computer program product capable of improving the checking efficiency of a large amount of transaction data to solve the above technical problems.

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

[0006] obtaining a first batch of transaction data of a first system and a second batch of transaction data of a second system in a current reconciliation period;

[0007] using a preset grouping strategy, dividing each first transaction data included in the first batch of transaction data into a plurality of first data groups, and dividing each second transaction data included in the second batch of transaction data into a plurality of second data groups;

[0008] for each first data group, storing the first transaction data included in the first data group into a first queue corresponding to the first data group, and for each second data group, storing the second transaction data included in the second data group into a second queue corresponding to the second data group; the first queue and the second queue are one-to-one corresponding;

[0009] reading transaction data from each first queue, generating a plurality of first sub-files corresponding to the identifier of the first queue, and reading transaction data from each second queue, generating a plurality of second sub-files corresponding to the identifier of the second queue;

[0010] checking the first sub-file and the second sub-file with the same identifier for transaction data, obtaining a plurality of sub-checking results, and obtaining a transaction data checking result in the current reconciliation period based on each sub-checking result.

[0011] In one of the embodiments, the grouping the first transaction data in the first batch of transaction data into a plurality of first data groups and the second transaction data in the second batch of transaction data into a plurality of second data groups comprises:

[0012] determining first feature information of each first transaction data in the first batch of transaction data, and grouping the first transaction data with the same first feature information into the same first data group;

[0013] determining second feature information of each second transaction data in the second batch of transaction data, and grouping the second transaction data with the same second feature information into the same second data group; the first data group and the second data group are one-to-one corresponding.

[0014] In one of the embodiments, the grouping the first transaction data in the first batch of transaction data into a plurality of first data groups and the second transaction data in the second batch of transaction data into a plurality of second data groups comprises:

[0015] grouping each first transaction data in the first batch of transaction data according to the feature information of the first transaction data, and performing clustering processing on each first transaction data by using a clustering algorithm to obtain a plurality of first data groups;

[0016] grouping each second transaction data in the second batch of transaction data according to the feature information of the second transaction data, and performing clustering processing on each second transaction data by using the clustering algorithm to obtain a plurality of second data groups.

[0017] In one of the embodiments, the reading transaction data from each first queue and generating a plurality of first sub-files corresponding to the identifier of the first queue, and reading transaction data from each second queue and generating a plurality of second sub-files corresponding to the identifier of the second queue comprises:

[0018] for each first queue, reading first transaction data from the first queue and generating a first intermediate file corresponding to the identifier of the first queue;

[0019] sorting each first transaction data in the first intermediate file according to the feature information of the first transaction data in the first intermediate file and a preset sorting strategy to obtain a first sub-file;

[0020] for each second queue, reading second transaction data from the second queue and generating a second intermediate file corresponding to the identifier of the second queue;

[0021] According to the characteristic information of each second transaction data included in the second intermediate file and a preset sorting strategy, the second transaction data included in the second intermediate file is sorted to obtain a second sub-file.

[0022] In one of the embodiments, the characteristic information includes transaction institution identification and transaction time; and the sorting of the first transaction data included in the first intermediate file according to the characteristic information of each first transaction data and a preset sorting strategy to obtain a first sub-file includes:

[0023] According to the first transaction institution identification of each first transaction data included in the first intermediate file, the first sorting processing is performed on each first transaction data.

[0024] For each first transaction institution identification, the second sorting processing is performed on the first transaction data corresponding to the first transaction institution identification among the first transaction data after the first sorting processing according to the transaction time of the first transaction data corresponding to the first transaction institution identification, to obtain a first sub-file.

[0025] In one of the embodiments, the sorting of the second transaction data included in the second intermediate file according to the characteristic information of each second transaction data and a preset sorting strategy to obtain a second sub-file includes:

[0026] According to the second transaction institution identification of each second transaction data included in the second intermediate file, the third sorting processing is performed on each second transaction data.

[0027] For each second transaction institution identification, the fourth sorting processing is performed on the second transaction data corresponding to the second transaction institution identification among the second transaction data after the third sorting processing according to the transaction time of the second transaction data corresponding to the second transaction institution identification, to obtain a second sub-file.

[0028] In one of the embodiments, the transaction data checking of the first sub-file and the second sub-file matched by the identification to obtain a plurality of sub-checking results, and the transaction data checking result in a current reconciliation period based on each sub-checking result includes:

[0029] For each set of the first sub-file and the second sub-file matched by the identification, the first characteristic information of each transaction data included in the first sub-file is compared with the second characteristic information of each transaction data included in the second sub-file, and the first target transaction data with different first characteristic information and second characteristic information is identified from the first sub-file, and the second target transaction data with different second characteristic information and first characteristic information is identified from the second sub-file.

[0030] Based on the first target transaction data and the second target transaction data, a transaction data reconciliation result in a current reconciliation period is obtained.

[0031] In one of the embodiments, the transaction data reconciliation result includes first difference transaction data of the first system and second difference transaction data of the second system; the obtaining of the first batch transaction data of the first system and the second batch transaction data of the second system in the current reconciliation period includes:

[0032] obtaining first current transaction data of the first system and second current transaction data of the second system in the current reconciliation period;

[0033] in the case that there is first difference transaction data of the first system in a historical reconciliation period, taking a union of the first difference transaction data and the first current transaction data as the first batch transaction data;

[0034] in the case that there is second difference transaction data of the second system in the historical reconciliation period, taking a union of the second difference transaction data and the second current transaction data as the second batch transaction data.

[0035] In one of the embodiments, the method further includes:

[0036] for each of the first queues, writing a first end identifier in the first queue in the case that all transaction data contained in the first data group corresponding to the first queue is stored into the first queue; the first end identifier is used to indicate that a corresponding first sub-file is generated based on transaction data read from the first queue;

[0037] for each of the second queues, writing a second end identifier in the second queue in the case that all transaction data contained in the second data group corresponding to the second queue is stored into the second queue; the second end identifier is used to indicate that a corresponding second sub-file is generated based on transaction data read from the second queue.

[0038] In a second aspect, the application further provides a transaction data reconciliation device. The device includes:

[0039] an obtaining module, configured to obtain first batch transaction data of a first system and second batch transaction data of a second system in a current reconciliation period;

[0040] a grouping module, configured to divide each first transaction data contained in the first batch transaction data into a plurality of first data groups by using a preset grouping strategy, and divide each second transaction data contained in the second batch transaction data into a plurality of second data groups;

[0041] a storage module, configured to store, for each of the first data groups, first transaction data included in the first data group into a first queue corresponding to the first data group, and store, for each of the second data groups, second transaction data included in the second data group into a second queue corresponding to the second data group; the first queue and the second queue are in one-to-one correspondence with each other;

[0042] a generation module, configured to read transaction data from each of the first queues, and generate a plurality of first sub-files corresponding to the first queues, and read transaction data from each of the second queues, and generate a plurality of second sub-files corresponding to the second queues;

[0043] a checking module, configured to check transaction data of the first sub-files and the second sub-files matched in identification, to obtain a plurality of sub-checking results, and obtain a transaction data checking result in a current reconciliation period based on each of the sub-checking results.

[0044] In one of the embodiments, the grouping module is specifically configured to:

[0045] determine first feature information of each first transaction data included in the first batch of transaction data, and divide the first transaction data with the same first feature information into the same first data group; determine second feature information of each second transaction data included in the second batch of transaction data, and divide the second transaction data with the same second feature information into the same second data group; the first data group and the second data group are in one-to-one correspondence with each other.

[0046] In one of the embodiments, the grouping module is specifically configured to:

[0047] perform clustering processing on each of the first transaction data according to feature information of each first transaction data included in the first batch of transaction data by using a clustering algorithm, to obtain a plurality of first data groups; perform clustering processing on each of the second transaction data according to feature information of each second transaction data included in the second batch of transaction data by using the clustering algorithm, to obtain a plurality of second data groups.

[0048] In one of the embodiments, the generation module is specifically configured to:

[0049] For each of the first queues, first transaction data is read from the first queue, a first intermediate file corresponding to the identity of the first queue is generated; according to the feature information of each first transaction data contained in the first intermediate file and a preset sorting strategy, each first transaction data contained in the first intermediate file is sorted to obtain a first sub-file; for each of the second queues, second transaction data is read from the second queue, a second intermediate file corresponding to the identity of the second queue is generated; according to the feature information of each second transaction data contained in the second intermediate file and a preset sorting strategy, each second transaction data contained in the second intermediate file is sorted to obtain a second sub-file.

[0050] In one of the embodiments, the feature information includes transaction institution identity and transaction time; and the generation module is specifically configured to: according to the first transaction institution identity of each first transaction data contained in the first intermediate file, each first transaction data is subjected to first sorting processing; for each of the first transaction institution identities, according to the transaction time of each first transaction data corresponding to the first transaction institution identity, each first transaction data after the first sorting processing, each first transaction data corresponding to the first transaction institution identity is subjected to second sorting processing to obtain the first sub-file.

[0051] In one of the embodiments, the generation module is specifically configured to:

[0052] According to the second transaction institution identity of each second transaction data contained in the second intermediate file, each second transaction data is subjected to third sorting processing; for each of the second transaction institution identities, according to the transaction time of each second transaction data corresponding to the second transaction institution identity, each second transaction data after the third sorting processing, each second transaction data corresponding to the second transaction institution identity is subjected to fourth sorting processing to obtain the second sub-file.

[0053] In one of the embodiments, the checking module is specifically configured to:

[0054] For each of the first sub-file and the second sub-file matched in each group of identities, the first feature information of each transaction data contained in the first sub-file is compared with the second feature information of each transaction data contained in the second sub-file, first target transaction data in which the first feature information is different from the second feature information is identified from the first sub-file, and second target transaction data in which the second feature information is different from the first feature information is identified from the second sub-file; based on each of the first target transaction data and the second target transaction data, a transaction data checking result in a current reconciliation period is obtained.

[0055] In one of the embodiments, the transaction data reconciliation result includes first difference transaction data of the first system and second difference transaction data of the second system; and the obtaining module is specifically configured to:

[0056] obtain first current transaction data of the first system and second current transaction data of the second system in a current reconciliation period; in a case where there is first difference transaction data of the first system in a historical reconciliation period, combine the first difference transaction data and the first current transaction data as first batch transaction data; and in a case where there is second difference transaction data of the second system in a historical reconciliation period, combine the second difference transaction data and the second current transaction data as second batch transaction data.

[0057] In one of the embodiments, the apparatus further includes:

[0058] the first writing module is configured to, for each of the first queues, write a first end identifier in the first queue in a case where all transaction data contained in the first data group corresponding to the first queue is stored into the first queue; the first end identifier is used to indicate that a corresponding first sub-file is generated based on transaction data read from the first queue.

[0059] the second writing module is configured to, for each of the second queues, write a second end identifier in the second queue in a case where all transaction data contained in the second data group corresponding to the second queue is stored into the second queue; the second end identifier is used to indicate that a corresponding second sub-file is generated based on transaction data read from the second queue.

[0060] 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 steps of the method in the first aspect when executing the computer program.

[0061] In a fourth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program implements the steps of the method in the first aspect when executed by a processor.

[0062] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and the computer program implements the steps of the method in the first aspect when executed by a processor.

[0063] The aforementioned transaction data verification method, apparatus, computer equipment, storage medium, and computer program product group the batch transaction data recorded by both systems into multiple smaller or controllable sub-files. The sub-files from both systems have one-to-one correspondence in their identifiers. By verifying the data in the sub-files with matching identifiers, the transaction data verification result between the two systems can be obtained. Since the grouping strategies for the batch transaction data are the same in both systems, identical transaction data recorded by both systems can be grouped into sub-files with matching identifiers. Therefore, only the sub-files with matching identifiers need to be verified; it is not necessary to compare each transaction record from one system with the full amount of transaction data recorded by the other system. Thus, this method can improve the efficiency of transaction data verification. Furthermore, the data verification process for each group of sub-files with matching identifiers can be processed in parallel to further improve data verification efficiency. Attached Figure Description

[0064] Figure 1 This is a diagram illustrating the application environment of a transaction data verification method in an example.

[0065] Figure 2 This is a flowchart illustrating a transaction data verification method in one embodiment;

[0066] Figure 3 This is a diagram illustrating the data read / write process in an example.

[0067] Figure 4 This is a schematic diagram of the data verification process in an example;

[0068] Figure 5 This is a flowchart illustrating the process of generating sub-files in one embodiment;

[0069] Figure 6 This is a flowchart illustrating the process of obtaining transaction data verification results in one embodiment;

[0070] Figure 7 This is a schematic diagram of the process for obtaining batch transaction data in one embodiment;

[0071] Figure 8 This is a structural block diagram of a transaction data verification device in one embodiment;

[0072] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0073] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0074] First, before specifically introducing the technical solutions of the embodiments of the present application, the technical background or the technical evolution context based on which the embodiments of the present application are introduced. In the financial field, when the upstream and downstream applications or cooperation parties are connected, it is often necessary to check the results of the relevant account processing of the two systems in the form of transaction data files. For example, daily or weekly checks can be performed as needed. In related technologies, batch transaction data is generally imported into a database, and the transaction data of the two systems is checked through database table insertion. However, as the amount of transaction data gradually increases, the efficiency of processing large amounts of data through database tables is low, and it generally takes several hours. The requirement for database resources is getting higher and higher, and when the original resources cannot match the data volume, resource expansion or upgrading is needed, which is costly and has poor scalability.

[0075] Based on this background, the applicant proposes a transaction data checking method through long-term research and development and experimental verification. By splitting large amounts of transaction data into multiple data volume controllable sub-files, and the data grouping strategies of the two systems are the same, the same transaction data recorded by the two systems can be divided into sub-files with matching identifiers, so that only the data of the sub-files with matching identifiers needs to be checked, and multiple sub-files with matching identifiers can be processed in parallel, thereby improving the efficiency of transaction data checking. In addition, the requirement for computing resources is lower when checking a small amount of data. And as the amount of transaction data increases, the data volume of the sub-files can be controlled through the grouping strategy, so that the data volume of the sub-files matches the computing resources, and thus the scalability of the method is good. In addition, it should be noted that the applicant has made a lot of creative labor in discovering the technical problems of the present application and introducing the technical solutions of the embodiments described below.

[0076] The transaction data checking method provided by the embodiments of the present application can be applied to the application environment as shown in Figure 1 . Among them, the computer device 102 can communicate with the first system 104 and the second system 106 respectively. The first system 104 and the second system 106 can be the business systems of two different financial institutions. Among them, the computer device 102 can be a separate computer device, or a computer device in the first system 104 or the second system 106. The computer device 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, servers, server clusters, etc., and the first system 104 and the second system 106 can be realized by terminals and / or servers respectively.

[0077] In one embodiment, as shown in Figure 2 , a transaction data checking method is provided, which can be applied to the computer device in Figure 1 . In this embodiment, the method comprises the following steps:

[0078] In step 201, a first batch of transaction data of a first system and a second batch of transaction data of a second system in a current reconciliation period are acquired.

[0079] In implementation, the first system and the second system can respectively send the batch of transaction data in the current reconciliation period to the computer device. The current reconciliation period can be set as needed, for example, it can be daily reconciliation of all transaction data recorded by the two systems on the same day, and the reconciliation period can also be shortened to realize quasi-real-time processing, such as setting the reconciliation period to 10 minutes, 1 hour, etc.

[0080] In step 202, a preset grouping strategy is used to divide each first transaction data contained in the first batch of transaction data into a plurality of first data groups, and each second transaction data contained in the second batch of transaction data into a plurality of second data groups.

[0081] In implementation, the grouping strategy can be to divide transaction data containing the same or similar characteristic information into the same data group. The characteristic information can be transaction region identification, business identification, etc. contained in the transaction data, or characteristic information obtained by mapping or other processing according to the information contained in the transaction data, such as consistent hash calculation of the unique identification (such as transaction serial number, etc.) of the transaction data, and the obtained hash value as the characteristic information. The grouping strategy can be based on a single characteristic information for grouping, or based on multiple characteristic information for grouping. The number of data groups can be set based on the amount of transaction data and computing resources or computing performance. The number of first data groups and second data groups can be the same, and the identification of each first data group and second data group can be one-to-one corresponding.

[0082] The computer device can divide each first transaction data contained in the first batch of transaction data into a plurality of first data groups, and each second transaction data contained in the second batch of transaction data into a plurality of second data groups, so that the amount of transaction data in each first data group and each second data group is small or controllable. Moreover, the same transaction data recorded in the first system and the second system can be divided into the first data group and the second data group with the same grouping strategy.

[0083] In step 203, for each first data group, the first transaction data contained in the first data group is stored into a first queue corresponding to the first data group, and for each second data group, the second transaction data contained in the second data group is stored into a second queue corresponding to the second data group.

[0084] Wherein, the identification of the first queue and the second queue is one-to-one corresponding.

[0085] In implementation, the computer device can store the transaction data contained in each data group into a corresponding queue, and the identity of the first queue corresponding to the first data group corresponds to the identity of the second queue corresponding to the second data group.

[0086] For example, after the computer device obtains the source file A of the first batch of transaction data of the first system, the computer device can read each transaction data ai in the source file A through a reading thread, determine the data group Ak corresponding to ai according to the grouping strategy, and then store the transaction data ai into the queue A corresponding to the data group Ak. k Similarly, the computer device can read each transaction data bi in the source file B of the second batch of transaction data of the second system, and store the transaction data bi into the queue B. k

[0087] In some examples, the first batch of transaction data and the second batch of transaction data can be multiple source files. In order to improve processing efficiency, the computer device can use multiple reading threads equal to the number of source files to read the transaction data of each source file, so as to group and store each transaction data into a corresponding queue. As shown in FIG. 3, the computer device obtains M source files A1-AM of the batch of transaction data of the first system, and can use M reading threads to read the transaction data of each source file. Optionally, one reading thread can correspond to one source file, or one reading thread can correspond to multiple source files. Figure 3

[0088] Step 204, reading the transaction data from each first queue to generate multiple first sub-files corresponding to the identity of the first queue, and reading the transaction data from each second queue to generate multiple second sub-files corresponding to the identity of the second queue.

[0089] In implementation, the computer device can read the transaction data from each queue through a reading and writing thread, and write the transaction data into a sub-file corresponding to the queue. Since the identity of the first queue and the second queue corresponds to each other, the identity of each first sub-file and second sub-file also corresponds to each other. For example, the computer device can read the transaction data from the first queue A k , write the transaction data into the first sub-file F Ak , read the transaction data from the second queue B k , and write the transaction data into the second sub-file F Bk . The first sub-file F Ak corresponds to or matches the second sub-file F Bk , such as F A1 matches F B1 , F A2 matches F B2 .

[0090] ​​Step 205: Verify the transaction data of the first and second sub-files with matching identifiers to obtain multiple sub-verification results, and obtain the transaction data verification results of the first system and the second system based on each sub-verification result.

[0091] In implementation, the computer device can identify the first sub-file and the second sub-file that match, such as the first sub-file F. Ak Second sub-file F Bk The data from each transaction contained herein is compared. The verification method can use database tables, such as comparing F... Ak The data in the file is compared with F one by one. Bk All data in the file were checked, and F was... Bk The data in the file is compared with F one by one. Ak The entire data in the first and second sub-files is reconciled to identify any discrepancies or inconsistencies. Then, the computer equipment generates sub-reconciliation results for the two sub-files based on the identified discrepancies. These sub-reconciliation results can then be merged to obtain the final transaction data reconciliation result for the first and second systems within the current reconciliation period.

[0092] Optional, such as Figure 4 As shown, the computer device can employ multiple verification threads to check the first sub-file F that matches each set of identifiers. Ak Second sub-file F Bk The system performs verification and stores the results (such as discrepancies in transaction data) in a result queue. Data can be read from the result queue and written to a result file using read / write threads. This enables multi-threaded concurrent processing, improving processing efficiency.

[0093] In the aforementioned transaction data verification method, the batch transaction data recorded by both systems is grouped into multiple smaller or controllable sub-files. The sub-files from both systems have one-to-one correspondence in their identifiers. Data verification is then performed on the sub-files with matching identifiers to obtain the transaction data verification results for both systems. Since the grouping strategies for the batch transaction data are the same in both systems, identical transaction data recorded by both systems can be grouped into sub-files with matching identifiers. Therefore, only the sub-files with matching identifiers need to be verified, eliminating the need to compare each transaction record from one system with the full transaction data recorded by the other system. This method improves the efficiency of transaction data verification. Furthermore, the data verification process for each group of sub-files with matching identifiers can be processed in parallel to further improve verification efficiency. Additionally, because the data volume of each sub-file is small, the computational resource requirements are low. Even as the batch transaction data from each system gradually increases, the data volume of each sub-file can be controlled through the grouping strategy, ensuring that the amount of verification data matches existing computational resources. Therefore, this method has better scalability.

[0094] In addition, in the file splitting process in the method, after grouping the transaction data, the transaction data is stored in the queue corresponding to the data group, so as to read the transaction data from the queue and write the transaction data into the corresponding sub-file. That is, the queue is used as the link between the read thread for reading data from the source data and the read-write thread for writing the sub-file. Through the setting of the queue, the flexibility of data processing can be improved, and the overall processing efficiency and resource consumption are taken into account. Especially for the batch transaction data containing multiple source files, the number of source files, the data volume of batch transaction data, the number of read threads for reading source files and the reading speed, the number of read-write threads for writing sub-files and the read-write speed can be comprehensively considered, and a proper number of queues are set as the link to take into account the processing efficiency and resource consumption.

[0095] In one embodiment, the process of data grouping in step 202 specifically includes the following steps: determining the first characteristic information of each first transaction data contained in the first batch transaction data, and dividing the first transaction data with the same first characteristic information into the same first data group; determining the second characteristic information of each second transaction data contained in the second batch transaction data, and dividing the second transaction data with the same second characteristic information into the same second data group; the identification of the first data group and the second data group are one-to-one corresponding.

[0096] In implementation, the computer device can extract the characteristic information from each transaction data. The characteristic information can be the transaction region identifier, business identifier and other information contained in the transaction data, or the characteristic information obtained by mapping or other processing according to the information contained in the transaction data, such as the hash value obtained by consistent hash calculation of the unique identifier (such as transaction serial number) of the transaction data as the characteristic information. Then, the computer device can divide the transaction data with the same characteristic information in the first transaction data of the first system into the same first data group, and divide the transaction data with the same characteristic information in the second transaction data of the second system into the same second data group. Moreover, the identification of the first data group and the second data group are one-to-one corresponding. Thus, for the same transaction data recorded by the first system and the second system, the same characteristic information can be extracted and divided into the first data group and the second data group with matching identification.

[0097] In one example, the feature information can be a transaction region identifier, i.e., the transaction data is grouped according to the transaction region identifier of each transaction data. It can be understood that, due to the different transaction data volume of different transaction regions, in order to balance the data volume of each data group, the transaction regions can be grouped according to the historical transaction volume of each transaction region, so that the transaction volume in each group is balanced. That is, the same data group can correspond to multiple transaction region identifiers, and the data group identifier and the transaction region identifier can be stored in correspondence in advance, so that the computer device can determine the data group identifier corresponding to the transaction region identifier of each transaction data according to the correspondence, so as to realize grouping of each transaction data.

[0098] In this embodiment, by dividing the transaction data with the same feature information into the same data group, and the grouping strategies of the transaction data of the two systems are the same and the data group identifiers are one-to-one corresponding, the same transaction data recorded by the two systems can be divided into the data groups with the matched identifiers, so as to realize splitting of a large amount of data into multiple sub-files, and the data checking of the sub-files with the matched identifiers can be realized, which can avoid full data comparison of the two systems and has high checking efficiency.

[0099] In one embodiment, another grouping method is also provided, and the process of data grouping in step 202 specifically includes the following steps: according to the feature information of each first transaction data contained in the first batch of transaction data, performing clustering processing on each first transaction data by using a clustering algorithm to obtain multiple first data groups; and according to the feature information of each second transaction data contained in the second batch of transaction data, performing clustering processing on each second transaction data by using a clustering algorithm to obtain multiple second data groups.

[0100] In implementation, the feature information can be vector information mapped by each transaction data, or multiple key information (such as data length information, transaction time information, transaction region identifier, service identifier, unique identifier, etc.) extracted from the transaction data. The computer device can perform clustering processing on each transaction data based on the feature information of each transaction data by using a clustering algorithm (such as k-means clustering algorithm, etc.), so as to divide the transaction data with the same or similar feature information into the same class, and the transaction data in the same class is the transaction data of the same data group. Thus, each transaction data of the first system can be divided into multiple first data groups, and each transaction data of the second system can be divided into multiple second data groups. And due to the use of the same clustering algorithm, the same transaction data recorded by the two systems will be divided into the classes with the matched identifiers, i.e., the data groups with the matched identifiers.

[0101] The embodiment provides an implementation manner of data grouping, which can realize splitting of a large amount of data into multiple data groups, and the same transaction data recorded by the two systems can be divided into the data groups with the matched identifiers, so as to realize data checking of the sub-files with the matched identifiers in the subsequent process, and improve the checking efficiency.

[0102] In one embodiment, as shown in FIG. 2B, the process of generating the sub-file in step 204 specifically includes the following steps: Figure 5

[0103] Step 501, for each first queue, reading first transaction data from the first queue, and generating a first intermediate file corresponding to the identification of the first queue.

[0104] In implementation, the computer device can read first transaction data from each first queue A k and write into the corresponding first intermediate file through the read-write thread. As shown in FIG. 5A, there can be multiple read-write threads, and one read-write thread can correspond to one queue. In other examples, one read-write thread can also correspond to multiple queues. Optionally, the number of queues can be 2-3 times the number of read-write threads, that is, one read-write thread can correspond to 2 or 3 queues, so as to balance the processing efficiency and resource consumption. Figure 3

[0105] Step 502, according to the characteristic information of each first transaction data contained in the first intermediate file and the preset sorting strategy, sorting each first transaction data contained in the first intermediate file to obtain a first sub-file.

[0106] In implementation, the computer device can sort each first transaction data contained in the first intermediate file according to the characteristic information of the transaction data to obtain the first sub-file. That is, the first sub-file is the file obtained after sorting the first sub-file. The characteristic information can be transaction time, unique identifier (such as transaction serial number), etc.

[0107] Step 503, for each second queue, reading second transaction data from the second queue, and generating a second intermediate file corresponding to the identification of the second queue.

[0108] In implementation, the computer device can read second transaction data from each second queue B k and write into the corresponding second intermediate file through the read-write thread.

[0109] Step 504, according to the characteristic information of each second transaction data contained in the second intermediate file and the preset sorting strategy, sorting each second transaction data contained in the second intermediate file to obtain a second sub-file.

[0110] In implementation, the computer device can use the same sorting strategy as in step 502 to sort each second transaction data contained in the second intermediate file to obtain the second sub-file.

[0111] ​​In this embodiment, after grouping the batch transaction data to form multiple files, the transaction data in each file can be sorted. Based on the first sub-file and the second sub-file sorted by the same method, data checking can be performed more quickly, and the data checking efficiency is improved.

[0112] In one embodiment, an implementation of sorting is provided, and the feature information in step 502 includes transaction institution identification and transaction time. The process of obtaining the first sub-file in step 502 specifically includes the following steps:

[0113] S1, performing first sorting processing on each first transaction data according to the first transaction institution identification of each first transaction data included in the first intermediate file.

[0114] In implementation, the computer device can perform first sorting processing on the first transaction data included in each first intermediate file according to the transaction institution identification of the transaction data.

[0115] S2, for each first transaction institution identification, performing second sorting processing on each first transaction data corresponding to the first transaction institution identification among the first transaction data after the first sorting processing, according to the transaction time of each first transaction data corresponding to the first transaction institution identification, to obtain the first sub-file.

[0116] In implementation, after the computer device sorts the transaction data according to the transaction institution identification, the computer device can perform second sorting processing on each transaction data corresponding to each transaction institution identification according to the transaction time of each transaction data, to obtain the first sub-file. That is, the first sub-file is obtained after the first sorting processing and the second sorting processing on the first intermediate file.

[0117] In another embodiment, the process of obtaining the second sub-file in step 504 specifically includes the following steps: performing third sorting processing on each second transaction data according to the second transaction institution identification of each second transaction data included in the second intermediate file; for each second transaction institution identification, performing fourth sorting processing on each second transaction data corresponding to the second transaction institution identification among the second transaction data after the third sorting processing, according to the transaction time of each second transaction data corresponding to the second transaction institution identification, to obtain the second sub-file.

[0118] In implementation, the computer device can use the same sorting method to obtain the first sub-file to sort the transaction data included in each second intermediate file, to obtain the second sub-file. The specific process is described in steps S1 to S2, which will not be repeated here.

[0119] In this embodiment, each transaction data is sorted by the joint sorting method based on the transaction institution identification and the transaction time, to generate the corresponding sub-file, which is beneficial to subsequent data checking and improves the data checking efficiency.

[0120] In one embodiment, an implementation of a data reconciliation process is provided. As shown in FIG. 2, the process of obtaining the transaction data reconciliation result in step 205 specifically includes the following steps: Figure 6

[0121] In step 601, for each set of matched first and second sub-files, the first characteristic information of each transaction data contained in the first sub-file is compared with the second characteristic information of each transaction data contained in the second sub-file, and the first target transaction data whose first characteristic information is different from the second characteristic information is identified from the first sub-file, and the second target transaction data whose second characteristic information is different from the first characteristic information is identified from the second sub-file.

[0122] In implementation, the computer device can perform data reconciliation according to the characteristic information of the transaction data to identify the first target transaction data in the first sub-file whose characteristic information is different from that of each transaction data in the second sub-file, and the second target transaction data in the second sub-file whose characteristic information is different from that of each transaction data in the first sub-file. The characteristic information can be one or more information such as transaction time and unique identifier (e.g. transaction serial number). If there are multiple information, any information different from the other is the target transaction data with difference.

[0123] Optionally, the first and second sub-files can be files sorted according to the same sorting strategy. In this way, the data comparison can be performed one by one according to the arrangement order of the transaction data. Specifically, the sorting code of the first transaction data a1 in the first sub-file can be compared with that of the first transaction data b1 in the second sub-file. The sorting code refers to the sorting basis information. If the sorting is performed according to the unique identifier, the sorting code is the unique identifier. If the sorting is performed according to the transaction institution identifier and transaction time, the sorting code is the transaction institution identifier and transaction time. If the sorting codes of the transaction data a1 and b1 are different, the transaction data with larger sorting code (sorted earlier) is regarded as abnormal transaction data. For example, if it is determined that the sorting code of a1 is larger, the second transaction data a2 in the first sub-file where the abnormal transaction data a1 is located is compared with the sorting code of the first transaction data b1 in the second sub-file. If the sorting codes of a2 and b1 are the same, further comparison of other characteristic information (e.g. unique identifier, amount information, etc.) to be reconciled can be performed. If all the other characteristic information are the same, the two transaction data are the same and are normal data. Then, the next transaction data a3 in the first sub-file can be compared with the next transaction data b2 in the second sub-file, until all the transaction data in one sub-file are reconciled. If there are still transaction data to be reconciled in the other sub-file, all the transaction data to be reconciled are abnormal data with difference.

[0124] ​Optionally, in the process of checking the first sub-file and the second sub-file after sorting, a data duplication checking step can also be included. For example, before comparing the second transaction data a2 in the first sub-file with the transaction data in the second sub-file, the transaction data a2 can be compared with the first transaction data a1 (adjacent and sorted in front) in the first sub-file first. If they are the same, it is duplicate data, and the duplicate data can be marked. Since the first transaction data that is the same as the data has been compared with the second sub-file, the duplicate data does not need to be compared again, and the comparison result of the first transaction data can be directly synchronized to the duplicate data. In this way, the comparison of duplicate data can be avoided, and the comparison efficiency can be further improved.

[0125] In step 602, a transaction data comparison result in the current reconciliation period is obtained based on each first target transaction data and second target transaction data.

[0126] In implementation, after the computer device identifies the target transaction data with differences included in each sub-file, the set of each first target transaction data can be taken as the first difference transaction data of the first system, the set of each second target transaction data can be taken as the second difference transaction data of the second system, and the difference transaction data of the first system and the second system can be taken as the transaction data comparison result in the current reconciliation period. The transaction data comparison result can also include other information, such as basic information of the data compared in the current reconciliation period, comparison time, etc. If there is duplicate data in the transaction data recorded by each system, a duplicate data file can also be output.

[0127] The embodiment provides an implementation manner of a data comparison process. The comparison is based on the feature information of transaction data, and the transaction data with differences between two systems can be quickly identified.

[0128] In one embodiment, the transaction data comparison result includes first difference transaction data of the first system and second difference transaction data of the second system. As shown in Figure 7 The process of obtaining batch transaction data in step 201 specifically includes the following steps:

[0129] In step 701, first current transaction data of the first system and second current transaction data of the second system in the current reconciliation period are obtained.

[0130] In implementation, the first system and the second system can send the current transaction data in the current reconciliation period to the computer device for data comparison. It can be understood that the arrival times of the source files of transaction data sent by the system can be inconsistent, and the computer device can match the corresponding reconciliation period according to the receiving times of receiving each source file. Thus, the computer device can obtain the current transaction data to be compared in the current reconciliation period.

[0131] In step 702, in the case that there is first difference transaction data of the first system in the historical reconciliation period, a union of the first difference transaction data and the first current transaction data is taken as the first batch transaction data.

[0132] In implementation, the historical reconciliation period can be the last or several last reconciliation periods. If there is first difference transaction data of the first system in the transaction data reconciliation result in the historical reconciliation period, a union of the first difference transaction data and the first current transaction data can be taken as the first batch transaction data of the first system for data reconciliation in the current reconciliation period. If there is no first difference transaction data of the first system in the transaction data reconciliation result in the historical reconciliation period, the first current transaction data can be directly taken as the first batch transaction data of the first system.

[0133] In step 703, in the case that there is second difference transaction data of the second system in the historical reconciliation period, a union of the second difference transaction data and the second current transaction data is taken as the second batch transaction data.

[0134] In implementation, if there is second difference transaction data of the second system in the transaction data reconciliation result in the historical reconciliation period, a union of the second difference transaction data and the second current transaction data can be taken as the second batch transaction data of the second system for data reconciliation in the current reconciliation period. If there is no second difference transaction data of the second system in the transaction data reconciliation result in the historical reconciliation period, the second current transaction data can be directly taken as the second batch transaction data of the second system.

[0135] In the embodiment, the batch transaction data for reconciliation in the current reconciliation period can be a union of the current transaction data sent by the system in the current reconciliation period and the difference transaction data in the transaction data reconciliation result in the historical reconciliation period. Due to the influence of network delay, the current transaction data sent by each system does not necessarily arrive in the same batch, that is, there is a problem of multiple batches arriving out of order. Therefore, the difference transaction data in the historical reconciliation period and the newly arrived current transaction data can be taken together to further reconcile in the current reconciliation period, thereby reducing the problem of misidentifying normal transaction data as difference transaction data due to delay and improving the accuracy of data reconciliation.

[0136] In one embodiment, the method further comprises the following steps: for each first queue, writing a first end identifier in the first queue in a case that all transaction data contained in the first data group corresponding to the first queue is stored into the first queue; the first end identifier is used to indicate that the corresponding first sub-file is generated based on the transaction data read from the first queue; for each second queue, writing a second end identifier in the second queue in a case that all transaction data contained in the second data group corresponding to the second queue is stored into the second queue; the second end identifier is used to indicate that the corresponding second sub-file is generated based on the transaction data read from the second queue.

[0137] In implementation, when the computer device groups and stores the transaction data of the source file into the queue, the end identifier can be written in the queue after all transaction data in the current reconciliation period is stored into the queue. Thus, when the read-write thread reads the data in the queue, if the end identifier is read, the processing can be ended, and the sub-file is generated based on the read transaction data. It can be understood that if multiple read threads are used to read the data in multiple source files, after each read thread reads all data in the corresponding source file and stores the data into the queue, the end identifier can be written respectively, that is, the number of end identifiers in one queue is the same as the number of read threads. When the read-write thread reads the target number of end identifiers, the processing can be ended, and the sub-file is generated based on the read transaction data.

[0138] In the embodiment, by writing the end identifier in the queue, it is indicated that the data in the current reconciliation period is read, and the sub-file can be generated for data reconciliation.

[0139] It should be understood that although each step in the flowchart involved in each embodiment described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps has no strict sequence limitation, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.

[0140] Based on the same inventive concept, the embodiments of the present application further provide a transaction data checking device for implementing the transaction data checking method as described above. The device provides a solution to the problem in a similar manner as the implementation solution described in the above method, and therefore the specific limitations in one or more transaction data checking device embodiments provided below can refer to the limitations of the transaction data checking method described above, which will not be repeated here.

[0141] In one embodiment, as shown in Figure 8 a transaction data checking device 800 is provided, comprising an acquisition module 801, a grouping module 802, a storage module 803, a generation module 804 and a checking module 805, wherein:

[0142] The acquisition module 801 is configured to acquire a first batch of transaction data of a first system and a second batch of transaction data of a second system in a current reconciliation period.

[0143] The grouping module 802 is configured to divide each first transaction data included in the first batch of transaction data into a plurality of first data groups and divide each second transaction data included in the second batch of transaction data into a plurality of second data groups by using a preset grouping strategy.

[0144] The storage module 803 is configured to store the first transaction data included in each first data group into a first queue corresponding to the first data group, and store the second transaction data included in each second data group into a second queue corresponding to the second data group; the first queue and the second queue are in one-to-one correspondence.

[0145] The generation module 804 is configured to read the transaction data from each first queue, generate a plurality of first sub-files corresponding to the identification of the first queue, and read the transaction data from each second queue, generate a plurality of second sub-files corresponding to the identification of the second queue.

[0146] The checking module 805 is configured to check the transaction data of the first sub-file and the second sub-file with the same identification, obtain a plurality of sub-checking results, and obtain a transaction data checking result in the current reconciliation period based on each sub-checking result.

[0147] In one embodiment, the grouping module 802 is specifically configured to determine first feature information of each first transaction data included in the first batch of transaction data, and divide the first transaction data with the same first feature information into the same first data group; determine second feature information of each second transaction data included in the second batch of transaction data, and divide the second transaction data with the same second feature information into the same second data group; the identification of the first data group and the second data group are in one-to-one correspondence.

[0148] In one of the embodiments, the grouping module 802 is specifically configured to: perform clustering processing on each first transaction data according to the characteristic information of each first transaction data included in the first batch of transaction data, to obtain a plurality of first data groups; perform clustering processing on each second transaction data according to the characteristic information of each second transaction data included in the second batch of transaction data, to obtain a plurality of second data groups.

[0149] In one of the embodiments, the generating module 804 is specifically configured to: for each first queue, read the first transaction data from the first queue, and generate a first intermediate file corresponding to the identifier of the first queue; perform sorting on each first transaction data included in the first intermediate file according to the characteristic information of each first transaction data and a preset sorting strategy, to obtain a first sub-file; for each second queue, read the second transaction data from the second queue, and generate a second intermediate file corresponding to the identifier of the second queue; perform sorting on each second transaction data included in the second intermediate file according to the characteristic information of each second transaction data and a preset sorting strategy, to obtain a second sub-file.

[0150] In one of the embodiments, the characteristic information includes a transaction institution identifier and a transaction time. The generating module 804 is specifically configured to: perform first sorting processing on each first transaction data according to the first transaction institution identifier of each first transaction data included in the first intermediate file; for each first transaction institution identifier, perform second sorting processing on each first transaction data corresponding to the first transaction institution identifier among the first sorted first transaction data according to the transaction time of each first transaction data corresponding to the first transaction institution identifier, to obtain the first sub-file.

[0151] In one of the embodiments, the generating module 804 is specifically configured to: perform third sorting processing on each second transaction data according to the second transaction institution identifier of each second transaction data included in the second intermediate file; for each second transaction institution identifier, perform fourth sorting processing on each second transaction data corresponding to the second transaction institution identifier among the third sorted second transaction data according to the transaction time of each second transaction data corresponding to the second transaction institution identifier, to obtain the second sub-file.

[0152] In one of the embodiments, the reconciliation module 805 is specifically configured to: for each group of identifiers, matching the first sub-file and the second sub-file, comparing the first feature information of each transaction data contained in the first sub-file with the second feature information of each transaction data contained in the second sub-file, identifying first target transaction data different in the first feature information and the second feature information from the first sub-file, and identifying second target transaction data different in the second feature information and the first feature information from the second sub-file; and obtaining the transaction data reconciliation result in the current reconciliation period based on the first target transaction data and the second target transaction data.

[0153] In one of the embodiments, the transaction data reconciliation result includes the first difference transaction data of the first system and the second difference transaction data of the second system. The obtaining module 801 is specifically configured to: obtain the first current transaction data of the first system and the second current transaction data of the second system in the current reconciliation period; in the case that the first difference transaction data of the first system in the historical reconciliation period exists, taking the union of the first difference transaction data and the first current transaction data as the first batch transaction data; and in the case that the second difference transaction data of the second system in the historical reconciliation period exists, taking the union of the second difference transaction data and the second current transaction data as the second batch transaction data.

[0154] In one of the embodiments, the apparatus further includes a first writing module and a second writing module, wherein:

[0155] The first writing module is configured to, for each first queue, write a first end identifier in the first queue in the case that all transaction data contained in the first data group corresponding to the first queue is stored in the first queue; and the first end identifier is used to indicate that the corresponding first sub-file is generated based on the transaction data read from the first queue.

[0156] The second writing module is configured to, for each second queue, write a second end identifier in the second queue in the case that all transaction data contained in the second data group corresponding to the second queue is stored in the second queue; and the second end identifier is used to indicate that the corresponding second sub-file is generated based on the transaction data read from the second queue.

[0157] Each module in the transaction data reconciliation apparatus described above can be realized by software, hardware, and combinations thereof, in whole or in part. Each module described above can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.

[0158] In one embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 9As shown in the figure. The computer device includes a processor, a memory and a network interface connected through a system bus. 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 data required or generated in the execution of the above transaction data checking method. The network interface of the computer device is used to communicate with the terminal outside through the network connection. The computer program is executed by the processor to realize a transaction data checking method.

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

[0160] In one embodiment, a computer device is provided, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the steps in each of the above method embodiments.

[0161] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by the processor to realize the steps in each of the above method embodiments.

[0162] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by the processor to realize the steps in each of the above method embodiments.

[0163] The transaction data checking method, device, computer device, storage medium and computer program product provided by the present application relate to the field of big data technology, and can be used in the field of financial technology or other fields. The present application does not limit the application field.

[0164] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.

[0165] 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. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to 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 (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0166] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.

[0167] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for verifying transaction data, characterized in that, The method includes: Retrieve the first batch of transaction data from the first system and the second batch of transaction data from the second system within the current reconciliation period; A preset grouping strategy is adopted to divide each first transaction data contained in the first batch of transaction data into multiple first data groups, and to divide each second transaction data contained in the second batch of transaction data into multiple second data groups; For each first data group, the first transaction data contained in the first data group is stored in the first queue corresponding to the first data group, and for each second data group, the second transaction data contained in the second data group is stored in the second queue corresponding to the second data group; the identifiers of the first queue and the second queue are in one-to-one correspondence. Transaction data is read from each of the first queues to generate multiple first sub-files corresponding to the identifiers of the first queues, and transaction data is read from each of the second queues to generate multiple second sub-files corresponding to the identifiers of the second queues; The transaction data of the first sub-file and the second sub-file that match the identifier is checked to obtain multiple sub-check results, and the transaction data check results within the current reconciliation period are obtained based on each of the sub-check results; The step of reading transaction data from each of the first queues to generate multiple first sub-files corresponding to the identifiers of the first queues, and reading transaction data from each of the second queues to generate multiple second sub-files corresponding to the identifiers of the second queues, includes: For each of the first queues, read the first transaction data from the first queue and generate a first intermediate file corresponding to the identifier of the first queue; Based on the feature information of each first transaction data contained in the first intermediate file and the preset sorting strategy, the first transaction data contained in the first intermediate file are sorted to obtain a first sub-file. For each of the second queues, read the second transaction data from the second queue and generate a second intermediate file corresponding to the identifier of the second queue; Based on the feature information of each second transaction data contained in the second intermediate file and the preset sorting strategy, the second transaction data contained in the second intermediate file are sorted to obtain a second sub-file.

2. The method according to claim 1, characterized in that, The step of employing a preset grouping strategy to divide each first transaction data item contained in the first batch of transaction data into multiple first data groups, and to divide each second transaction data item contained in the second batch of transaction data into multiple second data groups, includes: Determine the first feature information of each first transaction data included in the first batch of transaction data, and divide the first transaction data with the same first feature information into the same first data group; The second feature information of each second transaction data included in the second batch of transaction data is determined, and the second transaction data with the same second feature information are divided into the same second data group; the identifiers of the first data group and the second data group correspond one-to-one.

3. The method according to claim 1, characterized in that, The step of employing a preset grouping strategy to divide each first transaction data item contained in the first batch of transaction data into multiple first data groups, and to divide each second transaction data item contained in the second batch of transaction data into multiple second data groups, includes: Based on the feature information of each first transaction data contained in the first batch of transaction data, a clustering algorithm is used to cluster each first transaction data to obtain multiple first data groups; Based on the feature information of each second transaction data contained in the second batch of transaction data, the clustering algorithm is used to cluster each second transaction data to obtain multiple second data groups.

4. The method according to claim 1, characterized in that, The feature information includes the transaction institution identifier and the transaction time; the step of sorting the first transaction data contained in the first intermediate file according to the feature information of each first transaction data contained in the first intermediate file and a preset sorting strategy to obtain a first sub-file includes: Based on the first transaction institution identifier of each first transaction data contained in the first intermediate file, a first sorting process is performed on each of the first transaction data. For each of the first trading institution identifiers, based on the transaction time of each of the first trading data corresponding to the first trading institution identifier, the first trading data corresponding to the first trading institution identifier in the first sorting process is subjected to a second sorting process to obtain a first sub-file.

5. The method according to claim 4, characterized in that, The step of sorting the second transaction data contained in the second intermediate file according to the feature information of each second transaction data contained in the second intermediate file and a preset sorting strategy to obtain a second sub-file includes: Based on the second transaction institution identifier of each second transaction data contained in the second intermediate file, a third sorting process is performed on each of the second transaction data. For each second trading institution identifier, based on the transaction time of each second trading data corresponding to the second trading institution identifier, the second trading data corresponding to the second trading institution identifier in the third sorting process are sorted in the fourth sorting process to obtain the second sub-file.

6. The method according to claim 1, characterized in that, The step of verifying the transaction data of the first sub-file and the second sub-file with matching identifiers to obtain multiple sub-verification results, and obtaining the transaction data verification result for the current reconciliation period based on each of the sub-verification results, includes: For each set of identifiers matching the first sub-file and the second sub-file, the first feature information of each transaction data contained in the first sub-file is compared with the second feature information of each transaction data contained in the second sub-file. First target transaction data whose first feature information and second feature information are different from those in the first sub-file are identified, and second target transaction data whose second feature information and first feature information are different from those in the second sub-file are identified. Based on the first target transaction data and the second target transaction data, the transaction data verification results within the current reconciliation period are obtained.

7. The method according to claim 1, characterized in that, The transaction data verification results include the first difference transaction data of the first system and the second difference transaction data of the second system; obtaining the first batch transaction data of the first system and the second batch transaction data of the second system within the current reconciliation period includes: Obtain the first current transaction data of the first system and the second current transaction data of the second system within the current reconciliation period; In the case of first discrepancy transaction data in the first system within the historical reconciliation period, the combination of the first discrepancy transaction data and the first current transaction data is taken as the first batch of transaction data; In the case of second difference transaction data in the second system within the historical reconciliation period, the combination of the second difference transaction data and the second current transaction data is used as the second batch transaction data.

8. The method according to claim 1, characterized in that, The method further includes: For each of the first queues, when all transaction data contained in the first data group corresponding to the first queue is stored in the first queue, a first end identifier is written into the first queue; the first end identifier is used to indicate the generation of a corresponding first sub-file based on the transaction data read from the first queue; For each of the second queues, when all transaction data contained in the second data group corresponding to the second queue are stored in the second queue, a second end identifier is written into the second queue; the second end identifier is used to indicate the generation of a corresponding second sub-file based on the transaction data read from the second queue.

9. A transaction data verification device, characterized in that, The device includes: The acquisition module is used to acquire the first batch of transaction data from the first system and the second batch of transaction data from the second system within the current reconciliation period. The grouping module is used to divide each first transaction data contained in the first batch of transaction data into multiple first data groups and to divide each second transaction data contained in the second batch of transaction data into multiple second data groups using a preset grouping strategy. The storage module is used to store the first transaction data contained in each first data group into a first queue corresponding to the first data group, and to store the second transaction data contained in each second data group into a second queue corresponding to the second data group; the identifiers of the first queue and the second queue are in one-to-one correspondence. The generation module is used to read transaction data from each of the first queues, generate multiple first sub-files corresponding to the identifiers of the first queues, and read transaction data from each of the second queues, generate multiple second sub-files corresponding to the identifiers of the second queues; The verification module is used to verify the transaction data of the first sub-file and the second sub-file that match the identifier, obtain multiple sub-verification results, and obtain the transaction data verification result within the current reconciliation period based on each of the sub-verification results; The generation module is specifically used for: For each of the first queues, first transaction data is read from the first queue, and a first intermediate file corresponding to the identifier of the first queue is generated; according to the feature information of each first transaction data contained in the first intermediate file and a preset sorting strategy, the first transaction data contained in the first intermediate file is sorted to obtain a first sub-file; for each of the second queues, second transaction data is read from the second queue, and a second intermediate file corresponding to the identifier of the second queue is generated; according to the feature information of each second transaction data contained in the second intermediate file and a preset sorting strategy, the second transaction data contained in the second intermediate file is sorted to obtain a second sub-file.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Reconciliation method, apparatus, system and computer-readable storage medium

    CN109034993A

  • Transaction account checking method and device, electronic equipment and storage medium

    CN115880085A