Automatic financial voucher making method and device, server, medium and product
By establishing a synchronization mechanism between the data platform and the accounting engine and using tracking tables and intermediate storage tables, the system lag and extraction failure caused by large data volume are solved, and the automatic certification process of financial vouchers is successfully carried out.
Patent Information
- Application Number
- CN202411565070.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-11
AI Technical Summary
In the prior art, the system is stuck due to excessive data volume and the extraction failure occurs.
By establishing a synchronization mechanism between the data platform and the accounting engine, using timestamp status tracking tables and temporary intermediate storage tables, we ensure the orderliness of data processing and the separation of resources, and avoid resource contention.
It can avoid system lag in the case of large data volume, ensure the smooth progress of the automatic certificate production process of financial vouchers, and solve the problem of difficulty in data extraction.
Smart Images

Figure CN119417630A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, server, medium and product for automatically producing financial vouchers. Background Art
[0002] The accounting engine is used to automatically convert the certificate data into financial vouchers. In related technologies, business data is extracted from the data platform and processed into certificate data, which is then provided to the accounting engine. However, due to application limitations, excessive data volume can easily cause system freezes and extraction failures. Summary of the invention
[0003] The present application provides a method, device, server, medium and product for automatically producing financial vouchers, which are used to solve the problem that excessive data volume easily causes system jams and extraction failures.
[0004] In a first aspect, the present application provides a method for automatically producing financial vouchers, which is applied to a data platform, and the method comprises:
[0005] After the data processing is completed, the first business data and the second business data corresponding to the previous timestamp are obtained, and a tracking table data corresponding to the previous timestamp is inserted into the timestamp status tracking table; the tracking table data includes the data platform status and the accounting engine status, and the data platform status and the accounting engine status are both newly created;
[0006] Determine whether there is tracking table data in which the data platform status or the accounting engine status is in progress in the timestamp status tracking table;
[0007] If it does not exist, then the data platform status in the tracking table data corresponding to the preceding timestamp is updated to in progress;
[0008] Adding a new piece of first timestamp data to the first temporary intermediate storage table, and adding a new piece of second timestamp data to the second temporary intermediate storage table, and after the addition is completed, updating the data platform status in the tracking table data corresponding to the previous timestamp to completion;
[0009] Among them, the first timestamp data includes the previous timestamp and the first business data, and the second timestamp data includes the previous timestamp and the second business data; the first temporary intermediate storage table and the second temporary intermediate storage table are used for the accounting engine to automatically produce financial vouchers.
[0010] In some embodiments, it also includes:
[0011] If there is tracking table data in the timestamp status tracking table with the data platform status or accounting engine status being in progress, wait or exit.
[0012] In a second aspect, the present application provides a method for automatically producing financial vouchers, which is applied to an accounting engine, and the method comprises:
[0013] Read the timestamp status tracking table of the data platform;
[0014] If there is tracking table data in the timestamp status tracking table with the data platform status being successful and the accounting engine status being newly created, then determining whether there is tracking table data in the timestamp status tracking table with the data platform status or the accounting engine status being in progress;
[0015] If it does not exist, the certificate transfer operation is executed in a loop until all timestamps in the timestamp status tracking table are executed; wherein, the certificate transfer operation includes updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to in progress, and transferring the certificate based on the business data corresponding to the first timestamp sorted in the first temporary intermediate storage table and the second temporary intermediate storage table, and after the certificate transfer is completed, updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to completed.
[0016] In some embodiments, it also includes:
[0017] When all timestamps in the timestamp status tracking table are executed and it is confirmed that the data platform status and the accounting engine status in the timestamp status tracking table are both completed, the business data corresponding to the executed timestamps in the first temporary intermediate storage table and the second temporary intermediate storage table are deleted.
[0018] In some embodiments, it also includes:
[0019] If there are multiple tracking table data corresponding to the same transaction in the timestamp status tracking table, then obtaining the province codes corresponding to the multiple tracking table data respectively;
[0020] The target tracking table data in the timestamp status tracking table is transferred; the province code corresponding to the target tracking table data does not exist in the timestamp task status table; the timestamp task status table contains multiple status table data, and the status table data includes timestamp, province code, accounting date, task status and posting status.
[0021] In some embodiments, the transferring of the target tracking table data in the timestamp status tracking table includes:
[0022] For the target tracking table data, a new status table data is added to the timestamp task status table, and the certificate is transferred in batches according to the accounting date and the number of entries; the status table data includes the timestamp, province code, accounting date, task status and posting status in the target tracking table data, and the task status is the start of the certificate transfer;
[0023] After the provincial code corresponding to the target tracking table data and the multiple batches of data under the accounting date are all transferred, the task status in the status table data is updated to transfer completed.
[0024] In some embodiments, it also includes:
[0025] If the number of province codes with task status of completed transfer in the timestamp task status table is equal to the number of province codes under the timestamp in the target tracking table data, the accounting engine status in the tracking table data corresponding to the timestamp in the timestamp status tracking table is updated to completed.
[0026] In some embodiments, it also includes:
[0027] When there are multiple target tracking table data, each target tracking table data is transferred in sequence according to the order of timestamps.
[0028] In a third aspect, the present application provides an automatic certificate-making device for financial vouchers, which is arranged on a data platform, and the device comprises:
[0029] an acquisition module, used for acquiring the first business data and the second business data corresponding to the previous timestamp after the data processing is completed, and inserting a tracking table data corresponding to the previous timestamp in the timestamp status tracking table; the tracking table data includes the data platform status and the accounting engine status, and the data platform status and the accounting engine status are both newly created;
[0030] A judgment module, used for judging whether there is tracking table data with a data platform status or an accounting engine status in progress in the timestamp status tracking table;
[0031] An updating module, configured to update the data platform status in the tracking table data corresponding to the preceding timestamp to in progress if it does not exist;
[0032] A new module is used to add a new first timestamp data in the first temporary intermediate storage table, and to add a new second timestamp data in the second temporary intermediate storage table, and after the addition is completed, update the data platform status in the tracking table data corresponding to the previous timestamp to completion;
[0033] Among them, the first timestamp data includes the previous timestamp and the first business data, and the second timestamp data includes the previous timestamp and the second business data; the first temporary intermediate storage table and the second temporary intermediate storage table are used for the accounting engine to automatically produce financial vouchers.
[0034] In a fourth aspect, the present application provides an automatic certificate-making device for financial vouchers, which is arranged in an accounting engine, and the device comprises:
[0035] The reading module is used to read the timestamp status tracking table of the data platform;
[0036] A judgment module, used for judging whether there is tracking table data in the timestamp status tracking table with a data platform status of success and an accounting engine status of newly created if there is tracking table data in the timestamp status tracking table with a data platform status of success and an accounting engine status of newly created;
[0037] A certificate transfer module is used to loop the certificate transfer operation if it does not exist until all timestamps in the timestamp status tracking table are executed; wherein, the certificate transfer operation includes updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to in progress, transferring the certificate based on the business data corresponding to the first timestamp sorted in the first temporary intermediate storage table and the second temporary intermediate storage table, and after the certificate transfer is completed, updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to completed.
[0038] In a fifth aspect, the present application provides a server, comprising: a processor and a memory communicatively connected to the processor;
[0039] The memory stores computer-executable instructions;
[0040] The processor executes the computer-executable instructions stored in the memory to implement the automatic certification method for financial vouchers as described in any one of the first aspects or the automatic certification method for financial vouchers as described in any one of the second aspects.
[0041] In a sixth aspect, the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the automatic certification method for financial vouchers described in any one of the first aspect or the automatic certification method for financial vouchers described in any one of the second aspect.
[0042] In a seventh aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the automatic certification method for financial vouchers described in any one of the first aspect or the automatic certification method for financial vouchers described in any one of the second aspect.
[0043] The automatic certification method, device, server, medium and product for financial vouchers provided by the present application establish a synchronization mechanism with the financial accounting engine through the data platform to ensure the separation of business and financial reading and writing, avoid resource contention, and complete the certification of financial vouchers in an orderly manner. Specifically, by establishing a tracking table, the accounting engine can ensure the execution order of the transfer. By establishing an intermediate table and a tracking table, the problem of contention for reading and writing resources between the two parties can be solved. It can be seen that the present application can adjust the heavy integration mode to a lightweight integration, thereby solving the problems of extraction difficulties and system jams caused by excessive data volume in the prior art. 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] Figure 1 It is a schematic diagram of an application scenario provided by this application;
[0046] Figure 2 It is a flowchart of an automatic certification method for financial vouchers provided by this application;
[0047] Figure 3 It is a flowchart of another automatic certification method for financial vouchers provided by the present application;
[0048] Figure 4 It is a structural schematic diagram of an automatic certificate-making device for financial vouchers provided by the present application;
[0049] Figure 5 It is a structural schematic diagram of another automatic certificate-making device for financial vouchers provided by the present application;
[0050] Figure 6 It is a structural diagram of a server provided by this application.
[0051] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0053] Figure 1 is a schematic diagram of an application scenario provided by this application. Figure 1 As shown, the application scenario includes: a data platform 10 and an accounting engine 20. The data platform 10 and the accounting engine 20 are connected via a network.
[0054] The data platform 10 is provided with background services by a server, and the accounting engine 20 is provided with background services by a server. Optionally, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers.
[0055] In the insurance business scenario, the accounting engine is used to automatically convert the certificate data involved in the main business of the insurance business (such as direct insurance and reinsurance payment receipts) into financial vouchers. In related technologies, business data is extracted from the data platform and processed into certificate data, and then provided to the accounting engine. For example, batch downloading by posting date and institution, business document integration, financial dimension conversion, summary of certificated financial vouchers, etc. Specifically, data will be exchanged with the new payment system through an intermediate table, and business data will be extracted to the financial system business interface isomorphic table. After verification, conversion and merging, it will be filled into accounting entries, and finally the entries will be filled into accounting vouchers and posted. It includes the following functions:
[0056] Data extraction: The new payment system stores the daily updated business data into the new payment system interface table according to the rules, and the data platform synchronizes the data to the isomorphic mapping table at regular intervals;
[0057] Data processing: Convert the extracted data from business data to business documents, and then convert the business documents to financial documents. The converted financial documents will meet the requirements for financial accounting. This function will also provide data query, verification, data rollback and other functions;
[0058] Financial document accounting: After verification and conversion, the financial document data is recorded according to the consolidation rules and a financial voucher is generated.
[0059] Due to the large amount of data each month, data is processed in batches on a daily basis by institution, with each batch reaching hundreds of thousands to tens of millions of entries. The main disadvantages of related technologies are: excessive data volume leads to difficulty in extraction and system jams.
[0060] Based on this, this application proposes a method, device, server, medium and product for automatically producing financial vouchers, aiming to solve the above technical problems.
[0061] The execution subject of the automatic certification method for financial vouchers provided in the present application is an automatic certification device for financial vouchers, and the automatic certification device for financial vouchers is integrated in a server.
[0062] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0063] Figure 2 This is a flow chart of a method for automatically producing financial vouchers provided by this application. Figure 2 As shown, the automatic certification method for financial vouchers provided in this embodiment is applied to a data platform and includes the following steps:
[0064] Step S101, after the data processing is completed, obtain the first business data and the second business data corresponding to the previous timestamp, and insert a tracking table data corresponding to the previous timestamp into the timestamp status tracking table; the tracking table data includes the data platform status and the accounting engine status, and the data platform status and the accounting engine status are both newly created.
[0065] In the present application, the data platform extracts data from the business system and processes the data to obtain first business data (which can be represented as doc1 data) and second business data (which can be represented as doc2 data) corresponding to the preceding timestamp.
[0066] In this application, the data platform and the accounting engine agree on timestamps, and the minimum granularity of timestamps is payment transactions, such as each premium received or claim paid. The business system can generate multiple timestamps every day, which means data that requires business and financial integration.
[0067] The data platform establishes a timestamp status tracking table, and establishes a first temporary intermediate storage table (which can be represented as tmp_doc1) and a second temporary intermediate storage table (which can be represented as tmp_doc2), where the first temporary intermediate storage table is used to store the mirror image of the first business data, and the second temporary intermediate storage table is used to store the mirror image of the second business data.
[0068] Among them, the timestamp status tracking table is used to store the tracking table data. One tracking table data includes multiple table items, and the multiple table items include timestamp, data platform status, accounting engine status, first insertion time, data platform update time, data platform update account, accounting engine update time and accounting engine update account. For example, the timestamp is 20230901000000, the data platform status is new (which can be expressed as N or new), in progress (which can be expressed as D or doing) or completed (which can be expressed as S or success); the accounting engine status is new, in progress or completed.
[0069] Step S102, determining whether there is tracking table data in which the data platform status or the accounting engine status is in progress in the timestamp status tracking table.
[0070] In some embodiments, if there is tracking table data in the timestamp status tracking table that the data platform status or accounting engine status is in progress, it means that the current data platform or accounting engine is writing data, then you can wait for the status update or exit the current program.
[0071] Step S103: If it does not exist, then the data platform status in the tracking table data corresponding to the previous timestamp is updated to in progress.
[0072] Step S104, add a new first timestamp data in the first temporary intermediate storage table, and add a new second timestamp data in the second temporary intermediate storage table, and after the addition is completed, update the data platform status in the tracking table data corresponding to the previous timestamp to completion.
[0073] The first timestamp data includes a preceding timestamp and first business data, and the second timestamp data includes a preceding timestamp and second business data; the first temporary intermediate storage table and the second temporary intermediate storage table are used by the accounting engine to automatically produce financial vouchers.
[0074] For example, copy the doc1 data corresponding to the previous timestamp to tmp_doc1, and copy the doc2 data to tmp_doc2.
[0075] If there are multiple tracking table data in the timestamp status tracking table with the data platform status or accounting engine status being in progress, it means that multiple timestamp data need to be added to the first temporary intermediate storage table and the second temporary intermediate storage table respectively. For each new timestamp data, the data platform status in the tracking table data corresponding to the timestamp will be updated to completed.
[0076] It should be noted that the operation of adding a new first timestamp data in the first temporary intermediate storage table and adding a new second timestamp data in the second temporary intermediate storage table can be performed by a single process or thread to improve the efficiency of adding. It also supports batch addition of multiple timestamp data.
[0077] Among them, the error information in the processing process is recorded separately and does not need to be saved in the timestamp status tracking table.
[0078] This application establishes a synchronization mechanism between the data platform and the financial accounting engine to ensure the separation of business and financial reading and writing, avoid resource contention, and complete the financial voucher production in an orderly manner. Specifically, by establishing a tracking table, the accounting engine can ensure the execution order of the transfer. By establishing an intermediate table and a tracking table, the problem of contention for reading and writing resources between the two parties can be solved. It can be seen that this application can adjust the heavy integration mode to a lightweight integration, thereby solving the problems of extraction difficulties and system jams caused by excessive data volume in the prior art.
[0079] Figure 3 This is a flow chart of another automatic certification method for financial vouchers provided by this application, such as Figure 3 As shown, the automatic certification method for financial vouchers provided in this embodiment is applied to an accounting engine and includes the following steps:
[0080] Step S201, read the timestamp status tracking table of the data platform.
[0081] Among them, the accounting engine setting supports batch execution of background tasks. At this time, there is no need to select a specific timestamp (the timestamp range can be limited). Specifically, the accounting engine reads the timestamp status tracking table of the data platform to determine whether there is tracking table data with a data platform status of S and an accounting engine status of N. If not, it prompts that there is no data that needs to be transferred, and the task ends; if it exists, execute step S202.
[0082] Step S202, if there is tracking table data in the timestamp status tracking table with the data platform status being successful and the accounting engine status being newly created, then determine whether there is tracking table data in the timestamp status tracking table with the data platform status or the accounting engine status being in progress.
[0083] Among them, if there is tracking table data with the data platform status of success and the accounting engine status of newly created in the timestamp status tracking table, it means that there is business data that needs to be transferred, and then it is further determined whether there is tracking table data with the data platform status or the accounting engine status of in progress in the timestamp status tracking table; if there is no tracking table data with the data platform status of success and the accounting engine status of newly created in the timestamp status tracking table, it is prompted that there is no data that needs to be transferred and the task is completed.
[0084] If the timestamp status tracking table contains tracking table data with the data platform status or accounting engine status in progress, it means that the temporary intermediate storage table is being processed by the data platform or accounting engine, and the operation is stopped.
[0085] Step S203, if it does not exist, then execute the certificate transfer operation in a loop until all timestamps in the timestamp status tracking table are executed; wherein, the certificate transfer operation includes updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to in progress, transferring the certificate based on the business data corresponding to the first timestamp sorted in the first temporary intermediate storage table and the second temporary intermediate storage table, and after the certificate transfer is completed, updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to completed.
[0086] Among them, after the transfer operation of the first timestamp is completed, the next timestamp is transferred, and so on, until the transfer operations of all timestamps are completed. When a timestamp is abnormally terminated or cancelled, the accounting engine status shall not be changed to completed, and manual inspection and judgment are required, and the transfer operations of subsequent timestamps will not be performed. Error information during the processing is recorded separately and does not need to be saved in the timestamp status tracking table.
[0087] In some embodiments, the automatic certification method for financial vouchers provided in the present application also includes: when all timestamps in the timestamp status tracking table are executed and it is confirmed that the data platform status and the accounting engine status in the timestamp status tracking table are both completed, the business data corresponding to the executed timestamps in the first temporary intermediate storage table and the second temporary intermediate storage table are deleted.
[0088] For example, when the accounting engine completes the timestamp transfer and confirms that the tracking table status is S, the timestamp data of tmp_doc1 and tmp_doc2 will be deleted.
[0089] In one scenario, the data platform provides every complete transaction data, including payable and receivable data and actual payment and receipt data. Each transaction data will be marked with a valid mark (which can be represented as y) or an invalid mark (which can be represented as d), but the same transaction data may change at different times and be modified in certain dimensions, which means that the same valid payment and receipt transactions exist at different timestamps. In this case, the accounting engine needs to identify the change track of the data and automatically perform incremental processing.
[0090] In some embodiments, the automatic certification method of financial vouchers provided by the present application further includes:
[0091] If there are multiple tracking table data corresponding to the same transaction in the timestamp status tracking table, then the province codes corresponding to the multiple tracking table data are obtained;
[0092] The target tracking table data in the timestamp status tracking table is transferred; the province code corresponding to the target tracking table data does not exist in the timestamp task status table; the timestamp task status table contains multiple status table data, and the status table data includes timestamp, province code, accounting date, task status and posting status.
[0093] Among them, the provincial code is used to represent the provincial company to distinguish different provincial companies.
[0094] Exemplarily, the timestamp task status table includes multiple entries, and the multiple entries include timestamp, province code, account date, task status, posting status and other information. For example, the timestamp is 20240201000000, the province code is 3200, the task status is the start of the certificate transfer (which can be represented as 100), the certificate transfer failed (which can be represented as 101, such as a partial task dump), and the certificate transfer is completed (which can be represented as 109); the posting status is the start of the posting (which can be represented as 200), the posting failed (which can be represented as 201, such as a partial task dump), and the posting is completed (which can be represented as 209); other information can be the processing user, date and other information.
[0095] In some embodiments, transferring the target tracking table data in the timestamp status tracking table includes:
[0096] For the target tracking table data, a new status table data is added to the timestamp task status table, and the certificate is transferred in batches according to the accounting date and the number of entries. The status table data includes the timestamp, province code, accounting date, task status and posting status in the target tracking table data, and the task status is the start of the certificate transfer.
[0097] After the transfer of multiple batches of data under the province code and accounting date corresponding to the target tracking table data is completed, the task status in the status table data is updated to transfer completed.
[0098] For example, the certificate transfer process is performed by timestamp + province code: it is further divided into multiple batches according to the accounting date and the number of entries, and the timestamp + province code is locked. Only after it is locked can it be processed. At the same time, the status is written into the timestamp task status table, and the status is the certificate transfer started. When all batches of data under the province code and accounting date are converted, the status changes to certificate transfer completed. When a subtask is unexpectedly dumped and cancelled, the status changes to certificate transfer failed.
[0099] In some embodiments, it also includes:
[0100] If the number of province codes with task status of completed transfer in the timestamp task status table is equal to the number of province codes under the timestamp in the target tracking table data, the accounting engine status in the tracking table data corresponding to the timestamp in the timestamp status tracking table is updated to completed.
[0101] For example, if after all active tasks are completed, the number of provincial companies with the transfer completed status is equal to the total number of provincial companies under the timestamp, then the accounting engine status in the timestamp status tracking table is updated to S (completed), otherwise it is P.
[0102] In some embodiments, it also includes:
[0103] When there are multiple target tracking table data, each target tracking table data is transferred in sequence according to the order of timestamps.
[0104] For example, the incremental batch timestamp sequence is: the timestamps that meet the time requirements are executed in sequence. It should be noted that the subsequent timestamps are executed after the previous timestamp is executed and the accounting engine status is updated to S. For example, if there is an unfinished timestamp from the 1st of the previous month, that is, the accounting engine status is not S, even if it is not within the selected time range, an error will be reported and the current task will not be allowed to execute.
[0105] If the latter timestamp b (can be multiple timestamps) is executed first, and then the previous timestamp a is executed, due to the valid identifier (which can be represented as y) and the invalid identifier (which can be represented as d) of the data, when receiving any timestamp data, it is necessary to search for the same payment transaction number (temporarily reside in the memory through the memory database technology) in the timestamps of this month and last month (considering the cross-month situation during the monthly settlement period), and process it according to the following logic:
[0106] A. If the most recent timestamp has the same payment transaction, but the timestamp is after the current timestamp: the current timestamp will not be processed.
[0107] B. If there is no payment transaction with the same timestamp before: if the timestamp is d, it will not be processed; if it is y, the certificate will be issued according to the normal financial conversion logic.
[0108] C. If there is an identical payment transaction with the most recent timestamp and it was deleted with timestamp d: If the timestamp is d, it will not be processed; if it is y, the transaction will be certified according to the normal financial conversion logic.
[0109] D. If the previous most recent timestamp has the same payment transaction as y: when the current timestamp is d, the previous payment transaction will be reversed and offset, and when it is y, it will be updated, that is, the previous payment transaction will be reversed and offset first, and then the certificate will be issued according to the normal financial conversion logic.
[0110] In actual applications, the business logic of this application can be implemented through the HANA in-memory database and ABAP technology, so that the business financial integration of the most fine-grained data, that is, the transaction-level data, can be flexibly and conveniently realized for the front-end business data, that is, each premium, claim, and handling fee transaction can be automatically incremented to complete the production of financial vouchers, thereby affecting the financial statements. Among them, HANA (High-performance ANalytic Appliance) is an in-memory database management system that combines database, data processing and application platform functions to provide real-time data processing and analysis capabilities. ABAP (Advanced Business Application Programming) is a programming language related to HANA.
[0111] The beneficial effects of this application are as follows:
[0112] On the one hand, a synchronization mechanism is established between the front-end data and the financial accounting engine to ensure the separation of business and financial reading and writing in the form of tokens, avoid resource contention, and complete business data conversion and financial voucher production in an orderly manner. Specifically, by establishing a tracking table, the accounting engine can ensure the execution order of the transfer. By establishing an intermediate table and a tracking table, the problem of contention for read and write resources between the two parties can be solved. It can be seen that this application realizes business and financial integration with the smallest transaction granularity, and can adjust the heavy integration mode to a lightweight integration, thereby solving the problems of extraction difficulties and system jams caused by excessive data volume in the prior art.
[0113] On the other hand, the front-end data and the accounting engine agree on a timestamp. The minimum granularity of the timestamp is the payment and receipt transaction, that is, transaction-level data. The accounting engine can identify the change trajectory of the data and automatically perform incremental processing, solving the problem that existing technologies cannot perform incremental processing on the finest-grained transaction data.
[0114] Furthermore, if an error occurs in a certain item (payment or collection transaction), only this transaction needs to be rolled back. There is no need to roll back the entire batch as in related technologies, which causes a large number of vouchers to be discarded in the system, and the rollback takes a long time, thus affecting the efficiency of monthly closing.
[0115] Figure 4 This is a schematic diagram of the structure of an automatic certificate-making device for financial vouchers provided by the present application. Figure 4 As shown, in this embodiment, the automatic certificate-making device 30 for financial vouchers can be set in a server, and the server is used to provide background services for the data platform. The automatic certificate-making device 30 for financial vouchers includes:
[0116] The acquisition module 301 is used to acquire the first business data and the second business data corresponding to the previous timestamp after the data processing is completed, and insert a tracking table data corresponding to the previous timestamp in the timestamp status tracking table; the tracking table data includes the data platform status and the accounting engine status, and the data platform status and the accounting engine status are both newly created;
[0117] The judgment module 302 is used to judge whether there is tracking table data with the data platform status or the accounting engine status being in progress in the timestamp status tracking table;
[0118] An updating module 303 is used to update the data platform status in the tracking table data corresponding to the previous timestamp to in progress if it does not exist;
[0119] A new module 304 is used to add a new first timestamp data in the first temporary intermediate storage table, and to add a new second timestamp data in the second temporary intermediate storage table, and after the addition is completed, update the data platform status in the tracking table data corresponding to the previous timestamp to completion;
[0120] The first timestamp data includes a preceding timestamp and first business data, and the second timestamp data includes a preceding timestamp and second business data; the first temporary intermediate storage table and the second temporary intermediate storage table are used by the accounting engine to automatically produce financial vouchers.
[0121] In some embodiments, the update module 303 is further configured to:
[0122] If there is tracking table data in the timestamp status tracking table with the data platform status or accounting engine status being in progress, wait or exit.
[0123] The automatic certificate-making device 30 for financial vouchers provided in this embodiment can execute the technical solution of the corresponding method embodiment. Its implementation principle and technical effect are similar to those of the corresponding method embodiment, and will not be repeated here.
[0124] Figure 5 This is a schematic diagram of the structure of an automatic certificate-making device for financial vouchers provided by the present application. Figure 5 As shown, in this embodiment, the automatic certificate-making device 40 for financial vouchers can be set in a server, and the server is used to provide background services for the accounting engine. The automatic certificate-making device 40 for financial vouchers includes:
[0125] Reading module 401, used to read the timestamp status tracking table of the data platform;
[0126] A judgment module 402 is used to judge whether there is tracking table data in the timestamp status tracking table with a data platform status of success and an accounting engine status of newly created if there is tracking table data in the timestamp status tracking table with a data platform status of success and an accounting engine status of newly created;
[0127] The certificate transfer module 403 is used to execute the certificate transfer operation in a loop if it does not exist until all timestamps in the timestamp status tracking table are executed; wherein the certificate transfer operation includes updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to in progress, transferring the certificate based on the business data corresponding to the first timestamp sorted in the first temporary intermediate storage table and the second temporary intermediate storage table, and after the certificate transfer is completed, updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to completed.
[0128] In some embodiments, the certificate transfer module 403 is further used to:
[0129] When all timestamps in the timestamp status tracking table are executed and it is confirmed that the data platform status and the accounting engine status in the timestamp status tracking table are both completed, the business data corresponding to the executed timestamps in the first temporary intermediate storage table and the second temporary intermediate storage table are deleted.
[0130] In some embodiments, the certificate transfer module 403 is further used to:
[0131] If there are multiple tracking table data corresponding to the same transaction in the timestamp status tracking table, then the province codes corresponding to the multiple tracking table data are obtained;
[0132] The target tracking table data in the timestamp status tracking table is transferred; the province code corresponding to the target tracking table data does not exist in the timestamp task status table; the timestamp task status table contains multiple status table data, and the status table data includes timestamp, province code, accounting date, task status and posting status.
[0133] In some embodiments, the certificate transfer module 403 is further used to:
[0134] For the target tracking table data, a new status table data is added to the timestamp task status table, and the certificate is transferred in batches according to the accounting date and the number of entries. The status table data includes the timestamp, province code, accounting date, task status and posting status in the target tracking table data, and the task status is the start of the certificate transfer.
[0135] After the transfer of multiple batches of data under the province code and accounting date corresponding to the target tracking table data is completed, the task status in the status table data is updated to transfer completed.
[0136] In some embodiments, the certificate transfer module 403 is further used to:
[0137] If the number of province codes with task status of completed transfer in the timestamp task status table is equal to the number of province codes under the timestamp in the target tracking table data, the accounting engine status in the tracking table data corresponding to the timestamp in the timestamp status tracking table is updated to completed.
[0138] In some embodiments, the certificate transfer module 403 is further used to:
[0139] When there are multiple target tracking table data, each target tracking table data is transferred in sequence according to the order of timestamps.
[0140] The automatic certificate-making device 40 for financial vouchers provided in this embodiment can execute the technical solution of the corresponding method embodiment. Its implementation principle and technical effect are similar to those of the corresponding method embodiment, and will not be repeated here.
[0141] The embodiment of the present application also provides a server. Figure 6 This is a schematic diagram of the structure of a server provided by this application. Figure 6 As shown, the server 50 includes: a processor 501 and a memory 502 communicatively connected to the processor 501 .
[0142] The memory 502 stores computer-executable instructions; the processor 501 executes the computer-executable instructions stored in the memory 502 to implement the automatic certification method for financial vouchers provided in this application.
[0143] In the embodiment of the present application, the memory 502 and the processor 501 are connected via a bus. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.
[0144] The components, their connections and relationships, and their functions shown herein are merely examples and are not intended to limit the implementation of the present application described and / or required herein. The various components are interconnected using different buses and may be mounted on a common motherboard or in other ways as desired.
[0145] In an exemplary embodiment, a computer-readable storage medium is also provided, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the automatic certification method for financial vouchers provided in the present application.
[0146] In an exemplary embodiment, a computer program product is also provided, including a computer program, which is used to implement the automatic certification method of financial vouchers provided in the present application when the computer program in the computer program product is executed by a processor.
[0147] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0148] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0149] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0150] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.
[0151] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a central processing unit (CPU), a graphics processing unit (GPU), an application specific integrated circuit (ASIC), a digital signal processor (DSP), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components. Unless otherwise specified, the memory can be implemented by any type of volatile or non-volatile storage device or a combination of them, such as a USB flash drive, random-access memory (RAM), static random-access memory (SRAM), dynamic random-access memory (DRAM), enhanced dynamic random-access memory (EDRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), high-bandwidth memory (HBM) or hybrid memory cube (HMC) and other media that can store program code.
[0152] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a server to execute all or part of the steps of the various embodiments of the present application.
[0153] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0154] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0155] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for automatically producing financial vouchers, characterized in that: Applied to a data platform, the method includes: After the data processing is completed, the first business data and the second business data corresponding to the previous timestamp are obtained, and a tracking table data corresponding to the previous timestamp is inserted into the timestamp status tracking table; the tracking table data includes the data platform status and the accounting engine status, and the data platform status and the accounting engine status are both newly created; Determine whether there is tracking table data in which the data platform status or the accounting engine status is in progress in the timestamp status tracking table; If it does not exist, then the data platform status in the tracking table data corresponding to the preceding timestamp is updated to in progress; Adding a new piece of first timestamp data to the first temporary intermediate storage table, and adding a new piece of second timestamp data to the second temporary intermediate storage table, and after the addition is completed, updating the data platform status in the tracking table data corresponding to the previous timestamp to completion; Among them, the first timestamp data includes the previous timestamp and the first business data, and the second timestamp data includes the previous timestamp and the second business data; the first temporary intermediate storage table and the second temporary intermediate storage table are used for the accounting engine to automatically produce financial vouchers.
2. The method according to claim 1, characterized in that Also includes: If there is tracking table data in the timestamp status tracking table with the data platform status or accounting engine status being in progress, wait or exit.
3. A method for automatically producing financial vouchers, characterized in that: Applied to an accounting engine, the method comprises: Read the timestamp status tracking table of the data platform; If there is tracking table data in the timestamp status tracking table with the data platform status being successful and the accounting engine status being newly created, then determining whether there is tracking table data in the timestamp status tracking table with the data platform status or the accounting engine status being in progress; If it does not exist, the certificate transfer operation is executed in a loop until all timestamps in the timestamp status tracking table are executed; wherein, the certificate transfer operation includes updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to in progress, and transferring the certificate based on the business data corresponding to the first timestamp sorted in the first temporary intermediate storage table and the second temporary intermediate storage table, and after the certificate transfer is completed, updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to completed.
4. The method according to claim 3, characterized in that Also includes: When all timestamps in the timestamp status tracking table are executed and it is confirmed that the data platform status and the accounting engine status in the timestamp status tracking table are both completed, the business data corresponding to the executed timestamps in the first temporary intermediate storage table and the second temporary intermediate storage table are deleted.
5. The method according to claim 3, characterized in that: Also includes: If there are multiple tracking table data corresponding to the same transaction in the timestamp status tracking table, then obtaining the province codes corresponding to the multiple tracking table data respectively; The target tracking table data in the timestamp status tracking table is transferred; the province code corresponding to the target tracking table data does not exist in the timestamp task status table; the timestamp task status table contains multiple status table data, and the status table data includes timestamp, province code, accounting date, task status and posting status.
6. The method according to claim 5, characterized in that The transferring of the target tracking table data in the timestamp status tracking table comprises: For the target tracking table data, a new status table data is added to the timestamp task status table, and the certificate is transferred in batches according to the accounting date and the number of entries; the status table data includes the timestamp, province code, accounting date, task status and posting status in the target tracking table data, and the task status is the start of the certificate transfer; After the provincial code corresponding to the target tracking table data and the multiple batches of data under the accounting date are all transferred, the task status in the status table data is updated to transfer completed.
7. The method according to claim 5, characterized in that Also includes: If the number of province codes with task status of completed transfer in the timestamp task status table is equal to the number of province codes under the timestamp in the target tracking table data, the accounting engine status in the tracking table data corresponding to the timestamp in the timestamp status tracking table is updated to completed.
8. The method according to claim 5, characterized in that Also includes: When there are multiple target tracking table data, each target tracking table data is transferred in sequence according to the order of timestamps.
9. An automatic certificate-making device for financial vouchers, characterized in that: Set on the data platform, the device includes: an acquisition module, used for acquiring the first business data and the second business data corresponding to the previous timestamp after the data processing is completed, and inserting a tracking table data corresponding to the previous timestamp in the timestamp status tracking table; the tracking table data includes the data platform status and the accounting engine status, and the data platform status and the accounting engine status are both newly created; A judgment module, used for judging whether there is tracking table data with a data platform status or an accounting engine status in progress in the timestamp status tracking table; An updating module, configured to update the data platform status in the tracking table data corresponding to the preceding timestamp to in progress if it does not exist; A new module is used to add a new first timestamp data in the first temporary intermediate storage table, and to add a new second timestamp data in the second temporary intermediate storage table, and after the addition is completed, update the data platform status in the tracking table data corresponding to the previous timestamp to completion; Among them, the first timestamp data includes the previous timestamp and the first business data, and the second timestamp data includes the previous timestamp and the second business data; the first temporary intermediate storage table and the second temporary intermediate storage table are used for the accounting engine to automatically produce financial vouchers.
10. An automatic certificate-making device for financial vouchers, characterized in that: Set in the accounting engine, the device includes: The reading module is used to read the timestamp status tracking table of the data platform; A judgment module, used for judging whether there is tracking table data in the timestamp status tracking table with a data platform status of success and an accounting engine status of newly created if there is tracking table data in the timestamp status tracking table with a data platform status of success and an accounting engine status of newly created; A certificate transfer module is used to loop the certificate transfer operation if it does not exist until all timestamps in the timestamp status tracking table are executed; wherein, the certificate transfer operation includes updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to in progress, transferring the certificate based on the business data corresponding to the first timestamp sorted in the first temporary intermediate storage table and the second temporary intermediate storage table, and after the certificate transfer is completed, updating the accounting engine status in the tracking table data corresponding to the first timestamp sorted to completed.
11. A server, characterized in that: include: A processor and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the automatic certification method for financial vouchers as described in claim 1 or 2 or the automatic certification method for financial vouchers as described in any one of claims 3 to 8.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the automatic certification method for financial vouchers as described in claim 1 or 2 or the automatic certification method for financial vouchers as described in any one of claims 3 to 8.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the automatic certification method for financial vouchers as described in claim 1 or 2 or the automatic certification method for financial vouchers as described in any one of claims 3 to 8 is implemented.