Configurable bookkeeping method and device, equipment and storage medium
By obtaining target transaction data and determining target accounting expressions and transaction types, the problem that the accounting method in the existing technology cannot meet personalized needs is solved, and an efficient, accurate and reliable accounting process is achieved, while reducing maintenance costs.
Patent Information
- Application Number
- CN202411745596.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the accounting methods cannot meet personalized needs while ensuring efficiency. Especially in the financial industry, the business models and accounting requirements of each institution are different, and ready-made financial accounting software is difficult to fully meet these personalized needs.
By obtaining the target transaction data, extracting the current value of the target variable, determining the target accounting expression and transaction type, and then extracting the corresponding accounting data. This method does not rely on manual rewriting and can automatically adapt to changes in regulatory requirements and financial statistics dimensions.
It improves the accuracy and reliability of accounting, reduces the possibility of grammatical or logical errors introduced due to human errors, reduces the labor and time cost of later maintenance, and can better adapt to personalized business scenarios and accounting rules.
Smart Images

Figure CN119579336A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of big data technology, and in particular relates to a configurable accounting method, device, equipment and storage medium. Background Art
[0002] In the field of financial accounting, the double-entry accounting method is a commonly used method. In particular, the debit and credit accounting method used in the accounts of bank accounting tables is based on the principle of asset-liability balance. In this accounting method, "debit" and "credit" are special accounting symbols with specific meanings and usage rules. Among them, "where there is debit, there is credit, and debit and credit must be equal" is the core accounting rule, which means that for each economic transaction record, the debit and credit amounts must be equal to ensure the balance of the accounting equation (assets equal the sum of liabilities and owner's equity). This double-entry accounting method can comprehensively and systematically reflect the ins and outs of economic transactions and provide accurate data for financial analysis and decision-making.
[0003] The accounting rules of the financial industry are relatively complex. With the continuous changes in regulatory requirements and the in-depth development of financial statistics, it is necessary to increase or decrease accounting items. This adjustment of items is not isolated, and it will trigger a large number of changes in accounting rules. For example, new regulatory policies may require more detailed classification and accounting of risk assessments of certain financial products, or financial statistics may need to summarize data according to new dimensions, which will lead to changes in accounting items and corresponding rules.
[0004] In order to improve the efficiency of bookkeeping, every time you need to adjust the bookkeeping subjects and accounting rules, you can do it by manually writing scripts. However, this method has obvious disadvantages. First, its scalability is poor, because each adjustment requires rewriting the script. If the business scale expands or adjustments are frequent, the workload of writing scripts will increase exponentially, and inconsistencies are prone to occur. Secondly, relying on manual script writing means that it is easy to make mistakes. A small syntax error or logical loophole may cause problems in the entire bookkeeping system. Finally, the later maintenance is extremely difficult. As time goes by and the business changes, the scripts will become more and more complicated. Understanding and modifying these scripts requires a lot of manpower and time costs.
[0005] For this reason, the prior art proposes to use ready-made financial accounting software for accounting. This solution overcomes the shortcomings of manual scripting to a certain extent. It has the characteristics of relative stability and standardization, and can automatically adapt to some common account adjustment situations. However, it also has its own problems. It does not support personalized needs enough. Different financial institutions may have unique business models and accounting requirements, and ready-made software may not be able to fully meet these personalized needs. Summary of the invention
[0006] The present invention provides a configurable accounting method, device, equipment and storage medium to solve the problem that the accounting method in the prior art cannot meet personalized needs while ensuring efficiency.
[0007] In a first aspect, the present invention provides a configurable accounting method, comprising:
[0008] Obtain target transaction data, and extract the current value corresponding to the target variable in the target transaction data;
[0009] Determine a target accounting expression satisfied by a current value corresponding to the target variable;
[0010] Determine a target transaction type corresponding to the target accounting expression;
[0011] Extract accounting data corresponding to the target transaction type from the target transaction data.
[0012] In a second aspect, the present invention provides a configurable accounting device, comprising:
[0013] An acquisition module, used to acquire target transaction data and extract the current value corresponding to the target variable in the target transaction data;
[0014] A first determination module, used to determine a target accounting expression satisfied by a current value corresponding to the target variable;
[0015] A second determination module, used to determine a target transaction type corresponding to the target accounting expression;
[0016] The extraction module is used to extract the accounting data corresponding to the target transaction type from the target transaction data.
[0017] In a third aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned configurable accounting method when executing the computer program.
[0018] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which implements the steps of the above-mentioned configurable accounting method when executed by a processor.
[0019] In the solution implemented by the above configurable accounting method, by obtaining the target transaction data and determining the corresponding target accounting expression and target transaction type based on the current value of the target variable, the corresponding accounting data is extracted. The entire process does not rely on manual rewriting of scripts. For example, no matter how the regulatory requirements or financial statistical dimensions change, as long as the target variables and their corresponding accounting logic (accounting expressions, transaction types, etc.) are clear, they can be automatically adapted. Unlike manual scripting, each change does not require rewriting on a large scale, which effectively solves the problem of poor scalability.
[0020] In addition, this solution extracts and processes accounting data based on established target variables, accounting expressions and other logic. It is a relatively standardized and automated process that reduces manual intervention, thereby reducing the possibility of introducing grammatical or logical errors due to human errors, improving the accuracy and reliability of accounting, and overcoming the defects of relying on manual writing that is prone to errors.
[0021] Furthermore, this solution focuses on the target transaction data, target variables and the corresponding accounting logic. Its operation and maintenance are relatively concentrated on these key elements. The logic is clear and concise. Unlike manual scripts that become obscure over time, it is relatively easy to understand and modify, which can effectively reduce the manpower and time costs of later maintenance and solve the problem of difficulty in later maintenance of manually written scripts.
[0022] In addition, existing financial accounting software is difficult to meet the unique business models and accounting requirements of different financial institutions. This solution flexibly extracts accounting data based on key elements such as target variables, accounting expressions, and transaction types in the target transaction data. This means that target variables and corresponding accounting logic can be set according to the business characteristics of each financial institution, which can better adapt to personalized business scenarios and accounting rules. By customizing different target accounting expressions and other contents, personalized needs can be met, making up for the shortcomings of existing software in this regard.
[0023] In summary, the present invention can solve the problem that the accounting method in the prior art cannot meet personalized needs while ensuring efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0025] Figure 1 is a flow chart of a configurable accounting method in one embodiment of the present invention;
[0026] Figure 2 is another flow chart of a configurable accounting method in one embodiment of the present invention;
[0027] Figure 3 is a flow chart of step S12 in one embodiment of the present invention;
[0028] Figure 4 is another flow chart of step S12 in one embodiment of the present invention;
[0029] Figure 5 is a flow chart of step S1221 in an embodiment of the present invention;
[0030] Figure 6 is another flow chart of a configurable accounting method in one embodiment of the present invention;
[0031] Figure 7 is another flow chart of a configurable accounting method in one embodiment of the present invention;
[0032] Figure 8 is a schematic diagram of a structure of a configurable accounting device in an embodiment of the present invention;
[0033] Fig. 9 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0034] Fig.10 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] See also Figure 1 As shown, Figure 1 A schematic flow chart of a configurable accounting method provided by an embodiment of the present invention includes the following steps:
[0037] Step S20, obtaining target transaction data, and extracting the current value corresponding to the target variable in the target transaction data.
[0038] It should be noted that the target transaction data is any transaction data generated in relevant financial scenarios, such as repayment transactions for vehicle loans or asset transfer transactions.
[0039] It should be noted that the target variable can be any variable in the target transaction data. The variable in the target transaction data refers to the attributes corresponding to various data in the target data. For example, the variable in the target transaction data can be the transaction amount, or the user's gender, etc. It is understandable that for the same variable, different transaction quantities may correspond to different values. For example, the variable "operType" is set in the transaction data, and in the transaction data of the "repayment transaction" type, the value of this variable is "B", while in the transaction data of the "early repayment transaction" type, there is no value for this variable. In this way, if the target transaction data is the transaction data of the "repayment transaction", the current value of the "operType" variable is "B".
[0040] In one embodiment of the present invention, Figure 2 Another flow chart provided for an embodiment of the present invention is as follows: Figure 2 As shown, before step S20, it also includes:
[0041] Step S11, obtaining a historical transaction data set, and analyzing to obtain common variables in each historical transaction data in the historical transaction data set;
[0042] Step S12, analyzing the key variables among the common variables that have an impact on the data of each transaction type;
[0043] Step S13: determining the key variable as the target variable.
[0044] It can be understood that the historical transaction data set in step S11 is a collection of transaction data that has been generated, and the number of historical transactions in the collection can be one or more.
[0045] It should be noted that the common variables in each historical transaction data in the historical transaction data set are at least common variables in two historical transaction data.
[0046] It should be noted that the key variables that affect the data of each transaction type in step S12 are data that can be used to distinguish the transaction type of the transaction data, and the number of key variables used to distinguish the transaction type of the transaction data can be one or more. For example, for transaction data of the type of "asset transfer repayment transaction", the value of the "operType" variable is "B" and the value of the "SaleOut" variable is "1", and for transaction data of the type of "early repayment transaction", the value of the "operType" variable is none and the value of the "SaleOut" variable is "not equal to 1". In this way, by setting the "operType" variable and the "SaleOut" variable as key variables, the transaction data of the type of "asset transfer repayment transaction" and the transaction data of the type of "early repayment transaction" can be distinguished through the above key variables.
[0047] In one embodiment of the present invention, Figure 3 is a flow chart of step S12 in an embodiment of the present invention, as shown in Figure 3 As shown, step S12 includes:
[0048] Step S1211, using the common variables in the historical transaction data set and the values corresponding to the common variables as the parent nodes and child nodes of the decision tree, respectively, to generate a decision tree;
[0049] Step S1212, setting the purity value of the parent node, and calculating the purity value of the child node based on the purity value of the parent node;
[0050] Step S1213, determining a target child node whose purity value changes the most compared to the purity value of the parent node, and taking the parent node corresponding to the target child node as the best node;
[0051] Step S1214, obtaining the value range of the common variable corresponding to the best node in the historical transaction data set, and dividing the value range into multiple sub-value ranges;
[0052] Step S1215, based on the sub-value range, dividing the historical transaction data set into a plurality of sub-historical transaction data sets, wherein each of the sub-historical transaction data sets corresponds to a sub-value range;
[0053] Step S1216, recursively process each sub-historical transaction data set, continuously generate new decision trees, and obtain the best node in the new decision tree;
[0054] Step S1217, repeat the recursive process multiple times until a preset stop condition is reached, and use all the best nodes as key variables.
[0055] It can be understood that in step S1211, in the decision tree generated by the historical transaction data set, all common variables are located in the same layer as parent nodes, and the specific values of each common variable in each transaction data in the historical transaction data set are located in the next layer of the parent node as child nodes corresponding to the parent nodes.
[0056] It should be noted that, in step S1212, the purity of the parent node may refer to any parameter that can reflect the purity of the data, such as information entropy or Gini index, etc. For example, the purity of the parent node may be information entropy, and then the information entropy value corresponding to each parent node may be calculated, and then the purity value of each parent node may be used to calculate the purity value of its corresponding child node, that is, to calculate the information entropy value of the value corresponding to each common variable.
[0057] Specifically, in step S1213, after calculating the purity value of each parent node and the purity value of the child node corresponding to the parent node, the purity value change trend of each child node and its corresponding parent node can be determined, and then the parent node with the largest purity value change trend can be selected as the best node. As a specific example, the information entropy value corresponding to each parent node (such as the "operType" variable) in the historical transaction data set can be calculated. The values corresponding to the "operType" variable in the historical transaction data set include "A"-"E" and none. In this way, the information entropy value corresponding to each child node corresponding to the "operType" variable can be calculated, that is, the information entropy value corresponding to the "operType" variable when it is "A"-"E" and none is calculated.
[0058] Specifically, when there are multiple child nodes corresponding to a parent node, in order to observe the changing trend of the purity value of the child node compared with the purity value of the parent node, after calculating the purity value of each child node, a value that can reflect the purity value of each child node can be obtained. For example, this value can be the information entropy value obtained by weighted averaging of each child node.
[0059] It is understandable that the best node essentially corresponds to a key variable, but there may be more than one key variable. Therefore, in order to ensure that all key variables can be fully found, in step S1214, the value range of the common variable corresponding to the best node in the historical transaction data set can be obtained, and this value range can be divided into multiple sub-value ranges. For example, if the best node is the "operType" variable, and the value range of the "operType" variable is "A"-"F" and none, then "A"-"F" and none can be divided into multiple sub-value ranges, for example, "A"-"C", "D"-"F" and none.
[0060] Further, in step S1215 and step S1216, based on each sub-value range of the best node, the historical transaction data corresponding to each sub-value range in the historical transaction data set can be found, and for these historical transaction data, the common variables in these historical transaction data can be found, and then the new decision tree in step S1211 can be re-established based on these common variables, and then step S1212 and step S1213 are executed to obtain the best node corresponding to the sub-value range, which may be the same as the original best node or may be different;
[0061] Furthermore, in step S1217, recursive processing, that is, after each time a new optimal node is obtained, the sub-historical transaction data set can be re-divided based on the optimal node to obtain a new sub-historical transaction data set, and then a new decision tree is generated based on the sub-historical transaction data set to obtain the optimal node corresponding to the new decision tree. By repeating the recursive processing multiple times, multiple optimal nodes can be obtained. For example, the corresponding common variables in the historical transaction data set are the "operType" variable and the "SaleOut" variable. The optimal node in the decision tree initially obtained based on the historical transaction data set is the "operType" variable. The optimal node in the new decision tree further obtained based on the sub-historical transaction data is the "SaleOut" variable. In this way, all the optimal nodes corresponding to the historical transaction data set are the "operType" variable and the "SaleOut" variable, that is, the key variables are the "operType" variable and the "SaleOut" variable.
[0062] It should be noted that the stop condition in step S1217 can be set according to the specific needs of the application, for example, the generated optimal nodes have reached a preset number, or the sub-historical transaction data set can no longer be split.
[0063] It should be noted that in steps S1211 to S1217, the process of repeating multiple recursive processes to obtain multiple optimal nodes is for the case where there are multiple shared variables. If there is only one shared variable, steps S1211 to S1213 can be executed.
[0064] In one embodiment of the present invention, Figure 4 This is another flow chart of step S12 in an embodiment of the present invention. Step S12 includes:
[0065] Step S1221, clustering the historical transaction data set into clusters using a clustering algorithm;
[0066] Step S1222, extracting frequent item sets in each cluster, and determining the first variable corresponding to the frequent item sets;
[0067] Step S1223, determining the intersection variable of the first variable and the common variable, and using the intersection variable as the key variable.
[0068] It should be noted that the clustering algorithm in step S1221 may be any achievable algorithm, for example, it may be a K-Medoids or Gaussian mixture model clustering algorithm.
[0069] It can be understood that in step S1221, by clustering the historical transaction data set using a clustering algorithm, historical transaction data with strong similarity in the historical transaction data set can be clustered into a cluster, and historical transaction data with strong similarity can be considered as historical transaction data of the same type, so in step S1211, a cluster can represent historical transaction data of one type.
[0070] It can be understood that in step S1222, the frequent item sets in each cluster are the item sets that frequently appear in each cluster, and each cluster essentially represents a type of historical transaction data, so the frequent item sets in each cluster are the item sets that frequently appear in a type of historical transaction data, which can obviously have a significant impact on the historical transaction data of the corresponding target type. In this way, after determining the first variable corresponding to the frequent item set, it is obvious that the first variable corresponding to each cluster is obviously a variable that can have a significant impact on each type of historical transaction data. Further, in step S1223, the intersection variable of the first variable and the common variable is determined, that is, the key variable can be obtained.
[0071] In one embodiment of the present invention, Figure 5 is a flow chart of step S1221 in an embodiment of the present invention, as shown in Figure 5 As shown, step S1221 includes:
[0072] Step S12217, clustering the historical transaction data set into multiple clusters according to different cluster sizes using a K-means algorithm;
[0073] Step S12218, calculating the silhouette coefficients of various clusters, and determining the target number of samples in the target cluster corresponding to the maximum value of the silhouette coefficient;
[0074] Step S12219, using the target number as a new clustering scale of the K-means algorithm, re-clustering the historical transaction data set to obtain multiple clusters.
[0075] It should be noted that in step S12217, the cluster size means the number of samples (i.e., historical transaction data) in the generated clusters, so in step S12217, multiple clusters are finally generated, wherein the number of samples in each cluster is different. As a specific example, the K-means algorithm is used to cluster the historical transaction data set, wherein the number of samples in the clusters in one clustering method is the first number, and the number of samples in the clusters in another clustering method is the second number, so there are two types of clusters finally obtained by clustering, wherein one clusters the historical transaction data set into one or more first clusters, wherein the number of samples in each first cluster is the first number; and the other clusters the historical transaction data set into one or more second clusters, wherein the number of samples in each second cluster is the second number.
[0076] It can be understood that in step S12218, the larger the silhouette coefficient of the cluster, the closer the samples in the cluster are to other samples in the same cluster and the better separated from other clusters. This means that the clustering effect is better because the samples in the cluster are very compact and the boundaries between different clusters are clear. Therefore, it can be understood that the larger the silhouette coefficient corresponding to the cluster, the more historical transaction data of the same type are gathered in the cluster.
[0077] Furthermore, in step S12219, the target number corresponding to the maximum value of the silhouette coefficient is used as the new clustering scale of the K-means algorithm, and the historical transaction data set is re-clustered. When multiple clusters are obtained, these multiple clusters can accurately divide the historical transaction data set into various types of historical transaction data.
[0078] In one embodiment of the present invention, Figure 6 Another flow chart provided for an embodiment of the present invention is as follows: Figure 6 As shown, before step S12217, it also includes:
[0079] Step S12211, using the historical transaction data set as an initial clustering sample set, and filtering out outlier sample points in the initial clustering sample set to obtain a first clustering sample set;
[0080] Step S12212, selecting a sample point in the first cluster sample set as an initial cluster center point of the K-means algorithm;
[0081] Step S12213, for the target initial cluster center point, obtaining a preset number of first sample points in the target cluster corresponding to the target initial cluster center point that are farthest from the target initial cluster center point;
[0082] Step S12214, sorting the first sample points according to a preset order, and sequentially calculating the cumulative probability of each of the first sample points being a cluster center point;
[0083] Step S12215, generating a random number, and determining the first first sample point whose cumulative probability is greater than or equal to the random number;
[0084] Step S12216: Update the first sample point to the cluster center point in the target cluster.
[0085] It can be understood that in step S12211, screening outlier sample points in the initial clustering sample set can reduce the impact of noise on the clustering results and improve the accuracy and stability of clustering.
[0086] It can be understood that in steps S12213-S12216, a sample point is selected from the first sample point as the cluster center point in the target cluster cluster, and the first sample point is a preset number of sample points that are farthest from the target initial cluster center point. It is precisely because the first sample point is far enough from the target initial cluster center point that the cluster center point of the final target cluster cluster can cover more data areas, reduce clustering deviations, and increase the diversity of cluster center points, which is helpful to discover more potential clustering structures.
[0087] It is further understood that simply selecting the sample point farthest from the current center point will cause the algorithm to fall into a local optimal solution. Thus, in step S12214, by calculating the cumulative probability of the first sample point being the cluster center point, randomness can be introduced, making the selection more flexible and helping to escape from the local optimal solution.
[0088] In one embodiment of the present invention, Figure 7 Another flow chart provided for an embodiment of the present invention is as follows: Figure 7 As shown, after step S13, the following steps are also included:
[0089] Step S14, obtaining each historical transaction data set corresponding to each transaction type;
[0090] Step S15, for a first historical transaction data set corresponding to the first transaction type, extracting a value of a target variable in the first historical transaction data set;
[0091] Step S16, constructing a logical expression consisting of the target variable and a logical operator, so that the value of the target variable satisfies the logical expression;
[0092] Step S17: determine that the logical expression is a first accounting expression corresponding to the first transaction type.
[0093] It should be noted that, in step S14, the historical transaction data sets may be classified in advance according to the transaction types, so as to obtain historical transaction data sets corresponding to the transaction types.
[0094] It should be noted that, in the logical expression in step S16, the target variable may be one or more, and the logical operator may be any one or more logical operators, as long as the value of the target variable can satisfy the logical expression.
[0095] As a specific example, the target variables may include an "operType" variable and a "SaleOut" variable. For example, for historical transaction data of the "repayment transaction" type, the logical expression satisfied by the value of the target variable contained therein is "operType is not equal to B, and SaleOut is not equal to 1"; for historical transaction data of the "early repayment transaction" type, the logical expression satisfied by the value of the target variable contained therein is "SaleOut is not equal to 1".
[0096] In this way, based on steps S14 to S17, the accounting expressions corresponding to each transaction type can be obtained.
[0097] It should be noted that in order to determine the transaction type corresponding to the accounting expression based on the accounting expression, when constructing the logical expression to form the accounting expression, it is necessary to make the logical expressions corresponding to each transaction type different.
[0098] Step S30, determining the target accounting expression satisfied by the current value corresponding to the target variable.
[0099] Thus, in step S30, after the accounting expressions corresponding to various types of transaction data are known in advance, the current value of the target variable in the target transaction data can be extracted, so that the accounting expression satisfied by the current value of the target variable is the target accounting expression corresponding to the target transaction data.
[0100] Step S40, determining the target transaction type corresponding to the target accounting expression.
[0101] In this step, since the corresponding relationship between the accounting expression and the transaction type is preset, after the accounting expression is determined, the target transaction type corresponding to the target accounting expression can naturally be determined.
[0102] Step S50, extracting accounting data corresponding to the target transaction type from the target transaction data.
[0103] It should be noted that in step S50, the accounting data corresponding to the target transaction type can be set according to the specific needs of the application. For example, the accounting entries corresponding to each transaction type can be pre-stored, so that after determining the target transaction type, the accounting entry corresponding to the target transaction type can be determined, and then the accounting data corresponding to the accounting entry can be extracted from the target transaction data according to the accounting entry.
[0104] As a specific example, for example, the target transaction type is determined to be a "repayment transaction" type, and the accounting entries corresponding to the "repayment transaction" type are the deduction account, the car loan transaction (i.e., the car loan repayment amount), and the car consumer loan principal. The accounting data corresponding to the above accounting entries can be extracted from the target transaction data, for example, the deduction account can be "10056412", and the car loan transaction can be "5000 yuan". For example, the car consumer loan principal can be "4000 yuan".
[0105] It is understandable that by obtaining the target transaction data and determining the corresponding target accounting expression and target transaction type based on the current value of the target variable, and then extracting the corresponding accounting data, the entire process does not rely on manual rewriting of scripts. For example, no matter how the regulatory requirements or financial statistical dimensions change, as long as the target variables and their corresponding accounting logic (accounting expressions, transaction types, etc.) are clear, they can be automatically adapted, unlike manual scripting, which requires large-scale rewriting every time a change is made, effectively solving the problem of poor scalability.
[0106] In addition, this solution extracts and processes accounting data based on established target variables, accounting expressions and other logic. It is a relatively standardized and automated process that reduces manual intervention, thereby reducing the possibility of introducing grammatical or logical errors due to human errors, improving the accuracy and reliability of accounting, and overcoming the defects of relying on manual writing that is prone to errors.
[0107] Furthermore, this solution focuses on the target transaction data, target variables and the corresponding accounting logic. Its operation and maintenance are relatively concentrated on these key elements. The logic is clear and concise. Unlike manual scripts that become obscure over time, it is relatively easy to understand and modify, which can effectively reduce the manpower and time costs of later maintenance and solve the problem of difficulty in later maintenance of manually written scripts.
[0108] In addition, existing financial accounting software is difficult to meet the unique business models and accounting requirements of different financial institutions. This solution flexibly extracts accounting data based on key elements such as target variables, accounting expressions, and transaction types in the target transaction data. This means that target variables and corresponding accounting logic can be set according to the business characteristics of each financial institution, which can better adapt to personalized business scenarios and accounting rules. By customizing different target accounting expressions and other contents, personalized needs can be met, making up for the shortcomings of existing software in this regard.
[0109] In summary, the above solution can solve the problem that the accounting method in the prior art cannot meet personalized needs while ensuring efficiency.
[0110] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0111] In one embodiment, a configurable accounting device is provided, and the configurable accounting device corresponds one-to-one with the configurable accounting method in the above embodiment. Figure 8 As shown, the configurable accounting device includes an acquisition module 810, a first determination module 820, a second determination module 830 and an extraction module 840. The functional modules are described in detail as follows:
[0112] An acquisition module 810 is used to acquire target transaction data and extract a current value corresponding to a target variable in the target transaction data;
[0113] A first determination module 820, configured to determine a target accounting expression satisfied by a current value corresponding to the target variable;
[0114] A second determination module 830 is used to determine a target transaction type corresponding to the target accounting expression;
[0115] The extraction module 840 is used to extract the accounting data corresponding to the target transaction type from the target transaction data.
[0116] In one embodiment, the acquisition module 810 is further used to:
[0117] Acquire a historical transaction data set, and analyze and obtain common variables in each historical transaction data in the historical transaction data set;
[0118] Analyze the key variables among the common variables that have an impact on the data of each transaction type;
[0119] The key variables are determined as target variables.
[0120] In one embodiment, the acquisition module 810 is further used to:
[0121] Obtain each historical transaction data set corresponding to each transaction type;
[0122] For a first historical transaction data set corresponding to the first transaction type, extracting a value of a target variable in the first historical transaction data set;
[0123] Constructing a logical expression consisting of the target variable and a logical operator so that the value of the target variable satisfies the logical expression;
[0124] Determine that the logical expression is a first accounting expression corresponding to the first transaction type.
[0125] In one embodiment, the acquisition module 810 is further used to:
[0126] Generate a decision tree by using the common variables in the historical transaction data set and the values corresponding to the common variables as the parent node and child node of the decision tree respectively;
[0127] Setting the purity value of the parent node, and calculating the purity value of the child node based on the purity value of the parent node;
[0128] Determine a target child node whose purity value changes the most compared to the purity value of the parent node, and use the parent node corresponding to the target child node as the best node;
[0129] Obtaining a value range of a common variable corresponding to the best node in the historical transaction data set, and dividing the value range into a plurality of sub-value ranges;
[0130] Based on the sub-value range, the historical transaction data set is divided into a plurality of sub-historical transaction data sets, wherein each of the sub-historical transaction data sets corresponds to a sub-value range;
[0131] Recursively process each sub-historical transaction data set, continuously generate new decision trees, and obtain the best node in the new decision tree;
[0132] The recursive process is repeated multiple times until a preset stop condition is reached, and all the best nodes are used as key variables.
[0133] In one embodiment, the acquisition module 810 is further used to:
[0134] Clustering the historical transaction data set into multiple clusters according to different cluster sizes using a K-means algorithm;
[0135] Calculate the silhouette coefficients of various clusters, and determine the target number of samples in the target cluster corresponding to the maximum value of the silhouette coefficient;
[0136] The target number is used as a new clustering scale of the K-means algorithm, and the historical transaction data set is re-clustered to obtain multiple clusters.
[0137] In one embodiment, the acquisition module 810 is further used to:
[0138] The historical transaction data set is used as an initial clustering sample set, and outlier sample points in the initial clustering sample set are screened out to obtain a first clustering sample set;
[0139] Selecting sample points in the first cluster sample set as initial cluster center points of the K-means algorithm;
[0140] For the target initial cluster center point, obtaining a preset number of first sample points in the target cluster corresponding to the target initial cluster center point that are farthest from the target initial cluster center point;
[0141] Arrange the first sample points in a preset order, and sequentially calculate the cumulative probability of each of the first sample points being a cluster center point;
[0142] Generate a random number, and determine a first first sample point whose cumulative probability is greater than or equal to the random number;
[0143] The first sample point is updated as the cluster center point in the target cluster.
[0144] The present invention provides a configurable accounting device, which obtains target transaction data and determines the corresponding target accounting expression and target transaction type according to the current value of the target variable, and then extracts the corresponding accounting data. The entire process does not rely on manual rewriting of scripts. For example, no matter how the regulatory requirements or financial statistical dimensions change, as long as the target variables and their corresponding accounting logic (accounting expressions, transaction types, etc.) are clear, they can be automatically adapted. Unlike manual scripting, each change does not require rewriting on a large scale, which effectively solves the problem of poor scalability.
[0145] In addition, this solution extracts and processes accounting data based on established target variables, accounting expressions and other logic. It is a relatively standardized and automated process that reduces manual intervention, thereby reducing the possibility of introducing grammatical or logical errors due to human errors, improving the accuracy and reliability of accounting, and overcoming the defects of relying on manual writing that is prone to errors.
[0146] Furthermore, this solution focuses on the target transaction data, target variables and the corresponding accounting logic. Its operation and maintenance are relatively concentrated on these key elements. The logic is clear and concise. Unlike manual scripts that become obscure over time, it is relatively easy to understand and modify, which can effectively reduce the manpower and time costs of later maintenance and solve the problem of difficulty in later maintenance of manually written scripts.
[0147] In addition, existing financial accounting software is difficult to meet the unique business models and accounting requirements of different financial institutions. This solution flexibly extracts accounting data based on key elements such as target variables, accounting expressions, and transaction types in the target transaction data. This means that target variables and corresponding accounting logic can be set according to the business characteristics of each financial institution, which can better adapt to personalized business scenarios and accounting rules. By customizing different target accounting expressions and other contents, personalized needs can be met, making up for the shortcomings of existing software in this regard.
[0148] In summary, this solution can solve the problem that the accounting method in the prior art cannot meet personalized needs while ensuring efficiency.
[0149] For the specific definition of the configurable accounting device, please refer to the definition of the configurable accounting method above, which will not be repeated here. Each module in the above configurable accounting device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0150] Based on the above configurable accounting methods, such as Fig. 9 As shown, an embodiment of the present invention further provides a structural schematic diagram of a configurable accounting device, which includes a processor 91 and a memory 92 coupled to the processor 91. The memory 92 stores a computer program, and when the computer program is executed by the processor 91, the processor 91 executes the steps of the configurable accounting method in the above embodiment.
[0151] For other details about the processor 91 in the above-mentioned configurable accounting device implementing the above-mentioned technical solution, please refer to the description of the configurable accounting method provided in the above-mentioned invention embodiment, which will not be repeated here.
[0152] Among them, the processor 91 can also be called a CPU (Central Processing Unit), and the processor 91 may be an integrated circuit chip with signal processing capabilities; the processor 91 can also be a general-purpose processor, DSP (Digital Signal Process), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, among which the general-purpose processor can be a microprocessor or the processor 91 can also be any conventional processor, etc.
[0153] like Fig.10 As shown, the embodiment of the present invention also provides a schematic diagram of the structure of a computer-readable storage medium, on which a readable computer program 101 is stored; wherein the computer program 101 can be stored in the above storage medium in the form of a software product, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, magnetic disk or optical disk, ROM (Read-Only Memory), RAM (Random Access Memory) and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, and tablets.
[0154] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0155] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0156] In addition, each functional module in each embodiment of the present invention may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may be stored in a computer-readable storage medium.
[0157] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0158] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium), or a semiconductor medium (e.g., an SSD (solid state disk, solid state hard disk)).
[0159] The technical solution provided by the present invention is introduced in detail above. The present invention applies specific examples to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
[0160] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code.
[0161] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0162] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0164] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations. The non-Company software tools or components that appear in the embodiments of the present invention are merely examples and do not represent actual use.
Claims
1. A configurable accounting method, characterized in that: include: Obtain target transaction data, and extract the current value corresponding to the target variable in the target transaction data; Determine a target accounting expression satisfied by a current value corresponding to the target variable; Determine a target transaction type corresponding to the target accounting expression; Extract accounting data corresponding to the target transaction type from the target transaction data.
2. The configurable accounting method according to claim 1, characterized in that: Before obtaining the target transaction data and extracting the current value corresponding to the target variable in the target transaction data, the method further includes: Acquire a historical transaction data set, and analyze and obtain common variables in each historical transaction data in the historical transaction data set; Analyze the key variables among the common variables that have an impact on the data of each transaction type; The key variables are determined as target variables.
3. The configurable accounting method according to claim 2, characterized in that: After determining the key variable as the target variable and before determining the target accounting expression satisfied by the current value corresponding to the target variable, the method further includes: Obtain each historical transaction data set corresponding to each transaction type; For a first historical transaction data set corresponding to the first transaction type, extracting a value of a target variable in the first historical transaction data set; Constructing a logical expression consisting of the target variable and a logical operator so that the value of the target variable satisfies the logical expression; Determine that the logical expression is a first accounting expression corresponding to the first transaction type.
4. The configurable accounting method according to claim 2, characterized in that: Among the common variables analyzed, the key variables that affect the data of each transaction type include: Generate a decision tree by using the common variables in the historical transaction data set and the values corresponding to the common variables as the parent node and child node of the decision tree respectively; Setting the purity value of the parent node, and calculating the purity value of the child node based on the purity value of the parent node; Determine a target child node whose purity value changes the most compared to the purity value of the parent node, and use the parent node corresponding to the target child node as the best node; Obtaining a value range of a common variable corresponding to the best node in the historical transaction data set, and dividing the value range into a plurality of sub-value ranges; Based on the sub-value range, the historical transaction data set is divided into a plurality of sub-historical transaction data sets, wherein each of the sub-historical transaction data sets corresponds to a sub-value range; Recursively process each sub-historical transaction data set, continuously generate new decision trees, and obtain the best node in the new decision tree; The recursive process is repeated multiple times until a preset stop condition is reached, and all the best nodes are used as key variables.
5. The configurable accounting method according to claim 2, characterized in that: Among the common variables analyzed, the key variables that affect the data of each transaction type include: Clustering the historical transaction data set into clusters using a clustering algorithm; Extracting frequent item sets from each cluster, and determining a first variable corresponding to the frequent item sets; An intersection variable between the first variable and the common variable is determined, and the intersection variable is used as the key variable.
6. The configurable accounting method according to claim 5, characterized in that: The step of clustering the historical transaction data set into clusters using a clustering algorithm includes: Clustering the historical transaction data set into multiple clusters according to different cluster sizes using a K-means algorithm; Calculate the silhouette coefficients of various clusters, and determine the target number of samples in the target cluster corresponding to the maximum value of the silhouette coefficient; The target number is used as a new clustering scale of the K-means algorithm, and the historical transaction data set is re-clustered to obtain multiple clusters.
7. The configurable accounting method according to claim 6, characterized in that: Before clustering the historical transaction data set into a plurality of clusters according to different cluster sizes using a K-means algorithm, the method further includes: The historical transaction data set is used as an initial clustering sample set, and outlier sample points in the initial clustering sample set are screened out to obtain a first clustering sample set; Selecting sample points in the first cluster sample set as initial cluster center points of the K-means algorithm; For the target initial cluster center point, obtaining a preset number of first sample points in the target cluster corresponding to the target initial cluster center point that are farthest from the target initial cluster center point; Arrange the first sample points in a preset order, and sequentially calculate the cumulative probability of each of the first sample points being a cluster center point; Generate a random number, and determine a first first sample point whose cumulative probability is greater than or equal to the random number; The first sample point is updated as the cluster center point in the target cluster.
8. A configurable accounting device, characterized in that: include: An acquisition module, used to acquire target transaction data and extract the current value corresponding to the target variable in the target transaction data; A first determination module, used to determine a target accounting expression satisfied by a current value corresponding to the target variable; A second determination module, used to determine a target transaction type corresponding to the target accounting expression; The extraction module is used to extract the accounting data corresponding to the target transaction type from the target transaction data.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the configurable accounting method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the configurable accounting method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Device and method for the automated generation of a posting record for a user's transaction in an electronic bookkeeping system.
CH710779A2
Bill recording method, mobile terminal and computer readable storage medium
CN107657039A
Accounting method, accounting system, account system and payment system
CN111699486A
Product configuration-based accounting entry mapping method
CN115170264A
Data processing method and device, equipment and storage medium
CN117893338A