Method and apparatus for performing full-link reconciliation on basis of snowflake algorithm, and device and medium

By adopting a full-link reconciliation method based on snowflake algorithm in the cross-border payment industry, the problem of large data flow span and difficult to control transaction timeliness during cross-border business reconciliation is solved, and data accuracy and timeliness under high concurrent fields are achieved, the data accounting process is simplified and work efficiency is improved.

WO2025118972A1PCT designated stage expired Publication Date: 2025-06-12HANGZHOU PINGPONG INTELLIGENT TECH CO LTD

Patent Information

Application Number
PCT/CN2024/133132
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-06
Filing Date
2024-11-20
Publication Date
2025-06-12

AI Technical Summary

Technical Problem

In the cross-border payment industry, overseas banks have no unified standards, the transaction link is too long, and the transaction timeliness is difficult to control, resulting in a large data flow span during cross-border business reconciliation, and it is difficult for business data and capital data to form a complete closed-loop link.

Method used

The full-link reconciliation method based on the snowflake algorithm is adopted. Through the unified reconciliation center, the services in different scenarios are abstracted, aggregated, and analyzed, and distributed IDs are generated to realize timely acquisition, marking and verification of bank bills, and two-way verification is automatically realized, supporting diversified data association and matching, penetrating the entire link of information flow and capital flow, and unique ID records the order flow process.

Benefits of technology

It realizes the accuracy and timeliness of data in high concurrency scenarios, simplifies the data accounting process, improves work efficiency and data accuracy, ensures that the business balance and the accounting balance are fully matched at any time, and the differences are clearly confirmed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024133132_12062025_PF_FP_ABST
    Figure CN2024133132_12062025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are a method and apparatus for performing full-link reconciliation on the basis of a snowflake algorithm, and a device and a medium. The method comprises: responding to a cross-border business reconciliation request, and acquiring bill source data from a business terminal; parsing the acquired bill source data, and converting same into target bill data; calling a reconciliation rule engine to acquire a corresponding reconciliation rule and select a corresponding reconciliation algorithm, and executing a full-link reconciliation task for the target bill data, so as to obtain a reconciliation result; transmitting reconciliation imbalance data to a corresponding exception handling system for checking processing of abnormal data; and on the basis of an optimized snowflake algorithm, generating a unique target ID to associate a corresponding bill with the reconciliation result, automatically penetrating full-link data of an information flow and a fund flow on the basis of the corresponding unique target ID in the reconciliation result, and on the basis of the unique target ID, tracing the whole process of the circulation of a corresponding bill between the fund flow and the information flow, so as to achieve a complete reconciliation closed loop. In this way, the reconciliation working efficiency and data accuracy of the full-link reconciliation of a cross-border business are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Full-link reconciliation method, device, equipment and medium based on the Snowflake algorithm Technical Field

[0001] The present invention relates to the field of account reconciliation technology, and in particular to a full-link account reconciliation method, device, equipment and medium based on a snowflake algorithm. Background Art

[0002] The cross-border payment industry faces numerous challenges. Overseas banks lack unified standards, transaction processes are lengthy, and transaction times are difficult to control. Furthermore, each company has its own unique business scenarios, each with distinct processes. For example, some large companies manage their businesses by subsidiaries or departments, each with distinct business models. Examples include overseas collection, acquiring, credit, and foreign exchange. From user information flow data to final fund flow data, the entire chain involves cross-border fund flows. This chain spans a vastly different process, requiring the splitting and merging of orders at various stages and the transfer of funds through various banking channels. This prevents the final business and fund data from forming a closed loop.

[0003] To summarize, the data flows generated by overseas businesses during reconciliation currently span a wide range, with business and capital data transferred in and out through different channels, making it difficult to form a complete closed-loop link during the reconciliation process. Furthermore, overseas banks lack unified standards for reconciling this extremely long transaction chain, from user information flow to capital flow, and struggle to address reconciliation discrepancies within this long chain. Currently, no effective solution has been proposed. Summary of the Invention

[0004] The purpose of the present invention is to provide a full-link reconciliation method, device, equipment and medium based on the snowflake algorithm to solve the above-mentioned problems existing in the complex cross-border business reconciliation system. Based on the unified reconciliation center, the business in various special scenarios is abstracted, aggregated, analyzed, etc. to form a unified service platform, and a distributed ID generation service is built based on the improved snowflake algorithm to solve the data accuracy and timeliness in high-concurrency scenarios; a personalized rule engine is configured according to the rules to realize timely acquisition, marking and verification of bank bills; two-way verification is automatically realized according to the model, and diversified data association and matching is supported for the complex product logic of each bank; according to the reconciliation results, the entire link of information flow and capital flow is automatically penetrated, and the unique ID records the entire order flow process, so that the business balance and account balance can be fully matched at any time, and the difference can be clearly confirmed, which greatly simplifies the data accounting process and improves work efficiency and data accuracy.

[0005] The present invention provides a full-link reconciliation method based on the Snowflake algorithm, comprising:

[0006] Respond to cross-border business reconciliation requests and obtain bill source data from the business end;

[0007] Based on the unified reconciliation center, the acquired bill source data is parsed and converted into target bill data;

[0008] Call the reconciliation rule engine to obtain the corresponding reconciliation rules to match the different data access conditions of the cross-border payment terminal, select the corresponding reconciliation algorithm after executing the reconciliation rules, and perform the full-link reconciliation task on the target bill data to obtain the reconciliation result. The reconciliation task includes fund reconciliation, document reconciliation, and transaction reconciliation;

[0009] Determine whether the reconciliation result during the execution of the full-link reconciliation task is balanced, and transmit the unbalanced reconciliation data to the corresponding exception handling system for abnormal data verification and processing until the reconciliation result is balanced. Balance means that the balance obtained from the business system and the balance obtained from the financial system at the same time are the same;

[0010] Based on the optimized snowflake algorithm, a unique target ID is generated to associate the reconciliation result with the corresponding bill. According to the corresponding unique target ID in the reconciliation result, the full-link data of information flow and capital flow is automatically penetrated, and the entire process of the corresponding bill flowing between the capital flow and information flow is traced according to the unique target ID to achieve a complete reconciliation closed loop.

[0011] Preferably, before calling the reconciliation rule engine, the method includes:

[0012] Perform reconciliation configuration on the information flow corresponding to the bill source data and check the configuration operation by determining whether the configuration parameters pass verification;

[0013] After parameter verification passes, determine whether the reconciliation is duplicated. If the reconciliation is duplicated, restore the difference pool data generated by the previous reconciliation and then delete it. At the same time, delete the previous reconciliation data and write it to Redis in the form of the target reconciliation statement.

[0014] If parameter verification fails, it is directly written to Redis in the form of a target statement;

[0015] Determine whether an exception occurs in the database during the process of writing bill data to Redis. If no exception occurs, perform a check operation on the target bill. After reading the bill source data generated in the form of the target bill from the Redis cache, proceed to the next step of calling the reconciliation rule engine.

[0016] Among them, the bill source data reads Redis cache data in a Cousor cursor manner. The Cousor cursor manner includes: triggering a mechanism to extract one cache data record each time from a result set containing multiple cache data records. When a user accesses any row of cached data in the result set, the cursor is placed on the target row, and the operation is performed on the target row or the row block from the target position. A temporary file consisting of the cursor position pointing to the target cache record in the result set is formed.

[0017] Preferably, the step of responding to the cross-border business reconciliation request includes:

[0018] Establish a data exchange path between the reconciliation business system and the financial system, generate a unified reconciliation center based on the data exchange path, and implement centralized management. At the same time, build a distributed ID generation service based on the optimized snowflake algorithm to generate multiple target IDs in a high-concurrency environment;

[0019] When the current process is in the bill parsing state, a first target ID is generated based on the established ID generation service, and the reconciliation data is marked according to the first target ID and the flow process of the reconciliation data in the bill parsing state is recorded;

[0020] When the current process is in the reconciliation execution state, a second target ID is generated based on the established ID generation service, and the reconciliation data is marked according to the second target ID and the flow process of the reconciliation data in the reconciliation execution state is recorded;

[0021] When the current process is in the data penetration state, bill association across reconciliation dimensions is performed based on the first target ID to match cross-level data relationships, and penetration information from information flow to capital flow is generated. Based on the penetration information, anomalies are discovered and prompted in a timely manner.

[0022] Preferably, generating a unique target ID based on the optimized snowflake algorithm includes:

[0023] Obtain a first timestamp in the current state, and perform a division operation on the first timestamp to obtain a second timestamp in seconds;

[0024] Obtain a third timestamp of the last generated ID, and determine whether the third timestamp is the same as the second timestamp;

[0025] When the second timestamp is different from the third timestamp, if the second timestamp is smaller than the third timestamp, the system clock is rolled back and the second timestamp is set to the third timestamp;

[0026] If the second timestamp is the same as the third timestamp, an ID is generated in the same second, a sequence number is generated by auto-incrementing and assigned to a variable s, and an AND operation is performed on the variable s and the sequence number to determine whether the sequence number reaches a maximum threshold. When the maximum threshold is reached, the current thread enters a dormant state until the next second, and the variable s is used to store the sequence number.

[0027] Generate a hybrid code by combining a preset shift operation and a function call. The hybrid code is generated by shifting the second timestamp left by a preset bit to obtain a timestamp portion, obtaining a working node identification portion through a function call, performing a bitwise OR operation on the sequence number s to obtain a final hybrid code, and returning a generated distributed ID.

[0028] The optimized snowflake algorithm consists of 1 identification bit, 31 timestamp bits, 15 working machine IDs and 17 serial numbers.

[0029] Preferably, the converting the acquired bill source data into target bill data by parsing based on the unified reconciliation center includes:

[0030] Trigger data acquisition operations based on business notifications or preset time, generate reconciliation collection tasks, and execute corresponding download tasks;

[0031] Read the download task generated by the configuration, execute the download task at a scheduled time, and determine whether the target bill file is downloaded;

[0032] If the target bill file is downloaded, the unparsed records of the target bill file are read, and a parsing operation is triggered for the target bill file. The corresponding parsing template is selected according to the preset file type to parse the data in the target bill file, store it in the database, perform data cleansing, convert it into the target reconciliation statement, and generate conversion records according to the reconciliation dimension;

[0033] If the target billing file is not downloaded, determine whether the current download count has reached the maximum number of attempts. If the maximum number of attempts has not been reached, continue to retry the download task. If the maximum number of attempts has been reached, determine whether the download task has already downloaded a file. If so, mark it as a success. If not, issue a failure alarm.

[0034] The target bill files include bank bills and non-bank bills.

[0035] Preferably, calling the reconciliation rule engine to obtain the corresponding reconciliation rule includes:

[0036] In a one-to-one reconciliation rule mode, extract a target bill data of a first reconciling party and a target bill data of a second reconciling party, and perform bilateral amount accumulation according to preset dimensions and a preset amount accumulation algorithm. In the case of bilateral reconciliation, match the accumulated amounts of the first reconciling party with the accumulated amounts of the second reconciling party and determine whether the accounts are reconciled. The preset dimensions include at least the account number and the primary reconciliation ID.

[0037] In the one-to-one reconciliation rule mode, extract the target bill data of the first reconciliation party and the target bill data of the second reconciliation party. After setting the target field according to the field matching algorithm, match the target field of the first reconciliation party with the target field of the second reconciliation party to determine whether the account is reconciled.

[0038] In the one-to-many or many-to-one reconciliation rule mode, extract one target bill data of the first reconciling party and multiple target bill data of the second reconciling party, or extract multiple target bill data of the first reconciling party and one target bill data of the second reconciling party, and accumulate the amounts on one side according to the preset amount accumulation algorithm. In the case of one-side reconciliation, match the accumulated amount of multiple master / slave bills with the same master reconciliation ID attribute with an amount in the corresponding slave / master bill to determine whether the account is balanced;

[0039] The target billing data includes gateway statements, bank statements, document statements and transaction statements.

[0040] Preferably, selecting a corresponding reconciliation algorithm after executing the reconciliation rule includes:

[0041] If the reconciliation task is to execute inbound transactions and a one-to-many reconciliation rule is configured, a difference reconciliation algorithm is selected for the first reconciliation operation. The first reconciliation operation method is to confirm the target field to be reconciled under the rule, obtain the master bill and the subsidiary bill, and perform a loop operation. The amounts under the same target field in the subsidiary bill are accumulated to obtain the accumulated amount. After the accumulation, the same data in the master and subsidiary bills is matched. If the match is successful, the reconciliation is settled; otherwise, the operation ends without settling.

[0042] If the reconciliation task is to execute inbound transactions and the one-to-one reconciliation rule is configured, the standard reconciliation algorithm is selected for the second reconciliation operation. The second reconciliation operation method is to obtain the master invoice and the sub-invoice and perform a loop operation. After arranging the target fields in a preset order, the data under the target matching segment in the sub-invoice is matched. If the data under the last field in the order is matched, the operation ends, i.e., the reconciliation is completed.

[0043] If the reconciliation task is to execute a transfer transaction and the one-to-one reconciliation rule is configured, a data matching algorithm is selected to perform a third reconciliation operation. The third reconciliation operation method is to obtain the master bill and the sub-bill and perform a loop operation. The master bill and the sub-bill are filtered according to the preset conditions, and the same data in the master and sub-bill is matched after splicing according to their respective target fields and amounts. If the match is successful, the reconciliation is settled. Otherwise, the operation ends without settling.

[0044] The target field includes one or more combinations of bank, amount, currency, and master reconciliation ID.

[0045] Preferably, the step of transmitting the unbalanced reconciliation data to a corresponding exception handling system for checking the abnormal data until the reconciliation result is balanced includes:

[0046] Start the normal reconciliation mode and compare the master bill with the slave bill. If the comparison result shows that the slave bill is not balanced, determine whether the slave bill is a unilateral account.

[0047] If the secondary bill is not a unilateral account, determine whether the amount of the secondary bill is different from the primary bill. If the amount is different, register a primary / secondary unilateral account error record. This error record is periodically triggered to obtain the global error record matching and transmitted to the unified reconciliation center for execution by the unified reconciliation engine.

[0048] If the invoice is a unilateral account, register the unilateral account error and transmit the error data to the pending system to confirm whether it is funds in transit data. At the same time, transmit it to the error processing center for abnormal data verification to determine whether the error data needs to be written off. If so, write-off is performed until the account is balanced. If not, the error data is transmitted to the error pool for reconciliation.

[0049] If the erroneous data still exists after all the above methods are executed, a repair operation is performed on the erroneous data. The repair operation method is to split or merge multiple data in the erroneous data according to the preset repair fields and then reconcile them until the accounts are balanced.

[0050] The present invention also provides a full-link reconciliation device based on the snowflake algorithm, comprising:

[0051] The collection module is used to respond to cross-border business reconciliation requests and obtain bill source data from the business end;

[0052] The parsing module is used to parse the acquired bill source data and convert it into target bill data based on the unified reconciliation center;

[0053] The reconciliation module is used to call the reconciliation rule engine to obtain corresponding reconciliation rules to match the different data access conditions of the cross-border payment terminal, select the corresponding reconciliation algorithm after executing the reconciliation rules, and perform full-link reconciliation tasks on the target bill data to obtain reconciliation results. The reconciliation tasks include fund reconciliation, document reconciliation, and transaction reconciliation;

[0054] A judgment module is used to determine whether the reconciliation result during the execution of the full-link reconciliation task is balanced. The module transmits the unbalanced reconciliation data to the corresponding exception handling system for abnormal data verification until the reconciliation result is balanced. Balance means that the balance obtained from the business system and the balance obtained from the financial system at the same time are the same;

[0055] The penetration module is used to generate a unique target ID based on the optimized snowflake algorithm to associate the reconciliation result with the corresponding bill, automatically penetrate the full-link data of information flow and capital flow according to the corresponding unique target ID in the reconciliation result, and trace the entire process of the corresponding bill flowing between the capital flow and information flow according to the unique target ID to achieve a complete reconciliation closed loop.

[0056] The present invention provides an electronic device, comprising:

[0057] a memory for storing a processing program;

[0058] A processor, wherein when executing the processing program, the processor implements the full-link reconciliation method based on the snowflake algorithm as described in an embodiment of the present invention.

[0059] The present invention provides a readable storage medium, characterized in that a processing program is stored on the readable storage medium, and when the processing program is executed by a processor, the full-link reconciliation method based on the snowflake algorithm as described in an embodiment of the present invention is implemented.

[0060] With respect to the prior art, the present invention has the following beneficial effects:

[0061] The present invention provides a full-link reconciliation method based on the Snowflake algorithm. This method builds a distributed ID generation service based on an optimized Snowflake algorithm. This service uses a unique ID to run through the entire information and capital flow chain. In a distributed environment with high concurrency, the Snowflake algorithm is improved to support the generation of 130,000 IDs per second, ensuring data accuracy and timeliness in high-concurrency scenarios.

[0062] The present invention integrates different file formats between cross-border banks, configures a personalized rule engine based on regularities, and enables timely acquisition, marking, and verification of bank bills; records reconciliation association numbers, automatically implements two-way verification based on the model, and supports diversified data association and matching for the complex product logic of each bank; automatically penetrates the entire link of information flow and capital flow based on the reconciliation results, and records the entire process of order flow with a unique ID, so that the business balance and account balance can be fully matched at any point in time, and the differences can be clearly confirmed, which greatly simplifies the data accounting process and improves work efficiency and data accuracy. In combination with the needs of financial and business development, on the basis of meeting both parties, a set of standardized processes and standards are established for centralized management, and the offline reconciliation processing process is realized online through technology; at the same time, a set of reconciliation models are established by integrating business processes and financial needs, and a complete reconciliation closed loop is achieved through the verification of capital flow, information flow, and user balances to ensure the consistency, integrity, and accuracy of business system and financial system data.

[0063] The present invention calls a unified reconciliation rule engine to obtain corresponding reconciliation rules to match different data access conditions of cross-border payment terminals, executes the reconciliation rules and selects the corresponding reconciliation algorithm, thereby improving reconciliation efficiency and data accuracy.

[0064] This invention utilizes this penetration logic to address key challenges such as multi-level data association, data inconsistency, and exception handling, achieving accurate cross-level data association and penetration, representing a significant technological breakthrough. This penetration logic provides reliable data support for clearing and settlement and financial operations, improving reconciliation accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] FIG1 is a schematic diagram of the steps of a full-link reconciliation method based on a snowflake algorithm according to an embodiment of the present invention;

[0066] FIG2 is a schematic diagram of the overall architecture of a unified reconciliation center under clearing and settlement services in an embodiment of the present invention;

[0067] FIG3 is a flowchart illustrating step S1 in an embodiment of the present invention;

[0068] FIG4 is a diagram illustrating an example of a business process for bill parsing according to an embodiment of the present invention;

[0069] FIG5 is a diagram illustrating an example of a process for checking abnormal data in step S4 according to an embodiment of the present invention;

[0070] 6-7 are diagrams illustrating specific business processes in step S4 according to an embodiment of the present invention;

[0071] FIG8 is an example diagram of the improved snowflake algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION

[0072] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0073] Example 1

