CN113724082A - Accounting processing method, device, equipment and storage medium - Google Patents

Accounting processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113724082A
CN113724082A CN202111002318.XA CN202111002318A CN113724082A CN 113724082 A CN113724082 A CN 113724082A CN 202111002318 A CN202111002318 A CN 202111002318A CN 113724082 A CN113724082 A CN 113724082A
Authority
CN
China
Prior art keywords
transaction
sub
processing
accounting
transaction table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111002318.XA
Other languages
Chinese (zh)
Other versions
CN113724082B (en
Inventor
路杨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202111002318.XA priority Critical patent/CN113724082B/en
Publication of CN113724082A publication Critical patent/CN113724082A/en
Application granted granted Critical
Publication of CN113724082B publication Critical patent/CN113724082B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention discloses an accounting processing method, an accounting processing device, accounting processing equipment and a storage medium. The method comprises the following steps: configuring accounting information; the accounting information comprises accounting elements, an accounting method and an exception handling mechanism; generating a main transaction table and a sub transaction table based on the financial information, and initializing transaction states of the main transaction table and the sub transaction table; wherein, the sub-transaction table comprises at least one piece of transaction information; processing the at least one transaction message in sequence according to a transaction sequence; updating the transaction state of the main transaction table and the sub transaction table according to the processing result; and if the updated transaction state of the main transaction table and the updated transaction state of the sub transaction table are not credible, carrying out correction or compensation processing on the transaction information in the sub transaction table. The accounting processing method provided by the embodiment of the invention can ensure the accuracy and real-time of account processing.

Description

Accounting processing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of financial data processing, in particular to an accounting processing method, device, equipment and storage medium.
Background
For financial enterprises (such as banks), the accounting system is the most important and core system, and is the system with the strictest requirements on the result and the highest requirements on the performance. For the core system, the double accounting method is mainly adopted for accounting at present, which generally appears in the form of two lenders, and the lenders must have the same loan, and the lenders must be equal, and the lenders may be accounts of customers or accounts of internal subjects, so that the transaction and the accounting are separated. Each accounting system in the existing bank has a set of accounting mechanism and flow, which mainly comprises flow arrangement, exception handling, compensation mechanism and the like, and the following three problems exist at present:
1. the forward flow basically has no problem, but some system abnormal conditions are not considered completely or new abnormal conditions occur due to the called accounting system, so that the conditions of error accounting and long and short money can occur, once the conditions occur, fund loss can occur, and the reputation of the bank is also influenced to a certain extent. Under the existing condition, the remedy measures for the abnormal conditions are generally the repair of the existing codes, so that the codes are heavy, the logic becomes very complex, and the reading and the extension of developers and the troubleshooting of operation and maintenance personnel are difficult. No set of accounting processing mechanisms that can be easily expanded for maintenance has been developed.
2. Because products and accounting logics of each accounting system are different, a set of all-row uniform accounting processing mechanism is not formed, so that development testing, operation and maintenance, production problem troubleshooting, error processing and the like all require each system to be processed by special personnel who know the accounting mechanism. The requirement on personnel is high, namely the cost of the bank technology is greatly increased.
3. Because the business volume and the user volume are increasingly developed and the requirements on performance and user experience are increasingly higher, at present, many bank accounting systems are changed into a distributed micro-service framework, or the traditional business system needing to string a plurality of accounting system processes has the problem that distributed transactions need to be solved. Finally, the accuracy of the final accounting result is guaranteed, the performance is improved, and the time consumption is reduced. By distributed transaction, it is meant that the participants of the transaction (and in the case of a bank, the participants of the accounting) are not in the same database or application.
Disclosure of Invention
The embodiment of the invention provides an accounting processing method, an accounting processing device, accounting processing equipment and a storage medium, which can ensure the accuracy and the real-time performance of account checking processing.
In a first aspect, an embodiment of the present invention provides an accounting processing method, including:
configuring accounting information; the accounting information comprises accounting elements, an accounting method and an exception handling mechanism;
generating a main transaction table and a sub transaction table based on the financial information, and initializing transaction states of the main transaction table and the sub transaction table; the sub-transaction table comprises at least one piece of transaction information;
processing the at least one transaction message in sequence according to a transaction sequence;
updating the transaction state of the main transaction table and the sub transaction table according to the processing result;
and if the updated transaction state of the main transaction table and the updated transaction state of the sub transaction table are not credible, carrying out correction or compensation processing on the transaction information in the sub transaction table.
In a second aspect, an embodiment of the present invention further provides an accounting processing apparatus, where the accounting processing apparatus includes:
the accounting information configuration module is used for configuring accounting information; the accounting information comprises accounting elements, an accounting method and an exception handling mechanism;
the transaction table generating module is used for generating a main transaction table and a sub transaction table based on the financial information and initializing the transaction states of the main transaction table and the sub transaction table; the sub-transaction table comprises at least one piece of transaction information;
the transaction information processing module is used for sequentially processing the at least one piece of transaction information according to a transaction sequence;
the transaction state updating module is used for updating the transaction states of the main transaction table and the sub transaction table according to the processing result;
and the correcting or compensating module is used for correcting or compensating the transaction information in the sub-transaction table when the updated transaction state of the main transaction table and the updated transaction state of the sub-transaction table are not credible.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes: comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the accounting processing method according to the embodiment of the invention when executing the program.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processing apparatus, the computer program implements the accounting processing method according to the embodiment of the present invention.
The embodiment of the invention discloses an accounting processing method, an accounting processing device, accounting processing equipment and a storage medium. Configuring accounting information; the accounting information comprises accounting elements, an accounting method and an exception handling mechanism; generating a main transaction table and a sub transaction table based on the financial information, and initializing transaction states of the main transaction table and the sub transaction table; the sub-transaction table comprises at least one piece of transaction information; processing at least one piece of transaction information in sequence according to the transaction sequence; updating the transaction states of the main transaction table and the sub transaction table according to the processing result; and if the updated transaction state of the main transaction table and the updated transaction state of the sub transaction table are not credible, carrying out correction or compensation processing on the transaction information in the sub transaction table. The accounting processing method provided by the embodiment of the invention can ensure the accuracy and real-time of account processing.
Drawings
Fig. 1 is a flowchart of an accounting processing method according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of an accounting processing apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device in a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of an accounting processing method according to an embodiment of the present invention, where the embodiment is applicable to a case of processing an accounting, and the method may be executed by an accounting processing apparatus, as shown in fig. 1, the method specifically includes the following steps:
step 110, configuring accounting information.
The accounting information comprises accounting elements, accounting methods and exception handling mechanisms. In this embodiment, each kind of accounting information has a configuration table, the accounting information in the configuration table is stored in the database and loaded in the cache through the database, and the cache needs to be updated when the accounting information in the configuration table is modified. When the accounting information is used, the accounting information can be directly read from the cache, so that the database is not consumed in performance when the accounting information is loaded, and the consumption of the application system performance is almost negligible.
Wherein the billing elements may include: the number of the lending parties (such as one lending and one lending, and multiple lending), the types of the lending parties (private account, public account, internal subject, current subject and accounting entry), the entities of the lending parties (account number, subject, account name and institution), the information of the lending and accounting system (such as accounting system name and accounting system interface number), the transaction amount and the lending mark, and the like. The accounting elements are used to characterize which fields in the system or message the transaction information needs to be matched to for use in generating the transaction information. The billing method may include at least one of a TCC (Try-Confirm-Cancel) method, a SAGA method, and a final consistency method. Configuring the billing method may be understood as configuring a correspondence of the transaction category (characterized by the transaction code) to the billing method. The exception handling mechanism may include a synchronous handling mechanism and an asynchronous handling mechanism.
The synchronization processing mechanism comprises the following contents: how to handle the abnormal failure in the transaction flow, how to judge the abnormal accounting (judgment codes of the abnormal and overtime), the processing means (correcting or compensating) in the abnormal process, and the transaction (transaction code of correcting or compensating by the lender) required to be called by the abnormal process. The asynchronous processing mechanism comprises the following scenes: scene 1: the accounting transaction is returned at the moment, and the final accounting result can be obtained only through checking; scene 2: when the accounting transaction is overtime, the result is not inquired in real time, and the financial resources can be obtained and further accounted after the result is checked asynchronously. Configuring the asynchronous processing mechanism may be understood as: configuring the asynchronous checking frequency, checking the transaction code calling the accounting information, and judging the transaction result after checking (judging success or failure, and correcting or compensating the transaction result).
And step 120, generating a main transaction table and a sub transaction table based on the accounting information, and initializing the transaction states of the main transaction table and the sub transaction table.
Wherein, the sub-transaction table comprises at least one piece of transaction information. The initial transaction state of the main transaction table and the sub transaction table is 'pending'.
The main transaction table stores the whole information and state of the transaction, and contains summary information such as a global serial number, an accounting serial number, a transaction code, a transaction initiating system code, a transaction state and the like, wherein the transaction information of specific accounting is not involved. A single debit transaction (whether a single debit or multiple debits) stores only one piece of data in the master transaction form. The sub-transaction tables are matched with a plurality of sub-transactions according to the number of loan entries (or the number of accounting entries). Such as: the inter-clearing transaction across clearing institutions in the debit card bank at the core involves 1 debit customer account running, 1 credit customer account running, 1 debit account running, 1 credit account running, and 4 credit account running in total. The sub-transaction records the transaction information of the lender, wherein the transaction information comprises some elements (a lending mark, account information of the lender, a system number of the lender, a transaction code, a transaction amount) and the like in the accounting elements, and the sub-transaction also comprises the accounting elements such as a sub-transaction state, a main transaction running water, an automatic transaction running water, a return code, a return information and the like and result information.
At least one transaction message is processed in sequence according to the transaction sequence, step 130.
In this embodiment, after the main transaction table and the sub-transaction table are generated, the accounting engine starts to formally process the transaction information, first loads data in the main transaction table and the sub-transaction table, and then changes the state to "in process". And loading the configured accounting method, and calling the recorded accounting system to sequentially process according to the number and the loan sequence number in the sub-transaction table.
Optionally, the process of sequentially processing at least one piece of transaction information according to the transaction sequence may be: loading the accounting information configured by the sub-transaction table to obtain an accounting method; at least one transaction message is processed according to a billing method.
The billing method may include TCC method, SAGA method, and final consistency method, among others. The SAGA method is suitable for a relatively simple billing scene of a debit-credit and bill billing system. Example (c): the method can be used in an accounting stage of a debit-credit transaction, the first stage directly deducts money from a borrower and accounts for the lender, and if the first stage succeeds, the second stage does not do anything; if the credit in the first stage fails to enter account or the state is unknown, the transaction of correcting is directly called to back all the operations in the first stage, firstly, the credit is corrected, and then the debit is corrected, so that the strong consistency of the transaction is ensured. I.e., unsuccessful, then all rollback. TCC and final consistency can be used in combination, applicable in more complex billing scenarios involving multiple billing systems and scenarios where transaction accounting is separated. Example (c): debit card a is converted to credit card B, debit and credit cards are cross system accounts, i.e., there is a distributed transaction. And the method is divided into two steps of customer account billing and internal account billing. The first step is as follows: the TCC can be used for configuring the transaction of the account part of the client, namely, the state balance and the like are firstly checked on a payment account A in the Try stage, whether the payment account B can be checked is also checked, and the payment of the account A is stopped after the payment account B passes the check. And in the Confirm stage, the account A is subjected to payment release and deduction, and the account B is subjected to account entry. If the Confirm fails, entering a Cancel stage to perform payment-stopping reduction on the account A; and once the customer account is successfully billed, the internal accounting billing process is entered. Because the customer accounts are successfully booked, the internal accounts must be booked successfully. In order to improve the efficiency of the transaction, the final consistency can be achieved by asynchronously calling MQ (high available MQ-rocktMq) by using a distributed concept of the final consistency, so that the accounting efficiency is improved, and the accuracy of the final result of the transaction is guaranteed.
And step 140, updating the transaction states of the main transaction table and the sub transaction table according to the processing result.
In this embodiment, the transaction states of the main transaction table and the sub transaction table include: processing, processing failure, processing success, correction, cancellation failure, unknown, transaction exception, cancellation timeout, partial success, cancellation partial success and compensation processing. Wherein, the successful processing and the corrected transaction state are the credible states, and the rest transaction states are the incredible states.
Specifically, after the transaction information is processed by the accounting method, the transaction states of the main transaction table and the sub transaction tables need to be modified.
Optionally, the process of updating the transaction states of the main transaction table and the sub transaction table according to the processing result may be as follows: updating the transaction state of the sub-transaction table according to the processing result; and updating the transaction state of the main transaction table according to the updated transaction state of the sub transaction table. In this embodiment, the transaction state of the main transaction table is determined by the transaction state in the sub transaction table.
For example, the transaction status of the main transaction table and the sub transaction table may be updated by:
if the borrower succeeds, the lender sub-transaction is updated to be 'processing success', and the main transaction table is kept to be 'processing'.
If the borrower fails, the borrower sub-transaction is updated to be 'processing failure', and the main transaction table is 'processing failure'.
If the borrower is abnormal, the borrower sub-transaction is updated to be unknown, and the main transaction table is unknown.
If the lender succeeds, the lender sub-transaction is updated to be "processing successful", and the main transaction table is updated to be "processing successful".
If the lender fails, one lender borrows the lender and fails (the red line first account is failed), the lender sub-transaction is updated to be 'processing failure', the main transaction table is 'processing failure', one lender borrows the lender and succeeds first, and then the lender fails, the lender sub-transaction is updated to be 'processing failure', and the transaction main transaction table is 'partial success'.
If the lender is abnormal, one lender is abnormal (the first accounting of the red line is abnormal), the sub-transaction of the updated lender is unknown, the main transaction is unknown, one lender is successful in the first line, and the lender is abnormal later, the sub-transaction of the updated lender is unknown, and the transaction main transaction table is partially successful.
Optionally, if the sub-transaction table is configured as a synchronous processing mechanism, after updating the transaction states of the main transaction table and the sub-transaction table according to the processing result, the method further includes the following steps: if the transaction state of the updated main transaction table is not trusted, performing correction processing on the transaction in the sub transaction table; and updating the transaction states of the main transaction table and the sub transaction table according to the conflict result.
Specifically, if the transaction state of the updated main transaction table is not trusted, the main transaction is modified into 'reversal center', then the transaction information of the original transaction lender is reversed, the lender sub-transaction is modified into 'reversal center', and the transaction state of the main transaction table is modified according to the reversal result; and then correcting the running of the original transaction borrower, modifying the borrower sub-transaction into 'correction', and modifying the transaction state of the main sub-transaction table according to the correction result.
If the lender is successful in making the correction, the lender sub-transaction is updated to be "processing successful".
If the lender fails to make a positive answer, the lender sub-transaction is updated to be 'positive answer failure', and the main transaction table is 'positive answer failure'.
If the credit is overtime, the credit sub-transaction is updated to be 'overtime', and the main transaction table is 'overtime'.
If the borrower makes a positive-going transaction successfully, the borrower sub-transaction is updated to be 'positive-going successful', and the main transaction table is 'positive-going successful'.
If the borrower fails to make a positive payment, the borrower sub-transaction is updated to be 'positive payment failure', and the main transaction table is 'positive payment partial success'.
If the debit is abnormally charged, updating the debit sub-transaction to be 'charged exceeding', and updating the transaction main transaction table to be 'charged partial success'.
And 150, if the updated transaction state of the main transaction table and the updated transaction state of the sub transaction table are not trusted, carrying out correction or compensation processing on the transaction information in the sub transaction table.
In this embodiment, the general transaction result (characterized by the transaction status) is returned to the calling system in real time. But for scenario 1: the accounting transaction is returned and accepted at the moment, and the final accounting result can be obtained only through verification. Scene 2: when the accounting transaction is overtime, the result is not inquired in real time, and the financial resources can be obtained and further accounted after the result is checked asynchronously. The state in the master transaction table in both scenarios is not the final state and is not trusted. Under distributed transactions, the untrusted state requires that the transaction outcome be determined by a transaction decision.
Specifically, if the updated transaction state of the main transaction table and the updated transaction state of the sub transaction table are not trusted, the process of performing correction or compensation processing on the transaction information in the sub transaction table may be: judging the unreliable state according to the set frequency; if the judgment result is that correction is needed, the transaction information in the sub-transaction table is registered into the asynchronous correction table; if the judgment result is that compensation is needed, the transaction information in the sub-transaction table is registered into the asynchronous compensation table; and carrying out batch processing on the asynchronous correction table and the asynchronous compensation table.
The set frequency can be automatic batch judgment performed every 2 minutes, and is used for judging whether the state of the main transaction table before 5 minutes is an untrusted state or transaction information which is not judged, judging the transaction information, reflecting the judgment result in a judgment state field of the main transaction table, correcting or compensating the transaction according to the corresponding judgment state, and finally achieving the judgment state.
Specifically, if the transaction state of the main transaction table is "pending", it is determined that the transaction is failed, and the transaction state of the main transaction table is changed to "failed", and the transaction state is registered in the asynchronous correction table, so as to facilitate subsequent correction processing.
If the transaction state of the main transaction table is 'partially successful', the transaction is judged to be successful, the transaction state in the main transaction table is changed into 'successful', and the transaction state is registered in the asynchronous compensation table so as to be beneficial to subsequent compensation processing.
When the state of the main transaction table is "in process", "processing failure", "unknown" or "transaction abnormal", the sub-transaction list needs to be queried:
if the debit sub-transaction is successfully processed and the credit sub-transaction is definitely failed for the first time, the transaction state of the main transaction table is changed into 'failure' and is registered in the asynchronous correction table so as to be beneficial to subsequent correction processing.
If the debit sub-transaction is successfully processed and the credit sub-transaction is successfully processed for the first time, the transaction state of the main transaction table is changed to be successful and is registered in the asynchronous compensation table so as to be beneficial to subsequent compensation processing.
If the debit sub-transaction processing fails, the transaction state of the main transaction table is changed to 'failure', and the failure is registered in the asynchronous correction table, so that the subsequent correction processing is facilitated.
If the sub-transaction state of the borrower is abnormal, inquiring a transaction result according to the type of the debit accounting system, and if the result is definitely returned successfully, judging that the sub-transaction is successful; if the return is positive or nonexistent, the flow is judged to fail.
If the transaction state of the main transaction table is 'reversal part success', the transaction is judged to be reversed, the transaction state of the main transaction table is changed into 'reversal', and the transaction state is registered to the asynchronous reversal table so as to be beneficial to subsequent reversal processing.
When the main transaction state is 'rushing to center', 'rushing to center failing', 'rushing to center abnormal' or 'rushing to center overtime':
under the condition of automatic correction, the transaction state of the main transaction table is changed into 'corrected' and is registered in the asynchronous correction table, so that the subsequent correction processing is facilitated.
Query the sub-transaction list:
if the credit sub-transaction is 'liquidated', the transaction state of the main transaction table is changed to 'liquidated', and the transaction state is registered in the asynchronous liquidation table so as to be beneficial to subsequent liquidation processing.
If the credit sub-transaction is 'correction failure', the transaction state of the main transaction table is changed to 'success', and the transaction state is registered in the asynchronous compensation table so as to be beneficial to subsequent compensation processing.
If the lender sub-transaction is abnormal, the electronic account system or the core system is firstly inquired about the transaction result according to the type of the borrower accounting system, and if the result is definitely returned successfully, the sub-transaction is judged to be corrected successfully; if the return is positive or nonexistent, the flow is judged to fail.
Specifically, batch asynchronous compensation or asynchronous correction processing is performed on the determined data needing correction and compensation according to a set frequency. Firstly, an asynchronous forward rushing table and an asynchronous compensation table are inquired, a running water which needs compensation or rushing forward and is not successful in a compensation/rushing forward state is inquired, and an online compensation/rushing forward engine is called to compensate/rush forward the running water.
In the technical scheme of the embodiment, accounting information is configured; the accounting information comprises accounting elements, an accounting method and an exception handling mechanism; generating a main transaction table and a sub transaction table based on the financial information, and initializing transaction states of the main transaction table and the sub transaction table; the sub-transaction table comprises at least one piece of transaction information; processing at least one piece of transaction information in sequence according to the transaction sequence; updating the transaction states of the main transaction table and the sub transaction table according to the processing result; and if the updated transaction state of the main transaction table and the updated transaction state of the sub transaction table are not credible, carrying out correction or compensation processing on the transaction information in the sub transaction table. The accounting processing method provided by the embodiment of the invention can ensure the accuracy and real-time of account processing.
Example two
Fig. 2 is a schematic structural diagram of an accounting processing apparatus according to a second embodiment of the present invention, and as shown in fig. 2, the apparatus includes:
an accounting information configuration module 210, configured to configure accounting information; the accounting information comprises accounting elements, an accounting method and an exception handling mechanism;
the transaction table generating module 220 is configured to generate a main transaction table and a sub-transaction table based on the accounting information, and initialize transaction states of the main transaction table and the sub-transaction table; the sub-transaction table comprises at least one piece of transaction information;
a transaction information processing module 230, configured to process at least one piece of transaction information in sequence according to a transaction sequence;
a transaction status updating module 240, configured to update the transaction statuses of the main transaction table and the sub transaction table according to the processing result;
and the correcting or compensating module 250 is used for correcting or compensating the transaction information in the sub-transaction table when the updated transaction state of the main transaction table and the updated transaction state of the sub-transaction table are not credible.
Optionally, the transaction information processing module 230 is further configured to:
loading the accounting information configured by the sub-transaction table to obtain an accounting method;
at least one transaction message is processed according to a billing method.
Optionally, the transaction status updating module 240 is further configured to:
updating the transaction state of the sub-transaction table according to the processing result;
and updating the transaction state of the main transaction table according to the updated transaction state of the sub transaction table.
Optionally, the exception handling mechanism includes a synchronous handling mechanism and an asynchronous handling mechanism.
Optionally, if the sub-transaction table is configured as a synchronous processing mechanism, the method further includes: a state re-update module to:
if the transaction state of the updated main transaction table is not trusted, performing correction processing on the transaction in the sub transaction table;
and updating the transaction states of the main transaction table and the sub transaction table according to the conflict result.
Optionally, the transaction states of the main transaction table and the sub transaction table include: processing, processing failure, processing success, correction, cancellation, correction failure, unknown, transaction abnormity, correction overtime, partial success, correction partial success and compensation processing; wherein, the successful processing and the corrected transaction state are the credible states, and the rest transaction states are the incredible states.
Optionally, if the updated transaction status of the main transaction table and the updated transaction status of the sub transaction table are not trusted, the correcting or compensating module 250 is further configured to:
judging the unreliable state according to the set frequency;
if the judgment result is that correction is needed, the transaction information in the sub-transaction table is registered into the asynchronous correction table;
if the judgment result is that compensation is needed, the transaction information in the sub-transaction table is registered into the asynchronous compensation table;
and carrying out batch processing on the asynchronous correction table and the asynchronous compensation table.
The device can execute the methods provided by all the embodiments of the invention, and has corresponding functional modules and beneficial effects for executing the methods. For details not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the present invention.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a computer device according to a third embodiment of the present invention. FIG. 3 illustrates a block diagram of a computer device 312 suitable for use in implementing embodiments of the present invention. The computer device 312 shown in FIG. 3 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention. Device 312 is a computing device for typical accounting processing functions.
As shown in FIG. 3, computer device 312 is in the form of a general purpose computing device. The components of computer device 312 may include, but are not limited to: one or more processors 316, a storage device 328, and a bus 318 that couples the various system components including the storage device 328 and the processors 316.
Bus 318 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Computer device 312 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 312 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 328 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 330 and/or cache Memory 332. The computer device 312 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 334 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, and commonly referred to as a "hard drive"). Although not shown in FIG. 3, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 318 by one or more data media interfaces. Storage 328 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program 336 having a set (at least one) of program modules 326 may be stored, for example, in storage 328, such program modules 326 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which may comprise an implementation of a network environment, or some combination thereof. Program modules 326 generally carry out the functions and/or methodologies of embodiments of the invention as described herein.
The computer device 312 may also communicate with one or more external devices 314 (e.g., keyboard, pointing device, camera, display 324, etc.), with one or more devices that enable a user to interact with the computer device 312, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 312 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 322. Also, computer device 312 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), etc.) and/or a public Network, such as the internet, via Network adapter 320. As shown, network adapter 320 communicates with the other modules of computer device 312 via bus 318. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the computer device 312, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape drives, and data backup storage systems, to name a few.
The processor 316 executes various functional applications and data processing by executing programs stored in the storage 328, for example, implementing the accounting processing method provided by the above-described embodiment of the present invention.
Example four
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processing apparatus, implements an accounting processing method as in the embodiment of the present invention. The computer readable medium of the present invention described above may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: configuring accounting information; the accounting information comprises accounting elements, an accounting method and an exception handling mechanism; generating a main transaction table and a sub transaction table based on the financial information, and initializing transaction states of the main transaction table and the sub transaction table; wherein, the sub-transaction table comprises at least one piece of transaction information; processing the at least one transaction message in sequence according to a transaction sequence; updating the transaction state of the main transaction table and the sub transaction table according to the processing result; and if the updated transaction state of the main transaction table and the updated transaction state of the sub transaction table are not credible, carrying out correction or compensation processing on the transaction information in the sub transaction table.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An accounting processing method, comprising:
configuring accounting information; the accounting information comprises accounting elements, an accounting method and an exception handling mechanism;
generating a main transaction table and a sub transaction table based on the financial information, and initializing transaction states of the main transaction table and the sub transaction table; wherein, the sub-transaction table comprises at least one piece of transaction information;
processing the at least one transaction message in sequence according to a transaction sequence;
updating the transaction state of the main transaction table and the sub transaction table according to the processing result;
and if the updated transaction state of the main transaction table and the updated transaction state of the sub transaction table are not credible, carrying out correction or compensation processing on the transaction information in the sub transaction table.
2. The method of claim 1, wherein processing the at least one transaction message sequentially in a transaction order comprises:
loading the accounting information configured by the sub-transaction table to obtain an accounting method;
processing the at least one transaction message according to the billing method.
3. The method of claim 1, wherein updating the transaction status of the main transaction table and the sub transaction table according to the processing result comprises:
updating the transaction state of the sub-transaction table according to the processing result;
and updating the transaction state of the main transaction table according to the updated transaction state of the sub transaction table.
4. The method of claim 1, wherein the exception handling mechanism comprises a synchronous handling mechanism and an asynchronous handling mechanism.
5. The method of claim 4, wherein if the sub-transaction table is configured as a synchronous processing mechanism, after updating the transaction status of the main transaction table and the sub-transaction table according to the processing result, further comprising:
if the transaction state of the updated main transaction table is not trusted, carrying out correction processing on the transaction in the sub transaction table;
and updating the transaction states of the main transaction table and the sub transaction table according to the conflict result.
6. The method of claim 1, wherein the transaction states of the main transaction table and the sub transaction table comprise: processing, processing failure, processing success, correction, cancellation, correction failure, unknown, transaction abnormity, correction overtime, partial success, correction partial success and compensation processing; wherein, the successful processing and the corrected transaction state are the credible states, and the rest transaction states are the incredible states.
7. The method according to claim 1, wherein if the updated transaction status of the main transaction table and the updated transaction status of the sub transaction table are not trusted, performing correction or compensation processing on the transaction information in the sub transaction table, comprising:
judging the untrusted state according to a set frequency;
if the judgment result is that correction is needed, the transaction information in the sub-transaction table is registered into an asynchronous correction table;
if the judgment result is that compensation is needed, the transaction information in the sub-transaction table is registered into an asynchronous compensation table;
and carrying out batch processing on the asynchronous correction table and the asynchronous compensation table.
8. An accounting processing apparatus, comprising:
the accounting information configuration module is used for configuring accounting information; the accounting information comprises accounting elements, an accounting method and an exception handling mechanism;
the transaction table generating module is used for generating a main transaction table and a sub transaction table based on the financial information and initializing the transaction states of the main transaction table and the sub transaction table; the sub-transaction table comprises at least one piece of transaction information;
the transaction information processing module is used for sequentially processing the at least one piece of transaction information according to a transaction sequence;
the transaction state updating module is used for updating the transaction states of the main transaction table and the sub transaction table according to the processing result;
and the correcting or compensating module is used for correcting or compensating the transaction information in the sub-transaction table when the updated transaction state of the main transaction table and the updated transaction state of the sub-transaction table are not credible.
9. A computer device, the device comprising: comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the accounting processing method of any one of claims 1-7 when executing the program.
10. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processing apparatus, implementing an accounting processing method according to any one of claims 1 to 7.
CN202111002318.XA 2021-08-30 2021-08-30 Accounting processing method, device, equipment and storage medium Active CN113724082B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111002318.XA CN113724082B (en) 2021-08-30 2021-08-30 Accounting processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111002318.XA CN113724082B (en) 2021-08-30 2021-08-30 Accounting processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113724082A true CN113724082A (en) 2021-11-30
CN113724082B CN113724082B (en) 2024-04-30

