Data processing method and device
By receiving and processing transaction flows in data processing, determining transaction codes and business rules, and performing accounting summary and comparison, the limitations of accounting methods in the prior art are solved, and efficient and accurate accounting processing and system scalability are achieved.
Patent Information
- Application Number
- CN202411342914.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, the accounting method must be based on the account dimension, resulting in the limitations of the method, lack of universality and scalability, and it is difficult to meet the growing data processing needs when facing transactions that are not based on the account dimension.
By receiving transaction flow processing requests, downloading transaction flows, determining transaction codes based on channel type and business type, querying the extension type collection, extracting scenario values, matching the business rule engine, determining the balance type and account, performing accounting summary, and comparing whether the account balance and account balance are consistent, and performing corresponding operations based on the comparison results.
It realizes efficient processing of transactions that do not take the account as the dimension, improves accounting efficiency, reduces manual intervention, ensures the accuracy and consistency of accounting processing, and has high system scalability, adapts to the needs of modern enterprises.
Smart Images

Figure CN119671724A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method and device. Background Art
[0002] The current accounting method is based on accounts, but this method has limitations when facing transactions that are not based on accounts. This limitation makes the method lack versatility and scalability. As the business develops, the existing method is difficult to meet the growing data processing needs. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a data processing method and device, which can at least solve the limitation caused by the fact that the accounting method in the prior art must be based on the account dimension.
[0004] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a data processing method is provided, comprising: receiving a transaction flow processing request, downloading the transaction flow based on the file address in the transaction flow processing request, and then obtaining a batch of transaction flows to be processed; wherein the transaction flow includes a channel type, a business type, transaction information, and a scenario information; determining a transaction code according to the channel type and the business type, querying a set of extension types corresponding to the transaction code, and extracting a scenario value matching each extension type from the scenario information; matching a corresponding business rule engine according to the transaction code, the extension type, and the scenario value, and using the business rule engine to determine a balance type and an account; sending the transaction information to the account and the sub-account corresponding to the balance type for accounting summary, comparing whether the account balance and the sub-account balance are consistent, and performing corresponding operations according to the comparison result.
[0005] Optionally, the use of the business rule engine to determine the balance type and account includes: obtaining an accounting type and a matching type from the business rule engine; wherein the matching type includes an action type and an amount type; determining the balance type based on the matching type, and then determining the account based on the accounting type and the balance type.
[0006] Optionally, determining the balance type according to the matching type includes: determining the balance type and the debit and credit direction according to the matching type; sending the transaction information to the account and the sub-account corresponding to the balance type for bookkeeping summary, includes: mapping the transaction information to the amount of the account, so that the account adds or subtracts the current account balance and the transaction information according to the debit and credit direction to obtain an updated account balance; determining the sub-account corresponding to the balance type, adding the transaction information and the current sub-account balance to obtain an updated sub-account balance.
[0007] Optionally, the transaction information includes transaction currency and transaction amount; the transaction information is sent to the account and the sub-account corresponding to the balance type for accounting summary, including: mapping the transaction information to the sub-account corresponding to the transaction currency under the account, so that the sub-account adds or subtracts the current sub-account balance and transaction information according to the debit and credit direction to obtain an updated sub-account balance; determining the sub-account corresponding to the balance type, so that the sub-account determines the sub-account corresponding to the transaction currency, and the sub-account adds the transaction information with the current sub-account account balance to obtain an updated sub-account account balance.
[0008] Optionally, when there are multiple balance types, the account balances and sub-account balances corresponding to the same balance type are compared.
[0009] Optionally, the corresponding operations are performed according to the comparison results, including: in response to the consistency of the account balance and the sub-account balance, no processing is performed; in response to the inconsistency of the account balance and the sub-account balance, calling the preset verification rules to locate the transaction information and the reason for the difference that cause the inconsistent amount; wherein the preset verification rules include one or more of transaction information quantity comparison, transaction information comparison at the same time point, and transaction information aggregation method comparison; calling the pre-configured adjustment rules corresponding to the reason for the difference to adjust the transaction information that causes the inconsistent amount in the account and sub-account; sending the adjustment completion information to the review node for review, so that after receiving the review pass information returned by the review node, the account balance and the sub-account balance are recalculated and compared.
[0010] Optionally, downloading the transaction flow based on the file address in the transaction flow processing request includes: downloading the transaction flow based on the file address in the transaction flow processing request to calculate a hash value of the transaction flow; and obtaining a file hash value corresponding to the file address, comparing the file hash value and the calculated hash value to perform integrity verification on the transaction flow according to the comparison result.
[0011] To achieve the above-mentioned purpose, according to another aspect of an embodiment of the present invention, a data processing device is provided, including: a receiving module, used to receive a transaction flow processing request, download the transaction flow based on the file address in the transaction flow processing request, and then obtain the batch transaction flow to be processed; wherein the transaction flow includes the channel type, business type, transaction information, and scenario information; a query module, used to determine the transaction code according to the channel type and business type, query the extension type set corresponding to the transaction code, and extract the scenario value matching each extension type from the scenario information; a matching module, used to match the corresponding business rule engine according to the transaction code, extension type and scenario value, and use the business rule engine to determine the balance type and account; an accounting module, used to send the transaction information to the account and the sub-account corresponding to the balance type for accounting summary, compare whether the account balance and the sub-account balance are consistent, and perform corresponding operations according to the comparison result.
[0012] Optionally, the matching module is used to: obtain an accounting type and a matching type from a business rule engine; wherein the matching type includes an action type and an amount type; determine a balance type according to the matching type, and further determine an account according to the accounting type and the balance type.
[0013] Optionally, the matching module is used to determine the balance type and debit and credit direction according to the matching type; the accounting module is used to map the transaction information to the amount of the account, so that the account adds or subtracts the current account balance and transaction information according to the debit and credit direction to obtain an updated account balance; determine the sub-account corresponding to the balance type, add the transaction information and the current sub-account balance to obtain an updated sub-account balance.
[0014] Optionally, the transaction information includes the transaction currency and the transaction amount; the accounting module is used to: map the transaction information to the sub-account corresponding to the transaction currency under the account, so that the sub-account adds or subtracts the current sub-account balance and the transaction information according to the debit and credit direction to obtain an updated sub-account balance; determine the sub-account corresponding to the balance type, so that the sub-account determines the sub-account corresponding to the transaction currency, and the sub-account adds the transaction information with the current sub-account account balance to obtain an updated sub-account account balance.
[0015] Optionally, when there are multiple balance types, the account balances and sub-account balances corresponding to the same balance type are compared.
[0016] Optionally, the accounting module is used to: in response to the consistency of the account balance and the sub-account balance, do no processing; in response to the inconsistency of the account balance and the sub-account balance, call the preset verification rules to locate the transaction information and the reason for the difference that cause the inconsistent amount; wherein the preset verification rules include one or more of transaction information quantity comparison, transaction information comparison at the same time point, and transaction information aggregation method comparison; call the pre-configured adjustment rules corresponding to the reason for the difference to adjust the transaction information that causes the inconsistent amount in the account and sub-account; send the adjustment completion information to the review node for review, so that after receiving the review pass information returned by the review node, the account balance and sub-account balance are recalculated and compared.
[0017] Optionally, the receiving module is used to: download the transaction flow based on the file address in the transaction flow processing request to calculate the hash value of the transaction flow; and obtain the file hash value corresponding to the file address, compare the file hash value and the calculated hash value, and perform integrity verification on the transaction flow according to the comparison result.
[0018] To achieve the above objective, according to another aspect of an embodiment of the present invention, a data processing electronic device is provided.
[0019] The electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned data processing methods.
[0020] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the above data processing methods is implemented.
[0021] To achieve the above object, according to another aspect of an embodiment of the present invention, a computer program product is provided. A computer program product of an embodiment of the present invention includes a computer program, and when the program is executed by a processor, the data processing method provided by the embodiment of the present invention is implemented.
[0022] According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: by batch processing multiple transaction flows through an automated process, the efficiency of bookkeeping can be significantly improved and the need for manual intervention can be reduced. This method not only ensures that each transaction has clear processing rules, but also enhances the accuracy and consistency of accounting processing through the business rule engine. The entire operation process is no longer based on accounts, making the processing of batch transaction flows more efficient and accurate. At the same time, the system has high scalability, and when adding new business types or scenarios, only simple configuration modifications are required, without the need for large-scale system reconstruction. This design can effectively respond to business changes, improve overall flexibility and adaptability, and is suitable for the needs of modern enterprises.
[0023] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0025] Figure 1 is a main flow chart of a data processing method according to an embodiment of the present invention;
[0026] Figure 2 is a flowchart of an optional data processing method according to an embodiment of the present invention;
[0027] Figure 3 is a flowchart of a specific data processing method according to an embodiment of the present invention;
[0028] Figure 4 is a schematic diagram of main modules of a data processing device according to an embodiment of the present invention;
[0029] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0030] Figure 6 It is a schematic diagram of the structure of a computer system of a mobile device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0032] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0033] In the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The acquisition, transmission, storage, use, and processing of data in the technical solution of the present invention are in compliance with the relevant provisions of national laws and regulations, and are used for legal and reasonable purposes, and are not shared, disclosed, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities.
[0034] For user information, necessary measures should be taken to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once such user personal information data is no longer needed, risks should be minimized by limiting or even prohibiting data collection and / or deleting data. When applicable, including in certain relevant applications, protect user privacy by de-identifying data, such as by removing specific identifiers (e.g., date of birth, etc.), controlling the amount or specificity of stored data (e.g., collecting location data at the city level rather than at the specific address level), controlling how data is stored, and / or other methods of de-identification.
[0035] See also Figure 1 , which shows a main flow chart of a data processing method provided by an embodiment of the present invention, comprising the following steps:
[0036] S101: receiving a transaction flow processing request, downloading the transaction flow based on the file address in the transaction flow processing request, and then obtaining the batch transaction flow to be processed; wherein the transaction flow includes channel type, business type, transaction information, and scenario information;
[0037] S102: determining a transaction code according to the channel type and the business type, querying a set of extension types corresponding to the transaction code, and extracting a scenario value matching each extension type from the scenario information;
[0038] S103: Match the corresponding business rule engine according to the transaction code, extension type and scenario value, and use the business rule engine to determine the balance type and account;
[0039] S104: Send the transaction information to the subject and the sub-account corresponding to the balance type for accounting summary, compare the subject balance and the sub-account balance to see if they are consistent, and perform corresponding operations based on the comparison results.
[0040] In the above implementation, for step S101, the system (or server) first defines a unique transaction code based on the channel type and business type where the business occurs. For example: Channel A requires bad debt record registration, Channel B requires amortization accounting, and Channel C requires bad debt registration. Here, Channel A: online payment platform, Channel B: offline POS payment (such as UnionPay POS), Channel C: bank transfer (such as online banking transfer), Business Type 1: Bad Debt Registration, Business Type 2: Amortization Accounting, although the business types required by Channel A and Channel C are the same, the channel types of the two are different, so different transaction codes need to be generated. However, if the channel types of Channel A and Channel C are the same, such as both are online payment platforms, the same transaction code can be generated. This operation can be performed in the system's database or configuration file to define the mapping relationship between channel type, business type and transaction code. See Table 1 for the definition of transaction codes:
[0041]
[0042] The system receives transaction flow processing requests uploaded by different business parties through the interface, reads the file address in the transaction flow processing request, and downloads the corresponding transaction flow from the corresponding database according to the file address, such as business party A-database 1, business party B-database 2, or different partitions of the same database. In this way, business parties do not need to upload transaction flows one by one, but the system obtains transaction flows in batches from the corresponding database based on the file address, thereby improving the transaction flow transmission speed. Therefore, the number of transaction flows to be processed by the system is usually multiple. For this scenario, this solution preferably adopts batch processing, such as processing 10,000 at a time. After receiving the transaction flow, you can first perform a preliminary check to ensure that the data format is correct.
[0043] Considering that some transaction flows are missing information or have been tampered with, this solution can also download the transaction flow in the corresponding database according to the file address, and obtain the file hash value corresponding to the file address. The file hash value can change with the change of the content stored in the file address. Due to the immutable nature of the file hash value, the recalculated hash value can be compared with the original hash value stored in the database. If the two hash values are the same, it means that the file has not been tampered with and the transaction flow is complete. If the two hash values are different, it means that the file may have been tampered with, the transaction flow is incomplete, and the processing is stopped and the exception is recorded. If the transaction flow has not been tampered with, continue to match the corresponding business rule engine.
[0044] For step S102, in this solution, the transaction code will not be transmitted to the business party. The transaction code is only on the system side. The system can determine the transaction code from the above mapping relationship according to the channel type and business type in the transaction flow. For example, if business party X uploads a transaction flow through channel A, the transaction flow will include channel A and the business type. Assuming the business type is bad debt registration, the transaction code can be determined as A001. In this solution, the transaction flow includes but is not limited to channel type, business type, transaction information, scenario information, etc. Here, the transaction information includes but is not limited to transaction currency and amount, which are the actual fields used for bookkeeping and have nothing to do with parameter matching information. After receiving this information, the system can use formats such as JSON or XML to store this information in a structured manner.
[0045] In this solution, different extension types are set in advance for different transaction codes. The extension types include extension fields, and the extension fields include multiple pre-defined dimensions such as individual, company, activity, and branch, which are used to store the extension data in the business party's transaction flow. For example, under the same bad debt registration business type, the accounting subjects may be individual bad debt principal and unit bad debt principal. However, since the channel type and business type are the same, the defined transaction code is also the same. At this time, the special scenario can be further matched through the extension type. When setting a new transaction code, 1 to N extension types will be added according to the requirements on the basis of the set established fields, and each extension type can have multiple scenario values. See Table 2 for an example of the extension type:
[0046]
[0047] In the table, extension type 1 is individual or company, extension type 2 is branch attribute, such as setting Shanghai and Beijing, and extension type 3 is set as activity attribute, such as setting activities in Shanghai on June 18th and November 11th. Assuming the set of extension types corresponding to transaction code A001 includes the above three types, first extract the scenario values corresponding to each extension type from the scenario information. Assuming the scenario information is: {"company": "company", "branch": "Shanghai", "activity": "618"}, extract the scenario values corresponding to each extension type from the scenario information: extension type 1 (individual or company) - company, extension type 2 (branch) - Shanghai, extension type 3 (activity) - 618. When extension type 1 is "company", it is not necessary to extract the scenario values of extension type 2 and extension type 3. Therefore, the finally extracted extension type and scenario value are: extension type 1 - company.
[0048] However, assume the scenario information is: {"company": "Individual", "branch": "Beijing", "activity": "618"}. Extract the scenario values corresponding to each extension type from the scenario information: Extension type 1 (Individual or Company) - Individual, Extension type 2 (Branch) - Beijing, Extension type 3 (Activity) - 618. When extension type 1 is "Individual", the scenario value of extension type 3 does not need to be extracted. Therefore, the finally extracted extension types and scenario values are: Extension type 1 - Individual, Extension type 2 - Beijing.
[0049] After matching the transaction code, extension type, and scenario value through the above steps, a unified transaction posting interface format can be defined, as shown in Table 3:
[0050]
[0051] For step S103, based on the design of scalability and generality, this method designs a set of parameter mapping rule engines and configures the corresponding business rule engines, as shown in Table 4:
[0052]
[0053] It can be seen that in the case of the same transaction code, the scenarios can be further distinguished according to the extension type. For example, when the above extension type 1 is Individual and Company, they are mapped to different matching types. The accounting type corresponds to the accounting method, such as H0001 - Individual Consumption Overdraft, H0002 - Individual Cash Withdrawal Overdraft, H0003 - Company Consumption Overdraft. Matching type 1 corresponds to the action type (Repayment, Overdue, Interest Settlement, Write-off, Overdraft, etc.), such as P001 - Repayment, P002 - Interest Settlement. Matching type 2 corresponds to the amount type (Principal, Interest, Fee, Collection, etc.), such as J001 - Principal, J002 - Interest Income, J003 - Write-off Principal, J004 - Non-accrual Principal. For the first-line transaction code A001 and extension type 1 being Individual, the mapped accounting type - H0001 - Individual Consumption Overdraft, matching type 1 - P001 - Repayment, matching type 2 - J001 - Principal.
[0054] After determining the business rule engine, the accounting type and matching type can be obtained from the business rule engine, and then the balance type can be determined according to the matching type. As shown in Table 5:
[0055]
[0056] In the table, Y0001-normal loan principal, Y0002-non-accrued loan principal, Y0003-overdraft interest receivable, and Y0004-written-off loan principal. For the first row of transaction code A001, and extension type 1 is individual, the mapping to accounting type-H0001-personal consumption overdraft, matching type 1-P001-repayment, matching type 2-J001-principal, through Table 5, it can be seen that its balance type 1 is Y0001-normal loan principal, the lending direction is debit (Debit), indicating that the borrower repays the principal to the lender (Credit), and the balance type M (can be 2) is Y1001-principal income, indicating that the lender receives the principal repaid by the borrower. Different balance types can be obtained here according to different matching types. The number of some balance types is multiple, and in some cases it can be 1.
[0057] After determining the balance type, you can determine the account name based on the accounting type and balance type, as shown in Table 6:
[0058]
[0059] In the table, account 1-personal consumption principal, account 2-personal non-accrued consumption principal, account 3-personal current interest to be collected, account 4-company write-off principal, account 5-personal income principal. Therefore, through the first row of Table 5 above, the two balance types are matched. Through Table 6, we can know that account 1 corresponds to H0001 and Y0001, and account 5 corresponds to H0001 and Y1001.
[0060] In addition to the above methods, this solution can also use other methods to achieve "matching the corresponding business rule engine according to the transaction code, extension type and scenario value, and using the business rule engine to determine the balance type and account". Here, the mapping relationship between the transaction code, extension type, scenario value and business rule engine can be established and stored.
[0061] Embodiment 1:
[0062] Transaction code - TR001, indicates a transfer transaction; extension type - EXP_TYPE_01, indicates an internal transfer; scenario value - SCENE_01, indicates a transfer between personal accounts.
[0063] Business rule engine used: Name - Personal internal transfer rule engine, Function - Processing internal transfer logic between personal accounts.
[0064] Rule set: Verify whether the transfer amount exceeds the account balance, check whether the two parties of the transfer are from the same bank account, and record the transfer operation log.
[0065] Determine the result: Balance type - current deposit, Account - Personal current deposit account.
[0066] Embodiment 2:
[0067] Transaction code - DP002, indicates the withdrawal of fixed deposit; extended type - EXP_TYPE_02, indicates automatic transfer upon maturity; scenario value - SCENE_02, indicates the maturity processing of fixed deposit.
[0068] Business rule engine used: Name - Automatic rollover rule engine for time deposits upon maturity, Function - Processing the logic of automatic rollover after time deposits expire.
[0069] Rule set: Determine whether a time deposit has matured, automatically transfer the matured principal and interest to a new time deposit account, and update customer notification information.
[0070] Determine the result: Balance type - Time deposit, Account - Time deposit account.
[0071] For step S104, the transaction information is sent to different accounts for aggregation according to the subject and balance type. This solution pre-sets different sub-accounts for different balance types, such as Y0001-sub-account a, Y1001-sub-account b, so the transaction information needs to be sent to sub-account a and sub-account b, as well as subject 1 and subject 5. The aggregation here, such as subject 1, corresponds to the repayment of the principal by the debit to the creditor. Assuming that the repayment principal is 500,000, it is necessary to subtract 500,000 from the original subject balance. But for subject 5, corresponding to the income principal, it is necessary to add 500,000 to the original balance. For sub-accounts a and b, similarly, consumption is negative and income is positive. Transaction information includes transaction currency and transaction amount. Therefore, the above operation can also set different sub-accounts for different transaction currencies under the subject, and different sub-accounts can also be set for different transaction currencies under the sub-account. In this way, the purpose of directly comparing the balances of the same transaction currency without conversion is achieved, thereby improving the comparison accuracy.
[0072] The aforementioned entry interface obtains transaction flow, which will be mapped to the corresponding balance type (such as Y0001) after matching by the business rule engine. The amount of the detailed flow of the day summarized according to the balance type is the daily sub-account amount. In the case of multiple balance types, the number of subjects and sub-accounts are also multiple. The subject balances and sub-account balances corresponding to the same balance type can be compared, such as the balances of sub-account a and subject 1, and the balances of sub-account b and subject 5. You can also compare the balances of these four. There is no restriction here.
[0073] The above balance summary can be performed periodically or in real time, such as at the end of the day. If inconsistencies are found, the exception handling process is triggered, which may include automatic adjustments or manual review. All operation logs are recorded to facilitate subsequent audits and problem tracking. For example, the verification results of account 1 and sub-account a are consistent, but the verification results of account 5 and sub-account b are inconsistent. In this case, reprocessing is required to locate the specific detailed data that caused the inconsistent balance.
[0074] The method provided in the above embodiment processes multiple transaction flows at one time through an automated process, thereby improving processing efficiency and reducing manual intervention. The transaction code is determined by the channel type and business type to ensure that each transaction flow has a clear processing rule; the scenario value that matches the extended type is extracted from the scenario information to further refine the processing logic. The balance type and subject are determined by the business rule engine to ensure the accuracy of account processing; by comparing the subject balance and the sub-account balance, the consistency of the account is ensured, reducing the possibility of errors. The entire operation process is no longer based on the account dimension, and can efficiently and accurately process batch transaction flows, and ensure the consistency and accuracy of the account, and has universality. Even if new business types or scenarios, or business rule engines are added later, it is only necessary to simply modify the relevant configurations, without the need for large-scale reconstruction of the system, and it has high scalability.
[0075] See also Figure 2 , shows a schematic flow chart of an optional data processing method according to an embodiment of the present invention, comprising the following steps:
[0076] S201: Check whether the account balance and sub-account balance are consistent;
[0077] S202: In response to the account balance and the sub-account balance being consistent, no processing is performed;
[0078] S203: In response to the inconsistency between the account balance and the sub-account balance, calling a preset verification rule to locate the transaction information causing the inconsistency in the amount and the cause of the difference; wherein the preset verification rule includes one or more of transaction information quantity comparison, transaction information comparison at the same time point, and transaction information aggregation method comparison;
[0079] S204: calling the pre-configured adjustment rules corresponding to the difference reasons, and adjusting the transaction information that causes the inconsistent amounts in the subjects and sub-accounts;
[0080] S205: Send the adjustment completion information to the review node for review, so that after receiving the review approval information returned by the review node, the account balance and sub-account balance are recalculated and compared.
[0081] In the above implementation, balance aggregation can be performed periodically or in real time, such as at the end of the day. If inconsistencies are found, an exception handling process is triggered, which may include automatic adjustments or manual review. All operation logs are recorded to facilitate subsequent audits and problem tracking. For example, the verification results of account 1 and sub-account a are consistent, but the verification results of account 5 and sub-account b are inconsistent. In this case, reprocessing is required to locate the specific detailed data that caused the inconsistent balance.
[0082] For example, check all the detailed data of account 5 and sub-account b, and compare the debit and credit amounts of each transaction. Account 5: The record shows a balance of 10,000 yuan. And sub-account b: The record shows a balance of 9,800 yuan. Compare and check all the transaction records of account 5 and sub-account b, and find that a transaction record is missing: transaction date: 2023-10-01, transaction amount: 200 yuan, transaction type: transfer. Trigger the automatic adjustment mechanism to add the missing transaction record to sub-account b. Manual review: The financial staff confirms and manually re-enters the transaction record.
[0083] For example, the record of Account 5 shows a balance of 5,000 yuan. The record of Sub-account B shows a balance of 5,200 yuan. Comparing all transaction records of Account 5 and Sub-account B, it is found that a transaction record in Sub-account B is repeated: transaction date: 2023-10-02, transaction amount: 200 yuan, transaction type: collection. The automatic adjustment mechanism is triggered to delete the duplicate record in Sub-account B. Manual review: The financial staff confirms and manually deletes the duplicate record.
[0084] The above mainly compares the number of transaction information. In actual situations, transaction information can also be compared, such as whether the time points of the same transaction information are the same, whether the transaction information aggregation method is the same, and whether addition is actually done when subtraction should be done. It can be seen that when the balance of the account and the sub-account is found to be inconsistent, it can be handled through the following steps: 1) Locate the inconsistency: After the inconsistency is detected, trigger the exception handling process; 2) View the detailed data: Check all relevant transaction records. 3) Locate the difference: Find the specific cause of the difference. After locating the cause of the difference and the transaction information that caused the difference, use the pre-configured adjustment rules corresponding to the cause of the difference, such as the above repeat-automatic deletion, and confirm-automatic increase, to adjust the transaction information that causes the inconsistent amount in the account and sub-account, so as to achieve automatic adjustment. After the adjustment, manual review: confirmed by the financial staff, and then the account balance and sub-account balance can be recalculated and compared. Through these steps, the consistency of the balance of the account and sub-account can be ensured, and all operation logs can be recorded for subsequent audits and problem tracking.
[0085] In the method provided in the above embodiment, when it is found that the balance of the subject and the balance of the sub-account are inconsistent, the system automatically calls the preset verification rules and adjustment rules, which reduces the need for manual intervention, reduces the probability of errors caused by human factors, shortens the time for problem solving, and avoids delays caused by long waiting times for manual processing. The adjusted information is sent to the audit node for review to ensure the rationality and compliance of the adjustment. The preset verification rules and adjustment rules can be configured according to actual conditions, which increases the flexibility of the system. The overall process not only improves the efficiency and accuracy of account processing, but also enhances the transparency and auditing capabilities of the system, ensuring the consistency and reliability of the data.
[0086] See also Figure 3 , shows a schematic flow chart of a specific data processing method according to an embodiment of the present invention, comprising the following steps:
[0087] S301: receiving a transaction flow processing request, downloading the transaction flow based on the file address in the transaction flow processing request, and then obtaining the batch transaction flow to be processed; wherein the transaction flow includes channel type, business type, transaction information, and scenario information;
[0088] S302: determining a transaction code according to the channel type and the business type, querying an extension type set corresponding to the transaction code, and extracting a scenario value matching each extension type from the scenario information;
[0089] S303: Match the corresponding business rule engine according to the transaction code, extension type and scenario value, and obtain the accounting type and matching type from the business rule engine; wherein the matching type includes the action type and the amount type;
[0090] S304: determining the balance type according to the matching type, and further determining the account according to the accounting type and the balance type;
[0091] S305: Send the transaction information to the subject and the sub-account corresponding to the balance type for bookkeeping and summary, and compare whether the subject balance and the sub-account balance are consistent;
[0092] S306: In response to the account balance and the sub-account balance being consistent, no processing is performed;
[0093] S307: In response to the inconsistency between the account balance and the sub-account balance, calling a preset verification rule to locate the transaction information causing the inconsistency in the amount and the reason for the difference; wherein the preset verification rule includes one or more of transaction information quantity comparison, transaction information comparison at the same time point, and transaction information aggregation method comparison;
[0094] S308: Calling the pre-configured adjustment rules corresponding to the difference reasons to adjust the transaction information that causes the inconsistent amounts in the subjects and sub-accounts;
[0095] S309: Send the adjustment completion information to the audit node for audit, so that after receiving the audit pass information returned by the audit node, the account balance and sub-account balance are recalculated and compared.
[0096] The above embodiment provides a general accounting method based on transaction flow and batch tasks, which achieves the purpose of general, efficient and accurate accounting as the business scale expands and the transaction complexity increases. The method has the following advantages:
[0097] 1. Automated processing: Realize automated processing of transaction flow data, including transaction flow analysis, account determination and account balance update, etc., greatly improving bookkeeping efficiency and reducing manpower and time investment.
[0098] 2. Versatility: It can be applied to different types of business scenarios and has wide applicability. It can realize specific differentiation of business scenarios according to channel type, business type and extension fields.
[0099] 3. Scalability: The design fully considers future expansion needs and can be flexibly expanded as the business develops. For example, channel type, business type, transaction code, extension type, balance type, accounting type, matching type, preset verification rules, adjustment rules, and business rule engine can all be updated and configured at any time.
[0100] 4. Traceability: The entire process is transparent and clear, and the original transaction can be traced back one by one.
[0101] This method not only improves the efficiency and accuracy of accounting processing, but also enhances the versatility and scalability of the system, ensuring the consistency and reliability of financial data.
[0102] See also Figure 4 , shows a schematic diagram of main modules of a data processing device 400 provided in an embodiment of the present invention, including:
[0103] The receiving module 401 is used to receive a transaction flow processing request, download the transaction flow based on the file address in the transaction flow processing request, and then obtain the batch transaction flow to be processed; wherein the transaction flow includes channel type, business type, transaction information, and scenario information;
[0104] A query module 402 is used to determine the transaction code according to the channel type and the business type, query the extension type set corresponding to the transaction code, and extract the scenario value matching each extension type from the scenario information;
[0105] A matching module 403 is used to match the corresponding business rule engine according to the transaction code, extension type and scenario value, and use the business rule engine to determine the balance type and account;
[0106] The accounting module 404 is used to send the transaction information to the subject and the sub-account corresponding to the balance type for accounting summary, compare the subject balance and the sub-account balance to see if they are consistent, and perform corresponding operations based on the comparison results.
[0107] In the implementation device of the present invention, the matching module 403 is used to:
[0108] Obtain the accounting type and matching type from the business rule engine; the matching type includes the action type and the amount type;
[0109] The balance type is determined based on the matching type, and the account is determined based on the accounting type and balance type.
[0110] In the implementation device of the present invention, the matching module 403 is used to determine the balance type and the debit and credit direction according to the matching type;
[0111] The accounting module 404 is used to map the transaction information to the amount of the account, so that the account can add or subtract the current account balance and the transaction information according to the debit and credit direction to obtain the updated account balance;
[0112] Determine the sub-account corresponding to the balance type, accumulate the transaction information and the current sub-account balance, and obtain the updated sub-account balance.
[0113] In the implementation device of the present invention, the transaction information includes the transaction currency and the transaction amount;
[0114] The accounting module 404 is used to:
[0115] Map the transaction information to the sub-account corresponding to the transaction currency under the account, so that the sub-account can add or subtract the current sub-account balance and transaction information according to the debit and credit direction to obtain the updated sub-account balance;
[0116] Determine the sub-account corresponding to the balance type, so that the sub-account determines the sub-account corresponding to the transaction currency. The sub-account accumulates the transaction information with the current sub-account balance to obtain the updated sub-account balance.
[0117] In the implementation device of the present invention, when there are multiple balance types, the subject balances and sub-account balances corresponding to the same balance type are compared.
[0118] In the implementation device of the present invention, the accounting module 404 is used to:
[0119] In response to the account balance and sub-account balance being consistent, no processing is done;
[0120] In response to the inconsistency between the account balance and the sub-account balance, a preset verification rule is called to locate the transaction information causing the inconsistency in the amount and the reason for the difference; wherein the preset verification rule includes one or more of a comparison of the transaction information quantity, a comparison of the transaction information at the same time point, and a comparison of the transaction information aggregation method;
[0121] Call the pre-configured adjustment rules corresponding to the difference reasons to adjust the transaction information that causes inconsistent amounts in the accounts and sub-accounts;
[0122] Send the adjustment completion information to the review node for review, so that after receiving the review pass information returned by the review node, recalculate the account balance and sub-account balance and compare them.
[0123] In the implementation device of the present invention, the receiving module 401 is used to:
[0124] Downloading the transaction flow based on the file address in the transaction flow processing request to calculate the hash value of the transaction flow; and
[0125] Obtain the file hash value corresponding to the file address, compare the file hash value with the calculated hash value, and perform integrity check on the transaction flow based on the comparison result.
[0126] In addition, the specific implementation content of the device described in the embodiment of the present invention has been described in detail in the method described above, so the repeated content will not be described again here.
[0127] Figure 5 An exemplary system architecture 500 to which embodiments of the present invention may be applied is shown, including terminal devices 501 , 502 , 503 , a network 504 and a server 505 (only an example).
[0128] Terminal devices 501, 502, 503 can be various electronic devices with display screens and supporting web browsing, and various communication client applications are installed. Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc.
[0129] The network 504 is used to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0130] The server 505 may be a server that provides various services, such as a backend management server that provides support for shopping websites browsed by users using terminal devices 501, 502, and 503 (for example only). The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - for example only) to the terminal device. It should be noted that the method provided in the embodiment of the present invention is generally executed by the server 505, and accordingly, the device is generally set in the server 505.
[0131] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0132] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0133] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0134] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0135] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0136] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, 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 computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0137] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0138] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, they may be described as follows: a processor includes a receiving module, a query module, a matching module, and an accounting module. The names of these modules do not, in some cases, limit the modules themselves. For example, the accounting module may also be described as a "comparison module".
[0139] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes any of the above data processing methods.
[0140] The computer program product of the present invention comprises a computer program, and when the computer program is executed by a processor, the data processing method in the embodiment of the present invention is implemented.
[0141] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A data processing method, characterized in that: include: Receive a transaction flow processing request, download the transaction flow based on the file address in the transaction flow processing request, and then obtain the batch transaction flow to be processed; wherein the transaction flow includes channel type, business type, transaction information, and scenario information; Determine the transaction code according to the channel type and business type, query the extension type set corresponding to the transaction code, and extract the scenario value matching each extension type from the scenario information; According to the transaction code, extension type and scenario value, the corresponding business rule engine is matched, and the balance type and account are determined using the business rule engine; Send transaction information to the subject and the sub-account corresponding to the balance type for accounting summary, compare the subject balance and sub-account balance to see if they are consistent, and perform corresponding operations based on the comparison results.
2. The method according to claim 1, characterized in that The use of the business rule engine to determine the balance type and account includes: Obtain the accounting type and matching type from the business rule engine; the matching type includes the action type and the amount type; The balance type is determined based on the matching type, and the account is determined based on the accounting type and balance type.
3. The method according to claim 2, characterized in that Determining the balance type according to the matching type includes: determining the balance type and the debit and credit direction according to the matching type; The step of sending the transaction information to the subject and the sub-account corresponding to the balance type for bookkeeping and aggregation includes: Map transaction information to the amount of the account, so that the account can add or subtract the current account balance and transaction information according to the debit and credit direction to obtain the updated account balance; Determine the sub-account corresponding to the balance type, accumulate the transaction information and the current sub-account balance, and obtain the updated sub-account balance.
4. The method according to claim 3, characterized in that The transaction information includes transaction currency and transaction amount; The step of sending the transaction information to the subject and the sub-account corresponding to the balance type for bookkeeping and aggregation includes: Map the transaction information to the sub-account corresponding to the transaction currency under the account, so that the sub-account can add or subtract the current sub-account balance and transaction information according to the debit and credit direction to obtain the updated sub-account balance; Determine the sub-account corresponding to the balance type, so that the sub-account determines the sub-account corresponding to the transaction currency. The sub-account accumulates the transaction information with the current sub-account balance to obtain the updated sub-account balance.
5. The method according to claim 1, characterized in that When there are multiple balance types, compare the account balances and sub-ledger balances corresponding to the same balance type.
6. The method according to any one of claims 1 to 5, characterized in that The performing corresponding operations according to the comparison results includes: In response to the account balance and sub-account balance being consistent, no processing is done; In response to the inconsistency between the account balance and the sub-account balance, a preset verification rule is called to locate the transaction information causing the inconsistency in the amount and the cause of the difference; wherein the preset verification rule includes one or more of a comparison of the transaction information quantity, a comparison of the transaction information at the same time point, and a comparison of the transaction information aggregation method; Call the pre-configured adjustment rules corresponding to the difference reasons to adjust the transaction information that causes inconsistent amounts in the accounts and sub-accounts; Send the adjustment completion information to the review node for review, so that after receiving the review pass information returned by the review node, recalculate the account balance and sub-account balance and compare them.
7. The method according to claim 1, characterized in that The downloading of the transaction flow based on the file address in the transaction flow processing request includes: Downloading the transaction flow based on the file address in the transaction flow processing request to calculate the hash value of the transaction flow; and Obtain the file hash value corresponding to the file address, compare the file hash value with the calculated hash value, and perform integrity check on the transaction flow based on the comparison result.
8. A data processing device, characterized in that: include: A receiving module, used to receive a transaction flow processing request, download the transaction flow based on the file address in the transaction flow processing request, and then obtain the batch transaction flow to be processed; wherein the transaction flow includes channel type, business type, transaction information, and scenario information; A query module is used to determine the transaction code according to the channel type and the business type, query the set of extension types corresponding to the transaction code, and extract the scenario value matching each extension type from the scenario information; The matching module is used to match the corresponding business rule engine according to the transaction code, extension type and scenario value, and use the business rule engine to determine the balance type and account; The accounting module is used to send transaction information to the subject and the sub-account corresponding to the balance type for accounting summary, compare the subject balance and the sub-account balance for consistency, and perform corresponding operations based on the comparison results.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.