[0074] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0075] It should be noted that the concepts of "once" and "second" mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0076] It should be noted that the modifications of "one" and "multiple" mentioned in the disclosure of this application are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0077] The cross-border payment industry faces many problems. There is no unified standard for overseas banks, the transaction chain is too long, and the transaction timeliness is difficult to control. In addition, each company has its own unique business scenarios, and the processes of each business scenario are different. For example, some large companies will manage their businesses according to subsidiaries or large departments. Each business form is completely different, such as: overseas collection business, overseas acquiring business, overseas credit business, overseas foreign exchange business, etc.; from the user's information flow business data to the final capital flow data, the entire chain will involve cross-border capital flow. The flow chain span is extremely large. During the execution of the entire chain, it involves the splitting and merging of orders in each link, and the transfer of funds through different bank channels, resulting in The final business data and financial data cannot form a closed-loop link, and there is a possibility that financial personnel cannot accurately locate the link where financial risks occur; then their respective departments are responsible for checking the funds, transactions, accounts and other data. In the operation process, they will face problems such as data discrepancies or other operational problems, resulting in no unified group caliber and no unified system coordination. Another problem is that the financial personnel are responsible for reconciling business transactions. They need to analyze the process themselves and then manually check with the bank statements. As the business grows, this model can no longer meet the business development and timeliness requirements; in the process of system construction, they also have to face the problems of high concurrency and reconciliation timeliness of various departments in the system's cross-border business.

[0078] In response to the above-mentioned problems existing in cross-border business, the present invention provides a full-link reconciliation method based on the snowflake algorithm, which is applicable to the unified reconciliation center system.

[0079] As shown in Figure 1, the specific full-link reconciliation steps are as follows:

[0080] S1: Responds to cross-border business reconciliation requests and obtains bill source data from the business side. This bill source data can be pushed by the business side when the transaction order is transferred to the status. The data comes from the data department and is pushed centrally after ETL. It can also obtain payment channels, such as bank or third-party payment statements. The main acquisition methods include API query or push, FTP download, email, etc.

[0081] S2: Based on the unified reconciliation center, the acquired bill source data is parsed and converted into target bill data, thereby meeting the data requirements of different cross-border businesses. The target bill data is finally parsed and meets the interaction requirements between the business system and the financial system. The parsing and conversion process of this embodiment is performed by the bill collection system in order to collect and obtain data from various business systems, which is used as the data source for bilateral bill matching during reconciliation. It is suitable for cross-border businesses with strict requirements on data access and legal consistency.

[0082] S3: Calling the reconciliation rule engine to obtain corresponding reconciliation rules to match the different data access conditions of the cross-border payment terminal, selecting the corresponding reconciliation algorithm after executing the reconciliation rules, and performing full-link reconciliation tasks on the target bill data to obtain reconciliation results. The reconciliation tasks include fund reconciliation, document reconciliation, and transaction reconciliation;

[0083] S4: Determine whether the reconciliation result during the execution of the full-link reconciliation task is balanced, and transmit the unbalanced reconciliation data to the corresponding exception handling system for abnormal data verification until the reconciliation result is balanced. Balance means that the balance obtained from the business system and the balance obtained from the financial system at the same time are the same;

[0084] S5: Generate a unique target ID based on the optimized snowflake algorithm to associate the reconciliation result with the corresponding bill. Automatically penetrate the full-link data of information flow and capital flow according to the corresponding unique target ID in the reconciliation result, and trace the entire process of the corresponding bill flowing between the capital flow and information flow according to the unique target ID to achieve a complete reconciliation closed loop.

[0085] The full-link reconciliation provided by this implementation solves difficult and complex problems in complex cross-border business reconciliation systems, such as the lack of unified standards among overseas banks, lengthy transaction links, cross-period transactions in different time zones, and reconciliation challenges involving different cross-border businesses. By building a unified reconciliation center, we can abstract, aggregate, and analyze businesses in various special scenarios to form a unified methodology and solution, establish a distributed ID generation service, and address data accuracy and timeliness in high-concurrency scenarios. We integrate different file formats between cross-border banks and configure a personalized rule engine based on regular patterns to enable timely acquisition, tagging, and verification of bank statements. We record reconciliation association numbers and automatically implement two-way verification based on the model. We support diversified data association and matching for the complex product logic of each bank. Based on the reconciliation results, we automatically penetrate the entire information and capital flow chain, and use a unique ID to record the entire order flow process, allowing business balances and account balances to be fully matched at any point in time, with differences clearly identifiable. This greatly simplifies the data accounting process and improves work efficiency and data accuracy. Integrating financial and business development needs, while satisfying both parties, we establish a standardized set of processes and standards for centralized management, and leverage technology to bring offline reconciliation processes online. The clearing and settlement platform integrates business processes and financial needs to establish a reconciliation model. By verifying capital flows, information flows, and user balances, we achieve a complete reconciliation closed loop, ensuring the consistency, integrity, and accuracy of data across business and financial systems.

[0086] As shown in Figure 2, the business process based on the unified reconciliation center in this embodiment is as follows: 1. The data principle of this embodiment is that it is provided by the business system, received by the reconciliation center and then proceeds to the next reconciliation process; first, the data transmission specifications of the reconciliation center are unified, from defining data content, format to interaction form, as well as requirements such as data mismatch and fallback; through further analysis, aggregation and abstraction of different business scenarios or models, a set of mandatory and extensible standards from the core process of business logic to the unified reconciliation system is defined; 2. After the definition is completed, the unified reconciliation center will collect or obtain the bill data of each business system, and each business system will push the data to the reconciliation system. The requested SFTP is processed through the bill parsing system; 3. The bill parsing system parses the bills to be reconciled by the business, and the core system of the reconciliation center obtains the bills, which will go through the reconciliation engine, including reconciliation rules, reconciliation matching algorithms, such as: optimal matching algorithm, general data matching algorithm, abnormal matching algorithm, etc., reconciliation model training, reconciliation core, etc.; the reconciliation center is a full-link reconciliation, including external funds reconciliation, internal document reconciliation, cash flow reconciliation, and final customer account balance reconciliation, etc.; 4. Because cross-border business reconciliation is not as easy to balance as domestic reconciliation, there will be problems such as: long transaction links and cross-period dates If there is any imbalance after reconciliation, the reconciliation data will be pushed to the error center system; 5. The error center system will check and process abnormal data such as pending accounts, account cancellations, and daily cuts. If the error center cannot handle it under certain rules, the error data will be pushed to the repair center system for processing; and the error data will be pushed to the Pending system for financial dimension registration; 6. Use the repair center system because some scenarios data can actually be reconciled, such as payment or settlement is a single bank processing multiple transactions, then it cannot be directly reconciled through the repair center for splitting and merging; the repair center supports 1 Split into 1, 1 to many, and many to one; 7. Entering the Pending system indicates that these error data have no business claims at the current time, etc., and the calculation and accumulation of funds in transit will be carried out in accordance with financial standards, such as: according to funds, business, etc.; 8. Through our penetration system, the data of the entire link is connected through a distributed unique ID, and the snowflake algorithm generator is used to generate a unique ID; 9. Finally, the field information of the bank flow from the source is penetrated into the business flow data, and the transaction completion date of the bank flow is accumulated to reconcile the customer account balance; 10. Finally, the summary is output to the financial system according to the financial caliber.

[0087] In the data flow involved in the above process, funds reconciliation includes the verification of bank statements VS gateway orders and bank statements VS gateway statements; document reconciliation includes the verification of gateway orders VS transaction documents and gateway statements VS document reconciliation statements; flow reconciliation includes the verification of transaction documents VS account flow and document reconciliation statements VS flow statements. Among them, those skilled in the art can understand that the meaning of data flow is as follows: 1. Gateway reconciliation statement: the internal gateway order on the side where the company interacts with the bank or payment channel, the data source for funds reconciliation on the company side, and the abstract bill required for reconciliation. 2. Bank reconciliation statement: the external bill provided by the bank or payment channel, that is, the cross-border standard is called 053 day-end statement, the data source for funds reconciliation on the payment channel side, and the abstract bill required for reconciliation. 3. Document reconciliation statement: the transaction documents of the internal transactions of each business system or the side that interacts with the gateway order, the data source for document reconciliation, and the abstract bill required for reconciliation. 4. Statement Reconciliation: This is used to reconcile the transaction flow between accounts within each business system with the transaction documents. It serves as the data source for statement reconciliation and abstracts the statements required for reconciliation. 5. Funds Reconciliation: This is used to reconcile gateway statements with bank statements, performed through the reconciliation engine, with a 1:1 reconciliation rule. 6. Document Reconciliation: This is used to reconcile gateway statements with document statements, performed through the reconciliation engine. Reconciliation rules are diverse and can be configured through the rule engine, supporting 1:1, 1:many, and many:1 scenarios. 7. Statement Reconciliation: This is used to reconcile document statements with statement reconciliation, performed through the reconciliation engine, with diverse reconciliation rules and support 1:1, 1:many, and other scenarios.

[0088] First, the bill parsing process can be automated or manual. This is because cross-border business data access requirements are not uniform, and cross-border business is complex and difficult. To overcome this complexity and difficulty, the bill collection system abstractly defines various business scenarios, as shown below:

[0089] In order to integrate different file formats between cross-border banks, the steps of parsing the acquired bill source data and converting it into target bill data based on the unified reconciliation center in step S1 include:

[0090] According to business notification or preset time, data acquisition operation is triggered and reconciliation collection task is generated and corresponding download task is executed; download task generated by configuration is read, download task is executed regularly, and it is judged whether the target bill file is downloaded; if the target bill file is downloaded, the unparsed record of the target bill file is read, and the parsing operation of the target bill file is triggered. According to the preset file type, the corresponding parsing template is selected to parse the data in the target bill file and store it in the database, and the data is cleaned and converted into the target reconciliation statement and conversion record is generated according to the reconciliation dimension; if the target bill file is not downloaded, it is judged whether the current download number has reached the maximum number of attempts. If the maximum number of attempts has not been reached, the download task is retried. When the maximum number of attempts is reached, it is judged whether the download task has already downloaded the file. If the file has been downloaded, it is marked as successful. If the file has not been downloaded, a failure alarm is issued; wherein, the target bill file includes bank bills and non-bank bills, as shown in Figure 3.