Family

ID=78678905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111002318.XA Active CN113724082B (en) 2021-08-30 2021-08-30 Accounting processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113724082B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090048954A1 (en) * 2007-08-13 2009-02-19 Canopy Financial Sub-accounting for an omnibus account
CN108830697A (en) * 2018-04-04 2018-11-16 首汽租赁有限责任公司 A kind of industry wealth integral system and method
CN110288255A (en) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 A kind of logistics method and device of distributed transaction
CN111369350A (en) * 2020-03-31 2020-07-03 中国建设银行股份有限公司 Orthogonal punching easy processing method and device
WO2020243903A1 (en) * 2019-06-04 2020-12-10 深圳海付移通科技有限公司 Bookkeeping method, accounting system, account system, and payment system
CN112561672A (en) * 2020-12-04 2021-03-26 京东数字科技控股股份有限公司 Accounting data processing system, method, device, equipment and computer readable medium
CN112907344A (en) * 2021-03-25 2021-06-04 中国建设银行股份有限公司 Accounting data processing method and device, electronic equipment and storage medium
WO2021109719A1 (en) * 2019-12-03 2021-06-10 腾讯科技(深圳)有限公司 Transaction processing method, apparatus, and device, and computer storage medium
CN112967140A (en) * 2021-03-26 2021-06-15 武汉众邦银行股份有限公司 Hot account transaction data processing method based on asynchronous posting of timed tasks

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090048954A1 (en) * 2007-08-13 2009-02-19 Canopy Financial Sub-accounting for an omnibus account
CN108830697A (en) * 2018-04-04 2018-11-16 首汽租赁有限责任公司 A kind of industry wealth integral system and method
WO2020243903A1 (en) * 2019-06-04 2020-12-10 深圳海付移通科技有限公司 Bookkeeping method, accounting system, account system, and payment system
CN110288255A (en) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 A kind of logistics method and device of distributed transaction
WO2021109719A1 (en) * 2019-12-03 2021-06-10 腾讯科技(深圳)有限公司 Transaction processing method, apparatus, and device, and computer storage medium
CN111369350A (en) * 2020-03-31 2020-07-03 中国建设银行股份有限公司 Orthogonal punching easy processing method and device
CN112561672A (en) * 2020-12-04 2021-03-26 京东数字科技控股股份有限公司 Accounting data processing system, method, device, equipment and computer readable medium
CN112907344A (en) * 2021-03-25 2021-06-04 中国建设银行股份有限公司 Accounting data processing method and device, electronic equipment and storage medium
CN112967140A (en) * 2021-03-26 2021-06-15 武汉众邦银行股份有限公司 Hot account transaction data processing method based on asynchronous posting of timed tasks

