Accounting flow accounting system and method
By introducing configuration, initialization, batch initiation and flow verification modules into the accounting accounting system, the problem of manual batch-by-batch testing of traditional accounting standards is solved, and automated testing and efficient accounting are realized.
Patent Information
- Application Number
- CN202411418015.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-02-07
AI Technical Summary
Traditional accounting standard flow testing methods are cumbersome and dependent on experience by hand. They are highly instable and time-consuming, resulting in low testing efficiency.
An accounting accounting system is proposed, including configuration module, initialization module, batch initiation module and flow verification module. The batch configuration and SQL script configuration are performed through the configuration module, the initialization module is performed in the environment, the batch initiation module realizes automatic continuous batch running, and the flow verification module automatically checks the accounting standard flow.
Automatic accounting statement testing and accounting is realized, avoiding traditional manual inspection and comparison, and improving testing efficiency and accuracy.
Smart Images

Figure CN119398949A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of flow testing, and in particular to an accounting flow calculation system and method. Background Art
[0002] In the traditional accounting standard transaction flow testing method, testers usually design various test scenarios, generate numbers to form reconciliation files, and manually initiate batches. They check the standard transaction flow table one by one according to the test data scenario, or fill in all data in Excel with expected results according to the scenario, and compare and verify with the results in the standard transaction flow table.
[0003] However, accounting involves all financial transactions, with many and complex scenarios. The testing process and subsequent optimization involve regression testing of accounting standard flow, which requires a lot of testing work. The traditional method of testing accounting standard flow is cumbersome and experience-dependent, with high instability and time-consuming, resulting in low testing efficiency. Summary of the invention
[0004] The main purpose of this application is to provide an accounting flow calculation system and method, which aims to solve the technical problems of traditional methods of accounting standard flow testing, which are cumbersome manual batch testing steps, experience-dependent, highly unstable and time-consuming, resulting in low testing efficiency.
[0005] To achieve the above-mentioned purpose, the present application proposes an accounting flow calculation system, the system comprising: a configuration module, an initialization module, a batch initiation module and a flow verification module;
[0006] The configuration module is used to perform batch configuration and SQL script configuration on the third-party reconciliation file, obtain configuration parameters, and send the configuration parameters to the batch initiation module;
[0007] The initialization module is used to initialize the environment of various data tables required for batch running;
[0008] The batch initiation module is used to perform batch status verification on the third-party reconciliation file according to the batch parameters in the configuration parameters after initialization is completed, and obtain batch transaction results;
[0009] The transaction flow verification module is used to perform accounting transaction flow verification on the batch transaction results according to the configuration parameters to obtain verification results.
[0010] In one embodiment, the configuration parameters include batch parameters and SQL scripts; the configuration module is further used to perform parameter configuration on the uploaded third-party reconciliation file, obtain batch parameters, and send the batch parameters to the batch initiation module;
[0011] The configuration module is further used to write an SQL script according to the accounting type of the third-party reconciliation file;
[0012] The configuration module is also used to configure the SQL script and the accounting type, obtain a corresponding relationship, and send the corresponding relationship to the transaction verification module.
[0013] In one embodiment, the initialization module is further used to determine the pre-common data table, pre-differentiated data table and data processing data table required for batching the third-party reconciliation file;
[0014] The initialization module is further used to initialize the public data of the front public data table;
[0015] The initialization module is further used to initialize the third-party data of the front-end differential data table;
[0016] The initialization module is also used to initialize the flow details of the data processing data table.
[0017] In one embodiment, the batch initiation module is further used to obtain the batch parameters in sequence after the initialization is completed;
[0018] The batch initiation module is further used to initiate file notification according to the batch parameters and file interface, and trigger the batch run instruction;
[0019] The batch initiation module is further used to perform batch status verification on the third-party reconciliation file according to the batch running instruction to obtain a batch transaction result.
[0020] In one embodiment, the batch initiation module is further used to determine the sleep time when running the batch;
[0021] The batch initiation module is further used to perform batch status verification on the third-party reconciliation file according to the sleep time;
[0022] The batch initiation module is also used to trigger the second batch status verification when the verification result is successful, and return to execute the operation of performing batch status verification on the third-party reconciliation file according to the sleep time until the batch run is completed to obtain the batch transaction result.
[0023] In one embodiment, the transaction verification module is further used to obtain the accounting type and SQL script through the configuration parameters;
[0024] The transaction verification module is further used to query the batch transaction results corresponding to the third-party reconciliation file according to the accounting type;
[0025] The transaction flow verification module is also used to perform accounting transaction flow verification on batch transaction results according to the SQL script to obtain verification results.
[0026] In one embodiment, the transaction verification module is further used to generate expected results according to the SQL script;
[0027] The transaction verification module is further used to compare the batch transaction result with the expected result to obtain a comparison result;
[0028] The transaction verification module is further used to record the difference data between the batch transaction result and the expected result when the comparison result is inconsistent, and report an error based on the difference data.
[0029] In addition, to achieve the above purpose, the present application also proposes an accounting flow calculation method, which is applied to an accounting flow calculation system, the system including a configuration module, an initialization module, a batch initiation module and a flow verification module; the method includes:
[0030] The configuration module performs batch configuration and SQL script configuration on the third-party reconciliation file, obtains configuration parameters, and sends the configuration parameters to the batch initiation module;
[0031] The initialization module performs environment initialization on various data tables required for batch running;
[0032] After the batch initiation module is initialized, the batch status of the third-party reconciliation file is verified according to the batch parameters in the configuration parameters to obtain a batch transaction result;
[0033] The transaction flow verification module performs accounting transaction flow verification on the batch transaction results according to the configuration parameters to obtain verification results.
[0034] In one embodiment, the configuration parameters include batch parameters and SQL scripts, and the configuration module performs batch configuration and SQL script configuration on the third-party reconciliation file, obtains the configuration parameters, and sends the configuration parameters to the batch initiation module, including:
[0035] The configuration module performs parameter configuration on the uploaded third-party reconciliation file, obtains batch parameters, and sends the batch parameters to the batch initiation module;
[0036] The configuration module writes an SQL script according to the accounting type of the third-party reconciliation file;
[0037] The configuration module configures the SQL script and the accounting type to obtain a corresponding relationship, and sends the corresponding relationship to the transaction verification module.
[0038] In one embodiment, the initialization module performs the steps of initializing the environment of various data tables required for batch running, including:
[0039] The initialization module determines the pre-common data table, pre-differentiated data table and data processing data table required for batching the third-party reconciliation file;
[0040] The initialization module performs public data initialization on the front public data table;
[0041] The initialization module performs third-party data initialization on the front-end differential data table;
[0042] The initialization module performs a flow-by-flow initialization on the data processing data table.
[0043] One or more technical solutions proposed in this application have at least the following technical effects: This application proposes an accounting flow calculation system, the system includes: a configuration module, an initialization module, a batch initiation module and a flow verification module; the configuration module is used to perform batch configuration and SQL script configuration on the third-party reconciliation file, obtain configuration parameters, and send the configuration parameters to the batch initiation module; the initialization module is used to perform environmental initialization on various data tables required for batch running; the batch initiation module is used to perform batch status verification on the third-party reconciliation file according to the batch parameters in the configuration parameters after initialization, and obtain batch transaction results; the flow verification module is used to perform accounting flow verification on the batch transaction results according to the configuration parameters to obtain verification results. Since this application performs batch configuration and SQL script configuration in advance through the configuration module, automatic and continuous batch running can be realized in the batch initiation module, and the accounting standard flow can be automatically checked through the flow verification module after batch running, avoiding the traditional situation of manually checking and comparing each scene and each data one by one, and improving the efficiency of flow accounting. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] Figure 1 Functional module diagram provided for the first embodiment of the accounting flow calculation system of this application;
[0047] Figure 2 A flowchart of batch configuration and SQL script configuration of the configuration module provided in Example 1 of the present application;
[0048] Figure 3 A flowchart of the environment initialization of a batch provided in Example 1 of the present application;
[0049] Figure 4 A flowchart of batch initiation provided for the second embodiment of the accounting flow accounting system of this application;
[0050] Figure 5 A flow chart of the flow verification provided in Example 2 of the present application;
[0051] Figure 6 A flowchart diagram is provided for the first embodiment of the accounting flow calculation method of this application.
[0052] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0054] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0055] The present application embodiment provides an accounting flow calculation system, referring to Figure 1 , Figure 1 A functional module diagram provided for the first embodiment of the accounting flow calculation system of this application.
[0056] In this embodiment, the accounting flow calculation system includes: a configuration module 10 , an initialization module 20 , a batch initiation module 30 and a flow verification module 40 .
[0057] The configuration module 10 is used to perform batch configuration and SQL script configuration on the third-party reconciliation file, obtain configuration parameters, and send the configuration parameters to the batch initiation module 30.
[0058] It should be noted that the configuration module is used for batch configuration and SQL script configuration, and is used for preparation before the automatic start of the accounting flow accounting system. This module mainly has functions such as uploading third-party reconciliation files, batch parameter configuration, SQL script writing, and configuration of the correspondence between SQL scripts and accounting types.
[0059] It should be noted that the third-party reconciliation file is a file generated by a third-party organization or platform independent of the transaction parties for the purpose of verifying transaction data.
[0060] The third-party reconciliation file covers various business scenarios of third-party products. The accounting system mainly processes the data in the third-party reconciliation file according to business needs and generates accounting standard flow, which is mapped into various accounting entries for use by financial personnel. Finally, the accounting system will automatically check whether the accounting standard flow generated by each scenario is correct.
[0061] It should be noted that batch configuration is the batch-related parameters set for third-party reconciliation file processing, such as storage path, batch date, etc.
[0062] SQL script configuration is an SQL script that sets the accounting processing logic for each accounting type in business requirements. SQL scripts can be used to extract and analyze data from third-party reconciliation files and associate data with existing data in the database.
[0063] It should be noted that the configuration parameters include batch parameters obtained by batch configuration, SQL script data generated by SQL script configuration, etc., which are not limited in this embodiment.
[0064] The initialization module 20 is used to initialize the environment of various data tables required for batch running.
[0065] It should be noted that the initialization module is a module that cleans and initializes the test environment before the batch to ensure that the batch can proceed smoothly and the data is processed correctly.
[0066] It should be noted that the various data tables in the batch running environment may include public data tables, differentiated data tables, data processing flow tables, data summary tables, etc., and this implementation does not impose any restrictions on this.
[0067] The batch initiation module 30 is used to perform batch status verification on the third-party reconciliation file according to the batch parameters in the configuration parameters after initialization is completed, so as to obtain batch transaction results.
[0068] It should be noted that the batch initiation module mainly includes modules for obtaining batch parameters, initiating file notifications, and multiple batch status verifications. The batch initiation module can be used to automatically run batches for multiple consecutive days at the same time, saving the time of waiting for manual triggering of the second batch after the first batch is completed, or manually triggering the next day's batch after running one day's batch, thereby saving the time of accounting flow calculation.
[0069] It should be noted that batch parameters are parameters obtained through batch configuration of the configuration module, including the third-party reconciliation file storage path, file name, batch date, product number, channel type, institution number, channel number, MD5 (Message-Digest Algorithm 5, a hash algorithm) and other batch input parameter configurations.
[0070] In one embodiment, after the above initialization is completed, the batch initiation module can perform multiple batch status checks on the third-party reconciliation file at a fixed time according to the batch parameters in the configuration parameters to realize automatic batch running process and obtain batch transaction results.
[0071] The transaction flow verification module 40 is used to perform accounting transaction flow verification on the batch transaction results according to the configuration parameters to obtain verification results.
[0072] It should be noted that the transaction verification module is a module that obtains the SQL script and accounting type assembly from the configuration module to generate the expected results after the batch is completed, and compares and verifies the expected results with the actual results (batch transaction results).
[0073] The transaction verification module can verify whether the accounting standard transaction generated by each scenario is correct. If the comparison is consistent, the verification will pass. If the comparison is inconsistent, an error will be reported and the verification will fail.
[0074] In this embodiment, an accounting flow calculation system is proposed, including a configuration module, an initialization module, a batch initiation module and a flow verification module; the configuration module is used to perform batch configuration and SQL script configuration (such as batch parameter configuration, SQL script writing, SQL script and accounting type correspondence configuration, etc.) on third-party reconciliation files to obtain configuration parameters. The initialization module is used to initialize the environment of various data tables required for batch running (such as public data tables, differentiated data tables, data processing flow tables, data summary tables, etc.). After the above initialization is completed, the batch initiation module can perform multiple batch status checks on the third-party reconciliation files according to the batch parameters in the configuration parameters at a fixed time to realize the automatic batch running process and obtain batch transaction results. The flow verification module is used to obtain the SQL script and accounting type assembly from the configuration module to generate the expected results, compare and verify with the actual results (batch transaction results), and verify whether the accounting standard flow generated by each scenario is correct. If the comparison is consistent, the verification passes. If the comparison is inconsistent, an error verification fails. In this way, batches can be automatically run continuously for multiple days, and the accounting standard flow can be automatically checked after each batch. All batches can be checked quickly, replacing the original one-by-one checking and comparison of each data in each scene, greatly improving efficiency.
[0075] In a feasible implementation, the configuration parameters described in this embodiment include batch parameters and SQL scripts; the configuration module 10 is also used to configure parameters of the uploaded third-party reconciliation file, obtain batch parameters, and send the batch parameters to the batch initiation module 30; the configuration module 10 is also used to write an SQL script according to the accounting type of the third-party reconciliation file; the configuration module 10 is also used to configure the SQL script with the accounting type, obtain a corresponding relationship, and send the corresponding relationship to the transaction verification module 40.
[0076] It should be noted that the SQL script is a text file obtained by configuring a series of SQL statements through the configuration module. The SQL script may include various operations on the database where the third-party reconciliation file is located, such as creating a database, creating a table, inserting data, updating data, deleting data, querying data, establishing indexes, executing data definition and data manipulation, etc. The SQL script can be used to conveniently perform batch operations and automatic deployment on the database where the third-party reconciliation file is located.
[0077] It should be noted that the accounting type is a classification method for recording transactions or businesses in third-party reconciliation documents. It is used to clarify the nature of the economic business represented by each record, such as income, expenditure, transfer, refund, recharge and other different types.
[0078] It should be noted that the corresponding relationship is the relationship obtained by configuring the SQL script and the accounting type one by one.
[0079] In this embodiment, for ease of understanding, refer to Figure 2 , Figure 2 Flowchart for batch configuration and SQL script configuration of the configuration module provided in Example 1 of this application. The purpose of the accounting flow calculation system is to automatically test the accounting flow, and to automatically verify whether the accounting standard flow of each scenario data in the third-party reconciliation file is correct through automated batch running. Therefore, the first step in the accounting flow calculation system of this application is to do the preparation work before the batch, so that various scenarios can be covered during the automated test, batches can be run for multiple consecutive days, and the actual results can be correctly verified. The specific configuration process is as follows:
[0080] 1. Upload third-party reconciliation files. The accounting system mainly processes the original reconciliation files (i.e. batch data) corresponding to non-real-time single transactions pushed by third-party products every day. Therefore, both manual testing and automated testing require the design of reasonable data to verify whether the processing of these data is correct. After receiving the reconciliation file, upload it to the specified directory. When running the batch, you can obtain the reconciliation file according to the storage path of the third-party reconciliation file for batch running.
[0081] 2. Batch parameter configuration. You can directly configure the parameters through the Excel table, and configure the third-party reconciliation file storage path, file name, batch date, product number, channel type, organization number, channel number, MD5 and other batch parameters. When running the batch, you can obtain the parameters in sequence and run the batch daily.
[0082] 3. SQL script writing. This part mainly verifies whether the accounting processing is correct. According to the generation logic of the requirement documents of each accounting type, write SQL scripts to assemble and generate the expected results. In the flow verification module, the expected results can be generated according to the SQL scripts.
[0083] For example, take the Fenqi Le product as an example. The accounting type of the Fenqi Le product is "1-loan principal", and the generation logic is: take the loan amount in the third-party reconciliation file (loan detail file) that is not equal to 0 and the loan channel is not equal to "C2 (a specific code or identifier of a certain loan channel type)". According to this business requirement, you can write an SQL script to filter the data that meets the generation of the accounting type "1-loan principal" from the loan detail file, and add the channel type, loan note number, accounting type, amount, etc. to assemble it into a flow. The flow that should be generated by the reconciliation file (loan detail file) generated by the SQL script is called the expected result.
[0084] 4. Configuration of the correspondence between SQL script and accounting type. After the SQL script of the expected result is completed, the SQL script can be configured in Excel and configured one by one with the accounting type. The subsequent transaction verification module can generate the expected result through the SQL script assembly of the corresponding relationship, filter out all records of the accounting type in the accounting standard transaction table, and automatically compare and verify the accounting standard transaction.
[0085] In a feasible implementation manner, the initialization module 20 described in this embodiment is also used to determine the front common data table, front differential data table and data processing data table required for batch running of the third-party reconciliation file; the initialization module 20 is also used to initialize the common data of the front common data table; the initialization module 20 is also used to initialize the third-party data of the front differential data table; the initialization module 20 is also used to initialize the flow details of the data processing data table.
[0086] It should be noted that the front-end public data table is a table containing basic data that is commonly used in the entire reconciliation process, such as some common configuration information, system parameters, common code definitions, etc.
[0087] The front-end differential data table stores differential data related to third-party reconciliation files and is used to process and distinguish data processing requirements in different situations.
[0088] The data processing data table is used to temporarily store the intermediate results of data processing and the converted data during the batch running process. It serves all aspects of data processing and helps to realize operations such as data sorting, processing and transmission.
[0089] In this embodiment, for ease of understanding, refer to Figure 3 , Figure 3 Flowchart of the batch environment initialization provided in Example 1 of the present application. In order to ensure that the subsequent batch initiation module batches can proceed smoothly, the batch environment needs to be initialized and the tables in the database need to be cleaned up to achieve a state where the batch can be run normally and repeated batch verification can be achieved. Since the batch environment involves different databases, public data tables and non-public data tables, different functions can be called for initialization according to different databases, public data tables, and non-public data tables. The specific initialization process is as follows:
[0090] 1. Initialize the public data table before accounting. The public data table is the same table shared by all third parties. This part is extracted as a public module. There is no need to rewrite the new product when it is newly connected. Just delete the corresponding records according to different product numbers. The public data tables mainly include: batch processing information table, batch processing flow table, batch processing step table, file analysis details table, overdue processing record table, etc.
[0091] 2. Initialize differentiated data tables before accounting. The business of each third-party product is different. This part is the only differentiated module in the initialization environment. It is necessary to write an automatic deletion script to clean up this part of the data table according to the characteristics of each product. The main tables involved are: loan information table, principal and interest balance table, internal repayment plan table, account table, third-party reconciliation file storage table, third-party partition table, etc.
[0092] 3. Initialization of accounting data processing data tables. This part mainly involves various public data tables of the accounting data processing library. The database mainly processes data processing flow tables, data processing flow status tables, auxiliary account mapping tables, data summary tables, Kingdee-like tables, and adjustment tables. As a part of the batch flow, in order to ensure that the data is easy to analyze and process, this part of the data is cleaned up.
[0093] This embodiment provides an accounting flow calculation system, including a configuration module, an initialization module, a batch initiation module and a flow verification module; the configuration module is used to perform batch configuration and SQL script configuration (such as batch parameter configuration, SQL script writing, SQL script and accounting type correspondence configuration, etc.) on third-party reconciliation files to obtain configuration parameters. The initialization module is used to initialize the environment of various data tables (such as public data tables, differentiated data tables, data processing flow tables, data summary tables, etc.) required for batch running. After the above initialization is completed, the batch initiation module can perform multiple batch status checks on the third-party reconciliation files according to the batch parameters in the configuration parameters at a fixed time to realize the automatic batch running process and obtain batch transaction results. The flow verification module is used to obtain the SQL script and accounting type assembly from the configuration module to generate the expected result, compare and verify with the actual result (batch transaction result), and verify whether the accounting standard flow generated by each scenario is correct. If the comparison is consistent, the verification passes. If the comparison is inconsistent, an error verification fails. Since the present embodiment performs batch configuration and SQL script configuration in advance through the configuration module, automatic continuous batch running can be realized in the batch initiation module, and the accounting standard flow can be automatically checked through the flow verification module after the batch running, avoiding the traditional situation of manually checking and comparing each scene and each data one by one, thereby improving the efficiency of flow accounting.
[0094] Based on the first embodiment of the accounting flow calculation system of the present application, a second embodiment is proposed. In the second embodiment of the present application, the same or similar contents as those of the above-mentioned embodiment 1 can be referred to the above introduction and will not be repeated later.
[0095] The batch initiation module 30 described in this example is also used to obtain the batch parameters in sequence after initialization is completed; the batch initiation module 30 is also used to initiate file notification according to the batch parameters and file interface, and trigger batch running instructions; the batch initiation module 30 is also used to perform batch status verification on the third-party reconciliation file according to the batch running instructions to obtain batch transaction results.
[0096] It should be noted that the file interface is a specific channel in the system used to interact with third-party reconciliation files.
[0097] File notification is a notification mechanism. When a batch run is triggered, the system will send a notification message, for example, notifying the third-party system that there is a new reconciliation file to be processed.
[0098] It should be noted that batch instructions are instructions for processing batches of third-party reconciliation files. Batch instructions can be used to centrally and automatically process large amounts of data, such as calculation of reconciliation data, batch update of data, etc., to complete the entire batch task.
[0099] It should be noted that the batch transaction results are the actual results after the third-party reconciliation data is completed and batched.
[0100] In a feasible implementation, the batch initiation module 30 described in this embodiment is also used to determine the sleep time when running a batch; the batch initiation module 30 is also used to perform a batch status verification on the third-party reconciliation file according to the sleep time; the batch initiation module 30 is also used to trigger a second batch status verification when the verification result is successful, and return to execute the operation of performing a batch status verification on the third-party reconciliation file according to the sleep time until the batch running is completed to obtain the batch transaction result.
[0101] It should be noted that the sleep time is a fixed waiting time after the batch status check of each batch, such as 20 seconds, 30 seconds, etc., which is not limited in this embodiment.
[0102] In this embodiment, for ease of understanding, refer to Figure 4 , Figure 4 The flowchart of batch initiation provided for the second embodiment of the accounting flow accounting system of this application. After the environment is initialized, the batch can be initiated through the batch initiation module, and various processing can be performed on the data of various scenarios in the reconciliation file, and various types of accounting flow can be generated. The second batch is used as an example for explanation, but it does not limit this solution. The details are as follows:
[0103] 1. Get batch parameters. You can get the storage path, file name, batch date, product number, channel type, organization number, channel number, MD5 and other parameters of the third-party reconciliation file from the specified file and directory. When running the batch, get the parameters in order day by day.
[0104] 2. Send file notification. After obtaining the batch parameters, the storage path, file name, batch date, product number, channel type, institution number, channel number, MD5 and other parameters of the third-party reconciliation file are passed to the file interface to simulate the file notification for initiating batch running and trigger the batch running instruction to start the batch running.
[0105] 3. Batch status check. After the batch is triggered in the previous step, the accounting system starts to run the batch. For example, the daily batch is divided into two batches, one and two, and the prerequisite for the second batch is that the first batch is in the completed state. Since the batch takes a certain amount of time, you can set a suitable sleep time (such as waiting for 20 seconds) to perform batch status checks to check whether the batch is in a successful state. Check whether the batch status field of the query batch information table is 02. If the status is 02, it is successful (01 is in progress, 03 failed).
[0106] 4. Trigger the second batch. After the status of the first batch is verified, the notification interface of the second batch is called to trigger the second batch.
[0107] 5. Batch status verification of the second batch. After the second batch starts, after a short sleep time, the second batch will be verified. The verification method is the same as the first batch verification method. After each batch verification is passed, the subsequent batch verification is triggered, and automatic batch running can be achieved through the batch initiation module.
[0108] In another feasible implementation, the transaction flow verification module 40 described in this embodiment is also used to obtain the accounting type and SQL script through the configuration parameters; the transaction flow verification module 40 is also used to query the batch transaction results corresponding to the third-party reconciliation file according to the accounting type; the transaction flow verification module 40 is also used to perform accounting transaction flow verification on the batch transaction results according to the SQL script to obtain the verification result.
[0109] It should be noted that the accounting type is a classification method for recording transactions or businesses in third-party reconciliation documents. It is used to clarify the nature of the economic business represented by each record, such as income, expenditure, transfer, refund, recharge and other different types.
[0110] In another feasible implementation, the transaction flow verification module 40 described in this embodiment is also used to generate expected results based on the SQL script; the transaction flow verification module 40 is also used to compare the batch transaction results with the expected results to obtain comparison results; the transaction flow verification module 40 is also used to record the difference data between the batch transaction results and the expected results when the comparison results are inconsistent, and report an error based on the difference data.
[0111] It should be noted that the expected result is the flow result generated by the SQL script to generate the third-party reconciliation file.
[0112] It should be noted that the difference data refers to the data where there is a difference between the expected result and the batch transaction result (actual result).
[0113] In this embodiment, for ease of understanding, refer to Figure 5 , Figure 5 This is a flow chart of the transaction verification provided in Example 2 of this application. The transaction verification module is the core module, which can realize the automatic calculation of the accounting transaction processing results. After the automatic batch run is completed, the transaction verification module can automatically verify whether the accounting transaction of all data is generated correctly. The specific accounting transaction verification is as follows:
[0114] 1. Get the actual results. Get the accounting type through configuration parameters, and query all records of the accounting standard flow sheet of the accounting type (i.e. batch transaction results).
[0115] 2. Assemble expected results. You can extract data from various original data (i.e. third-party reconciliation data) according to the configured SQL script to assemble the expected results.
[0116] 3. Comparison and verification. Compare the field content and number of the actual result with the expected result. If they are consistent, the verification will pass. If they are inconsistent, an error will be reported and the verification will fail.
[0117] This embodiment can automatically test accounting flow through the above method. Compared with traditional manual testing, it has the characteristics of flexible batch running, high timeliness, high efficiency, high reusability, etc. Through the accounting flow calculation system, batches can be automatically run for many days, and the accounting standard flow can be automatically checked after the batch, and all batches can be checked quickly. At the same time, the module is clear and the operation difficulty is low, which replaces the original manual inspection and comparison of each scene and each data one by one, greatly improving efficiency.
[0118] Exemplarily, in order to help understand the implementation process of the accounting flow system obtained after the above-mentioned Example 1 and Example 2 of this embodiment, the verification of the third-party product Fenqi Le is used as an example for explanation, but this embodiment is not limited. Assume that the accounting type of the third-party product Fenqi Le is 1-loan principal, take the loan amount in the third-party reconciliation file (loan details file) is not equal to 0 and the loan channel is not equal to "C2" IOU, the data date is the current date of the system, the business type is 31 (31 represents Fenqi Le), the accounting type is 1 (1-loan principal), the accounting event code is the loan principal, as follows:
[0119] Step 1: Before the accounting flow accounting system is running, the tester will first prepare the data and configure the parameters.
[0120] 1. Upload third-party reconciliation files, i.e. prepare test data, extract the structure of each reconciliation file, various business scenarios, and data collection logic for outgoing transactions. After the test data is prepared, upload it to the corresponding directory.
[0121] 2. Batch parameter configuration. Interface parameters include the third-party reconciliation file storage path, file name, batch date, product number, channel type, organization number, channel number, MD5, etc. Batch parameters must be obtained to trigger the batch.
[0122] 3. SQL script writing. According to the business documents, write the SQL script to generate the expected results. After running the batch, load the SQL script and assemble to generate the accounting flow of accounting type 1-loan principal (expected results).
[0123] 4. Configure the correspondence between SQL script and accounting type. After the SQL script of the expected result is completed, configure the SQL script and accounting type one by one.
[0124] Step 2: After configuring the parameters and SQL scripts, you need to initialize the environment to ensure the smooth progress of the batch and the correctness of the data.
[0125] 1. Initialize the pre-accounting public data tables, including the notification record table, batch processing information, batch processing steps, batch processing flow, and accounting overdue processing record table.
[0126] 2. Initialization of accounting pre-differentiated data tables, including the basic information table of Fenqi Le loan notes, the basic information backup table of Fenqi Le loan notes, the principal and interest balance table of Fenqi Le loan notes, the principal and interest balance backup table of Fenqi Le loan notes, the repayment plan table of Fenqi Le loan notes, the repayment plan backup table of Fenqi Le loan notes, the account information table of Fenqi Le, the account information backup table of Fenqi Le, the accounting standard flow table, the partition table of Fenqi Le loan processing, the partition table of Fenqi Le repayment processing, the partition table of Fenqi Le day-end batch processing, the partition table of Fenqi Le day-end second batch processing, etc.
[0127] 3. Initialize the data tables of the first link of accounting data, including the adjustment quota batch table, adjustment quota loan repayment detail table, data processing flow status table, data processing detail table, data summary table, Kingdee-like table, etc.
[0128] Step 3: After the environment is initialized, get the batch parameters from the batch parameter configuration table, assemble the message and send the file notification to trigger a batch. After the first batch is completed, the first batch status transaction is passed, triggering the second batch. After the second batch is completed, the second batch status transaction is carried out.
[0129] Step 4: After the batch is completed, conduct an accounting processing test, that is, an accounting standard flow test, to check whether the reconciliation file data is correct. The specific implementation process is as follows:
[0130] 1. Generate actual results. Obtain the accounting type, accounting date, and product code from the parameter table as query conditions, query the accounting standard flow table, and generate actual results.
[0131] 2. Generate expected results. After obtaining the SQL statement that generates the expected results from the Excel table, execute the SQL statement to generate the expected results.
[0132] 3. Compare the actual results with the expected results. If the actual results are consistent with the expected results, the verification is passed. If they are inconsistent, the difference data is recorded in the document and an error is reported.
[0133] Reference Figure 6 The present application provides an accounting flow calculation method. Figure 6 The flowchart provided is a first embodiment of the accounting flow calculation method of the present application, wherein the accounting flow calculation system includes a configuration module, an initialization module, a batch initiation module and a flow verification module.
[0134] In this embodiment, the method includes steps S10 to S40:
[0135] Step S10: the configuration module performs batch configuration and SQL script configuration on the third-party reconciliation file, obtains configuration parameters, and sends the configuration parameters to the batch initiation module.
[0136] It should be noted that the configuration module is used for batch configuration and SQL script configuration, and is used for preparation before the automatic start of the accounting flow accounting system. This module mainly has functions such as uploading third-party reconciliation files, batch parameter configuration, SQL script writing, and configuration of the correspondence between SQL scripts and accounting types.
[0137] It should be noted that the third-party reconciliation file is a file generated by a third-party organization or platform independent of the transaction parties for the purpose of verifying transaction data.
[0138] The third-party reconciliation file covers various business scenarios of third-party products. The accounting system mainly processes the data in the third-party reconciliation file according to business needs and generates accounting standard flow, which is mapped into various accounting entries for use by financial personnel. Finally, the accounting system will automatically check whether the accounting standard flow generated by each scenario is correct.
[0139] It should be noted that batch configuration is the batch-related parameters set for third-party reconciliation file processing, such as storage path, batch date, etc.
[0140] SQL script configuration is an SQL script that sets the accounting processing logic for each accounting type in business requirements. SQL scripts can be used to extract and analyze data from third-party reconciliation files and associate data with existing data in the database.
[0141] It should be noted that the configuration parameters include batch parameters obtained by batch configuration, SQL script data generated by SQL script configuration, etc., which are not limited in this embodiment.
[0142] Step S20: The initialization module performs environment initialization on various data tables required for batch running.
[0143] It should be noted that the initialization module is a module that cleans and initializes the test environment before the batch to ensure that the batch can proceed smoothly and the data is processed correctly.
[0144] It should be noted that the various data tables in the batch running environment may include public data tables, differentiated data tables, data processing flow tables, data summary tables, etc., and this implementation does not impose any restrictions on this.
[0145] Step S30: After the batch initiation module is initialized, it performs batch status verification on the third-party reconciliation file according to the batch parameters in the configuration parameters to obtain a batch transaction result.
[0146] It should be noted that the batch initiation module mainly includes modules for obtaining batch parameters, initiating file notifications, and multiple batch status verifications. The batch initiation module can be used to automatically run batches for multiple consecutive days at the same time, saving the time of waiting for manual triggering of the second batch after the first batch is completed, or manually triggering the next day's batch after running one day's batch, thereby saving the time of accounting flow calculation.
[0147] It should be noted that batch parameters are parameters obtained through batch configuration of the configuration module, including the third-party reconciliation file storage path, file name, batch date, product number, channel type, institution number, channel number, MD5 (Message-Digest Algorithm 5, a hash algorithm) and other batch input parameter configurations.
[0148] In one embodiment, after the above initialization is completed, the batch initiation module can perform multiple batch status checks on the third-party reconciliation file at a fixed time according to the batch parameters in the configuration parameters to realize automatic batch running process and obtain batch transaction results.
[0149] Step S40: The transaction flow verification module performs accounting transaction flow verification on the batch transaction results according to the configuration parameters to obtain verification results.
[0150] It should be noted that the transaction verification module is a module that obtains the SQL script and accounting type assembly from the configuration module to generate the expected results after the batch is completed, and compares and verifies the expected results with the actual results (batch transaction results).
[0151] The transaction verification module can verify whether the accounting standard transaction generated by each scenario is correct. If the comparison is consistent, the verification will pass. If the comparison is inconsistent, an error will be reported and the verification will fail.
[0152] In this embodiment, an accounting flow calculation system is proposed, including a configuration module, an initialization module, a batch initiation module and a flow verification module; the configuration module is used to perform batch configuration and SQL script configuration (such as batch parameter configuration, SQL script writing, SQL script and accounting type correspondence configuration, etc.) on third-party reconciliation files to obtain configuration parameters. The initialization module is used to initialize the environment of various data tables required for batch running (such as public data tables, differentiated data tables, data processing flow tables, data summary tables, etc.). After the above initialization is completed, the batch initiation module can perform multiple batch status checks on the third-party reconciliation files according to the batch parameters in the configuration parameters at a fixed time to realize the automatic batch running process and obtain batch transaction results. The flow verification module is used to obtain the SQL script and accounting type assembly from the configuration module to generate the expected results, compare and verify with the actual results (batch transaction results), and verify whether the accounting standard flow generated by each scenario is correct. If the comparison is consistent, the verification passes. If the comparison is inconsistent, an error verification fails. In this way, batches can be automatically run continuously for multiple days, and the accounting standard flow can be automatically checked after each batch. All batches can be checked quickly, replacing the original one-by-one checking and comparison of each data in each scene, greatly improving efficiency.
[0153] In a feasible implementation, the configuration parameters of this embodiment include batch parameters and SQL scripts, and the step S10 includes: the configuration module performs parameter configuration on the uploaded third-party reconciliation file, obtains batch parameters, and sends the batch parameters to the batch initiation module; the configuration module writes an SQL script according to the accounting type of the third-party reconciliation file; the configuration module configures the SQL script with the accounting type, obtains a corresponding relationship, and sends the corresponding relationship to the transaction verification module.
[0154] It should be noted that the SQL script is a text file obtained by configuring a series of SQL statements through the configuration module. The SQL script may include various operations on the database where the third-party reconciliation file is located, such as creating a database, creating a table, inserting data, updating data, deleting data, querying data, establishing indexes, executing data definition and data manipulation, etc. The SQL script can be used to conveniently perform batch operations and automatic deployment on the database where the third-party reconciliation file is located.
[0155] It should be noted that the accounting type is a classification method for recording transactions or businesses in third-party reconciliation documents. It is used to clarify the nature of the economic business represented by each record, such as income, expenditure, transfer, refund, recharge and other different types.
[0156] It should be noted that the corresponding relationship is the relationship obtained by configuring the SQL script and the accounting type one by one.
[0157] In this implementation, the purpose of the accounting flow calculation system is to automatically test the accounting flow, and to automatically verify whether the accounting standard flow of each scenario data in the third-party reconciliation file is correct through automated batch running. Therefore, the first step in the accounting flow calculation system of this application is to do the preparation work before the batch, so that the automated test can cover various scenarios, run batches for multiple consecutive days, and correctly verify the actual results. The specific configuration process is as follows:
[0158] 1. Upload third-party reconciliation files. The accounting system mainly processes the original reconciliation files (i.e. batch data) corresponding to non-real-time single transactions pushed by third-party products every day. Therefore, both manual testing and automated testing require the design of reasonable data to verify whether the processing of these data is correct. After receiving the reconciliation file, upload it to the specified directory. When running the batch, you can obtain the reconciliation file according to the storage path of the third-party reconciliation file for batch running.
[0159] 2. Batch parameter configuration. You can directly configure the parameters through the Excel table, and configure the third-party reconciliation file storage path, file name, batch date, product number, channel type, organization number, channel number, MD5 and other batch parameters. When running the batch, you can obtain the parameters in sequence and run the batch daily.
[0160] 3. SQL script writing. This part mainly verifies whether the accounting processing is correct. According to the generation logic of the requirement documents of each accounting type, write SQL scripts to assemble and generate the expected results. In the flow verification module, the expected results can be generated according to the SQL scripts.
[0161] 4. Configuration of the correspondence between SQL script and accounting type. After the SQL script of the expected result is completed, the SQL script can be configured in Excel and configured one by one with the accounting type. The subsequent transaction verification module can generate the expected result through the SQL script assembly of the corresponding relationship, filter out all records of the accounting type in the accounting standard transaction table, and automatically compare and verify the accounting standard transaction.
[0162] In a feasible implementation, step S20 of this embodiment may include the steps of: the initialization module determines the front common data table, the front differential data table and the data processing data table required for the third-party reconciliation file to be run in batches; the initialization module performs public data initialization on the front common data table; the initialization module performs third-party data initialization on the front differential data table; the initialization module performs transaction details initialization on the data processing data table.
[0163] It should be noted that the front-end public data table is a table containing basic data that is commonly used in the entire reconciliation process, such as some common configuration information, system parameters, common code definitions, etc.
[0164] The front-end differential data table stores differential data related to third-party reconciliation files and is used to process and distinguish data processing requirements in different situations.
[0165] The data processing data table is used to temporarily store the intermediate results of data processing and the converted data during the batch running process. It serves all aspects of data processing and helps to realize operations such as data sorting, processing and transmission.
[0166] In this implementation, in order to ensure that the subsequent batch initiation module batches can proceed smoothly, the batch environment needs to be initialized and the tables in the database need to be cleaned up to achieve a state where the batch can be run normally and repeated batch verification can be achieved. Since the batch environment involves different databases, public data tables and non-public data tables, different functions can be called for initialization according to different databases, public data tables and non-public data tables. The specific initialization is as follows Figure 3 As shown:
[0167] 1. Initialize the public data table before accounting. The public data table is the same table shared by all third parties. This part is extracted as a public module. There is no need to rewrite the new product when it is newly connected. Just delete the corresponding records according to different product numbers. The public data tables mainly include: batch processing information table, batch processing flow table, batch processing step table, file analysis details table, overdue processing record table, etc.
[0168] 2. Initialize differentiated data tables before accounting. The business of each third-party product is different. This part is the only differentiated module in the initialization environment. It is necessary to write an automatic deletion script to clean up this part of the data table according to the characteristics of each product. The main tables involved are: loan information table, principal and interest balance table, internal repayment plan table, account table, third-party reconciliation file storage table, third-party partition table, etc.
[0169] 3. Initialization of accounting data processing data tables. This part mainly involves various public data tables of the accounting data processing library. The database mainly processes data processing flow tables, data processing flow status tables, auxiliary account mapping tables, data summary tables, Kingdee-like tables, and adjustment tables. As a part of the batch flow, in order to ensure that the data is easy to analyze and process, this part of the data is cleaned up.
[0170] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the accounting flow calculation method of the present application. Simple transformations in more forms based on this technical concept are all within the protection scope of the present application. Other embodiments or specific implementation methods of the accounting flow calculation method of the present application can refer to the above system embodiments and will not be repeated here.
[0171] The accounting flow calculation method provided by the present application is applied to the accounting flow calculation system in the above-mentioned embodiment, and can solve the technical problems of the traditional method of testing the accounting standard flow, which is that the manual batch testing steps are cumbersome, rely on experience, are highly unstable and time-consuming, and lead to low testing efficiency. Compared with the prior art, the beneficial effects of the accounting flow calculation method provided by the present application are the same as the beneficial effects of the accounting flow calculation system provided by the above-mentioned embodiment, and the other technical features in the accounting flow calculation method are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0172] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An accounting flow calculation system, characterized in that: The system includes: a configuration module, an initialization module, a batch initiation module and a flow verification module; The configuration module is used to perform batch configuration and SQL script configuration on the third-party reconciliation file, obtain configuration parameters, and send the configuration parameters to the batch initiation module; The initialization module is used to initialize the environment of various data tables required for batch running; The batch initiation module is configured to, after initialization is completed, perform batch status verification on the third-party reconciliation file according to the batch parameters in the configuration parameters to obtain a batch transaction result; The transaction flow verification module is used to perform accounting transaction flow verification on the batch transaction results according to the configuration parameters to obtain verification results.
2. The system according to claim 1, wherein The configuration parameters include batch parameters and SQL scripts; the configuration module is further used to configure parameters of the uploaded third-party reconciliation file, obtain batch parameters, and send the batch parameters to the batch initiation module; The configuration module is further configured to write an SQL script according to the accounting type of the third-party reconciliation file; The configuration module is further used to configure the SQL script and the accounting type, obtain a corresponding relationship, and send the corresponding relationship to the transaction verification module.
3. The system according to claim 2, wherein: The initialization module is further used to determine the pre-common data table, pre-differentiated data table, and data processing data table required for batching the third-party reconciliation file; The initialization module is further used to initialize the public data in the front public data table; The initialization module is further configured to initialize the front-end differential data table with third-party data; The initialization module is further used to initialize the flow details of the data processing data table.
4. The system according to claim 2, wherein: The batch initiation module is further configured to obtain the batch parameters in sequence after initialization is completed; The batch initiation module is further used to initiate file notification according to the batch parameters and file interface, and trigger the batch run instruction; The batch initiation module is further configured to perform batch status verification on the third-party reconciliation file according to the batch execution instruction to obtain a batch transaction result.
5. The system according to claim 4, wherein: The batch initiation module is also used to determine the sleep time when running a batch; The batch initiation module is further configured to perform batch status verification on the third-party reconciliation file according to the sleep time; The batch initiation module is further configured to trigger a second batch status verification when the verification result is successful, and return to execute the operation of performing batch status verification on the third-party reconciliation file according to the sleep time until the batch run is completed to obtain the batch transaction result.
6. The system according to any one of claims 2 to 5, characterized in that The transaction verification module is further configured to obtain the accounting type and SQL script through the configuration parameters; The transaction verification module is further configured to query the batch transaction results corresponding to the third-party reconciliation file according to the accounting type; The transaction flow verification module is further used to perform accounting transaction flow verification on batch transaction results according to the SQL script to obtain verification results.
7. The system according to claim 6, wherein: The flow verification module is further used to generate expected results according to the SQL script; The transaction verification module is further configured to compare the batch transaction result with the expected result to obtain a comparison result; The transaction flow verification module is further configured to record difference data between the batch transaction result and the expected result when the comparison result is inconsistent, and report an error based on the difference data.
8. An accounting flow calculation method, characterized in that: The accounting flow calculation method is applied to an accounting flow calculation system, the system including a configuration module, an initialization module, a batch initiation module and a flow verification module; the method includes: The configuration module performs batch configuration and SQL script configuration on the third-party reconciliation file, obtains configuration parameters, and sends the configuration parameters to the batch initiation module; The initialization module performs environment initialization on various data tables required for batch running; After initialization is completed, the batch initiation module performs batch status verification on the third-party reconciliation file according to the batch parameters in the configuration parameters to obtain a batch transaction result; The transaction flow verification module performs accounting transaction flow verification on the batch transaction results according to the configuration parameters to obtain verification results.
9. The method according to claim 8, wherein The configuration parameters include batch parameters and SQL scripts. The configuration module performs batch configuration and SQL script configuration on the third-party reconciliation file, obtains the configuration parameters, and sends the configuration parameters to the batch initiation module, including: The configuration module performs parameter configuration on the uploaded third-party reconciliation file, obtains batch parameters, and sends the batch parameters to the batch initiation module; The configuration module writes an SQL script according to the accounting type of the third-party reconciliation file; The configuration module configures the SQL script and the accounting type to obtain a corresponding relationship, and sends the corresponding relationship to the transaction verification module.
10. The method according to claim 9, wherein The initialization module performs the steps of initializing the environment of various data tables required for batch running, including: The initialization module determines the pre-common data table, pre-differentiated data table, and data processing data table required for batching the third-party reconciliation file; The initialization module performs public data initialization on the front public data table; The initialization module performs third-party data initialization on the front-end differential data table; The initialization module initializes the flow details of the data processing data table.