[0091] Those skilled in the art will appreciate that the business process for bill parsing in this embodiment is as follows, as shown in Figure 4: 1. Triggering: a. DP notification that bills can be retrieved; b. According to the agreed-upon time rules with the DP; 2. Generate data collection tasks; 3. Execute data collection tasks; 4. Parse and store data in the database; 5. Data cleansing: Convert data into reconciliation statements, providing data for subsequent reconciliation module access, enabling timely acquisition, tagging, and verification of bank bills. In this embodiment, parsing is performed daily. When parsing bank bills, classification and tagging are performed. At the same time, the original bill data is converted and included in the reconciliation data. When parsing non-bank bills, the original bill data is converted and included in the reconciliation data. Data producers (DPs) include: PP business lines, deposit banks, withdrawal banks and channels, and operator uploads; data channels include: HTTP push / query, FTP upload and download, message queue MQ, offline file upload, and database DB.

[0092] This embodiment obtains data source reconciliation statement data, such as: gateway reconciliation statement, bank reconciliation statement, document reconciliation statement, and water reconciliation statement. In order to overcome the bottleneck of high data concurrency, the single reconciliation data is read from the Redis cache. The specific steps include: reconciliation configuration of the information flow corresponding to the bill source data and checking the configuration operation, and the checking method is to determine whether the configuration parameters have passed the verification; after the parameter verification is passed, determine whether the reconciliation is repeated, and if the reconciliation is repeated, restore the difference pool data generated by the previous reconciliation and then delete it, and at the same time, delete the previous reconciliation data and write it to Redis in the form of a target reconciliation statement; if the parameter verification fails, directly write it to Redis in the form of a target reconciliation statement; determine the bill Whether an exception occurs in the database during the process of writing data to Redis, and if no exception occurs, the target statement is verified, and after reading the source bill data generated in the form of the target statement from the Redis cache, the next step of the reconciliation rule engine call operation is entered; wherein, the source bill data reads the Redis cache data in the Cousor cursor mode, and the Cousor cursor mode includes: triggering a mechanism to extract one cache data record at a time from a result set containing multiple cache data records, and when the user accesses any row of cached data in the result set, after placing the cursor on the target row, performing operations on the target row or on the row block from the target position, and a temporary file consisting of the cursor position pointing to the target cache record in the result set. The role of the database cursor is to act as a pointer in the database. The temporary file generated above provides the ability to browse data forward or backward in the query result set and process data in the result set. With a cursor, it is convenient for users to access any row of data in the result set. After placing the cursor on a row, operations can be performed on that row or on the row block from that position.

[0093] In various embodiments of the present application, calling the reconciliation rule engine to obtain the corresponding reconciliation rule in step S3 specifically includes the following steps:

[0094] In a one-to-one reconciliation rule mode, extract a target bill data of a first reconciling party and a target bill data of a second reconciling party, and perform bilateral amount accumulation according to preset dimensions and a preset amount accumulation algorithm. In the case of bilateral reconciliation, match the accumulated amounts of the first reconciling party with the accumulated amounts of the second reconciling party and determine whether the accounts are reconciled. The preset dimensions include at least the account number and the primary reconciliation ID.

[0095] In the one-to-one reconciliation rule mode, extract the target bill data of the first reconciliation party and the target bill data of the second reconciliation party. After setting the target field according to the field matching algorithm, match the target field of the first reconciliation party with the target field of the second reconciliation party to determine whether the account is reconciled.

[0096] In the one-to-many or many-to-one reconciliation rule mode, extract one target bill data of the first reconciliation party and multiple target bill data of the second reconciliation party, or extract multiple target bill data of the first reconciliation party and one target bill data of the second reconciliation party, and add the amounts on one side according to the preset amount accumulation algorithm. In the case of one-side reconciliation, match the accumulated amount of multiple master / slave bills with the same master reconciliation ID attribute with an amount in the corresponding slave / master bill to determine whether the account is balanced.

[0097] Those skilled in the art will appreciate that the rule engine used in this embodiment, i.e., matching different data access conditions of the cross-border payment terminal, can dynamically set flexible reconciliation rules. The standard ones are as follows:

[0098] a) One-to-one, account and amount accumulation method: After the bilateral invoices are combined with the account amount, the cumulative amount is verified on a one-to-one basis;

[0099] b) One-to-one, field matching method: after setting the specified fields, all the fields of the bilateral bills are matched on a one-to-one basis;

[0100] c) One-to-many, master reconciliation ID, amount accumulation method, the amounts with the same master reconciliation ID on the slave side will be accumulated and converted into one item before matching;

[0101] d) Many-to-one, master reconciliation ID, amount accumulation method: Amounts with the same master reconciliation ID on the master side are added together to form a single item for matching. Bilateral bills here refer to bills containing data from both sides, such as the gateway statement and bank statement, the gateway statement and document statement, or the document statement and journal statement. This refers to bill data from two reconciliation parties.

[0102] In various embodiments of the present application, in order to automatically implement two-way verification based on the model, support diversified data association and matching for the complex product logic of each bank, the corresponding reconciliation algorithm selected after executing the reconciliation rule in step S3 includes:

[0103] If the reconciliation task is to execute inbound transactions and is configured with a one-to-many reconciliation rule, a difference reconciliation algorithm is selected for the first reconciliation operation. This first reconciliation operation involves confirming the target fields to be reconciled under the rule, obtaining the master and slave invoices, and executing a loop operation. The amounts under the same target fields in the slave invoices are accumulated to obtain the accumulated amount. After accumulation, the same data in the master and slave invoices is matched. If a match is found, the reconciliation is considered settled; otherwise, the operation is terminated without balancing. This can be understood as executing the difference reconciliation algorithm: the reconciliation task is configured with a one-to-many reconciliation rule for deposit transaction analysis. The bank, amount, and currency are checked. The master and slave invoices are obtained, and the looped slave invoices are obtained. The amounts under the same bank and currency in the slave invoices are summed to obtain the accumulated amount. The accumulated amount is then assembled into the corresponding bank, amount, and currency. Finally, the bilateral invoices are matched. If a match is found, the reconciliation is considered settled; otherwise, the operation is terminated without balancing.

[0104] If the reconciliation task is to execute inbound transactions and is configured with a one-to-one reconciliation rule, the standard reconciliation algorithm is selected for the second reconciliation operation. The second reconciliation operation is to obtain the master and sub-invoices and execute a loop operation. After arranging them in a preset order according to the target fields, the data under the target segment in the sub-invoice is checked. If the data under the final field in the order is matched, the operation is completed, i.e., the reconciliation is completed. This can be understood as executing the standard reconciliation algorithm: This algorithm is suitable for most scenarios. The reconciliation task is to analyze deposit transactions and is configured with a one-to-one reconciliation rule. The master reconciliation ID + amount + currency are checked to obtain the master and sub-invoices. The master invoice loops the sub-invoices, sorts them in reverse order according to the above three fields, and then checks them against the relevant fields in the sub-invoices. If a match is found with the first transaction in the sub-invoice, the reconciliation is marked as complete. Otherwise, the operation continues until all sets have been traversed.

[0105] If the reconciliation task is to execute a transfer transaction and is configured with a one-to-one reconciliation rule, a data matching algorithm is selected to perform a third reconciliation operation. The third reconciliation operation involves obtaining a master invoice and a slave invoice and executing a loop operation. The master invoice and the slave invoice are filtered according to preset conditions, and the master and slave invoices are matched against the same data in the master and slave invoices after concatenating their respective target fields and amounts. If a match is successful, the reconciliation is considered settled; otherwise, the operation ends without settling. This can be understood as executing a data matching algorithm: this algorithm is applicable to a wide range of basic default scenarios and can be used for general logic processing. The reconciliation task is configured with a one-to-one reconciliation rule for transfer transaction analysis. The master reconciliation ID + amount is verified, and the master and slave invoices are obtained. The master invoice loops over the slave invoices, and the bilateral invoices are filtered according to preset rules and conditions. The bilateral invoices are then concatenated and matched according to their respective master reconciliation IDs and amounts. If a match is found, the reconciliation is considered settled; otherwise, the operation ends without settling. The target fields include one or more combinations of bank, amount, currency, and master reconciliation ID.

[0106] The above-mentioned loop operation specifically includes: comparing the first master bill data with the first slave bill data and judging whether the data is successfully matched based on the comparison result, looping to obtain the second slave bill data from the slave bill until a match is successful, then the reconciliation is balanced, otherwise outputting an unbalanced result.

[0107] The principles of the reconciliation process for the above information flow in this embodiment are as follows:

[0108] 1. Due to the particularity and complexity of cross-border business and the different reconciliation scenarios, an abstract reconciliation rule engine center is created to group and set various system interactions and types, collectively referred to as reconciliation tasks.

[0109] 2. Reconciliation task configuration module: The reconciliation task consists of several parts, including bilateral reconciliation bills, reconciliation type, reconciliation business type, etc.

[0110] 3. Trigger the reconciliation task and hand it over to the reconciliation engine for processing;

[0111] 4. Reconciliation Engine: First, obtain data from the data source, such as gateway statements, bank statements, document statements, and transaction statements. To improve the bottleneck of high concurrency, read the single-time reconciliation data into the Redis cache. The master side uses the Cousor cursor method to read the Redis cache data obtained by querying the loop in the DB data. After the data is prepared, call the reconciliation rule engine to obtain the corresponding rules and use the self-developed reconciliation algorithm.