Also Published As

Publication number Publication date
CN113724082B (en) 2024-04-30

Similar Documents

Publication Publication Date Title
JP2023156390A (en) Method and system for dispute resolution in public blockchain
CN108762895B (en) Method and device for processing distributed transaction
CN112907344A (en) Accounting data processing method and device, electronic equipment and storage medium
CN112965986B (en) Service consistency processing method, device, equipment and storage medium
CN113312259B (en) Interface testing method and device
US11704637B2 (en) System and method to accept third-party payments
CN112991029A (en) Account checking method and device
CN110415112B (en) Post-credit business processing method, device, equipment and storage medium
CN113724082B (en) Accounting processing method, device, equipment and storage medium
US20230087584A1 (en) Reconciliating payment transactions performed by a payment service provider
US20220277400A1 (en) System and method for regular expression generation for improved data transfer
CN115511586A (en) Method, system, terminal device and storage medium for automatic account checking based on jmeter
US8566241B2 (en) Deposit pending check clearance
CN114004701A (en) Method and device for generating transaction result, electronic equipment and storage medium
CN114385320B (en) Distributed transaction processing method and system
US20210141719A1 (en) Assertion engine for validating the configuration of a transaction processing system
CN110969518B (en) Clearing account configuration method and device, server and storage medium
CN112819605A (en) Method and device for testing fund settlement service and computer readable medium
CN107492031B (en) Quasi-real-time financial system account checking method based on function contract bypass analysis
US10929921B1 (en) Instant matching of data for accounting based on email and bank scraping
CN116468432B (en) Order processing method, device, equipment and medium
CN113706045B (en) Funds payment method, apparatus, device, medium and program product
US20200151813A1 (en) Systems and methods for lending transactions
CN117217691A (en) Business process processing method, device, terminal equipment and storage medium
CN117493156A (en) Payment system testing method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant