Accounting data accounting processing method, system, device and storage medium
By introducing a key-value mapping set to the engine and a key-value mapping set to the journal entry rules, the accounting engine and business logic are decoupled, solving the problem of bloat in the accounting data accounting system when updating accounting rules, and realizing the scalability and flexibility of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-24
- Publication Date
- 2026-03-20
AI Technical Summary
Existing accounting data processing systems are prone to becoming bloated and difficult to scalable when updating accounting rules.
By introducing a key-value mapping set to the engine and a key-value mapping set to the journal entry rules, the accounting engine and business logic are decoupled. This allows for modification of business logic and journal entry scenarios by configuring the mapping sets, thereby improving the system's scalability.
It decouples the accounting engine from the business logic, improves the scalability of the accounting data accounting system, and can flexibly meet the needs of different business scenarios.
Smart Images

Figure CN113032147B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of automatic programming, and in particular to a method, system, device and storage medium for accounting data processing. BACKGROUND
[0002] The accounting engine of the existing accounting data processing system is coupled with business logic and business scenarios. When the accounting rules need to be updated (for example, when a transaction needs to support the same-day reversal, the transaction accounting rules need to be configured with a set of parameters for the reverse of borrowing and lending, and a set of parameters for supporting the next-day reversal), generally, the logic of the exception scenario can only be supplemented by hard coding. In this way, the accounting data processing system is gradually bloated. Therefore, how to improve the scalability of the accounting data processing system has become a technical problem to be solved at present. SUMMARY
[0003] The purpose of the embodiments of the present specification is to provide a method, device, equipment and storage medium for accounting data processing, so as to improve the scalability of the accounting data processing system.
[0004] To achieve the above-mentioned purpose, on the one hand, the embodiments of the present specification provide a method for accounting data processing, comprising:
[0005] obtaining business data carrying a total account key value;
[0006] from a preset key value and engine mapping set, matching a target accounting engine according to the total account key value;
[0007] processing the business data according to the target accounting engine to obtain an accounting flow;
[0008] from a preset key value and journal rule mapping set, matching a target journal rule corresponding to the accounting flow, and performing accounting journal processing on the accounting flow according to the target journal rule.
[0009] In the embodiments of the present specification, each accounting engine in the key value and engine mapping set is configured with a plurality of calculation sub-logics of different accounting types.
[0010] In the embodiments of the present specification, the processing of the business data according to the target accounting engine comprises:
[0011] when the accounting of the business data does not involve the change of the COA segment value of the accounting subject table, calling all calculation sub-logics under the target accounting engine to perform accounting processing on the business data;
[0012] when the accounting processing result produces an occurrence amount, generating an accounting flow;
[0013] updating the account balance information table according to the accounting flow;
[0014] persisting the accounting flow.
[0015] In the embodiments of the present specification, the processing of the business data according to the target accounting engine comprises:
[0016] when the accounting of the business data involves COA segment value change, generating a first accounting flow according to the corresponding account balance information table;
[0017] calling all calculation sub-logics under the target accounting engine to process the business data;
[0018] when the accounting processing result produces an occurrence amount, generating a second accounting flow;
[0019] determining whether there is a COA segment value change control parameter;
[0020] when there is no COA segment value change control parameter, updating the account balance information table according to the second accounting flow;
[0021] persisting the first accounting flow and the second accounting flow.
[0022] In the embodiments of the present specification, the processing of the business data according to the target accounting engine further comprises:
[0023] when there is a COA segment value change control parameter, cleaning up the first accounting flow and the second accounting flow;
[0024] generating a third accounting flow according to the COA segment value change control parameter;
[0025] updating the account balance information table according to the third accounting flow;
[0026] persisting the third accounting flow.
[0027] In the embodiments of the present specification, whether the accounting of the business data involves COA segment value change is determined by the following way:
[0028] determining whether the sub-transaction code in the business data is empty;
[0029] when the sub-transaction code in the business data is empty, it is determined that the accounting of the business data does not involve COA segment value change;
[0030] when the sub-transaction code in the business data is not empty, it is determined that the accounting of the business data involves COA segment value change.
[0031] In the embodiments of the present specification, after the accounting flow is obtained, the method further comprises:
[0032] According to the accounting entry type flag in the accounting stream, the accounting stream is written into an online stream set or a batch stream set.
[0033] In the embodiments of the present specification, the accounting entry processing of the accounting stream according to the target entry rule comprises:
[0034] For the online stream set, the online stream set is scanned by a timing job for unaccounted online streams in the online stream set;
[0035] The unaccounted online stream is subjected to accounting entry, and an accounting entry result is obtained;
[0036] The accounting entry result is sent in real time to an accounting component system in an event-driven architecture (EDA).
[0037] In the embodiments of the present specification, the accounting entry processing of the accounting stream according to the target entry rule comprises:
[0038] For the batch stream set, after the end of the end-of-day main batch processing, the batch stream set is scanned by an independent batch job for unaccounted batch streams in the batch stream set;
[0039] The unaccounted batch stream is subjected to accounting entry, and an accounting entry result is obtained;
[0040] The accounting entry result is sent to the accounting component system in the form of a file.
[0041] In the embodiments of the present specification, the online stream set is scanned by the timing job for unaccounted online streams in the online stream set, comprising:
[0042] An unaccounted online main stream is scanned from the online stream set at a timing;
[0043] All online sub-streams under the unaccounted online main stream are determined to form an online sub-stream set.
[0044] In the embodiments of the present specification, the target entry rule corresponding to the accounting stream is matched, and the accounting entry processing of the accounting stream according to the target entry rule comprises:
[0045] An online sub-stream is taken out from the online sub-stream set;
[0046] It is confirmed whether the accounting entry rule corresponding to the online sub-stream exists in the key value and entry rule mapping set;
[0047] when the online sub-stream corresponds to an accounting entry rule and satisfies the accounting entry rule, generating an entry sub-table record of the online sub-stream according to the accounting entry rule;
[0048] recursively, generating entry sub-table records of remaining online sub-streams in the set of online sub-streams;
[0049] persisting the entry sub-table records of all online sub-streams in the set of online sub-streams, and updating the state of the unrecorded online main stream to recorded successfully.
[0050] In an embodiment of the present specification, the method further comprises:
[0051] when the online sub-stream corresponds to an accounting entry rule and does not satisfy the accounting entry rule, processing a next online sub-stream from the set of online sub-streams.
[0052] In an embodiment of the present specification, the method further comprises:
[0053] when the online sub-stream does not correspond to an accounting entry rule, generating an entry sub-table record according to a default accounting entry specification rule.
[0054] In another aspect, an embodiment of the present specification further provides an accounting data accounting processing system, comprising:
[0055] an accounting module configured to acquire business data carrying a total account key value, match a target accounting engine from a preset key value and engine mapping set according to the total account key value, and process the business data according to the target accounting engine to obtain an accounting stream.
[0056] an entry module configured to match a target entry rule corresponding to the accounting stream from a preset key value and entry rule mapping set, and perform accounting entry processing on the accounting stream according to the target entry rule.
[0057] In another aspect, an embodiment of the present specification further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory, wherein the computer program is executed by the processor to execute the instructions of the above method.
[0058] In another aspect, an embodiment of the present specification further provides a computer storage medium having a computer program stored thereon, wherein the computer program is executed by a processor of a computer device to execute the instructions of the above method.
[0059] From the technical solutions provided by the embodiments of the present specification, it can be seen that in the embodiments of the present specification, when the service data carrying the total account key value is received, the corresponding accounting engine can be matched from the preset key value and engine mapping set according to the total account key value; the service data is processed according to the matched accounting engine to obtain the accounting water, so that the decoupling of the accounting engine and the business logic is realized; when the business logic needs to be modified, the key value and engine mapping set can be configured to realize, thereby improving the scalability of the accounting data accounting system.
[0060] Further, based on the obtained accounting water, the embodiments of the present specification can also match the target journal rule corresponding to the accounting water from the preset key value and journal rule mapping set according to the total account key value, and then perform the accounting journal processing on the accounting water according to the target journal rule, so that the decoupling of the accounting engine and the journal business scenario is realized, thereby realizing the accounting and accounting journal of the service data. When the journal business scenario needs to be modified, the key value and journal rule mapping set can be configured, that is, the scene, condition, quantity and other information of generating the journal can be parameterized configured, thereby further improving the scalability of the accounting data accounting system. BRIEF DESCRIPTION OF DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments described in the present specification, and those skilled in the art can also obtain other drawings according to these drawings without creative labor. In the drawings:
[0062] Figure 1 The application scenario schematic diagram of the accounting data accounting processing system in some embodiments of the present specification is shown;
[0063] Figure 2 The flowchart of the accounting data accounting processing method in some embodiments of the present specification is shown;
[0064] Figure 3 The structural block diagram of the accounting data accounting processing system in some embodiments of the present specification is shown;
[0065] Figure 4 The structural block diagram of the computer device in some embodiments of the present specification is shown.
[0066]
Explanation of reference numerals
[0067] 31, accounting module;
[0068] 32, journal module;
[0069] 402, computer device;
[0070] 404. processor;
[0071] 406. memory;
[0072] 408. driving mechanism;
[0073] 410. input / output module;
[0074] 412. input device;
[0075] 414. output device;
[0076] 416. presentation device;
[0077] 418. graphical user interface;
[0078] 420. network interface;
[0079] 422. communication link;
[0080] 424. communication bus. DETAILED DESCRIPTION
[0081] In order to make the person skilled in the art better understand the technical solutions in the specification, the technical solutions in the specification will be described clearly and completely in the specification, and obviously, the described embodiments are only part of the embodiments of the specification, not all. Based on the embodiments in the specification, all other embodiments obtained by the person skilled in the art without creative labor should belong to the protection scope of the specification.
[0082] Reference Figure 1 As shown in the specification, the accounting data accounting system 100 of the embodiment of the specification is mainly used for processing the accounting and accounting entry processing of the business data (i.e. transaction data) of the business system 200, and sending the obtained entry information to the accounting component system 300, so as to facilitate the accounting component system 300 to perform the accounting processing. Wherein, the business system 200 can be a financial business transaction system (such as a personal loan system, etc.).
[0083] The accounting data accounting processing method provided by the embodiment of the specification can be applied to the above-mentioned accounting data accounting system, and reference Figure 2 As shown in the specification, in some embodiments of the specification, the accounting data accounting processing method can include the following steps:
[0084] S201, acquiring business data carrying a total account key value.
[0085] S202, matching a target accounting engine according to the total account key value from a preset key value and engine mapping set.
[0086] S203, processing the business data according to the target accounting engine to obtain an accounting journal.
[0087] S204, matching a target journal rule corresponding to the accounting journal from a preset key value and journal rule mapping set, and performing accounting journal processing on the accounting journal according to the target journal rule.
[0088] In the embodiments of the present specification, when the business data carrying the general ledger key value is received, the corresponding accounting engine can be matched from the preset key value and engine mapping set according to the general ledger key value; the business data is processed according to the matched accounting engine to obtain an accounting journal, so that the decoupling of the accounting engine and the business logic is realized; when the business logic needs to be modified, it can be realized by configuring the key value and engine mapping set, thereby improving the scalability of the accounting data system. Further, on the basis of obtaining the accounting journal, the target journal rule corresponding to the accounting journal can be matched from the preset key value and journal rule mapping set according to the general ledger key value, and then the accounting journal is processed according to the target journal rule. So that the decoupling of the accounting engine and the journal business scenario is realized, thereby realizing the accounting and accounting journal of the business data. When the journal business scenario needs to be modified, it can be realized by configuring the key value and journal rule mapping set, that is, the scene, condition, quantity and other information of generating the journal can be parameterized, thereby further improving the scalability of the accounting data system.
[0089] In some embodiments of the present specification, when a user initiates a transaction to a business system through a transaction channel, the business system can generate business data and send it to the accounting data system for processing. Correspondingly, the accounting data system can receive the business data. The transaction channel may, for example, be a counter, a self-service terminal device, a client (such as a mobile bank, a browser), etc.
[0090] In some embodiments of the present specification, each major accounting object can have a unique general ledger key value; the general ledger key value can correspond to a set of accounting journal mapping configuration rules for the transaction object. Based on different major accounting objects, a plurality of accounting type groups can be split, each accounting type group being an accounting engine corresponding to a major accounting object (which can be expanded, modified and deleted according to actual needs). For example, in an exemplary embodiment, six major accounting objects, namely ordinary loan accounting, Jiaoyamao business accounting, entrusted loan accounting, military provident fund accounting, securitization accounting and quota accounting, can be configured with the following six accounting engines:
[0091] G = domestic ordinary loan accounting type group
[0092] H = Jiaoyamao accounting type group
[0093] E = Delegated loan accounting type group (public accumulation fund)
[0094] A = Military accumulation fund accounting type group
[0095] S = Securitization accounting type group
[0096] C = Quota accounting type group
[0097] Therefore, in order to facilitate subsequent accounting and accounting entry processing, the total account key value information is carried in the business data. When the business data is received, the total account key value can be extracted therefrom, and the corresponding accounting engine can be matched from the preset key value and engine mapping set (for example, an accounting engine mapping table used to represent the mapping relationship between the total account key value and the accounting engine) according to the total account key value. For example, assuming that the business data is military accumulation fund accounting, the military accumulation fund accounting type group (i.e., the military accumulation fund accounting engine) can be matched from the key value and engine mapping set. Of course, the key value and engine mapping set can also include accounting engine description, path for obtaining the accounting engine, and the like.
[0098] In some embodiments of the present specification, each accounting engine in the key value and engine mapping set can be configured with a plurality of calculation sub-logics of different accounting types, and the specific calculation sub-logics of each accounting engine can be configured according to specific needs. In this way, the extension and maintenance of each accounting engine itself can be facilitated. For example, taking the above-mentioned domestic ordinary loan accounting type group as an example, the calculation sub-logics of normal principal, overdue principal, interest accrued, interest income, interest receivable, interest collection, principal penalty interest-interest receivable, principal penalty interest-interest collection, and written-off interest, and the like can be configured.
[0099] Since some business data can involve COA segment value changes, that is, one or more field segment values in the Chart Of Accounts (COA) will be increased, deleted, or modified, etc. Therefore, before processing the business data according to the target accounting engine, it is necessary to determine whether the accounting of the business data involves COA segment value changes, so as to facilitate subsequent accounting and accounting entry processing.
[0100] In an embodiment of the present specification, whether the accounting of the business data involves COA segment value changes can be determined in the following manner:
[0101] 1) Determine whether the sub-transaction code in the business data is empty.
[0102] In an exemplary embodiment, scenarios such as branch merger (corresponding sub-transaction code BRCH), customer type change (corresponding sub-transaction code CUST), tax-free flag change (corresponding sub-transaction code TAXF), accounting type change (corresponding sub-transaction code GLCH), normal sale (corresponding sub-transaction code SE01), bad sale (corresponding sub-transaction code SE02), term code change (corresponding sub-transaction code LDDL), commercial to public (i.e. commercial loan to public fund loan, corresponding sub-transaction code CMAF), public to commercial (i.e. public fund loan to commercial loan, corresponding sub-transaction code AFCM) generally involve COA segment value change.
[0103] 2) When the sub-transaction code in the business data is empty, it can be determined that the accounting of the business data does not involve COA segment value change; otherwise (i.e. when the sub-transaction code in the business data is not empty), it can be determined that the accounting of the business data involves COA segment value change.
[0104] In an embodiment of the present specification, when the accounting of the business data does not involve COA segment value change of the accounting subject matter table, the processing of the business data according to the target accounting engine can include:
[0105] 1) Calling all calculation sub-logics under the target accounting engine, performing accounting processing on the business data to calculate new accounting amount items.
[0106] On the basis of calculating new accounting amount items, new accounting amount items and old accounting amount items can also be processed to determine whether there is an occurrence amount. Of course, in some embodiments of the present specification, the accounting engine can also be configured with corresponding trigger conditions, so that any impact of accounting actions (such as loans, repayments, interest calculations, column conversions, branch mergers, product conversions, etc.) on the account can calculate its occurrence amount.
[0107] 2) When the accounting processing result produces an occurrence amount, generate an accounting log.
[0108] 3) Update the corresponding account balance information table according to the accounting log.
[0109] 4) Persist the accounting log for subsequent accounting entries.
[0110] For example, in an exemplary interest accrual scenario: the cumulative interest calculation amount is increased from 20 to 20.2. The calculation sub-logic involved and its corresponding logic are shown in Table 1.
[0111] Table 1
[0112]
[0113]
[0114] In the account balance table ACC_EXT2, the old accounting amount item: ACC_EXT2(OLD).AMT4 = 20;
[0115] In the account balance table ACC_EXT2, the old accounting amount item: ACC_EXT2(OLD).AMT5 = 20;
[0116] The general accounting engine matched by the total account key value calculates according to the rules: in the account balance table ACC_EXT2, the new accounting amount item: ACC_EXT2(NEW).AMT4 = 20.2;
[0117] In the account balance table ACC_EXT2, the new accounting amount item: ACC_EXT2(NEW).AMT5 = 20.2;
[0118] By comparing the old accounting amount item ACC_EXT2(OLD).AMT4 = 20 in the account balance table ACC_EXT2 with the new accounting amount item: ACC_EXT2(NEW).AMT4 = 20.2, a 0.2 occurrence amount can be obtained; by comparing the old accounting amount item ACC_EXT2(OLD).AMT5 = 20 in the account balance table ACC_EXT2 with the new accounting amount item: ACC_EXT2(NEW).AMT5 = 20.2, another 0.2 occurrence amount can be obtained.
[0119] Due to the occurrence amount, the following accounting flow can be generated according to the occurrence amount:
[0120] G0004 0.2
[0121] G0005 0.2
[0122] For example, in an exemplary account cancellation repayment scenario: 100 principal of the account repayment has been cancelled, and the scenario involves deposit component reconciliation and internal account transfer to make a provision for impairment. The calculation sub-logic involved and its corresponding logic are shown in Table 2.
[0123] Table 2
[0124]
[0125] In the account balance table ACC_EXT2, the old accounting amount item: ACC_EXT2(OLD).AMT18 = 320;
[0126] The ordinary accounting engine that passes the total account key value matching calculates according to the rules, and the new accounting amount item in the account balance table ACC EXT2 is ACC EXT2 (NEW). AMT18 = 220.
[0127] By making a difference between the old accounting amount item ACC EXT2 (OLD). AMT18 = 320 and the new accounting amount item ACC EXT2 (NEW). AMT18 = 220 in the account balance table ACC EXT2, the occurrence amount - 100 is generated. According to the occurrence amount, the following accounting flow is generated:
[0128] G0018-100
[0129] In an embodiment of the present specification, when the accounting of the business data involves the change of the COA segment value, the processing of the business data according to the target accounting engine can include:
[0130] 1) generating a first accounting flow (i.e., the accounting flow corresponding to the old accounting amount item) according to the corresponding account balance information table.
[0131] That is, all the accounting amount items in the account balance information table corresponding to the account are converted into the accounting flow by string splicing. The accounting flow generation in other places in the present specification can also refer to the string splicing method.
[0132] 2) calling all the calculation sub-logics under the target accounting engine to process the business data.
[0133] 3) when the accounting processing result generates an occurrence amount, generating a second accounting flow (i.e., the accounting flow corresponding to the new accounting amount item).
[0134] 4) confirming whether there is a COA segment value change control parameter.
[0135] The general business logic of COA segment value change is to transfer out the old account balance and mark it as OLD, and transfer in the new account balance and mark it as NEW. If special calculation is required to transfer in and out, the COA segment value change control parameter (CD_TXN_ENTRY parameter) can be configured, and the transfer-in and transfer-out can be generated after the processing according to the parameter configuration. By configuring the COA segment value change control parameter, the range of accounting amount items contained in the generated flow can be adjusted, and the occurrence amount can be processed, operated, etc. by taking other values.
[0136] It should be noted that in the present specification, confirming whether there is a COA segment value change control parameter can mean confirming whether there is a COA segment value change control parameter in the calculation sub-logic under the target accounting engine.
[0137] 5) updating the account balance information table according to the second accounting stream when the COA segment value change control parameter does not exist.
[0138] 6) persisting the first accounting stream and the second accounting stream for subsequent accounting entries.
[0139] In another embodiment of the present specification, after the above-mentioned confirmation of whether the COA segment value change control parameter exists, the following can also be included:
[0140] 5') clearing the first accounting stream and the second accounting stream when the COA segment value change control parameter exists.
[0141] 6') generating a third accounting stream according to the COA segment value change control parameter.
[0142] 7') updating the account balance information table according to the third accounting stream.
[0143] 8') persisting the third accounting stream for subsequent accounting entries.
[0144] For example, in an exemplary scenario (no COA segment value change control parameter exists), after an account maintenance transaction, the account is institutionally merged, and the old institution A is transferred out and the new institution B is transferred in on the account.
[0145] The account balance table ACC_EXT2 can be marked as ACC_EXT2 (OLD), and all accounting amount items thereof are concatenated by strings to generate a transfer-out stream. For example, assuming that the old accounting amount item is ACC_EXT2 (OLD). GL AMT 1 = 100 (for the sake of explanation, other accounting amount items are omitted here), and the old accounting engine flag is G, the first accounting stream can be processed as follows:
[0146] G0001 100.00 OLD Institution A
[0147] The new accounting engine flag is still G = ordinary calculation engine, and the new accounting amount item ACC_EXT2 (NEW). GL AMT 1 = 100 is generated after calculation. According to this, the second accounting stream can be generated as follows:
[0148] G0001 100.00 NEW Institution B
[0149] According to the second accounting stream G0001 100.00 NEW Institution B, the new account balance table ACC_EXT2 (NEW) is updated; and G0001 100.00 OLD Institution A and G0001 100.00 NEW Institution B are persisted.
[0150] For example, in another exemplary scenario (COA segment value change control parameter exists), after the account is sold through account securitization, SE01 = normal sale occurs, and the old balance table is transferred out on the account, and the new balance is transferred out of the securitization table.
[0151] ACC EXT2 (NEW) is generated according to the logic of the general scenario, and all the water is cleaned up; then the COA segment value change control parameter is obtained, and the new accounting water is generated according to the configuration of the COA segment value change control parameter. The new accounting water is updated according to the new accounting water ACC EXT2 (NEW), and then the new accounting water is persisted.
[0152] In some embodiments of the present specification, in order to meet the real-time accounting needs, according to the accounting entry type flag in the accounting water, the accounting engine output accounting water can be marked with the flag of executing online entry or batch entry. For example, 0 represents executing online entry, and 1 represents executing batch entry. Correspondingly, after obtaining the accounting water, the accounting water can be written into the online water set or the batch water set according to the accounting entry type flag in the accounting water.
[0153] In this case, for the online water set, the unaccounted online water in the online water set is scanned through a timing job; the accounting entry is performed on the unaccounted online water to obtain an accounting entry result; and the accounting entry result is sent to the accounting component system in real time in an event-driven architecture (EDA) manner, so as to realize real-time accounting with low delay.
[0154] And for the batch water set, the unaccounted batch water in the batch water set can be scanned through an independent batch job after the end of the daily main batch processing; the accounting entry is performed on the unaccounted batch water to obtain an accounting entry result; and the accounting entry result is sent to the accounting component system in the form of a file, so as to realize batch accounting in most scenarios.
[0155] In an embodiment of the present specification, the unaccounted online water in the online water set is scanned through a timing job, which can include: an unaccounted online main water is scanned from the online water set at a timing (for example, every 5 minutes or 10 minutes, etc.); all online sub-waters under the unaccounted online main water are determined to form an online sub-water set. Wherein, the online main water is a unique global water number (similar to the batch main water mentioned below, which is also a unique global water number), which realizes the binding of transaction information and accounting information, that is, the atomic accounting mode, so that each accounting record has a traceable record, which is convenient for problem analysis and tracing.
[0156] On this basis, the accounting entry of the unaccounted online stream can include:
[0157] 1) Take out an online sub-stream from the online sub-stream set.
[0158] 2) Confirm whether the accounting entry rule corresponding to the online sub-stream exists in the key-value and entry rule mapping set. In an embodiment of the present specification, the accounting entry rule can be expressed by a Boolean expression (i.e., a regular expression). When it is necessary to control the generation of the corresponding entry in a certain scenario or to control a stream to generate multiple entries, the regular expression can be configured to configure such entry rule.
[0159] 3) When the accounting entry rule corresponding to the online sub-stream exists and the online sub-stream satisfies the accounting entry rule, the sub-entry table record of the online sub-stream is generated according to the accounting entry rule.
[0160] In an embodiment of the present specification, the generation of the sub-entry table record of the online sub-stream according to the accounting entry rule can include: resetting the sub-entry serial number, order + 1; calculating the direction of the debit and credit of the amount (here, taking the accounting of the loan business as an example), the OLD flag makes the debit and credit reverse; taking the absolute value of the amount; and transferring the stream information to the sub-entry according to the processing, mapping, and transmission rules specified by the Boolean expression.
[0161] In an embodiment of the present specification, when the accounting entry rule corresponding to the online sub-stream exists and the online sub-stream does not satisfy the accounting entry rule, the next online sub-stream is taken out from the online sub-stream set for processing, so that the sub-entry table record of the online sub-stream is not generated, thereby realizing that accounting entry is not needed in some scenarios.
[0162] In an embodiment of the present specification, when the accounting entry rule corresponding to the online sub-stream does not exist, the sub-entry table record is generated according to the default accounting entry specification rule. The default accounting entry specification rule can be set according to actual needs to meet the general accounting needs.
[0163] 4) Recursively generate the sub-entry table records of the remaining online sub-streams in the online sub-stream set.
[0164] 5) Persist the sub-entry table records of all online sub-streams in the online sub-stream set, and update the state of the unaccounted online main stream to account successfully. Of course, if any exception occurs in the accounting entry process of the unaccounted online main stream, the state of the unaccounted online main stream is recorded as account failure. It should be noted that the unaccounted online main stream in the present specification refers to the online main stream whose state is unprocessed or account failure.
[0165] 6) The unaccounted online main stream accounting record results are sent to the accounting component system in real time in the EDA mode.
[0166] 7) The remaining unaccounted online streams in the online stream set are sequentially processed by the accounting record.
[0167] For example, taking the accounting stream (G0004 0.2; G0005 0.2) generated in the above interest accrual scenario as an example; the following record information can be generated after the accounting record:
[0168] G0004 170105 = Accrued interest D 0.2
[0169] G0005 506403 = Interest income C 0.2
[0170] For example, taking the accounting stream (G0018-100) generated in the above account write-off repayment scenario as an example; the following record information can be generated after the accounting record:
[0171] G0018 159501 = Allowance for credit loss C 100 (in-table subject)
[0172] G0018 938003 = Write-off principal D 100 (out-of-table subject)
[0173] 317610 = Cross-component balance subject D 100 (here, due to the negative amount of the stream, the record will be reversed)
[0174] In another embodiment of the present specification, after generating the record sub-table of each online sub-stream in the above online sub-stream set, the occurrence direction of the occurrence amount can also be counted. For example, taking the loan business as an example, the occurrence direction of the occurrence amount can be determined according to the nature of the record subject, if 1 = ordinary subject, the amount of debit and credit is counted to determine the occurrence direction of the occurrence amount.
[0175] In another embodiment of the present specification, after counting the occurrence direction of the occurrence amount, the accounting amounts of the transaction parties can also be balanced; if not balanced, a pending balance subject (i.e. the counterpart's balance subject) is generated. Accordingly, when persisting the record sub-table, the pending balance subject is also persisted.
[0176] In the embodiment of the present specification, the accounting record processing of the unaccounted batch stream is basically the same as the accounting record processing of the unaccounted online stream described above. The difference lies in the processing time and the way of sending the record results to the accounting component system (which has been described above). Therefore, the accounting record processing of the unaccounted batch stream can refer to the accounting record processing of the unaccounted online stream described above, and will not be repeated here.
[0177] It should be noted that in the embodiments of the present disclosure, the accounting entry processing of the unrecorded online stream and the batch stream described above is performed under the premise that COA segment value change is not involved. When the accounting entry processing involves COA segment value change, the difference from the accounting entry processing not involving COA segment value change is that a new accounting entry item is created before the unrecorded online main stream (or the unrecorded online main stream) is obtained.
[0178] Although the process flows described above include a number of operations that are performed in a particular order, it should be clear that the processes can include more or fewer operations, and that the operations can be performed in a different order (e.g., using a parallel processor or multi-threaded environment).
[0179] Corresponding to the accounting data accounting processing method described above, the present disclosure also provides an embodiment of an accounting data accounting processing system. Referring to Figure 3 As shown in the figure, in some embodiments of the present disclosure, the accounting data accounting processing system can include:
[0180] The accounting module 31 can be configured to obtain business data carrying a general ledger key value; match a target accounting engine from a preset key value and engine mapping set according to the general ledger key value; and process the business data according to the target accounting engine to obtain an accounting stream.
[0181] The entry module 32 can be configured to match a target entry rule corresponding to the accounting stream from a preset key value and entry rule mapping set, and perform accounting entry processing on the accounting stream according to the target entry rule.
[0182] For the convenience of description, the above-described apparatus is described in various units according to functions and is described respectively. Of course, in the implementation of the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0183] The embodiments of the present disclosure also provide a computer device. As shown in Figure 4As shown, in some embodiments of the specification, the computer device 402 can include one or more processors 404, such as one or more central processing units (CPUs) or graphics processing units (GPUs), each of which can implement one or more hardware threads. The computer device 402 can also include any memory 406 for storing any kind of information, such as code, settings, data, etc., in an implementation, a computer program stored on the memory 406 and executable on the processor 404, when executed by the processor 404, can perform instructions according to the above-described method. Without limitation, for example, the memory 406 can include any one or combination of the following: any type of RAM, any type of ROM, a flash memory device, a hard disk, an optical disk, etc. More generally, any memory can store information using any technology. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 402. In one case, the computer device 402 can perform any operation of the associated instructions when the processor 404 executes the associated instructions stored in any memory or combination of memories. The computer device 402 also includes one or more drive mechanisms 408, such as a hard disk drive mechanism, an optical disk drive mechanism, etc., for interacting with any memory.
[0184] The computer device 402 can also include an input / output module 410 (I / O) for receiving various inputs (via input devices 412) and for providing various outputs (via output devices 414). One particular output mechanism can include a presentation device 416 and an associated graphical user interface 418 (GUI). In other embodiments, the input / output module 410 (I / O), the input devices 412, and the output devices 414 can also not be included, just as a computer device in a network. The computer device 402 can also include one or more network interfaces 420 for exchanging data with other devices via one or more communication links 422. One or more communication buses 424 couple the above-described components together.
[0185] The communication links 422 can be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication links 422 can include any combination of hardwired links, wireless links, routers, gateway functionality, name servers, etc., governed by any protocol or combination of protocols.
[0186] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0187] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0188] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0189] In one typical configuration, a computer device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0190] The memory can include non-persistent memory and / or volatile memory, such as a random access memory (RAM) including a cache area for the temporary storage of data. The memory can also include non-volatile memory, such as a read only memory (ROM), EPROM, EEPROM, or flash memory. The memory can be another form of computer-readable media that stores data temporarily or permanently.
[0191] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computer device. According to the definition herein, computer-readable media does not include transitory media, such as modulated data signals and carriers.
[0192] Those skilled in the art will appreciate that embodiments of the present specification can be provided as methods, systems or computer program products. Therefore, embodiments of the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, embodiments of the present specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0193] Embodiments of the present specification can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. Embodiments of the present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.
[0194] Each of the embodiments in the present specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, the system embodiments are described simply because they are substantially similar to the method embodiments. The relevant parts can be referred to the description of the method embodiments. In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the embodiments of the present specification. The illustrative description of the above terms in the present specification does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. Furthermore, the person skilled in the art can combine and integrate the different embodiments or examples described in the present specification and the features of the different embodiments or examples without contradiction.
[0195] The above only describes the embodiments of the present application and is not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of claims of the present application.
Claims
1. A method for accounting data processing, characterized in that, include: Retrieve business data carrying general ledger key values; Each type of business data is an accounting object class, and each accounting object class has a unique general ledger key value; From a preset set of key-value and engine mappings, a target accounting engine is matched based on the general ledger key value; the set of key-value and engine mappings contains the mapping relationship between general ledger key values and accounting engines, and when the business logic is modified, the mapping relationship in the set of key-value and engine mappings is reconfigured; the business data is processed according to the target accounting engine to obtain accounting records; From the preset key-value and entry rule mapping set, the target entry rule corresponding to the accounting transaction is matched, and the accounting transaction is processed according to the target entry rule. The key-value and entry rule mapping set contains the mapping relationship between accounting transactions and accounting entry rules. When the entry scenario is modified, the mapping relationship in the key-value and entry rule mapping set is reconfigured.
2. The accounting data processing method as described in claim 1, characterized in that, Each computing engine in the key-value and engine mapping set is configured with multiple computing sub-logic of different computing types.
3. The accounting data processing method as described in claim 1, characterized in that, The process of processing the business data according to the target accounting engine includes: When the accounting of the business data does not involve changes to the COA segment value in the chart of accounts, all calculation sub-logic under the target accounting engine is invoked to perform accounting processing on the business data; When the accounting processing results in an amount incurred, an accounting transaction record is generated; Update the corresponding account balance information table according to the aforementioned accounting records; Persist the accounting records.
4. The accounting data processing method as described in claim 1, characterized in that, The process of processing the business data according to the target accounting engine includes: When the accounting of the business data involves changes in the COA segment value, a first accounting transaction is generated based on the corresponding account balance information table. The business data is processed by invoking all computational sub-logic under the target computing engine. When the accounting processing results in an amount incurred, a second accounting record is generated; Confirm whether there are any changes to the COA segment value control parameters; When there is no COA segment value change control parameter, update the account balance information table according to the second accounting flow; Persist the first accounting record and the second accounting record.
5. The accounting data processing method as described in claim 4, characterized in that, The process of processing the business data according to the target accounting engine further includes: When there is a change in the COA segment control parameter, clear the first accounting record and the second accounting record; A third accounting record is generated based on the control parameters changed according to the COA segment value; Update the account balance information table according to the third accounting record; Persist the third accounting record.
6. The accounting data processing method as described in claim 3 or 4, characterized in that, The following methods can be used to determine whether the accounting of the business data involves changes to the COA segment value: Determine whether the sub-transaction code in the business data is empty; When the sub-transaction code in the business data is empty, it is confirmed that the calculation of the business data does not involve changes to the COA segment value. When the sub-transaction code in the business data is not empty, it is confirmed that the calculation of the business data involves a change in the COA segment value.
7. The accounting data processing method as described in claim 1, characterized in that, After obtaining the accounting records, the process also includes: Based on the accounting entry type flag in the accounting transaction record, the accounting transaction record is written into the online transaction record set or the batch transaction record set.
8. The accounting data processing method as described in claim 7, characterized in that, The step of processing accounting entries for the accounting flow according to the target entry rules includes: For the aforementioned online transaction set, unposted online transactions in the online transaction set are scanned by a scheduled job; Make accounting entries for the unposted online transactions to obtain the accounting entry results; The accounting entries are sent to the accounting component system in real time using an event-driven architecture (EDA) method.
9. The accounting data processing method as described in claim 7, characterized in that, The step of processing accounting entries for the accounting flow according to the target entry rules includes: For the batch transaction set, after the end-of-day main batch processing is completed, the unposted batch transactions in the batch transaction set are scanned by an independent batch job; Make accounting entries for the unposted batch transactions to obtain the accounting entry results; The accounting entries are sent to the accounting component system in file format.
10. The accounting data processing method as described in claim 8, characterized in that, The step of scanning the online transaction record set for unposted transactions via a scheduled job includes: Periodically scan the online transaction log set to identify an unposted online transaction log. Identify all online sub-flows under the unposted online main flow and form an online sub-flow set.
11. The accounting data processing method as described in claim 10, characterized in that, The process of matching the target journal entry rule corresponding to the accounting transaction details and processing the accounting transactions according to the target journal entry rule includes: Take one online sub-flow from the set of online sub-flows; Confirm whether the accounting entry rule corresponding to the online sub-transaction exists in the key-value and entry rule mapping set; When there is an accounting entry rule corresponding to the online sub-flow, and the online sub-flow satisfies the accounting entry rule, an entry sub-table record of the online sub-flow is generated according to the accounting entry rule; By recursively applying this process, the journal entries for the remaining online sub-streams in the set of online sub-streams are generated. Persist the journal entries of all online sub-streams in the set of online sub-streams, and update the status of the unposted online main stream to posting successful.
12. The accounting data processing method as described in claim 11, characterized in that, Also includes: When an accounting entry rule exists corresponding to the online sub-flow, and the online sub-flow does not meet the accounting entry rule, the next online sub-flow is taken from the set of online sub-flows for processing.
13. The accounting data processing method as described in claim 11, characterized in that, Also includes: When there is no accounting entry rule corresponding to the online sub-flow, an entry sub-table record is generated according to the default accounting entry specification rule.
14. An accounting data processing system, characterized in that, include: The accounting module is used to retrieve business data carrying general ledger key values; Each type of business data is an accounting object class, and each accounting object class has a unique general ledger key value; From a preset set of key-value and engine mappings, a target accounting engine is matched based on the general ledger key value; the set of key-value and engine mappings contains the mapping relationship between general ledger key values and accounting engines, and when the business logic is modified, the mapping relationship in the set of key-value and engine mappings is reconfigured; the business data is processed according to the target accounting engine to obtain accounting records; The journal entry module is used to match the target journal entry rule corresponding to the accounting transaction from a preset key-value and journal entry rule mapping set, and to perform accounting journal entry processing on the accounting transaction according to the target journal entry rule; the key-value and journal entry rule mapping set contains the mapping relationship between accounting transactions and accounting journal entry rules, and the mapping relationship in the key-value and journal entry rule mapping set is reconfigured when the journal entry scenario is modified.
15. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, When the computer program is run by the processor, it executes the instructions of the method according to any one of claims 1-13.
16. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor of the computer device, it executes the instructions of the method according to any one of claims 1-13.
Citation Information
Patent Citations
Data processing method and device, electronic equipment and storage medium
CN111915427A