[0112] 5. The specific reconciliation algorithm is as follows:

[0113] a) HASH algorithm;

[0114] b) Difference reconciliation method: After obtaining the reconciliation rules, the difference reconciliation algorithm is used for verification. For example, if the reconciliation rule is 1:1, the master reconciliation ID, amount, and currency are verified. Then, the bilateral invoice data is obtained, and the master side loops over the slave side. After sorting the three fields in reverse order, the field values ​​are then checked one by one on the slave side. If the first item on the slave side matches, the reconciliation ends, and the reconciliation is concluded. Otherwise, the reconciliation continues until the entire set is traversed.

[0115] c) Standardized reconciliation algorithm: In some scenarios, field information may not differ significantly, so the reconciliation rules are obtained and formatted for verification to ensure field consistency before reconciliation.

[0116] d) Data matching algorithm: Filter out matching items that meet the conditions according to the set rules and conditions;

[0117] e) Anomaly detection algorithm: This algorithm uses historical data to suggest anomaly models and rule engines. Based on business needs and experience, it sets a series of rules and conditions to screen out abnormal transactions or bills, such as abnormal amounts and abnormal time intervals.

[0118] 6. Reconciliation task configuration module: one side - one data,

[0119] 7. Rules engine, through dynamic setting of flexible reconciliation rules, the standard ones are as follows:

[0120] a) One-on-one, account and amount accumulation method: After both parties add up the amounts in the account dimension, they verify the accumulated amounts one-on-one;

[0121] b) One-to-one, field matching method: after setting the specified field, all the fields in the bilateral one-to-one verification are matched;

[0122] c) One-to-many, master reconciliation ID, amount accumulation method: add up the amounts with the same master reconciliation ID on the slave side and then match the master account with the same amount;

[0123] d) Many-to-one, master reconciliation ID, amount accumulation method, same as above, but the master and slave are swapped;

[0124] 8. Produce reconciliation results and generate a distributed unique ID under high concurrency using the snowflake algorithm;

[0125] 9. Error Center Module: This module aims to handle and process data that cannot be reconciled normally, using a separate error module. This module primarily handles abnormal data verification, such as pending accounts, write-offs, and daily cuts. i. Funding Layer: Because this system connects to numerous channels, including overseas banks, third-party payment institutions, and domestic banks, each bank has different standards, resulting in various recovery methods, such as one-to-one, one-to-many, and many-to-one. ii. One-to-One: Due to inconsistencies in certain fields during interaction between the bank and the business system, the gateway and bank reconciliation may be inconsistent, resulting in discrepancies in the master reconciliation ID and amount. iii. Many-to-One: The bank will proactively merge several transactions sent by the system into a single settlement. iv. One-to-Many: The bank will proactively split and settle a large transaction. v. Document Layer: Due to inconsistent interactions between business systems or improper payment operations, such as manual adjustments for refunds and incorrect manually entered order numbers, 1-to-Many and Many-to-One do not exist. These transactions are automatically merged during information flow reconciliation, eliminating the need for recovery.

[0126] The specific steps for processing and repairing erroneous data in response to the above problems include:

[0127] Start the normal reconciliation mode, compare the master bill with the slave bill, and if the comparison result shows that the slave bill is not balanced, determine whether the slave bill is a unilateral account; if the slave bill is not a unilateral account, determine whether the amount of the slave bill is different from the master bill. If the amount is different, register the master / slave unilateral account error record, trigger the acquisition of the error record regularly for global error record matching, and transmit it to the unified reconciliation center to execute the unified reconciliation engine; if the slave bill is a unilateral account, register the slave unilateral account error and transmit the error data to the pending system The system confirms whether the data is in-transit funds data and transmits it to the error processing center for abnormal data verification. It determines whether the error data needs to be written off. If so, the write-off is performed until the account is balanced. If not, the error data is transmitted to the error pool for reconciliation. If the error data still exists after all the above methods are executed, a repair operation is performed on the error data. The repair operation method is to split or merge multiple data in the error data according to the preset repair fields and then reconcile until the account is balanced, as shown in Figure 5. In this embodiment, for a transaction, the accounting may have the following situations: Scenario 1: The issuing bank deducts (entries) the funds, but the acquiring bank does not; Scenario 2: The issuing bank deducts (entries) the funds and the acquiring bank enters the funds; Scenario 3: The issuing bank does not deduct the funds and the acquiring bank enters the funds; Scenario 4: The issuing bank does not deduct the funds and the acquiring bank does not enter the funds. The above situations 1 and 3 can be called unilateral accounts, that is, only one side is recorded in the account, and situation 2 can be called bilateral accounts, that is, both sides are recorded in the account.

[0128] This can be understood as the following: i. Reconciliation Reason: Daily Reconciliation, Account Write-off; ii. Account Write-off Type: Offline Withdrawal Verification and Account Receipt, Duplicate Withdrawal, Related Account Write-off, etc. In this embodiment, the repair operation is performed through the Repair Center module, which repairs billing data with inconsistent unique IDs to billing data with the same unique ID. Because the data in some scenarios can actually be reconciled, such as payments or settlements that are processed by multiple banks in one transaction, they cannot be directly reconciled; clearing and settlement reconciliation involves full-link reconciliation, including fund-level reconciliation, document-level reconciliation, and flow-level reconciliation in the collection line reconciliation model. In the actual business reconciliation process, there are many cases where the system cannot be directly reconciled, and reconciliation can only be achieved after manual / automatic intervention and repair. Therefore, a repair center module is built, which is mainly used for modifying the fields required for various bill reconciliations and merging and splitting bills; the repair center is commonly known as one-to-one, one-to-many, and many-to-one. The fields involved in the repair are: amount, main reconciliation ID, channel, major account, currency, reconciliation sub-type, counterparty department, and financial business unit. The specific import repair process is shown in Figure 6, and the deletion / import repair process is shown in Figure 7.

[0129] In various embodiments of the present application, high-concurrency scenarios exist in clearing and settlement reconciliation systems. When generating corresponding database tables, unique IDs need to be generated, which necessitates the use of an ID generator. The Snowflake algorithm, a unique ID generation algorithm primarily used in distributed systems, has emerged as a suitable solution. It can generate globally unique IDs without relying on other storage facilities such as databases. The existing Snowflake algorithm consists of a 1-bit sign bit, a 41-bit timestamp, a 10-bit machine ID, and a 12-bit counting sequence number. Its drawbacks include: 1. Time duration issues: Time calculations start in 1970 and can only be used for 69 years; 2. It consumes more space: Using more bits to represent timestamps consumes more storage space. 3. Clock rewind issues: If the system clock rewinds, duplicate or invalid IDs may be generated. Due to the length of time stamps, a higher clock resolution may be required to ensure that the same ID is not generated repeatedly. Insufficient clock resolution can increase the risk of ID conflicts. 4. Performance issues under high concurrency: the larger the amount of bottle-neck generation, the slower the bottleneck; 5. It is easy to cause single point failure; 6. Scalability is limited, there are no rules and business meanings, in a sense it is just an ID, if the business requires a meaningful distributed ID, it is not advisable.

[0130] Based on the above Twitter native snowflake algorithm, a secondary improvement is made, as shown in Figure 8:

[0131] 1 bit is the sign bit, which is the highest bit and is always 0. It has no meaning because it is a negative number in the unique computer binary complement and 0 is a positive number.

[0132] The 31-bit timestamp is changed to the second. The 31-bit binary can be used for 69 years. Since time theoretically increases forever, it is possible to sort according to this.

[0133] The 15-digit number is for machine identification, and all of it can be used as the machine ID. Our computer room uses the IP / 31 network segment, which fully meets the identification requirements of 32,768 machines.

[0134] The 17-digit serial number is a counting serial number, which means that different IDs can theoretically be generated at the same time on the same machine. The 17-digit serial number can distinguish 131,071 IDs.

[0135] To achieve the goal of generating 130,000 IDs per second through a secondary improvement to the Snowflake algorithm in a distributed environment with high concurrency, the specific solution for generating unique target IDs based on the optimized Snowflake algorithm includes:

[0136] Obtain a first timestamp in the current state, and perform a division operation on the first timestamp to obtain a second timestamp in seconds;

[0137] Obtain a third timestamp of the last generated ID, and determine whether the third timestamp is the same as the second timestamp;

[0138] When the second timestamp is different from the third timestamp, if the second timestamp is smaller than the third timestamp, the system clock is rolled back and the second timestamp is set to the third timestamp;

[0139] If the second timestamp is the same as the third timestamp, an ID is generated in the same second, a sequence number is generated by auto-incrementing and assigned to a variable s, and an AND operation is performed on the variable s and the sequence number to determine whether the sequence number reaches a maximum threshold. When the maximum threshold is reached, the current thread enters a dormant state until the next second, and the variable s is used to store the sequence number.

[0140] A mixed code is generated by combining a preset shift operation and a function call. The mixed code is generated by shifting the second timestamp left by a preset position to obtain the timestamp part, obtaining the working node identification part through a function call, performing a bitwise OR operation on the serial number s to obtain the final mixed code, and returning the generated distributed ID.

[0141] The specific implementation code in this embodiment is as follows:

[0142] The core of the above ID generation principle is as follows:

[0143] 1. First, call the getInnerMixId() method to obtain the ID of the generated distribution. 2. Get the current timestamp now and divide it by 1000 to get the second-level timestamp timestamp. 3. Get the value of LAST_TIME_V2, which is the timestamp of the last ID generation. 4. If timestamp is less than lastTimestamp, it means that the time has rolled back, and set timestamp to lastTimestamp. 5. Define a variable s to store the sequence number. 6. If timestamp is equal to lastTimestamp, it means that the ID was generated in the same second. Increase the value of the sequence number SEQUENCE_V2 and assign it to s. If the result of the AND operation of s and SEQUENCE_MASK_V2 is 0, it means that the sequence number has reached the maximum value and needs to wait for the next second to generate again. At this time, the waiting time hold is calculated, and then the thread is put to sleep through TimeUnit.MILLISECONDS.sleep(hold) until the next second. 7. If timestamp is not equal to lastTimestamp, it means a new second has begun, and the value of the sequence number SEQUENCE_V2 is reset to 0. 8. Finally, use bitwise operations and method calls to combine and generate a mixed code: (timestamp-DIRECT)<<32, that is, shift left 32 bits to obtain the timestamp part; use the getWorkIdV2() method to obtain the working node identification part; perform a bitwise OR operation on the sequence number s to obtain the final mixed code. 9. Return the generated distributed ID, where LAST_TIME_V2: the timestamp of the last time the ID was obtained; SEQUENCE_V2: the sequence number definition for concurrent requests at the same timestamp, the default value is 0; SEQUENCE_MASK_V2: the maximum number of concurrent requests. DIRECT: the default timestamp (seconds) initialization value of the snowflake algorithm is used to extend the maximum usage period of the snowflake algorithm.

[0144] In summary, the advantages of using the improved snowflake algorithm to generate unique target IDs are: 1. High concurrency: By properly allocating and managing work nodes (workId) and sequence numbers (seq), this improved solution can generate 130,000 unique IDs per second. This makes it ideal for ID generation in high-concurrency scenarios. 2. Accurate timestamps: Using a 31-bit timestamp, compared to the 41-bit timestamps of the snowflake algorithm, provides a longer time range and lowers the clock resolution requirement. The fewer timestamp bits allow it to operate at lower clock resolutions, reducing reliance on high-performance clocks. This supports ID generation over a longer timeframe and avoids potential time overlap issues. 3. Detailed item identification: Introducing an identification bit for reconciliation details helps distinguish different types of business or data, facilitating subsequent data processing and analysis. 4. Scalability: This improved solution uses a 15-bit work node (workId), providing system scalability up to 32,768 work nodes. This means the number of work nodes can be easily increased or adjusted to meet business expansion needs. 5. Less space usage: Compared to 41-bit timestamps, 31-bit timestamps require less storage space, which means it solves the huge challenge of storing massive amounts of data in high-concurrency reconciliation scenarios. 6. Simple and efficient: Compared to other complex ID generation algorithms, this improved solution is relatively simple and easy to understand. At the same time, due to its use of the snowflake algorithm as a foundation, it can still maintain efficient ID generation performance. 7. Regarding single points of failure, we have two ways to implement the snowflake algorithm: one is to provide a tool class, and the other is to provide it as a distributed ID service. The tool class method can be integrated into the business system to avoid more than 90% of single points of failure.

[0145] In various embodiments of the present application, the responding to the cross-border business reconciliation request includes:

[0146] Establish a data exchange path between the reconciliation business system and the financial system, generate a unified reconciliation center based on the data exchange path, and manage it centrally. At the same time, build a distributed ID generation service based on the optimized snowflake algorithm to generate multiple target IDs in a high-concurrency environment;

[0147] When the current process is in the bill parsing state, a first target ID is generated based on the established ID generation service, and the reconciliation data is marked according to the first target ID and the flow process of the reconciliation data in the bill parsing state is recorded;

[0148] When the current process is in the reconciliation execution state, a second target ID is generated based on the established ID generation service, and the reconciliation data is marked according to the second target ID and the flow process of the reconciliation data in the reconciliation execution state is recorded;

[0149] When the current process is in the data penetration state, bill association across reconciliation dimensions is performed based on the first target ID to match cross-level data relationships, and penetration information from information flow to capital flow is generated. Based on the penetration information, anomalies are discovered and prompted in a timely manner, which is conducive to coping with the complexity of cross-border payments and the lack of unified standards. There is a complete closed loop from user information flow to capital flow to ensure that any errors between businesses and systems can be discovered through the reconciliation system, and any differences in the entire link are handled.

[0150] The difficulties in achieving penetration in this embodiment are: 1. Multi-level data association: Associating and analyzing data at various levels of different business lines involves matching multiple data sources and dimensions, and needs to solve problems such as different data formats and identification fields. 2. Data inconsistency: There may be problems such as day cuts and risk control between the bank's actual fund account period and the customer's transaction date, resulting in inconsistent data time. How to accurately associate the account period and transaction information and handle inconsistencies is an important difficulty. 3. Handling of abnormal situations: During the penetration process, there may be a situation where one party has data and the other party has no data, or the transaction or transaction documents are missing. How to handle these abnormal situations and ensure the accuracy and completeness of the penetration is a challenge.

[0151] To address the above-mentioned shortcomings, the penetration function provided in this embodiment is intended to connect the reconciliation data of various links in different business lines in series, thereby forming a clear image of the direction of business data information flow and capital flow.

[0152] To address the issue of inconsistencies between a bank's actual funding period and a customer's transaction history, such as in situations involving daily cuts and risk control, the present invention's penetration technology can link each detailed transaction data to the bank's payment period layer by layer, including the processing status and pending items at each intermediate step. This allows accurate determination of each transaction's actual payment period and funds flow. Furthermore, to support the calculation of clearing and settlement OP and financial OP, the penetration function is considered an essential prerequisite. By providing the necessary foundation, the penetration function ensures the smooth execution of clearing, settlement, and financial operations.

[0153] This invention provides a penetration method for associating and analyzing data at various levels across different business lines to reveal clear business data information flows and capital flows. The specific penetration logic is as follows:

[0154] In the bank channel penetration logic, cross-reconciliation bill associations are achieved through penetration analysis of bank / channel bills, gateway orders, document information, and transaction information. At the fund level, this penetration logic ensures that the fund reconciliation details have been reconciled. Based on the bilateral data, the penetration information is brought into the business statement and the corresponding funds pending information is simultaneously marked. At the document level, based on the conditions that the fund details have been reconciled and the fund level has been penetrated, the penetration information from the business order is carried over to the transaction document. At the transaction level, when reconciling transaction documents with transaction statements, the penetration information from the transaction document is implemented.

[0155] In the channel penetration logic, cross-reconciliation bill association is achieved through penetration analysis of channel bills, transaction orders, transaction vouchers, and customer transactions. This penetration logic, assuming that the channel details have been reconciled, incorporates the penetration information into the transaction order reconciliation statement based on bilateral data and simultaneously adds the corresponding channel detail pending information. At the document level, based on the conditions that the channel details have been reconciled and the funding level has been penetrated, the penetration information from the transaction order is carried over to the transaction voucher. At the transaction level, when reconciling transaction documents with transaction statements, the penetration information from the transaction document is integrated into the transaction statement.

[0156] Furthermore, within the transfer penetration logic, cross-reconciliation bill associations are achieved through penetration analysis of outgoing (incoming) documents and business line transactions. This penetration logic, assuming all reconciliation levels are balanced, determines the primary bill direction based on business attributes and chronologically penetrates the penetration information of bilateral business documents. At the transaction level, penetration information from transaction documents is penetrated into transaction statements, ensuring that all document levels are balanced and penetrated.

[0157] The breakthrough points of the above-mentioned embodiment in achieving penetration are: 1. Bill association across reconciliation dimensions: bill association across reconciliation dimensions is performed through the original bill ID (unique), which realizes the precise matching and association of data at different levels, and provides a comprehensive flow of business data information and funds. 2. Accurate penetration information transmission: for data relationships at different levels, the penetration information is accurately transmitted to the reconciliation statements at each level, ensuring the consistency and accuracy of the data. 3. Pending information synchronization: during the penetration process, the corresponding funds and channel details pending information will be synchronously marked with the corresponding penetration information, so that information such as in-transit funds and transaction status can be accurately displayed. The above-mentioned pending information refers to the funds on the bank side that have occurred, but the business line has not yet added or subtracted funds from the customer's account due to daily cuts or risk control audits. 4. Abnormal situation handling strategy: for abnormal situations, such as no data, missing data, etc., corresponding processing logic and supplementary measures are provided to ensure the stability and integrity of the penetration process.

[0158] In summary, this penetration logic achieves accurate cross-level data association and penetration by addressing key challenges such as multi-level data association, data inconsistency, and exception handling, achieving a high level of technical breakthrough. This penetration logic provides reliable data support for clearing and settlement and financial operations, improving reconciliation accuracy and efficiency.

[0159] In summary, the penetration logic provided by this invention, through precise data association and matching, provides an efficient solution for reconciling different business lines, effectively revealing the flow of business data and funds. This penetration logic has important application value in areas such as clearing and settlement, and financial operations.

[0160] Example 2

[0161] Based on the same inventive concept, the present invention provides a full-link reconciliation device based on the Snowflake algorithm, comprising:

[0162] The collection module is used to respond to cross-border business reconciliation requests and obtain bill source data from the business end;

[0163] The parsing module is used to parse the acquired bill source data and convert it into target bill data based on the unified reconciliation center;

[0164] The reconciliation module is used to call the reconciliation rule engine to obtain corresponding reconciliation rules to match the different data access conditions of the cross-border payment terminal, select the corresponding reconciliation algorithm after executing the reconciliation rules, and perform full-link reconciliation tasks on the target bill data to obtain reconciliation results. The reconciliation tasks include fund reconciliation, document reconciliation, and transaction reconciliation;

[0165] A judgment module is used to determine whether the reconciliation result during the execution of the full-link reconciliation task is balanced. The module transmits the unbalanced reconciliation data to the corresponding exception handling system for abnormal data verification until the reconciliation result is balanced. Balance means that the balance obtained from the business system and the balance obtained from the financial system at the same time are the same;

[0166] The penetration module is used to generate a unique target ID based on the optimized snowflake algorithm to associate the reconciliation result with the corresponding bill, automatically penetrate the full-link data of information flow and capital flow according to the corresponding unique target ID in the reconciliation result, and trace the entire process of the corresponding bill flowing between the capital flow and information flow according to the unique target ID to achieve a complete reconciliation closed loop.

[0167] The principles, contents and implementation methods of the above-mentioned collection module, analysis module, reconciliation module, judgment module and penetration module are as described in Example 1 and will not be repeated here.

[0168] Example 3

[0169] In some embodiments of the present application, an electronic device is provided. This electronic device includes a memory and a processor, wherein the memory is used to store a processing program, and the processor executes the processing program according to instructions. When the processor executes the processing program, the full-link reconciliation method based on the snowflake algorithm described in the aforementioned embodiments is implemented.

[0170] In some embodiments of the present application, a readable storage medium is further provided. The readable storage medium may be a non-volatile readable storage medium or a volatile readable storage medium. The readable storage medium stores instructions that, when executed on a computer, cause an electronic device containing the readable storage medium to execute the aforementioned full-link reconciliation method based on the Snowflake algorithm.

[0171] It is understandable that for the aforementioned full-link reconciliation method based on the snowflake algorithm, if it is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program code.

[0172] Computer-readable storage media may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0173] The program code used to implement the technical solutions disclosed in this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., as well as conventional procedural programming languages ​​such as C or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and 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 via any type 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, via the Internet using an Internet service provider).

[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A full-link reconciliation method based on the snowflake algorithm, characterized in that: include: Respond to cross-border business reconciliation requests and obtain bill source data from the business end; Based on the unified reconciliation center, the acquired bill source data is parsed and converted into target bill data; Calling the reconciliation rule engine to obtain the corresponding reconciliation rules to match the different data access conditions of the cross-border payment terminal, selecting the corresponding reconciliation algorithm after executing the reconciliation rules, and executing the full-link reconciliation task on the target bill data to obtain the reconciliation result. The reconciliation task includes fund reconciliation, document reconciliation and transaction reconciliation; Determine whether the reconciliation result is balanced during the execution of the full-link reconciliation task, and transmit the unbalanced reconciliation data to the corresponding exception processing system for checking the abnormal data until the reconciliation result is balanced. Balance means that the balance obtained from the business system and the balance obtained from the financial system at the same time are the same; Generate a unique target ID based on the optimized snowflake algorithm to associate the reconciliation result with the corresponding bill, automatically penetrate the full-link data of information flow and capital flow according to the corresponding unique target ID in the reconciliation result, and trace the entire process of the corresponding bill flowing between the capital flow and the information flow according to the unique target ID to achieve a complete reconciliation closed loop; The method of generating a unique target ID based on the optimized snowflake algorithm includes: obtaining a first timestamp in the current state, and performing a division operation on the first timestamp to obtain a second timestamp at the second level; obtaining a third timestamp of the last ID generation, and determining whether the third timestamp is the same as the second timestamp; when the second timestamp is different from the third timestamp, if the second timestamp is less than the third timestamp, the system clock is rolled back, and the second timestamp is set to the third timestamp; when the second timestamp is the same as the third timestamp, an ID is generated in the same second, a serial number is generated by self-incrementing and assigned to a variable s, and an AND operation is performed between the variable s and the serial number to determine whether the serial number reaches a maximum threshold, and when the maximum threshold is reached, the current thread enters a dormant state until the next second, and the variable s is used to store the serial number; a mixed code is generated by combining a preset shift operation and a function call, and the mixed code The combined encoding method is to shift the second timestamp left by a preset bit to obtain the timestamp part, obtain the working node identification part through a function call, perform a bitwise OR operation on the serial number s to obtain the final mixed encoding, and return the generated distributed ID; wherein the optimized snowflake algorithm consists of 1 identification bit, 31 timestamp bits, 15 working machine ids and 17 serial numbers; The parsing and converting of the acquired bill source data into target bill data based on the unified reconciliation center includes: triggering a data acquisition operation according to a business notification or a preset time, generating a reconciliation collection task, and executing a corresponding download task; reading the download task generated by the configuration, executing the download task regularly, and judging whether the target bill file is downloaded; if the target bill file is downloaded, reading the unparsed record of the target bill file, triggering a parsing operation on the target bill file, selecting a corresponding parsing template according to a preset file type, parsing the data in the target bill file, storing it in the database, performing data cleaning, converting it into a target reconciliation statement, and generating a conversion record according to the reconciliation dimension; if the target bill file is not downloaded, judging whether the current download count has reached the maximum number of attempts, and if it has not reached the maximum number of attempts, continuing to retry the download task, and if it has reached the maximum number of attempts, judging whether the download task has a downloaded file, and if it has a downloaded file, marking it as successful, and if it has not, giving a failure alarm; wherein the target bill file includes a bank bill and a non-bank bill; The calling of the reconciliation rule engine to obtain the corresponding reconciliation rule includes: in a one-to-one reconciliation rule mode, extracting a target bill data of a first reconciliation party and a target bill data of a second reconciliation party, accumulating the amounts bilaterally according to preset dimensions and a preset amount accumulation algorithm, and in the case of bilateral reconciliation, matching the accumulated amount of the first reconciliation party with the accumulated amount of the second reconciliation party and determining whether the accounts are balanced, wherein the preset dimensions at least include an account number and a master reconciliation ID; in a one-to-one reconciliation rule mode, extracting a target bill data of a first reconciliation party and a target bill data of a second reconciliation party, and after setting the target field according to the field matching algorithm, matching the target field of the first reconciliation party with the target field of the second reconciliation party. , and judge whether it is a balance; in a one-to-many or many-to-one reconciliation rule mode, extract a target bill data of the first reconciliation party and multiple target bill data of the second reconciliation party, or extract multiple target bill data of the first reconciliation party and a target bill data of the second reconciliation party, and add the amounts on one side according to the preset amount accumulation algorithm. In the case of one-side reconciliation, match the accumulated amount of multiple master / slave bills with the same master reconciliation ID attribute with an amount in the corresponding slave / master bill and judge whether it is a balance; wherein, the target bill data includes gateway reconciliation statement, bank reconciliation statement, document reconciliation statement and journal reconciliation statement; The selecting of the corresponding reconciliation algorithm after executing the reconciliation rule includes: if the reconciliation task is to execute an inbound transaction and is configured as a one-to-many reconciliation rule, selecting a difference reconciliation algorithm to perform a first reconciliation operation, the first reconciliation operation method is to obtain the master bill and the slave bill and execute a loop operation after confirming the target field to be checked under the rule, accumulating the amount under the same target field of the slave bill to obtain the accumulated amount, and matching the same data in the master and slave bills after accumulation, if the match is successful, the reconciliation is settled, otherwise the operation is ended without settling; if the reconciliation task is to execute an inbound transaction and is configured as a one-to-one reconciliation rule, selecting a standard reconciliation algorithm to perform a second reconciliation operation, the second reconciliation operation method is to obtain the master bill and the slave bill and execute l Oop loop operation, after arranging the target fields in a preset order, the data under the target segment in the slave bill is matched. If the data under the final field in the order is matched, the operation is terminated, i.e., the reconciliation is completed; if the reconciliation task is to execute a transfer transaction and is configured as a one-to-one reconciliation rule, a data matching algorithm is selected to perform a third reconciliation operation. The third reconciliation operation mode is to obtain the master bill and the slave bill and perform a loop operation, filter the master bill and the slave bill according to the preset conditions, and match the same data in the master and slave bills after splicing them according to their respective target fields and amounts. If the match is successful, the reconciliation is settled, otherwise the operation is terminated without settling; wherein, the target field includes one or more combinations of bank, amount, currency, and master reconciliation ID; The said transmitting the data of the unbalanced reconciliation to the corresponding exception handling system to check and handle the abnormal data until the reconciliation result is balanced includes: starting the normal reconciliation mode, comparing the main bill with the subsidiary bill, and when the output comparison result shows that the subsidiary bill is unbalanced, judging whether the subsidiary bill is a unilateral account; if the subsidiary bill is not a unilateral account, judging whether the amount of the subsidiary bill is different from that of the main bill, and if the amount is different, registering the main / slave unilateral account error record, triggering the acquisition of the error record regularly for global error record matching, and transmitting it to the unified reconciliation center to execute the unified reconciliation engine; if the subsidiary bill is a unilateral account, Register the unilateral account error, transmit the error data to the pending system to confirm whether it is the funds in transit data, and transmit it to the error processing center for abnormal data verification to determine whether the error data needs to be written off. If it is necessary to write off the account, execute the write-off until the account is balanced; if it is not necessary to write off the account, transmit the error data to the error pool for reconciliation; if the above methods are all executed and the error data still exists, perform a repair operation on the error data, and the repair operation method is to split or merge multiple data in the error data according to the preset repair fields and then reconcile them until the account is balanced.

2. The full-link reconciliation method based on the snowflake algorithm as claimed in claim 1, characterized in that: The calling of the reconciliation rule engine includes: Performing reconciliation configuration on the information flow corresponding to the bill source data and checking the configuration operation by determining whether the configuration parameters have passed the verification; After the parameter verification is passed, determine whether the reconciliation is duplicated. If the reconciliation is duplicated, restore the difference pool data generated by the previous reconciliation and then delete it. At the same time, delete the previous reconciliation data and write it to Redis in the form of the target reconciliation statement; If parameter verification fails, it is directly written to Redis in the form of a target statement; Determine whether an exception occurs in the database during the process of writing bill data to Redis. If no exception occurs, check the target bill. After reading the bill source data generated in the form of the target bill from the Redis cache, proceed to the next step of calling the reconciliation rule engine. Among them, the bill source data reads Redis cache data in a Cousor cursor manner, and the Cousor cursor manner includes: triggering a mechanism to extract one cache data record each time from a result set containing multiple cache data records, and when a user accesses any row of cache data in the result set, placing the cursor on the target row, and performing operations on the target row or on a row block from the target position. The result set is composed of a temporary file consisting of the cursor position pointing to the target cache record.

3. The full-link reconciliation method based on the snowflake algorithm as claimed in claim 1, characterized in that: The responding to the cross-border business reconciliation request includes: Establish a data interaction path between the reconciliation business system and the financial system, generate a unified reconciliation center based on the data interaction path and manage it in a centralized manner, and build a distributed ID generation service based on the optimized snowflake algorithm to generate multiple target IDs in a high-concurrency environment; When the current process is in the bill parsing state, a first target ID is generated based on the established ID generation service, and the reconciliation data is marked according to the first target ID and the flow process of the reconciliation data in the bill parsing state is recorded; When the current process is in the reconciliation execution state, a second target ID is generated based on the established ID generation service, and the reconciliation data is marked according to the second target ID and the flow process of the reconciliation data in the reconciliation execution state is recorded; When the current process is in the data penetration state, the bill association across the reconciliation dimension is performed according to the first target ID to match the cross-level data relationship, and the penetration information from the information flow to the capital flow is generated. According to the penetration information, it is ensured that anomalies are discovered and prompted in time.

4. A full-link reconciliation device based on the snowflake algorithm, characterized in that: include: The collection module is used to respond to cross-border business reconciliation requests and obtain bill source data from the business end; The parsing module is used to parse the acquired bill source data and convert it into target bill data based on the unified reconciliation center; A reconciliation module is used to call the reconciliation rule engine to obtain corresponding reconciliation rules to match different data access conditions of the cross-border payment terminal, select the corresponding reconciliation algorithm after executing the reconciliation rule, and perform the full-link reconciliation task on the target bill data to obtain the reconciliation result. The reconciliation task includes fund reconciliation, document reconciliation and transaction reconciliation; A judgment module is used to judge whether the reconciliation result is balanced during the execution of the full-link reconciliation task, and transmit the unbalanced reconciliation data to the corresponding exception processing system for checking the abnormal data until the reconciliation result is balanced. Balance means that the balance obtained from the business system and the balance obtained from the financial system at the same time are the same; A penetration module is used to generate a unique target ID based on the optimized snowflake algorithm to associate the reconciliation result with the corresponding bill, automatically penetrate the full-link data of the information flow and the capital flow according to the corresponding unique target ID in the reconciliation result, and trace the entire process of the corresponding bill flowing between the capital flow and the information flow according to the unique target ID to achieve a complete reconciliation closed loop; The method of generating a unique target ID based on the optimized snowflake algorithm includes: obtaining a first timestamp in the current state, and performing a division operation on the first timestamp to obtain a second timestamp at the second level; obtaining a third timestamp of the last ID generation, and determining whether the third timestamp is the same as the second timestamp; when the second timestamp is different from the third timestamp, if the second timestamp is less than the third timestamp, the system clock is rolled back and the second timestamp is set to the third timestamp; when the second timestamp is the same as the third timestamp, an ID is generated within the same second, and the serial number is incremented by Generate and assign a value to variable s, and determine whether the sequence number reaches the maximum threshold by performing an AND operation on variable s and the sequence number. When the maximum threshold is reached, the current thread enters a dormant state until the next second. The variable s is used to store the sequence number; a mixed code is generated by combining a preset shift operation and a function call. The mixed code is performed by shifting the second timestamp to the left by a preset position to obtain the timestamp part, obtaining the working node identification part through a function call, performing a bitwise OR operation on the sequence number s to obtain the final mixed code, and returning the generated distributed ID; wherein the optimized snowflake algorithm consists of a 1-bit identification bit, a 31-bit timestamp bit, a 15-bit working machine id, and a 17-bit sequence number; The parsing and converting of the acquired bill source data into target bill data based on the unified reconciliation center includes: triggering a data acquisition operation according to a business notification or a preset time, generating a reconciliation collection task, and executing a corresponding download task; reading the download task generated by the configuration, executing the download task regularly, and judging whether the target bill file is downloaded; if the target bill file is downloaded, reading the unparsed record of the target bill file, triggering a parsing operation on the target bill file, selecting a corresponding parsing template according to a preset file type, parsing the data in the target bill file, storing it in the database, performing data cleaning, converting it into a target reconciliation statement, and generating a conversion record according to the reconciliation dimension; if the target bill file is not downloaded, judging whether the current download count has reached the maximum number of attempts, and if it has not reached the maximum number of attempts, continuing to retry the download task, and if it has reached the maximum number of attempts, judging whether the download task has a downloaded file, and if it has a downloaded file, marking it as successful, and if it has not, giving a failure alarm; wherein the target bill file includes a bank bill and a non-bank bill; The calling of the reconciliation rule engine to obtain the corresponding reconciliation rule includes: in a one-to-one reconciliation rule mode, extracting a target bill data of a first reconciliation party and a target bill data of a second reconciliation party, accumulating the amounts bilaterally according to a preset dimension and a preset amount accumulation algorithm, and in the case of bilateral reconciliation, matching the accumulated amount of the first reconciliation party with the accumulated amount of the second reconciliation party and determining whether the amount is Determine whether the account is balanced, and the preset dimensions include at least the account number and the master account ID; in a one-to-one reconciliation rule mode, extract a target bill data of the first account party and a target bill data of the second account party, set the target field according to the field matching algorithm, match the target field of the first account party with the target field of the second account party, and determine whether the account is balanced; in a one-to-many or many-to-one reconciliation rule mode, extract a target bill data of the first account party and multiple target bill data of the second account party, or extract multiple target bill data of the first account party and a target bill data of the second account party, and add up the amounts on one side according to the preset amount accumulation algorithm. In the case of one-side reconciliation, match the accumulated amount of multiple master / slave bills with the same master account ID attribute with an amount in the corresponding slave / master bill, and determine whether the account is balanced; wherein, the target bill data includes gateway reconciliation statements, bank reconciliation statements, document reconciliation statements, and running reconciliation statements; The selecting of the corresponding reconciliation algorithm after executing the reconciliation rule includes: if the reconciliation task is to execute an inbound transaction and is configured as a one-to-many reconciliation rule, selecting a difference reconciliation algorithm to perform a first reconciliation operation, the first reconciliation operation method is to obtain the master bill and the slave bill and perform a loop operation after confirming the target field to be checked under the rule, accumulating the amount under the same target field of the slave bill to obtain the accumulated amount, and matching the same data in the master and slave bills after accumulation, if the match is successful, the reconciliation is settled, otherwise the operation is ended without settling; if the reconciliation task is to execute an inbound transaction and is configured as a one-to-one reconciliation When the rule is set, the standard reconciliation algorithm is selected to perform the second reconciliation operation. The second reconciliation operation method is to obtain the master bill and the sub-bill and perform a loop operation. After arranging them in a preset order according to the target fields, the data under the target segment in the sub-bill is matched. If the data under the final field in the order is matched, the operation is ended, that is, the reconciliation; if the reconciliation task is to execute a transfer transaction and the one-to-one reconciliation rule is configured, a data matching algorithm is selected to perform the third reconciliation operation. The third reconciliation operation method is to obtain the master bill and the sub-bill and perform a loop operation. The master bill and the sub-bill are screened according to the preset conditions. Select, and match the same data in the master and slave bills according to the respective target fields and amounts. If the match is successful, the reconciliation is settled, otherwise the operation is terminated without settling the accounts. The target fields include one or more combinations of bank, amount, currency and master reconciliation ID. The said transmitting the data of the unbalanced reconciliation to the corresponding exception handling system to check and handle the abnormal data until the reconciliation result is balanced includes: starting the normal reconciliation mode, comparing the main bill with the subsidiary bill, and when the output comparison result shows that the subsidiary bill is unbalanced, judging whether the subsidiary bill is a unilateral account; if the subsidiary bill is not a unilateral account, judging whether the amount of the subsidiary bill is different from that of the main bill, and if the amount is different, registering the main / slave unilateral account error record, triggering the acquisition of the error record regularly for global error record matching, and transmitting it to the unified reconciliation center to execute the unified reconciliation engine; if the subsidiary bill is a unilateral account, Register the unilateral account error, transmit the error data to the pending system to confirm whether it is the funds in transit data, and transmit it to the error processing center for abnormal data verification to determine whether the error data needs to be written off. If it is necessary to write off the account, execute the write-off until the account is balanced; if it is not necessary to write off the account, transmit the error data to the error pool for reconciliation; if the above methods are all executed and the error data still exists, perform a repair operation on the error data, and the repair operation method is to split or merge multiple data in the error data according to the preset repair fields and then reconcile them until the account is balanced.

5. An electronic device, characterized in that: include: A memory, the memory being used to store a processing program; A processor, wherein when executing the processing program, the processor implements the full-link reconciliation method based on the snowflake algorithm as described in any one of claims 1 to 3.

6. A readable storage medium, characterized in that: The readable storage medium stores a processing program, and when the processing program is executed by the processor, the full-link reconciliation method based on the snowflake algorithm as described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Full-link account checking method and system

    CN110544164A

  • Full-link account checking method and account checking system

    CN116091192A

  • Account checking processing method and device, electronic equipment and storage medium

    CN116167860A

  • Reconciliation method and device, equipment and storage medium

    CN117132415A

  • Full-link account checking method and device based on snowflake algorithm, equipment and medium

    CN117350880A

Cited By

  • Campus consumption account state intelligent management system based on multi-terminal synchronous verification

    CN121921012A

  • Cross-border platform multi-target area adaptation system and method

    CN122132081A

  • Data configuration method and device, storage medium and electronic equipment

    CN122346335A