Information matching method and device, equipment and storage medium
By identifying and comparing the difference and intersection data of data sources in the data lake, the problem of low information matching efficiency in existing technologies is solved, and efficient matching of large amounts of information is achieved.
Patent Information
- Application Number
- CN202311065633.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-08-23
AI Technical Summary
Existing technologies have relatively simple information matching processing methods, which can only match one online transaction, making it difficult and inefficient to handle large-scale information matching needs.
By storing data from multiple data sources in a data lake, in response to a matching request, the difference set data and intersection data are determined directly based on the first and second matching information in the data lake, and content comparison is performed based on this data to generate matching result data, thus avoiding reliance on online matching.
It achieves efficient processing of large-scale information matching, improves matching efficiency, simplifies operation process, and overcomes the problem of difficulty in handling large-scale information matching needs in existing technologies.
Smart Images

Figure CN116881736B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of big data and financial technology, and more particularly, to an information matching method, device, equipment, medium and program product. BACKGROUND
[0002] With the continuous development of computer technology, a transaction system is generally set in a distributed environment, and different transaction functions are executed by multiple service nodes in the distributed environment. After executing the transaction, the transaction information generated by the multiple service nodes needs to be matched to ensure the consistency of the transaction information.
[0003] In the prior art, information matching is mainly realized through an http interface. For example, servers of multiple transaction systems or service nodes involved in the same transaction information are connected online, one of the transaction systems or service nodes is taken as a host, transaction information from other transaction systems or service nodes is obtained through a host interface, and then the obtained transaction information is matched with the transaction information stored in the host to complete the information matching.
[0004] In the process of implementing the present disclosure, the inventors found that at least the following problems exist in the related art: the information matching processing mode is relatively single, and only one transaction related to online can be matched, resulting in the problems of difficulty in processing a large amount of information matching demand and low efficiency. SUMMARY
[0005] In view of the above problems, the present disclosure provides an information matching method, device, equipment, medium and program product.
[0006] According to a first aspect of the present disclosure, an information matching method is provided, comprising: in response to receiving a request for executing a matching operation, determining first matching information and second matching information, wherein the first matching information comprises M transaction records of at least one data source, the second matching information comprises N transaction records of at least one data source, M≥2, N≥2; determining difference set data and intersection data between the first matching information and the second matching information, wherein the intersection data comprises at least one transaction record that is in both the first matching information and the second matching information, and the difference set data comprises at least one transaction record that is in one of the first matching information or the second matching information; based on the first matching information and the second matching information, performing content comparison on each transaction record in the intersection data to obtain a comparison result; and determining matching result data according to the comparison result and the difference set data.
[0007] According to an embodiment of the present disclosure, the first matching information comprises a first matching table, the second matching information comprises a second matching table, the first matching table and the second matching table each comprise a transaction number, and the determining the difference set data and the intersection data between the first matching information and the second matching information comprises: generating a first database code statement according to a table name of the first matching table and a table name of the second matching table; and obtaining the intersection data and the difference set data by executing the first database code statement and comparing the transaction numbers of the M transaction records with the transaction numbers of the N transaction records.
[0008] According to an embodiment of the present disclosure, the obtaining the intersection data and the difference set data by executing the first database code statement and comparing the transaction numbers of the M transaction records with the transaction numbers of the N transaction records comprises: determining Q transaction records that do not match the transaction numbers of the M transaction records from the N transaction records, with the M transaction records as a reference, N≥Q≥1; determining P transaction records that do not match the transaction numbers of the N transaction records from the M transaction records, with the N transaction records as a reference, M≥P≥1; grouping the P transaction records and the Q transaction records to obtain the difference set data; and determining (M-P) transaction records that match the transaction numbers of the N transaction records from the M transaction records, and taking the (M-P) transaction records as the intersection data, or determining (N-Q) transaction records that match the transaction numbers of the M transaction records from the N transaction records, and taking the (N-Q) transaction records as the intersection data.
[0009] According to an embodiment of the present disclosure, the first matching information comprises a first field value of each of the M transaction records, the second matching information comprises a second field value of each of the N transaction records, and the first field value and the second field value are used to represent a transaction feature of the transaction record; and the content comparison on each transaction record in the intersection data based on the first matching information and the second matching information to obtain a comparison result comprises: generating a second database code statement according to the first matching information and the second matching information; and obtaining the comparison result by executing the second database code statement and comparing the first field value with the second field value.
[0010] According to an embodiment of the present disclosure, the first field value or the second field value comprises a plurality of strings, and each string is used to represent a transaction data of the transaction record; and the plurality of strings are spliced to obtain the first field value or the second field value.
[0011] According to an embodiment of the present disclosure, the matching result data includes matching detail data and matching statistical data; and the determining the matching result data according to the comparison result and the difference set data includes: forming at least one transaction record whose first field value and second field value are not matched according to the comparison result into matching difference data together with the difference set data; forming at least one transaction record whose first field value and second field value are matched according to the comparison result into matching consistent data; and generating the matching detail data and the matching statistical data according to the matching difference data and the matching consistent data.
[0012] According to an embodiment of the present disclosure, the method further includes: exporting the matching result data into a first matching result file in a binary data format; converting the first matching result file into a second matching result file in a target data format by using a big data engine; and transmitting the second matching result file to a file processing server in a distributed system.
[0013] A second aspect of the present disclosure provides an information matching apparatus, including: a first determining module configured to determine first matching information and second matching information in response to receiving a request for performing a matching operation, wherein the first matching information includes M transaction records of at least one data source, the second matching information includes N transaction records of at least one data source, M≥2, N≥2; a second determining module configured to determine difference set data and intersection data between the first matching information and the second matching information, wherein the intersection data includes at least one transaction record that is in both the first matching information and the second matching information, and the difference set data includes at least one transaction record that is in one of the first matching information and the second matching information; a first comparing module configured to perform content comparison on each transaction record in the intersection data based on the first matching information and the second matching information to obtain a comparison result; and a second comparing module configured to determine matching result data according to the comparison result and the difference set data.
[0014] A third aspect of the present disclosure provides an electronic device, including: one or more processors; and a memory storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the information matching method.
[0015] A fourth aspect of the present disclosure further provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the information matching method.
[0016] A fifth aspect of the present disclosure further provides a computer program product including a computer program that, when executed by a processor, implements the information matching method.
[0017] According to an embodiment of the present disclosure, in processing a large batch of information matching requirements, in response to receiving a request for performing a matching operation, first matching information and second matching information are determined; difference set data and intersection data between the first matching information and the second matching information are determined; each transaction record in the intersection data is subjected to content comparison based on the first matching information and the second matching information, to obtain a comparison result; and a matching result data is determined according to the comparison result and the difference set data. The embodiment of the present disclosure can realize the processing of a large batch of information matching by the above technical means, and at least partially overcomes the technical problems of great difficulty and low efficiency in processing a large batch of information matching requirements in the prior art.
[0018] In an embodiment of the present disclosure, data from multiple data sources are all stored into a data lake first, and in response to receiving a request for performing a matching operation, intersection data and difference set data including multiple transaction records are directly obtained based on first matching information and second matching information in the data lake; then batch matching of multiple data sources can be directly realized based on the difference set and the intersection data, without relying on online matching, and without relying on an interface between two data sources to realize single information matching, thereby improving the matching efficiency and realizing simple batch reconciliation. BRIEF DESCRIPTION OF DRAWINGS
[0019] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:
[0020] Figure 1 An application scenario of an information matching method according to an embodiment of the present disclosure is schematically shown;
[0021] Figure 2 A flowchart of an information matching method according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 3 A flowchart of a difference set data determination method according to an embodiment of the present disclosure is schematically shown;
[0023] Figure 4 A flowchart of an intersection data determination method according to an embodiment of the present disclosure is schematically shown;
[0024] Figure 5 A flowchart of a job scheduling method according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 6 A structural block diagram of an information matching apparatus according to an embodiment of the present disclosure is schematically shown; and
[0026] Figure 7A block diagram of an electronic device suitable for an information matching method according to an embodiment of the present disclosure is schematically illustrated. DETAILED DESCRIPTION
[0027] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it is to be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description of the embodiments of the present disclosure, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. However, it will be apparent to one skilled in the art that the embodiments of the present disclosure can be practiced without these specific details. In other instances, well-known structures and functions have been omitted to avoid obscuring the concepts of the present disclosure.
[0028] The terms used herein are merely used to describe specific embodiments and are not intended to limit the present disclosure. The terms "include", "comprise" and the like used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0029] All terms used herein, including technical and scientific terms, have the same meanings as those generally understood by a person skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the specification, and should not be interpreted in an idealized or overly formal manner.
[0030] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should be generally interpreted as having the same meaning as the expression "one or more of the items from the group consisting of A, B, and C" unless otherwise defined. For example, "a system having at least one of A, B, and C" should include but not be limited to a system having A alone, a system having B alone, a system having C alone, a system having both A and B, a system having both A and C, a system having both B and C, and / or a system having A, B, and C, etc.
[0031] In the technical solutions of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information such as location information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved are information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure, and application of related data comply with relevant laws, regulations, and standards of relevant countries and regions, take necessary security measures, do not violate public order and good customs, and provide corresponding operation portals for users to choose authorization or refusal.
[0032] In the prior art, the process of online information matching includes: for transaction information A, connecting the server A, server B and server C involved in the transaction information A, taking one of the server A, server B and server C as a host, obtaining information related to the transaction information A from another server through the interface between the two servers, and matching the obtained information with the locally stored transaction information of the host to determine whether the information of the host and other servers about the transaction information A is consistent.
[0033] However, online information matching can only be performed online for servers related to transaction information, and cannot be matched for other transaction information, resulting in low information matching efficiency. In addition, since the corresponding information is obtained through the online http interface in each information matching process, it is difficult to implement the operation of obtaining information from multiple servers in a batch scenario.
[0034] Therefore, the prior art has the problems of single processing mode, difficulty in processing large batch of information matching requirements, and low efficiency.
[0035] Embodiments of the present disclosure provide an information matching method, which includes determining first matching information and second matching information in response to receiving a request for performing a matching operation, wherein the first matching information includes M transaction records of at least one data source, the second matching information includes N transaction records of at least one data source, M≥2, N≥2; determining difference set data and intersection data between the first matching information and the second matching information, wherein the intersection data includes at least one transaction record that is in both the first matching information and the second matching information, and the difference set data includes at least one transaction record that is in one of the first matching information or the second matching information; performing content comparison on each transaction record in the intersection data based on the first matching information and the second matching information to obtain a comparison result; and determining matching result data according to the comparison result and the difference set data.
[0036] Figure 1 An application scenario of information matching according to an embodiment of the present disclosure is schematically shown.
[0037] As shown in Figure 1 The application scenario 100 according to this embodiment can include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0038] A user can use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0039] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smartphones, tablet computers, laptop computers, desktop computers, etc.
[0040] The server 105 can be a server providing various services, such as a background management server providing support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (only as an example). The background management server can analyze and process received user requests and other data, and feed back the processing results (such as web pages, information, or data, etc. obtained or generated according to user requests) to the terminal device.
[0041] It should be noted that the information matching method provided by the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the information matching apparatus provided by the embodiments of the present disclosure can generally be arranged in the server 105. The information matching method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Accordingly, the information matching apparatus provided by the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0042] For example, a user can perform a transaction operation in a mobile banking client in the first terminal device 101, the second terminal device 102, and the third terminal device 103, and the first terminal device 101, the second terminal device 102, and the third terminal device 103 send transaction information to the server 105, wherein the server 105 is equipped with a data lake. The server 105 determines the first matching information and the second matching information in response to receiving a request for performing a matching operation, determines the difference set data and the intersection data between the first matching information and the second matching information, performs content comparison on each transaction record in the intersection data based on the first matching information and the second matching information to obtain a comparison result, and determines matching result data according to the comparison result and the difference set data.
[0043] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above-mentioned scenarios is only illustrative. Any number of terminal devices, networks and servers can be provided according to implementation needs.
[0044] The information matching method according to the embodiments of the present disclosure will be described below based on the scenarios described above. Figure 1 The information matching method according to the embodiments of the present disclosure will be described below based on the scenarios described above. Figures 2 to 5 The information matching method according to the embodiments of the present disclosure will be described below based on the scenarios described above.
[0045] Figure 2 An illustrative flowchart of the information matching method according to the embodiments of the present disclosure is shown.
[0046] As shown in Figure 2 The method 200 includes operations S210-S240.
[0047] At operation S210, in response to receiving a request for performing a matching operation, first matching information and second matching information are determined.
[0048] According to embodiments of the present disclosure, at a server idle time, for example, at midnight every day, the server can load information from different data sources through a job scheduling task, and record the processed information into a data lake, wherein the information from different data sources includes information required for performing an information matching operation.
[0049] According to embodiments of the present disclosure, a data source includes a source that provides information required for information matching, for example, a computer that provides matching information in a distributed environment.
[0050] According to embodiments of the present disclosure, the first matching information includes at least two transaction records of at least one data source; and the second matching information includes at least two transaction records of at least one data source. The first matching information and the second matching information are from different data sources, for example, different servers in the same distributed environment.
[0051] According to embodiments of the present disclosure, after a client initiates a matching operation, the server determines the information required for performing the matching operation from the data lake in response to receiving a request for performing the matching operation, and determines the first matching information and the second matching information according to the data sources of the information.
[0052] For example, the data source of the first matching information can be a server storing transaction records of a plurality of payee accounts of a payee; and the data source of the second matching information can be a server storing transaction records of a plurality of payer accounts corresponding to a plurality of payers. The server loads the transaction records of the plurality of payee accounts of the payee and the transaction records of the plurality of payer accounts corresponding to the plurality of payers into a data lake through a job scheduling task at an idle time. When the client initiates a matching operation, the server determines the matching information required for performing the matching operation from the data lake, determines that the matching information of the data source of the transaction records of the plurality of payee accounts of the payee is the first matching information, and determines that the matching information of the data source of the transaction records of the plurality of payer accounts corresponding to the plurality of payers is the second matching information.
[0053] In operation S220, difference set data and intersection data between the first matching information and the second matching information are determined.
[0054] According to an embodiment of the present disclosure, the intersection data includes at least one transaction record that is in both the first matching information and the second matching information; and the difference set data includes at least one transaction record that is in one of the first matching information or the second matching information.
[0055] According to an embodiment of the present disclosure, the intersection data and the difference set data can be data tables having a preset format. Each transaction record in the intersection data and the difference set data at least includes a transaction number and transaction record content, wherein the transaction numbers of the same transaction record are the same, that is, the transaction numbers of the same transaction record in the first matching information and the second matching information are the same.
[0056] According to an embodiment of the present disclosure, the transaction record content in the first matching information is referred to as first transaction record content, and the transaction record content in the second matching information is referred to as second transaction record content. The intersection data and the difference set data only include the first transaction record content and the second transaction record content. In the intersection data, the first transaction record content and the second transaction record content are both not empty; and in the difference set data, one of the first transaction record content and the second transaction record content is empty.
[0057] According to an embodiment of the present disclosure, transaction records with different transaction numbers in the first matching information and the second matching information can be grouped into difference set data; and transaction records with different transaction numbers in the first matching information and the second matching information can be grouped into intersection data.
[0058] For example, the first matching information can be table A, and the second matching information can be table B. Table A includes a transaction record with transaction number 1 and a transaction record with transaction number 2, and table B includes a transaction record with transaction number 1 and a transaction record with transaction number 3. Since both table A and table B include data with transaction number 1, intersection data can be generated according to the transaction record with transaction number 1 in table A and the transaction record with transaction number 1 in table B. Since the transaction record with transaction number 2 is only included in table A and the transaction record with transaction number 3 is only included in table B, difference data can be generated according to the transaction record with transaction number 2 and the transaction record with transaction number 3. In the difference data, the first transaction record with transaction number 2 has the same content as the record in table A, and the second transaction record is empty. The first transaction record with transaction number 3 is empty, and the second transaction record has the same content as the record in table B.
[0059] In operation S230, content comparison is performed on each transaction record in the intersection data based on the first matching information and the second matching information, and a comparison result is obtained.
[0060] According to an embodiment of the present disclosure, the comparison result is used to indicate whether the first transaction record content and the second transaction record content contained in each transaction record in the intersection data are the same.
[0061] According to an embodiment of the present disclosure, a value can be assigned to the comparison result corresponding to each transaction record. For example, the comparison result of a transaction record with the same first transaction record content and second transaction record content can be assigned a value of 1, and the comparison result of a transaction record with different first transaction record content and second transaction record content can be assigned a value of 0.
[0062] According to an embodiment of the present disclosure, a comparison result table with a preset format can be generated based on the transaction number and the corresponding comparison result. The comparison result table can include at least the transaction number and the comparison result, and the comparison result and the transaction record are associated through the transaction number.
[0063] In operation S240, the matching result data is determined according to the comparison result and the difference data.
[0064] According to an embodiment of the present disclosure, the matching result data can include data with consistent information and data with inconsistent information.
[0065] Since the intersection data includes transaction records with the same transaction record content and transaction records with different transaction record content, the multiple transaction records with different transaction record content in the intersection data and the multiple transaction records in the difference data can be collectively used as data with inconsistent information, and the multiple transaction records with the same transaction record content can be used as data with consistent information.
[0066] For example, the transaction records with the comparison result of 0 in the intersection data and the transaction records in the difference data can be matched to form the data of inconsistent information matching, and the transaction records with the comparison result of 1 in the intersection data can be matched to form the data of consistent information matching.
[0067] According to an embodiment of the present disclosure, in processing a large batch of information matching requirements, in response to receiving a request for performing a matching operation, determining first matching information and second matching information; determining difference set data and intersection data between the first matching information and the second matching information; performing content comparison on each transaction record in the intersection data based on the first matching information and the second matching information to obtain a comparison result; and determining matching result data according to the comparison result and the difference set data, which can realize batch information matching from multiple data sources. The embodiment of the present disclosure can realize the processing of large batch information matching by the above technical means, and at least partially overcome the technical problems of large difficulty and low efficiency in processing large batch information matching requirements in the prior art.
[0068] In an embodiment of the present disclosure, data from multiple data sources are first stored in a data lake, and in response to receiving a request for performing a matching operation, the intersection data and the difference set data including multiple transaction records are directly obtained based on the first matching information and the second matching information in the data lake; then the batch matching of multiple data sources can be directly realized based on the difference set and the intersection data, without relying on online matching and without relying on the interface between the two data sources to realize single information matching, thereby improving the matching efficiency and realizing simple batch reconciliation.
[0069] According to an embodiment of the present disclosure, the first matching information includes a first matching table, the second matching information includes a second matching table, and the first matching table and the second matching table each include a transaction number.
[0070] According to an embodiment of the present disclosure, determining the difference set data and the intersection data between the first matching information and the second matching information includes: generating a first database code statement according to a table name of the first matching table and a table name of the second matching table; and obtaining the intersection data and the difference set data by comparing the transaction numbers of the M transaction records and the transaction numbers of the N transaction records through executing the first database code statement.
[0071] According to an embodiment of the present disclosure, the first matching information and the second matching information can be recorded in the form of a data table in a preset format, the data table corresponding to the first matching information is a first matching table, the data table corresponding to the second matching information is a second matching table, the first matching table and the second matching table each include at least a transaction number, and the first matching table and the second matching table each have a corresponding table name.
[0072] According to an embodiment of the present disclosure, the first database code statement can be used for the comparison operation of the first matching information and the second matching information, and can be executed by a big data platform Spark to obtain the intersection data and the difference set data. The big data platform Spark has the characteristics of fast running speed, strong usability, support for complex queries, support for real-time stream processing, and good fault tolerance. By loading information in the data lake and using the big data platform Spark to execute the information matching method, batch information matching in a distributed environment can be quickly realized, and the problems existing in the information matching through online can be solved.
[0073] According to an embodiment of the present disclosure, the first database code statement can be an SQL (Structured Query Language) statement, which is generated according to the table names of the first matching table and the second matching table.
[0074] According to another embodiment of the present disclosure, the first database code statement can also be an HQL (Hibernate Query Language) statement, which is generated according to the object class names in the first matching information and the second matching information, for example, transaction numbers.
[0075] According to an embodiment of the present disclosure, the first database code statement can be generated according to a template of a logical or database code statement to be executed.
[0076] According to an embodiment of the present disclosure, after the server generates the first database code statement, the server executes the first database code statement by using the Spark to determine the difference set data and the intersection data.
[0077] For example, the first database code statement matches the transaction numbers in the first matching information with the transaction numbers in the second matching information one by one, and groups multiple transaction records with the same transaction number into the intersection data and groups multiple intersection records with different transaction numbers into the difference set data.
[0078] For example, there are Table 1 representing the first matching information and Table 2 representing the second matching information as follows: Table 1 contains a transaction record with a transaction number 1 and a transaction record with a transaction number 2; Table 2 contains a transaction record with a transaction number 1 and a transaction record with a transaction number 3.
[0079] Table 1
[0080] Transaction number Transaction record content 1 HT00002|||2|||0 2 HT00004|||1|||5000000
[0081] Table 2
[0082] Transaction number Transaction record content 1 HT0002|||1|||1000 3 HT00006|||1|||6000000
[0083] After the first database code statement is executed, the intersection data can be generated according to the two data records with the transaction number being 1, and the difference set data can be generated according to the two data records with the transaction number being 2 and the transaction number being 3.
[0084] Table 3
[0085] Transaction number Table 1 transaction record content Table 2 transaction record content 2 HT00004|||1|||5000000 3 HT00006|||1|||6000000
[0086] Table 4
[0087] Transaction number Table 1 transaction record content Table 2 transaction record content 1 HT00002|||2|||0 HT0002|||1|||1000
[0088] According to an embodiment of the present disclosure, the difference set data and the intersection data can be stored in the form of data tables. For example, the intersection data table and the difference set data table are shown in Table 3 and Table 4.
[0089] According to an embodiment of the present disclosure, by determining the intersection data and the difference set data in the first matching information and the second matching information through the first database code statement, the information matching operation can be realized in the database without matching through online.
[0090] According to an embodiment of the present disclosure, by executing the first database code statement, comparing the transaction numbers of the M transaction records and the transaction numbers of the N transaction records, the intersection data and the difference set data include: taking the M transaction records as a reference, determining Q transaction records from the N transaction records that do not match the transaction numbers of the M transaction records, N≥Q≥1; taking the N transaction records as a reference, determining P transaction records from the M transaction records that do not match the transaction numbers of the N transaction records, M≥P≥1; combining the P transaction records and the Q transaction records to form the difference set data; and determining (M-P) transaction records from the M transaction records that match the transaction numbers of the N transaction records, and taking the (M-P) transaction records as the intersection data; or determining (N-Q) transaction records from the N transaction records that match the transaction numbers of the M transaction records, and taking the (N-Q) transaction records as the intersection data.
[0091] According to an embodiment of the present disclosure, since the transaction records can only belong to the first matching information or the second matching information, matching the transaction numbers on one side only can cause the omission of the transaction records in the difference set data, and therefore, the omission of the transaction records in the difference set data can be avoided by matching the transaction numbers on both sides.
[0092] For example, the transaction number of the transaction record in the second matching information is determined based on the first matching information, and if the transaction numbers are the same, intersection data is generated, and if the transaction numbers are different, difference set data is generated; and the transaction number of the transaction record in the first matching information is determined based on the second matching information, and if the transaction numbers are the same, intersection data is generated, and if the transaction numbers are different, difference set data is generated.
[0093] According to an embodiment of the present disclosure, the intersection data and the difference set data can be data tables in a preset format, and at least contain the transaction number, the first transaction record content and the second transaction record content, wherein the first transaction record content and the second transaction record content of the intersection data are both not empty, and the first transaction record content and the second transaction record content of the difference set data have one empty but cannot be empty at the same time.
[0094] For example, the first transaction record content of the difference set data generated based on the first matching information is empty; and the second transaction record content of the difference set data generated based on the second matching information is empty.
[0095] According to an embodiment of the present disclosure, the first database code statement includes difference set determination statements and intersection determination statements, wherein the difference set determination statements include first difference set determination statements, second difference set determination statements and difference set combination statements, and the intersection determination statements include first intersection determination statements and second intersection determination statements.
[0096] Specifically, the first difference set determination statement can be a database code statement generated based on the table name of the second matching information and the first matching information table; the second difference set determination statement can be a database code statement generated based on the table name of the first matching information and the second matching information table; the difference set combination statement can be a database code statement for generating difference set data based on the transaction record determined by the first difference set determination statement and the transaction record determined by the second difference set determination statement; the first intersection determination statement can be a database code statement generated based on the table name of the first matching information and the second matching information table; and the second intersection statement can be a database code statement generated based on the second matching information and the intersection data.
[0097] According to an embodiment of the present disclosure, the transaction number of the transaction record in the first matching information can be taken as a reference to execute the first difference set determination statement to determine the transaction record in the second matching information that does not match the transaction number of the transaction record in the first matching information; the transaction number of the transaction record in the second matching information can be taken as a reference to execute the second difference set determination statement to determine the transaction record in the first matching information that does not match the transaction number of the transaction record in the second matching information; and finally, the difference set combination statement is executed to combine the transaction record determined by the first difference set determination statement and the transaction record determined by the second difference set determination statement to form the difference set data.
[0098] According to embodiments of this disclosure, the first matching information may contain transaction records whose transaction numbers do not match the transaction numbers of the transaction records in the second matching information, and the second matching information may also contain transaction records whose transaction numbers do not match the transaction numbers of the transaction records in the first matching information. Therefore, two comparisons should be performed based on the first matching information and the second matching information respectively to avoid missing difference data.
[0099] According to embodiments of this disclosure, a first intersection determination statement can be executed to first determine transaction records from the transaction records of the first matching information that have the same transaction number as the transaction records in the second matching information, generating intersection data. At this time, the transaction number and the content of the first transaction record in the generated intersection data are not empty, while the content of the second transaction record is empty. Then, a second intersection determination statement is executed to determine transaction records from the transaction records of the second matching information that have the same transaction number as the transaction records in the intersection data, and based on the transaction characteristics of the transaction records in the second matching information, the content of the second transaction record in the intersection data is generated.
[0100] According to another embodiment of this disclosure, a second intersection determination statement can also be executed to determine the transaction record with the same transaction number as the transaction record in the first matching information from the transaction records of the second matching information, and generate intersection data. At this time, the transaction number and the content of the second transaction record in the generated intersection data are not empty, and the content of the first transaction record is empty. Next, the first intersection determination statement is executed to determine the transaction record with the same transaction number as the transaction record in the intersection data from the transaction records of the first matching information, and generate the content of the first transaction record in the intersection data.
[0101] Figure 3 A flowchart illustrating a method for determining difference set data according to an embodiment of the present disclosure is shown schematically.
[0102] like Figure 3 As shown, the method 300 for determining difference set data in this embodiment includes operations S321 to S327, which can be used as a specific embodiment of operation S220.
[0103] According to an embodiment of this disclosure, operation S220 is to determine the difference data and intersection data between the first matching information and the second matching information.
[0104] In operation S321, the first difference set determination statement is generated and executed.
[0105] In operation S322, it is determined whether there is a transaction record in the second matching information that has a different transaction number from the transaction number in the first matching information.
[0106] According to an embodiment of the present disclosure, if there is a transaction record different from the transaction number in the first matching information in the second matching information, operation S323 is performed; if there is no transaction record different from the transaction number in the first matching information in the second matching information, operation S324 is performed.
[0107] In operation S323, the transaction record is stored.
[0108] In operation S324, the second difference set determination statement is generated and executed.
[0109] In operation S325, it is determined whether there is a transaction record different from the transaction number of the transaction record in the second matching information in the transaction record in the first matching information.
[0110] According to an embodiment of the present disclosure, if there is a transaction record different from the transaction number of the transaction record in the second matching information in the transaction record in the first matching information, operation S326 is performed; if there is no transaction record different from the transaction number of the transaction record in the second matching information in the transaction record in the first matching information, operation S327 is performed.
[0111] In operation S326, the transaction record is stored.
[0112] According to an embodiment of the present disclosure, based on the transaction record obtained in operation S323 and operation S326, operation S327 is performed.
[0113] In operation S327, the difference set combination statement is executed to generate the difference set data.
[0114] Figure 4 A flowchart of a method for determining intersection data according to an embodiment of the present disclosure is schematically shown.
[0115] As Figure 4 shown, the method 400 for determining intersection data of this embodiment includes operations S421-S427, which can be one specific embodiment of operation S220.
[0116] According to an embodiment of the present disclosure, operation S220 is to determine the difference set data and the intersection data between the first matching information and the second matching information.
[0117] In operation S421, the first intersection determination statement is generated and executed.
[0118] In operation S422, it is determined whether there is a transaction record with the same transaction number as the transaction record in the second matching information in the transaction record in the first matching information.
[0119] According to an embodiment of the present disclosure, if the transaction record in the first matching information exists a transaction record with the same transaction number as the transaction record in the second matching information, operation S423 is performed; if the transaction record in the first matching information does not exist a transaction record with the same transaction number as the transaction record in the second matching information, operation S424 is performed.
[0120] In operation S423, intersection data is generated, and the transaction number and the first transaction record content are written.
[0121] In operation S424, a second intersection determination statement is generated and executed.
[0122] In operation S425, it is determined whether the transaction record in the second matching information exists a transaction record with the same transaction number as the transaction record in the intersection data.
[0123] According to an embodiment of the present disclosure, if the transaction record in the second matching information exists a transaction record with the same transaction number as the transaction record in the intersection data, operation S426 is performed; if the transaction record in the second matching information does not exist a transaction record with the same transaction number as the transaction record in the intersection data, operation S427 is performed.
[0124] In operation S426, the second transaction record content is written in the intersection data.
[0125] According to an embodiment of the present disclosure, after the second transaction record content is written in the intersection data, operation S427 is performed.
[0126] In operation S427, intersection data is generated.
[0127] For example, based on the transaction records in Table 1 above, the first difference set determination statement is executed to determine the transaction records in Table 2 that do not match the transaction numbers of the transaction records in Table 1, and the stored transaction records are shown in Table 5:
[0128] Table 5
[0129] Transaction number Table 1 transaction record content Table 2 transaction record content 3 HT00006|||1|||6000000
[0130] Based on the transaction records in Table 2, the second difference set determination statement is executed to determine the transaction records in Table 1 that do not match the transaction numbers of the transaction records in Table 2, and the stored transaction records are shown in Table 6:
[0131] Table 6
[0132] Transaction number Table 1 transaction record content Table 2 transaction record content 2 HT00004|||1|||5000000
[0133] The difference set combination statement is executed to combine the transaction records determined by the first difference set determination statement and the transaction records determined by the second difference set determination statement into difference set data, and the difference set data is shown in Table 7.
[0134] Table 7
[0135] Transaction number Table 1 transaction record content Table 2 transaction record content 2 HT00004|||1|||5000000 3 HT00006|||1|||6000000
[0136] The first intersection determination statement is executed to determine the transaction records with the same transaction number as the transaction records in Table 2 from the transaction records in Table 1, and the intersection data generated at this time has a non-empty transaction number and non-empty Table 1 transaction record content, and empty Table 2 transaction record content, and the intersection data generated at this time is shown in Table 8.
[0137] Table 8
[0138] Transaction number Table 1 transaction record content Table 2 transaction record content 1 HT00002|||2|||0
[0139] Next, the second intersection determination statement is executed to determine the transaction records with the same transaction number as the intersection data from the transaction records in Table 2, and the Table 2 transaction record content in the intersection data is generated according to the transaction records in Table 2, and the intersection data generated at this time is shown in Table 9.
[0140] Table 9
[0141] Transaction number Table 1 transaction record content Table 2 transaction record content 1 HT00002|||2|||0 HT0002|||1|||1000
[0142] According to the embodiments of the present disclosure, the difference set data and the intersection data are determined by performing bilateral comparison based on the first matching information and the second matching information respectively, so that the difference set data and the intersection data of the first matching information and the second matching information are not missed, and the accuracy of information matching is ensured.
[0143] According to the embodiments of the present disclosure, the first matching information includes first field values of the M transaction records respectively, and the second matching information includes second field values of the N transaction records respectively, and the first field values and the second field values are used to represent transaction characteristics of the transaction records.
[0144] According to the embodiments of the present disclosure, the content of each transaction record in the intersection data is compared based on the first matching information and the second matching information to obtain a comparison result, including: generating a second database code statement according to the first matching information and the second matching information; and comparing the first field values and the second field values by executing the second database code statement to obtain the comparison result.
[0145] According to the embodiments of the present disclosure, the first field values and the second field values include a plurality of strings, and each string is used to represent one transaction data of the transaction records; and the plurality of strings are spliced to obtain the first field values or the second field values.
[0146] According to an embodiment of the present disclosure, the transaction features can represent a plurality of features of the transaction record content, such as a transaction type, a user identity, a transaction status, a transaction time, a transaction amount, and the like.
[0147] For example, the first field value of Table 1 is: HT00002|||2|||0, "HT00002" can represent a transaction type, "2" represents a payee, and "0" represents a transaction failure.
[0148] According to an embodiment of the present disclosure, a plurality of transaction features in the transaction record can also be represented by setting a plurality of fields.
[0149] According to an embodiment of the present disclosure, by comparing the first field value and the second field value in the intersection data, a comparison result is generated, which realizes the comparison of the transaction features of the same transaction number from different data sources, and further embodies the use of a database to realize the matching demand of a large amount of information without using online matching.
[0150] According to an embodiment of the present disclosure, the matching result data includes matching detail data and matching statistical data.
[0151] According to an embodiment of the present disclosure, the matching result data is determined according to the comparison result and the difference set data, including: forming matching difference data from at least one transaction record in which the comparison result represents that the first field value and the second field value do not match and the difference set data; forming matching consistent data from at least one transaction record in which the comparison result represents that the first field value and the second field value match; and generating matching detail data and matching statistical data according to the matching difference data and the matching consistent data.
[0152] According to an embodiment of the present disclosure, the matching detail data includes detailed information matching results, the matching statistical data includes statistical results of the information matching results, and the matching detail data and the matching statistical data are generated from the matching difference data and the matching consistent data.
[0153] According to an embodiment of the present disclosure, the matching difference data can include transaction records of the transaction number corresponding to the result 0 in the comparison result and transaction records in the difference set data, and the matching consistent data can include transaction records of the transaction number corresponding to the result 1 in the comparison result.
[0154] According to an embodiment of the present disclosure, the matching difference data and the matching consistent data can be data tables in a preset format, and at least include a serial number, a transaction number, a matching date, a matching result, first transaction record content, second transaction record content, a difference value, failure information, and the like.
[0155] According to an embodiment of the present disclosure, the serial number can be related to the transaction number, or related to the transaction feature, representing the position of the transaction record in the matching difference data or the matching consistent data. The matching date can represent the date of the matching operation. The difference value can represent the difference between the first transaction record content and the second transaction record content, and if there is a null value in the first transaction record content and the second transaction record content, the difference value is null. The failure information can represent the reason for the information matching failure.
[0156] According to an embodiment of the present disclosure, the matching result represents the result of the information matching of the transaction record, for example, the information matching result is consistent, the matching result is 1; the transaction record is unique to the first matching information, the matching result is 2; the transaction record is unique to the second matching information, the matching result is 3; the transaction number of the transaction record in the first matching information and the second matching information is the same but the transaction feature is different, the matching result is 4; the information matching fails due to network interruption or the like, and the matching result is 5.
[0157] According to an embodiment of the present disclosure, the comparison result represents at least one transaction record whose first field value and second field value do not match and the difference set data form the matching difference data, comprising: in the comparison result, determining the corresponding first transaction number of the result 0; in the intersection data, determining the first transaction record corresponding to the first transaction number; processing the first transaction record and writing it into the matching difference data; processing all transaction records in the difference set data and writing them into the matching difference data.
[0158] According to an embodiment of the present disclosure, according to the matching difference data and the matching consistent data, the matching detail data and the matching statistical data are generated, comprising: in the comparison result, determining the corresponding second transaction number of the result 1; in the intersection data, determining the second transaction record corresponding to the second transaction number; processing the second transaction record and writing it into the matching consistent data.
[0159] Table 10
[0160] Transaction number Table 1 transaction record content Table 2 transaction record content 1 HT00002|||2|||0 HT0002|||1|||1000
[0161] For example, according to the comparison result table obtained as described above, the corresponding transaction number 1 of the result 0 is determined, and the transaction record with the transaction number 1 in the intersection data is shown in Table 10.
[0162] Since the transaction record content of Table 1 in the intersection data table is different from the transaction record content of Table 2, the transaction record with the transaction number 1 can be written into the matching difference data table, as shown in Table 11:
[0163] Table 11
[0164]
[0165] According to an embodiment of the present disclosure, based on the comparison result, the intersection data and the difference set data, the matching difference data and the matching consistent data are generated, and then the matching detailed data and the matching statistical data are further generated according to the matching difference data and the matching consistent data, so as to obtain the matching result data, thereby improving the efficiency.
[0166] According to an embodiment of the present disclosure, the information matching method further comprises: exporting the matching result data into a first matching result file in a binary data format; converting the matching result file into a second matching result file in a target data format by using a big data engine; and transmitting the second matching result file to a file processing server in a distributed system.
[0167] According to an embodiment of the present disclosure, the first matching result file can be a binary file; and the second matching result file can be a TXT text file and a CHecK file.
[0168] According to an embodiment of the present disclosure, exporting the matching result data into a first matching result file in a binary data format comprises: a server performing a job to export the daily content in the matching detailed data, thereby generating a binary file.
[0169] According to an embodiment of the present disclosure, converting the matching result file into a second matching result file in a target data format by using a big data engine comprises: the big data engine performing a transfer job on the binary file, thereby generating a TXT text file and a CHecK file.
[0170] According to an embodiment of the present disclosure, transmitting the second matching result file to a file processing server in a distributed system comprises: a server automatically performing an ETRANCFG task to transfer the generated TXT text file and the check file to a downstream file server.
[0171] According to an embodiment of the present disclosure, the conversion of the file format is completed by performing a job, and the file is transmitted to a downstream file server by automatically performing a task, thereby improving the efficiency of processing and transmission of the file generated by information matching.
[0172] Figure 5 A flowchart of a job calling method according to an embodiment of the present disclosure is schematically shown.
[0173] As shown in Figure 5 The job calling 500 of this embodiment comprises operation S521 to operation S522.
[0174] In operation S501, a matching file is loaded by a job scheduling.
[0175] In operation S502, the matching file is processed and recorded in a data lake.
[0176] In operation S503, the Spark performs an information matching job. For example, the matching file in the data lake can be executed as the first matching information or the second matching information to perform the information matching operation.
[0177] In operation S504, it is determined whether the matching result data is successfully generated.
[0178] According to an embodiment of the disclosure, if the matching result data is not successfully generated, operation S505 is performed; if the matching result data is successfully generated, operation S506 is performed.
[0179] In operation S505, the data generation fails.
[0180] In operation S506, the job is exported to generate the first matching result file.
[0181] In operation S507, it is determined whether the first matching result file is successfully generated.
[0182] According to an embodiment of the disclosure, if the first matching result file is not successfully generated, operation S508 is performed; if the first matching result file is successfully generated, operation S509 is performed.
[0183] For example, it can be determined whether the first matching result file is successfully generated according to a first result string. The first result string is / datafs / bdsp / export / F-GCMS / #YYYYMMDD#, which indicates that the first matching result file is successfully generated, and vice versa.
[0184] In operation S508, the first matching result file generation fails.
[0185] In operation S509, the job number is transferred to generate the second matching result file.
[0186] In operation S510, it is determined whether the second matching result file is successfully generated.
[0187] According to an embodiment of the disclosure, if the second matching result file is not successfully generated, operation S511 is performed; if the second matching result file is successfully generated, operation S512 is performed. For example, it can be determined whether the second matching result file is successfully generated according to a second result string. If the second result string is / datafs / bdsp / export / F-GCMS / scfin_lakerecon, it indicates that the second matching result file is successfully generated, and vice versa.
[0188] In operation S511, the second matching result file generation fails.
[0189] In operation S512, the second matching result file is transmitted to the distributed system file processing server.
[0190] In operation S513, it is determined whether the second matching result file is successfully received by the file processing server.
[0191] According to an embodiment of the present disclosure, if the file processing server successfully receives the second matching result file, operation S515 is performed; if the file processing server does not successfully receive the second matching result file, operation S514 is performed.
[0192] In operation S514, the information matching fails.
[0193] In operation S515, the information matching succeeds.
[0194] According to an embodiment of the present disclosure, by scheduling the loading of the matching file, processing the matching file into the data lake, performing the information matching, transferring the matching result file, and the like, a business group is formed to meet different needs of different stages of the information matching method.
[0195] Figure 6 A structural block diagram of an information matching apparatus according to an embodiment of the present disclosure is schematically shown.
[0196] As shown in Figure 6 The information matching apparatus 600 of this embodiment includes a first determination module 610, a second determination module 620, a first comparison module 630, and a second comparison module 640.
[0197] The first determination module 610 is configured to determine first matching information and second matching information in response to receiving a request for performing a matching operation, wherein the first matching information includes M transaction records of at least one data source, and the second matching information includes N transaction records of at least one data source, M≥2, N≥2. In an embodiment, the first determination module 610 can be configured to perform operation S210 described above, and thus no further description is given.
[0198] The second determination module 620 is configured to determine difference set data and intersection data between the first matching information and the second matching information, wherein the intersection data includes at least one transaction record that is in both the first matching information and the second matching information, and the difference set data includes at least one transaction record that is in one of the first matching information or the second matching information. In an embodiment, the second determination module 620 can be configured to perform operation S220 described above, and thus no further description is given.
[0199] The first comparison module 630 is configured to perform content comparison on each transaction record in the intersection data based on the first matching information and the second matching information, to obtain a comparison result. In an embodiment, the first comparison module 630 can be configured to perform the operation S230 described above, and thus details are not repeated.
[0200] The second comparison module 640 is configured to determine matching result data according to the comparison result and the difference set data. In an embodiment, the second comparison module 640 can be configured to perform the operation S240 described above, and thus details are not repeated.
[0201] According to an embodiment of the present disclosure, the second determination module 620 includes a first generation sub-module and a second generation sub-module.
[0202] The first generation sub-module is configured to generate a first database code statement according to the table name of the first matching table and the table name of the second matching table.
[0203] The second generation sub-module is configured to compare the transaction numbers of the M transaction records and the transaction numbers of the N transaction records by executing the first database code statement, to obtain the intersection data and the difference set data.
[0204] According to an embodiment of the present disclosure, the second generation sub-module includes a first determination unit, a second determination unit, a first generation unit and a third determination unit.
[0205] The first determination unit is configured to determine, from the N transaction records, Q transaction records that do not match the transaction numbers of the M transaction records, with the M transaction records as a reference, N≥Q≥1.
[0206] The second determination unit is configured to determine, from the M transaction records, P transaction records that do not match the transaction numbers of the N transaction records, with the N transaction records as a reference, M≥P≥1.
[0207] The first generation unit is configured to group the P transaction records and the Q transaction records into the difference set data.
[0208] The third determination unit is configured to determine, from the M transaction records, (M-P) transaction records that match the transaction numbers of the N transaction records, and determine the (M-P) transaction records as the intersection data; or determine, from the N transaction records, (N-Q) transaction records that match the transaction numbers of the M transaction records, and determine the (N-Q) transaction records as the intersection data.
[0209] According to an embodiment of the present disclosure, the first comparison module 630 includes a third generation sub-module and a fourth generation sub-module.
[0210] The third generation sub-module is configured to generate a second database code statement according to the first matching information and the second matching information.
[0211] The fourth generating submodule is configured to obtain a comparison result by comparing the first field value and the second field value by executing the second database code statement.
[0212] According to an embodiment of the present disclosure, the second comparison module 640 comprises a fifth generating submodule, a sixth generating submodule and a seventh generating submodule.
[0213] The fifth generating submodule is configured to form the matching difference data by using at least one transaction record whose comparison result indicates that the first field value and the second field value do not match and the difference set data.
[0214] The sixth generating submodule is configured to form the matching consistent data by using at least one transaction record whose comparison result indicates that the first field value and the second field value match.
[0215] The seventh generating submodule is configured to generate the matching detail data and the matching statistical data according to the matching difference data and the matching consistent data.
[0216] According to an embodiment of the present disclosure, the information matching apparatus 600 further comprises a first generating module, a second generating module and a transmission module.
[0217] The first generating module is configured to export the matching result data into a first matching result file in a binary data format.
[0218] The second generating module is configured to convert the matching result file into a second matching result file in a target data format by using a big data engine.
[0219] The transmission module is configured to transmit the second matching result file to a file processing server in a distributed system.
[0220] According to an embodiment of the present disclosure, any multiple modules of the first determining module 610, the second determining module 620, the first comparison module 630 and the second comparison module 640 can be combined in one module to be implemented, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of the modules can be combined with at least part of the functions of other modules, and implemented in one module.
[0221] According to an embodiment of the present disclosure, at least one of the first determining module 610, the second determining module 620, the first comparing module 630 and the second comparing module 640 can be implemented at least in part as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of hardware or firmware by which circuits can be integrated or packaged, or implemented in any one of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the first determining module 610, the second determining module 620, the first comparing module 630 and the second comparing module 640 can be implemented at least in part as a computer program module which, when executed, can perform the corresponding function.
[0222] Figure 7 A block diagram of an electronic device suitable for the information matching method according to an embodiment of the present disclosure is schematically shown.
[0223] As shown in Figure 7 , the electronic device 700 according to an embodiment of the present disclosure includes a processor 701 which can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 702 or loaded into a random access memory (RAM) 703 from a storage portion 708. The processor 701 can include, for example, a general purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special purpose microprocessor (such as an application specific integrated circuit (ASIC)), and the like. The processor 701 can also include an on-board memory for cache use. The processor 701 can include a single processing unit or a plurality of processing units for performing different actions of the method processes according to embodiments of the present disclosure.
[0224] In the RAM 703, various programs and data required for the operation of the electronic device 700 are stored. The processor 701, the ROM 702 and the RAM 703 are connected to each other through a bus 704. The processor 701 performs various operations of the method processes according to embodiments of the present disclosure by executing programs in the ROM 702 and / or the RAM 703. It should be noted that the programs can also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 can also perform various operations of the method processes according to embodiments of the present disclosure by executing programs stored in the one or more memories.
[0225] According to an embodiment of the present disclosure, the electronic device 700 can further include an input / output (I / O) interface 705 also connected to the bus 704. The electronic device 700 can further include one or more of the following components connected to the input / output I / O interface 705: an input part 706 including a keyboard, a mouse, etc.; an output part 707 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part 708 including a hard disk, etc.; and a communication part 709 including a network interface card such as a LAN card, a modem, etc. The communication part 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as necessary. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 710 as necessary, so that a computer program read out therefrom is installed in the storage part 708 as necessary.
[0226] The present disclosure also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments, or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, which when executed, implement the method according to the embodiments of the present disclosure.
[0227] According to an embodiment of the present disclosure, the computer readable storage medium can be a non-volatile computer readable storage medium, which can include, but is not limited to, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more of the above-described ROM 702 and / or RAM 703 and / or one or more memories other than the ROM 702 and the RAM 703.
[0228] Embodiments of the present disclosure also include a computer program product, which includes a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the above-mentioned methods provided by the embodiments of the present disclosure.
[0229] The above-described functions of the system / device defined in the system / apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiments of the present disclosure, the system, apparatus, module, unit, etc. described above can be implemented by the computer program modules.
[0230] In one embodiment, the computer program can be stored in a tangible storage medium, such as an optical, magnetic, or other memory on a hard disk drive, solid-state drive, or other storage device. In another embodiment, the computer program can be transmitted over a network, using a wireless or wired transmission medium, and downloaded and installed by a communication portion 709, and / or installed from a removable medium 711. The program code embodied in the computer program can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical, or the like, or any suitable combination of the foregoing.
[0231] In such an embodiment, the computer program can be downloaded and installed from a network, using a wireless or wired transmission medium, and / or installed from a removable medium 711. The above-described functions of the system defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiments of the present disclosure, the system, apparatus, module, unit, etc. described above can be implemented by the computer program modules.
[0232] According to the embodiments of the present disclosure, the program code for execution of the computer program provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, and specifically, can be implemented using a high-level procedural and / or object-oriented programming language, and / or an assembly / machine language. The programming language includes, but is not limited to, a programming language such as Java, C++, Python, "C" language, or a similar programming language. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, connected through the Internet using an Internet service provider).
[0233] The computer program product of the first aspect can include one or more non-transitory computer-readable media storing instructions that, when executed, cause one or more processors to perform the operations of the first aspect. The one or more non-transitory computer-readable media can include, for example, magnetic media such as one or more magnetic disks, magnetic tapes or cassettes; optical media such as one or more compact discs (CD), optical discs or discs (for example, DVD, Blu-ray Disc®, digital video disc, ultra density disc, ultra-compact disc, any optical media, etc.); solid state media such as flash memory, storage and / or memory card(s), solid state drive(s) and / or flash drive(s); and / or any suitable combination of these and / or any other non-transitory computer-readable media.
[0234] Those skilled in the art will understand that the features recited in the various embodiments and / or claims of the present disclosure can be combined or / and integrated in a variety of ways, even if such combinations or integrations are not expressly disclosed in the present disclosure. In particular, the features recited in the various embodiments and / or claims of the present disclosure can be combined and / or integrated in a variety of ways without departing from the spirit and teachings of the present disclosure. All such combinations and / or integrations are within the scope of the present disclosure.
[0235] The specific embodiments described above are intended to be illustrative of the present disclosure and should not be construed as limiting the present disclosure. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments described above and that any modifications, equivalents, improvements, and / or the like that do not depart from the spirit and teachings of the present disclosure are included in the scope of the present disclosure.
Claims
1. An information matching method, comprising: determining first matching information and second matching information in response to receiving a request for performing a matching operation, wherein the first matching information comprises M transaction records of at least one data source, the second matching information comprises N transaction records of at least one data source, the first matching information comprises a first matching table, the second matching information comprises a second matching table, the first matching table and the second matching table each comprise transaction numbers, the first matching information and the second matching information come from different data sources, M≥2, N≥2; generating a first database code statement according to a table name of the first matching table and a table name of the second matching table, and obtaining intersection data and difference set data by comparing transaction numbers of the M transaction records and transaction numbers of the N transaction records through executing the first database code statement, wherein the intersection data comprises at least one transaction record simultaneously in the first matching information and the second matching information, and the difference set data comprises at least one transaction record in one of the first matching information or the second matching information; performing content comparison on each transaction record in the intersection data based on the first matching information and the second matching information to obtain a comparison result; and determining matching result data according to the comparison result and the difference set data. The obtaining of the intersection data and the difference set data by executing the first database code statement to compare the transaction numbers of the M transaction records and the transaction numbers of the N transaction records comprises: determining Q transaction records not matching the transaction numbers of the M transaction records from the N transaction records based on the M transaction records, N≥Q≥1; determining P transaction records not matching the transaction numbers of the N transaction records from the M transaction records based on the N transaction records, M≥P≥1; and grouping the P transaction records and the Q transaction records to form the difference set data.
2. The method of claim 1, wherein, The obtaining of the intersection data and the difference set data by executing the first database code statement to compare the transaction numbers of the M transaction records and the transaction numbers of the N transaction records comprises: determining (M-P) transaction records matching the transaction numbers of the N transaction records from the M transaction records, and determining the (M-P) transaction records as the intersection data; or determining (N-Q) transaction records matching the transaction numbers of the M transaction records from the N transaction records, and determining the (N-Q) transaction records as the intersection data.
3. The method of claim 1, wherein, The first matching information comprises first field values of the M transaction records respectively, and the second matching information comprises second field values of the N transaction records respectively, the first field values and the second field values being used to represent transaction characteristics of the transaction records; The performing of the content comparison on each transaction record in the intersection data based on the first matching information and the second matching information to obtain the comparison result comprises: generate a second database code statement according to the first matching information and the second matching information; compare the first field value and the second field value by executing the second database code statement to obtain a comparison result.
4. The method of claim 3, wherein, The first field value or the second field value includes a plurality of strings, each string representing a transaction data of the transaction record; and the plurality of strings are spliced to obtain the first field value or the second field value.
5. The method of claim 3, wherein, The matching result data includes matching detail data and matching statistical data. The matching result data includes matching detail data and matching statistical data. The matching result data includes matching detail data and matching statistical data. The matching result data includes matching detail data and matching statistical data. The matching result data includes matching detail data and matching statistical data.
6. The method of claim 1 or 5, further comprising: exporting the matching result data into a first matching result file in a binary data format; converting the matching result file into a second matching result file in a target data format by using a big data engine; and transmitting the second matching result file to a file processing server in a distributed system.
7. An information matching apparatus, comprising: a first determination module configured to determine first matching information and second matching information in response to receiving a request for performing a matching operation, wherein the first matching information includes M transaction records of at least one data source, the second matching information includes N transaction records of at least one data source, the first matching information includes a first matching table, the second matching information includes a second matching table, the first matching table and the second matching table both include transaction numbers, the first matching information and the second matching information come from different data sources, M≥2, and N≥2; a first generation submodule configured to generate a first database code statement according to a table name of the first matching table and a table name of the second matching table; a second generation submodule configured to compare transaction numbers of the M transaction records and transaction numbers of the N transaction records by executing the first database code statement to obtain intersection data and difference set data, wherein the intersection data includes at least one transaction record that is in both the first matching information and the second matching information, and the difference set data includes at least one transaction record that is in one of the first matching information or the second matching information; a first comparison module configured to perform content comparison on each transaction record in the intersection data based on the first matching information and the second matching information to obtain a comparison result; and a second comparison module configured to determine matching result data according to the comparison result and the difference set data. The second generation submodule further includes: a first determination unit, configured to determine, from the N transaction records, Q transaction records that do not match the transaction numbers of the M transaction records, based on the M transaction records, wherein N≥Q≥1; a second determination unit, configured to determine, from the M transaction records, P transaction records that do not match the transaction numbers of the N transaction records, based on the N transaction records, wherein M≥P≥1; and a first generation unit, configured to group the P transaction records and the Q transaction records to generate the difference set data. 8.An electronic device, comprising: one or more processors; a memory device for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, enable the one or more processors to perform the method of any one of claims 1-6. 9.A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1-6. 10.A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 1-6.
Citation Information
Patent Citations
Method and device for obtaining transaction correlation and executing regression test, and storage medium
CN108763474A
Data checking method and device, computer equipment and storage medium
CN112433988A