Artificial intelligence accounting data entry method, system, device and storage medium
By using pre-trained classification models and automation technology, automatic journal entries for accounting data have been achieved, solving the problems of time-consuming, labor-intensive, and error-prone manual journal entries, and improving the accuracy and efficiency of accounting data entries.
Patent Information
- Application Number
- CN202211048086.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-08-30
AI Technical Summary
In existing technologies, accounting data entries rely on manual operation, which is time-consuming, labor-intensive, and prone to errors.
The accounting data to be entered is classified using a pre-trained current classification model. The accounting data is processed automatically using Robotic Process Automation (RPA) and Enterprise Resource Planning (ERP) systems. The account codes are determined and accounting entries are made using the LinearSVC classification model and feature filtering technology.
It improves the accuracy and efficiency of accounting data entries, reduces errors caused by human intervention, and lowers the workload and economic losses of accountants.
Smart Images

Figure CN115563271B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to an accounting data entry method, system, device and storage medium based on artificial intelligence. BACKGROUND
[0002] Accounting refers to recording all economic businesses of a unit or an individual family on an account book by using a certain accounting method, and refers to recording economic businesses in time and classification into an account book according to an audit-free original voucher and an accounting voucher, and according to a national unified accounting system and a complex accounting method. The existing accounting method of an enterprise is usually to manually enter an account by an accountant, which is time-consuming and laborious, and is prone to errors.
[0003] Therefore, an accounting method is needed to solve the above technical problems. SUMMARY
[0004] The embodiment of the present application provides an accounting data entry method, system, device and storage medium based on artificial intelligence, and the technical scheme of the embodiment of the present application realizes automatic entry of to-be-entered accounting data.
[0005] In a first aspect, the embodiment of the present application provides an accounting data entry method based on artificial intelligence, and the method comprises the following steps.
[0006] In a case where at least one piece of to-be-entered accounting data is received, the to-be-entered accounting data is classified based on a current classification model obtained by pre-training, to obtain a classification result of each piece of to-be-entered accounting data; the current classification model is obtained by training a historical accounting data set; and the classification result comprises a subject code.
[0007] Each piece of to-be-entered accounting data and the subject code corresponding to the to-be-entered accounting data are processed to obtain an accounting entry result.
[0008] In a second aspect, the embodiment of the present application provides an accounting data entry device based on artificial intelligence, and the device comprises the following modules.
[0009] A classification result acquisition module is configured to, in a case where at least one piece of to-be-entered accounting data is received, classify the to-be-entered accounting data based on a current classification model obtained by pre-training, to obtain a classification result of each piece of to-be-entered accounting data; the current classification model is obtained by training a historical accounting data set; and the classification result comprises a subject code.
[0010] An accounting entry module is configured to process each piece of to-be-entered accounting data and the subject code corresponding to the to-be-entered accounting data to obtain an accounting entry result.
[0011] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising:
[0012] One or more processors;
[0013] Storage device for storing one or more programs.
[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement an artificial intelligence accounting data entry method as described in any embodiment of the present invention.
[0015] Fourthly, embodiments of the present invention provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform an artificial intelligence accounting data entry method as described in any embodiment of the present invention.
[0016] The technical solution of this invention, upon receiving at least one piece of accounting data to be entered, classifies the accounting data based on a pre-trained current classification model, obtaining a classification result for each piece of accounting data to be entered. This makes the classification results more accurate and improves classification efficiency, ensuring the rapid and accurate acquisition of subsequent journal entries based on the classification results. This technical solution, by processing the accounting data to be entered, obtains the accounting entry results without human intervention, improving the efficiency of accounting data entry and reducing the workload of accountants. Furthermore, since no human intervention is required throughout the entry process, errors caused by accountant mistakes are avoided, improving the accuracy of accounting data entries and thus preventing economic losses due to accounting data entry errors. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] in:
[0019] Figure 1 This is a flowchart illustrating an artificial intelligence-based accounting data entry method in one embodiment.
[0020] Figure 2 This is a flowchart illustrating the operation of an artificial intelligence-based accounting data entry system in another embodiment.
[0021] Figure 3Structure diagram of an accounting data entry device with artificial intelligence in another embodiment;
[0022] Figure 4 Structure diagram of an electronic device in another embodiment. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0024] Before the technical solutions in the embodiments of the present application are described, an exemplary description of the application scenarios of the embodiments of the present application is given:
[0025] Nowadays, the accounting bill types of different enterprises can be different. When making accounting entries, an accountant usually needs to make entries according to the accounting bill type of the enterprise, which is time-consuming and error-prone. The embodiments of the present application provide an accounting data entry method with artificial intelligence. The current classification model obtained by pre-training is used to process accounting data to obtain a classification result, which includes a subject code. The subject code and the corresponding accounting data are processed to obtain an accounting entry result. The current classification model in the technical solutions of the embodiments of the present application can be obtained by training according to the historical accounting data of a company, so that the current classification model is adapted to the characteristics of the accounting data of the company, thereby improving the accuracy of the accounting data entry. Moreover, since the accounting data entry does not require human intervention, the errors caused by humans are reduced, and the efficiency of the accounting data entry is improved.
[0026] In an embodiment of the present application, an accounting data entry method with artificial intelligence is provided. The accounting data entry method with artificial intelligence of the embodiments of the present application is applicable to the case of entering accounting data. The method can be executed by an accounting data entry device with artificial intelligence, which can be implemented in the form of software and / or hardware. For example, the software can be a developed application software, and the hardware can be a computer with the function of entering accounting data with artificial intelligence.
[0027] As shown in FIG. 1, the accounting data entry method with artificial intelligence of the embodiments of the present application specifically includes the following steps: Figure 1
[0028] S110, in the case of receiving at least one piece of accounting data to be entered, based on a current classification model obtained by pre-training, classifying the accounting data to be entered to obtain a classification result of each piece of accounting data to be entered.
[0029] The current classification model is obtained by training based on a historical accounting data set. The classification result includes a subject code. The historical accounting data of the embodiment of the application can be a journal, a time series account, etc. in xls, xlsx, or csv format. It can be accounting data of a historical time period, such as accounting data from 2019 to 2021. The subject code refers to a subject number, a code uniformly specified by an accounting subject. The to-be-posted accounting data refers to accounting data that needs to be posted at present. The to-be-posted accounting data includes an accounting summary, a subject name, an amount, a time, etc. In addition to the accounting summary, the subject name, the amount, the time, etc., the historical accounting data also includes a subject code, and the subject code is used as a classification label.
[0030] Specifically, in the case of receiving at least one piece of to-be-posted accounting data, the current classification model obtained by pre-training is used to classify the to-be-posted accounting data, and the classification result of each piece of to-be-posted accounting data, such as a subject code, is obtained. Through this step, the corresponding subject code of each piece of to-be-posted accounting data can be found. When posting accounting data, accounting data with the same subject code is usually entered into the same area. This step prepares for obtaining an accounting posting result based on the to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data.
[0031] S120, processing each piece of to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data to obtain an accounting posting result.
[0032] In the embodiment of the application, each piece of to-be-posted accounting data is posted based on the to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data, and an accounting posting result is obtained. In this way, the efficiency and accuracy of accounting posting are improved, and manual posting errors are avoided.
[0033] In another embodiment of the application, the processing of each piece of to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data to obtain an accounting posting result includes determining a data storage area corresponding to the subject code and storing at least one piece of to-be-posted accounting data corresponding to the subject code in the data storage area.
[0034] Specifically, the data storage area of the corresponding to-be-posted accounting data is found according to the subject code, and the to-be-posted accounting data is stored in the data storage area to realize accounting posting. In this step, accounting posting is realized based on each piece of to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data, and the efficiency of accounting posting is improved.
[0035] The technical scheme of the embodiment of the present application realizes the effect of automatically recording the accounting data to be recorded, improves the efficiency of the accounting recording, and reduces the errors caused by manual operation.
[0036] In another embodiment of the present application, before processing each piece of accounting data to be recorded and the subject code corresponding to the accounting data to be recorded, the method further comprises: adding each piece of accounting data to be recorded and the subject code corresponding to the accounting data to be recorded to a table to obtain table data to be processed; and the processing of each piece of accounting data to be recorded and the subject code corresponding to the accounting data to be recorded comprises: identifying the table data to be processed and processing the identified table data to be processed.
[0037] In the embodiment of the present application, the filling positions of different types of data in the table are pre-set, for example, refer to Table 1. The data type refers to subject code, subject name, summary, etc. Each type of data has corresponding data, and it should be understood that each piece of accounting data can include multiple types of data described above. Each piece of accounting data to be recorded and the subject code corresponding to the accounting data to be recorded are added to the table to obtain table data to be processed, the table data to be processed is identified, and the identified table data to be processed is processed to obtain the accounting recording result.
[0038] Table 1
[0039]
[0040]
[0041] Exemplarily, in the embodiment of the present application, the manner of adding each piece of to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data into the table can be realized by robotic process automation (RPA). RPA is a business process automation technology based on software robots and artificial intelligence (AI). RPA can automatically monitor the graphical user interface (GUI) of a user in an application software and automatically repeat the work directly on the GUI. No modification is needed to the existing system or enterprise resource planning (ERP). The to-be-posted accounting data and the subject code corresponding to each piece of to-be-posted accounting data are added into the table by RPA to obtain to-be-processed table data, and the to-be-processed data is obtained by identifying the to-be-processed table data.
[0042] Exemplarily, the to-be-processed data is processed by ERP to obtain an accounting posting result. ERP refers to a management platform that is based on information technology, integrates information technology and advanced management ideas, and provides decision-making means for employees and decision-makers of an enterprise based on a systematic management idea.
[0043] In another embodiment of the present application, before the to-be-posted accounting data is classified by the current classification model obtained by pre-training to obtain the classification result of each piece of to-be-posted accounting data, the method further comprises: obtaining a historical accounting data set, wherein the historical accounting data set comprises a plurality of historical accounting data and a plurality of historical subject codes of each piece of historical accounting data, the historical accounting data comprises a chronological account and / or a journal account, and the historical accounting data has a plurality of corresponding historical subject codes; and training an initial classification model by using the historical accounting data set, and obtaining the trained current classification model in a case where the classification result of the initial classification model meets a preset rule.
[0044] In the embodiment of the present application, the historical accounting data set comprises a plurality of historical accounting data, and each piece of historical accounting data has a plurality of corresponding historical subject codes. The plurality of subject codes refers to two or more subject codes. It should be noted that the historical subject codes are categories of the historical accounting data. Alternatively, the historical subject codes can be used as classification labels of the historical accounting data set, or the historical subject codes can be used as categories of classification, and a classification label is set so that there is a one-to-one correspondence between the classification label and the historical subject code, and the historical subject code can be determined when the classification label of the historical accounting data is known. It should be understood that each piece of historical accounting data comprises two or more historical subject codes, for example, one piece of historical accounting data comprises two subject codes, a subject code of a debit side and a subject code of a credit side.
[0045] In the embodiment of the present application, the historical accounting data set is obtained, and the initial classification model is trained through the historical accounting data set. The preset rule in the embodiment of the present application refers to that, in the multiple classification results of each piece of historical accounting data, the multiple historical subject codes corresponding to the historical accounting data are included, and the number of each historical subject code is greater than the number of non-historical subject codes. The initial classification model is trained through each piece of historical accounting data in turn to obtain the current classification model. It should be understood that, since the accounting data in the embodiment of the present application adopts the double-entry accounting method, there are multiple subject codes.
[0046] In another embodiment of the present application, the initial classification model includes an initial LinearSVC classification model; and the training of the initial classification model through the historical accounting data set, in the case that the classification result of the initial classification model meets the preset rule, obtains the current classification model after training, including: for each piece of historical accounting data in the historical accounting data set, in the case that the processing number of the current historical accounting data through the initial LinearSVC classification model reaches N times, and in the N classification results, the multiple historical subject codes of the current historical accounting data are included, and the number of any one historical subject code is greater than the number of non-historical subject codes, the next piece of historical accounting data of the current historical accounting data is processed through the initial LinearSVC classification model until all the historical accounting data are processed to obtain the current LinearSVC classification model after training, wherein each training for each piece of historical accounting data obtains one classification result.
[0047] In the embodiment of the present application, N can be set according to actual conditions, which is not limited here. Each piece of historical accounting data is processed N times through the initial LinearSVC classification model, and since one classification result is obtained by processing once, N classification results are obtained by processing N times. In the N classification results, the multiple historical subject codes of the processed current historical accounting data are included, and in the N classification results, the number of each historical subject code is greater than the number of non-historical subject codes, then the initial LinearSVC classification model ends processing the current historical accounting data and starts processing the next piece of historical accounting data of the current historical accounting data until all the historical accounting data in the historical accounting data set are processed to obtain the current LinearSVC classification model. It should be understood that the historical accounting data in the historical accounting data set in the embodiment of the present application is processed in turn through the initial LinearSVC classification model, and as for the sorting problem of the historical accounting data, the number of each piece of historical accounting data can be set, and each piece of historical accounting data is obtained in turn according to the number. Of course, other ways can also be used, and the order of processing the initial LinearSVC classification model by the historical accounting data is not limited here.
[0048] In another embodiment of the present application, after the historical accounting data is obtained, the method further comprises: preprocessing the set of historical accounting data to obtain a set of historical accounting vectors, the set of historical accounting vectors comprising a plurality of historical accounting vectors; and training an initial classification model using the set of historical accounting data, wherein, when the classification result of the initial classification model meets a preset rule, a current classification model is obtained, comprising: for each historical accounting vector, repeatedly processing the historical accounting vector N times using the initial LinearSVC classification model, and adjusting the penalty coefficient of the initial LinearSVC classification model at the end of each processing to obtain a new penalty coefficient, and then processing the historical accounting vector again using the initial LinearSVC classification model with the new penalty coefficient, until the processing number reaches N times, and the N classification results meet the preset rule, then processing the next historical accounting vector of the historical accounting vector using the initial LinearSVC classification model until all the historical accounting vectors are processed to obtain the current LinearSVC classification model, and the penalty coefficient of the initial LinearSVC classification model is the initial value each time the next historical accounting vector is processed.
[0049] In the embodiment of the present application, the penalty coefficient describes the tolerance to errors. In the embodiment of the present application, the value range of the penalty coefficient is 0.2-1.0, and the adjustment of the penalty coefficient can be manually adjusted.
[0050] Optionally, each time a piece of historical accounting data is trained, the training is performed N times, and after each training is completed, the penalty coefficient is adjusted by a preset step size, for example, the initial value of the penalty coefficient is 0.2, and the preset step size of each adjustment is 0.2, so that the preset step size is adjusted to 0.4 at the end of the first training. Until the preset number of times is reached. Of course, after the training of the current historical accounting data is completed, the next piece of historical accounting data of the current historical accounting data is processed, the penalty coefficient can be reinitialized, that is, the initial value is 0.2, and when the training is completed once, the penalty coefficient is adjusted again, and the same steps as processing the current historical accounting data are repeated.
[0051] In the embodiment of the present application, the initial LinearSVC classification model is used to train each historical accounting vector for N times. For the current historical accounting vector, if, in the N classification results after N times of training, the current historical accounting data of the current historical accounting vector includes multiple historical subject codes, and the number of each historical subject code is greater than the number of non-historical subject codes, then the next historical accounting vector of the current historical accounting vector is processed by the initial LinearSVC classification model. If, in the N classification results after N times of training, all historical subject codes of the current historical accounting data of the current historical accounting vector are not included, or the number of any historical subject code is less than the number of non-historical subject codes, then the current historical accounting vector is retrained for N times. It should be noted that when retraining for N times, the penalty coefficient starts from the initial value and is adjusted once for each training. That is, N times of training is taken as a calculation node to determine whether all historical subject codes of the historical accounting data of the current historical accounting vector are included in the calculation classification result, and whether the number of each historical subject code is greater than the number of non-historical subject codes.
[0052] For example, for a piece of historical accounting data, the historical accounting data includes 3 historical subject codes, i.e., classification labels, marked as Q, W, and E. Training for 50 times, the initial value of the penalty coefficient is 0.2, and the step is 0.2 until 1.0. In the 50 classification results, Q is 20 times, W is 15 times, E is 12 times, and N is 3 times. It can be concluded that after 50 times of training, all historical subject codes of the historical accounting data are included in the classification result, and the number of each historical subject code is greater than the number of non-historical subject codes, then the training of the current historical accounting data is completed, and the training of the next historical accounting data of the current historical accounting data is executed. Such training method can ensure the accuracy of the classification result.
[0053] Alternatively, the training of the initial Linear classification model can also be for N times for each piece of historical accounting data, then the same classification results in the N classification results are combined, and different classification results are output, for example, the above example, 4 classification results after N times of training are obtained, which are Q, W, E and N, and the four are taken as output results. The condition for completing the training of each piece of historical accounting data is that the N classification results after N times of training include multiple historical subject codes included in the historical accounting data. That is, it is not limited that the number of each historical subject code is greater than the number of non-historical subject codes. In this way, the training efficiency can be improved.
[0054] The development language of the LinearSVC classification model is the python programming language, and the Scikit-learn open source software machine learning library is used. The model algorithm is different from the traditional SVC model of binary classification, and can support the input of super high-dimensional data with multiple categories and complex classification. Cross validation is performed on the given labeled training data, and the given label means that each cell in the table is assigned a category. For example, the cells in column A are account summaries, and the cells in column B are subject codes. Cross validation refers to a statistical modeling method (Cross Validation), which means that the original data is grouped, part of which is used as the training set and the other part is used as the validation set. First, the training set is used to train the classifier, and then the validation set is used to test the trained model.
[0055] The LinearSVC classification model with massive text information classification can filter and feature screen by default through the L2 loss function, and is more suitable for the classification model algorithm of accounting information in terms of data processing speed and efficiency. The L2 loss function refers to the square of the difference between the test value and the true value. The mathematical formula of the L2 loss function is as follows:
[0056]
[0057] Wherein, the L2 loss function calculates the Euclidean distance of each vector, n is the sample number, and the formula Y is the feature vector of the target value, f(x) is the feature vector of the training set, and the square of the difference between them is taken. The square root of the result is classified by size. By continuously inputting the given labeled feature vector, the initial classification model is trained. The initial classification model construction method is: using gradient descent method, assigning initial value, using a random number generator to randomly select feature training, loss function default L2, calculating error vector, taking out the largest item, obtaining the features of accounting subject and accounting summary, and then fitting the features and categories by linear fitting method. After training the initial classification model, the current classification model is obtained, and the input business description or accounting summary is processed through the current classification model. The current classification model will calculate the probability of the business description or accounting summary belonging to each subject code respectively. It should be understood that in the embodiments of the present application, the to-be-posted accounting data is a business description or an accounting summary. The business description here refers to a description of the flow of money, including time, subject name, amount, etc. For example, a description of a company's running account, 2020.03.12, A company borrows 200 million from B company.
[0058] The advantage of taking the linearSVC classification model as the classification model in the embodiment of the application is that the L2 loss function is used for filtering and feature screening, thereby improving the accuracy of accounting data classification, and the tool for assisting accounting data entry can be seamlessly integrated into the workflow of voucher entry, the accuracy of subject code determination can be further improved by providing the features of historical accounting data of the company, and the work efficiency can be significantly improved, and the possibility of missing and mis-entering accounting data entries can be reduced.
[0059] In another embodiment of the application, before obtaining the historical accounting data set, the method further comprises: constructing an attribute dictionary containing accounting feature information; and the preprocessing of the historical accounting data set to obtain a historical accounting vector set comprises: performing word segmentation processing on each historical accounting data in the historical accounting data set to divide a plurality of word groups; and performing vectorization preprocessing on each word group according to the attribute dictionary to obtain a historical accounting vector corresponding to each historical accounting data, so as to obtain the historical accounting vector set.
[0060] In the embodiment of the application, each historical accounting data is vector preprocessed by the attribute dictionary, and a historical accounting vector of each historical accounting data is obtained by vector preprocessing of each historical accounting data by the attribute dictionary. The historical accounting vector set is composed of each historical accounting vector.
[0061] It should be noted that the historical accounting vector of the embodiment of the application can be a feature matrix with multiple rows and multiple columns, which is collectively referred to as a historical accounting vector.
[0062] In the embodiment of the application, the attribute dictionary containing accounting feature information can be a plurality of time-series accounts downloaded from any financial software, for example, more than 50 excel file format time-series accounts. The time-series accounts are read, and the data in the time-series accounts are sorted according to categories to obtain data of categories such as accounting summary, subject name, subject code, etc. The data of each category are spliced at the beginning and the end by a loop method to obtain a long text, and a TF-IDF algorithm in a machine learning library Sklearn is used for feature value extraction. First, the word frequency is calculated, that is, the number of occurrences of a word in the long text / total number of words, then the inverse document frequency is calculated, IDF=log(total number of corpus documents / number of documents containing the word+1), and finally TF*IDF is calculated, that is, the TF-IDF value, and the TF-IDF values of all words are arranged in descending order to take the first M as the feature value. M can take any value, for example, 16. The method of extracting feature values according to categories is used to extract TF-IDf feature values of all samples of each category, and finally all feature values of different categories are collected to integrate repeated items to construct the attribute dictionary. Here, the sample refers to the long text of the accounting data of each category.
[0063] In the embodiment of the present application, each piece of historical accounting data in the historical accounting data set, i.e., the accounting summary, is subjected to word segmentation processing, i.e., the sentence corresponding to each piece of accounting data is divided into word groups, and a plurality of word groups are obtained. The accounting data is subjected to vectorization preprocessing according to the attribute dictionary to obtain historical accounting vectors, and the historical accounting vector set is composed of a plurality of historical accounting vectors.
[0064] Optionally, before word segmentation, the accounting data is subjected to noise removal processing, such as removing auxiliary words, etc. The key words are extracted, and the text of the key words is divided into word groups to obtain a plurality of word groups. The key words of the embodiment of the present application can be selected according to actual conditions. The noise removal method can be a text noise removal method in the prior art, such as regular cleaning, etc. The key word extraction method can refer to the key word extraction method in the prior art. For example, an unsupervised key word extraction method.
[0065] In another embodiment of the present application, the historical accounting data set is divided to obtain a training data set and a test data set. Optionally, 80% of the historical accounting data set is used as the training data set, and 20% of the historical accounting data set is used as the test data set. The historical accounting data set has a corresponding historical accounting vector set. After the historical accounting data set is divided into the test data set and the training data set, the test data set has a corresponding test accounting vector set, and the training data set has a corresponding training accounting vector set. The purpose of dividing the test data set and the training data set is to perform cross-validation. See Figure 2 The historical accounting data set is exported by the financial software to obtain a labeled training data set. The labeled training data set is subjected to feature extraction to obtain the training accounting vector set and perform feature training. Then, the initial LinearSVC classification model is trained to obtain the trained current LinearSVC classification model.
[0066] In the embodiment of the present application, the training accounting vector set is input into the initial LinearSVC classification model for training, and the test accounting vector set is input into the initial LinearSVC classification model for adjustment of the penalty coefficient. The prediction result is obtained by inputting each vector of the test accounting vector set into the initial LinearSVC classification model for prediction, and the prediction result is compared with the pre-set test result to evaluate whether the initial LinearSVC classification model is trained. In the linear vector, when the data set is not linear in the original feature, the original feature space is mapped into a higher-dimensional space through mapping, so that the data may become linear in the high-dimensional space. The penalty coefficient is the distance between the mapped points. When the penalty coefficient is smaller, the classification will be finer, but it is easy to cause overfitting. When the penalty coefficient is larger, the classification will be coarser, which causes the data to be unable to be distinguished. Therefore, how to select a suitable penalty coefficient is the key to ensure the accuracy. In the embodiment of the present application, it is verified through experiments that when the penalty coefficient is 10, the accuracy is 60%, the value of the penalty coefficient is adjusted, and the value of 9 is selected. The accuracy is 66% after retesting, and the value is selected in the proportion of 0.2 steps. Here, the accuracy refers to the ratio of the historical subject code in the classification result to all classification results after N times of training. The historical subject code refers to the historical accounting data processed by the initial LinearSVC classification model. Of course, it may include multiple historical subject codes, and the accuracy is calculated for each historical subject code, and then the average value is calculated to obtain the overall accuracy of each piece of historical accounting data. Of course, the accuracy of each historical subject code of each piece of historical accounting data can also be obtained.
[0067] In another embodiment of the present application, an artificial intelligence accounting data entry system is provided. The front-end operation interface is opened with a web browser, and has buttons of user login, uploading of journal account and uploading of chronological account. There are also manual operation buttons of downloading of the current classification model, excel data template and automatic entry of accounting entries. The user does not need to input any content, but only needs to click the mouse to operate. In the front end of the webpage, a button of selecting the penalty coefficient is designed, and the size of the penalty coefficient can be selected by the user. The user can freely design a suitable initial classification model. In the embodiment of the present application, a subject code output service based on Web is provided. A Web server and a webpage are built, the current classification model is deployed on the Web server, the webpage is accessed through the browser, and the business description or accounting information is input. When the Web server receives the to-be-entered accounting data, the current classification model is called to obtain the subject code of the to-be-entered accounting data, and the result is fed back to the display interface to display the subject code in the browser. See Figure 2, the current classification model is called through JAVA computer language, the webpage sends a request to the server by using getCode() method, and subject code information is transmitted in json format by using ajax technology. The web server processes the request by using httpd.handle_request() and httpd.serverforever() methods, the application function receives and saves parameters and accounting data to be posted, the morning function is called to call application commodity data and the classification result of the current classification model is obtained by using predict() method, the classification result is transmitted to the application function in json format, and the web server responds to the webpage by using the application function. The webpage receives the classification result by using the getCode() method, and the classification result is assigned to the text control result and displayed in the browser. After obtaining the subject code, RPA is started to input the accounting data to be posted and the subject code corresponding to the accounting data to be posted into the table. It should be noted that the RPA local client has pre-downloaded an excel data template, that is, the table.
[0068] The RPA program is executed, after receiving the instruction, the RPA imports the third-party open source pyautogui module of Python, detects whether the current display interface is in the target button picture, if so, starts to click the button and increase the voucher. The third-party open source openpyxl module of Python is imported, the first worksheet in the excel data template is read, and the
abstract
subject code
towards
amount
abstract
[0069] For data with high-dimensional features, if the data is loaded at one time, the memory may be crashed due to too large data. Therefore, the server of the system is established on the Ali Cloud, and after vectorization processing, there is no memory crash, and the data processing speed is stable.
[0070] The RPA of the embodiment of the application mainly uses the pyautogui module of a Python third-party open source library as a tool for operating a keyboard and a mouse. The pyautogui library is an automatic tool for simulating manual mouse and keyboard operations. It can not only simulate mouse movement, clicking, dragging, keyboard key input operations, but also can realize the functions of controlling a message box, taking a screenshot, positioning, etc. It can convert a large number of repetitive computer manual operations into automatic operation, and improve office efficiency. The RPA of the embodiment of the application can automatically input the classified results into an ERP software. The embodiment of the application uses an excel data template as an intermediate processing database, fully utilizes the advantages of excel in copying and pasting, statistics comparison, and repeated use, and reduces the possibility of missing and misentering accounting entries caused by fixed processes.
[0071] In another embodiment of the application, an artificial intelligence accounting data entry device is provided. Figure 3 FIG. 1 is a structural schematic diagram of an artificial intelligence accounting data entry device according to an embodiment of the application. The artificial intelligence accounting data entry device provided in the embodiment of the application can execute the artificial intelligence accounting data entry method provided in any embodiment of the application, and has the corresponding function modules and beneficial effects of the execution method. The device includes a classification result acquisition module 310 and an accounting entry module 320. The classification result acquisition module 310 is configured to, in a case where at least one piece of to-be-entered accounting data is received, classify the to-be-entered accounting data based on a current classification model obtained through pre-training, to obtain a classification result of each piece of to-be-entered accounting data. The current classification model is obtained through training based on a historical accounting data set. The classification result includes a subject code. The accounting entry module 320 is configured to process each piece of to-be-entered accounting data and the subject code corresponding to the to-be-entered accounting data, to obtain an accounting entry result.
[0072] The classification result acquisition module 310 is configured to, in a case where at least one piece of to-be-entered accounting data is received, classify the to-be-entered accounting data based on a current classification model obtained through pre-training, to obtain a classification result of each piece of to-be-entered accounting data. The current classification model is obtained through training based on a historical accounting data set. The classification result includes a subject code. The accounting entry module 320 is configured to process each piece of to-be-entered accounting data and the subject code corresponding to the to-be-entered accounting data, to obtain an accounting entry result.
[0073] Further, in the embodiment of the application, the device further includes:
[0074] The to-be-processed table data acquisition module is configured to add each piece of to-be-entered accounting data and the subject code corresponding to the to-be-entered accounting data to a table, to obtain to-be-processed table data.
[0075] The accounting entry module 320 is further configured to identify the to-be-processed table data, and process the identified to-be-processed data.
[0076] Further, in the embodiment of the application, the device further includes:
[0077] The current classification model obtaining module is configured to obtain a historical accounting data set, the historical accounting data set including a plurality of historical accounting data and a plurality of historical subject codes of each piece of historical accounting data, the historical accounting data including a chronological account and / or a journal account, and the historical accounting data having a plurality of corresponding historical subject codes; and train an initial classification model through the historical accounting data set, and obtain a trained current classification model in a case where a classification result of the initial classification model meets a preset rule.
[0078] Further, in the embodiment of the present application, the initial classification model includes an initial LinearSVC classification model; and the current classification model obtaining module is further configured to:
[0079] For each piece of historical accounting data in the historical accounting data set, in a case where a processing number of the current piece of historical accounting data through the initial LinearSVC classification model reaches N times, and in N classification results, a number of any one historical subject code is greater than a number of non-historical subject codes, the next piece of historical accounting data of the current piece of historical accounting data is processed through the initial LinearSVC classification model until all the historical accounting data are processed, and a trained current LinearSVC classification model is obtained, wherein a classification result is obtained through each training of each piece of historical accounting data.
[0080] Further, in the embodiment of the present application, the device further includes:
[0081] The historical accounting vector set obtaining module is configured to pre-process the historical accounting data set to obtain a historical accounting vector set, the historical accounting vector set including a plurality of historical accounting vectors.
[0082] The current classification model obtaining module is further configured to:
[0083] For each historical accounting vector, the initial LinearSVC classification model is repeatedly processed N times, and in a case where each processing is ended, a penalty coefficient of the initial LinearSVC classification model is adjusted to obtain a new penalty coefficient, the historical accounting vector is processed again through the initial LinearSVC classification model with the new penalty coefficient until the processing number reaches N times, and N classification results meet a preset rule, the next historical accounting vector of the historical accounting vector is processed through the initial LinearSVC classification model until all the historical accounting vectors are processed, and a current LinearSVC classification model is obtained, and each time the next historical accounting vector is processed, the penalty coefficient of the initial LinearSVC classification model is an initial value.
[0084] Further, in the embodiment of the present application, the device further comprises:
[0085] The attribute dictionary construction module is configured to construct an attribute dictionary containing accounting feature information.
[0086] The historical accounting vector set acquisition module is further configured to:
[0087] perform word segmentation processing on each piece of historical accounting data in the historical accounting data set to divide a plurality of word groups; and perform vectorization preprocessing on each word group according to the attribute dictionary to obtain a historical accounting vector corresponding to each piece of historical accounting data, so as to obtain the historical accounting vector set.
[0088] Further, in the embodiment of the present application, the accounting entry module 320 is further configured to:
[0089] determine a data storage area corresponding to the subject code, and store at least one piece of the to-be-entered accounting data corresponding to the subject code into the data storage area.
[0090] The technical scheme of the embodiment of the present application, by receiving at least one piece of to-be-entered accounting data, classifying the to-be-entered accounting data based on the current classification model obtained by pre-training, and obtaining a classification result, i.e., a subject code. Since the current classification model is obtained by training based on historical accounting data, the current classification model obtained by training is suitable for classifying to-be-entered accounting data. Processing each piece of to-be-entered accounting data and the subject code corresponding to the to-be-entered accounting data obtains an accounting entry result, improves the accuracy of the accounting entry result, and reduces the labor cost and the working pressure of accountants due to the whole process without human processing, and improves the overall efficiency of accounting data entry.
[0091] It should be noted that each module included in the above device is only divided according to the function logic, but is not limited to the above division, as long as the corresponding function can be realized; in addition, the specific name of each function module is only for easy mutual distinction, and does not limit the protection scope of the embodiment of the present application.
[0092] In another embodiment of the present application, an electronic device is provided, Figure 4 A structural schematic diagram of an electronic device provided by the embodiment of the present application is shown. Figure 4 A block diagram of an exemplary electronic device 50 suitable for implementing the embodiments of the present application is shown. Figure 4 The electronic device 50 shown is only an example, and should not bring any limitation to the function and use range of the embodiment of the present application.
[0093] As Figure 4As shown, the electronic device 50 is in the form of a general- purpose computer. The components of the electronic device 50 can include, but are not limited to, one or more processors or processing units 501, a system memory 502, and a bus 503 that couples various system components including the system memory 502 to the processing unit 501.
[0094] The bus 503 represents one or more of any of several bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerator bus, a processor or local bus using any of a variety of bus architectures. By way of example, these architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0095] The electronic device 50 typically includes a variety of computer system readable media. Such media can be any available media that is located either internally or externally to the electronic device 50, including both volatile and nonvolatile media, removable and non-removable media.
[0096] The system memory 502 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 504 and / or cache memory 505. The electronic device 50 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 506 can be provided for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard drive"). Figure 4 Not shown, a removable / non-removable interface can also be provided and can include interface to one or more devices allowing the electronic device 50 to read from or write to such devices. The storage system 506 can include a number of storage devices including magnetic disk storage media, memory storage devices, and / or optical storage devices. In one embodiment, the storage system 506 can be implemented as a database management system appropriate for the electronic device 50. Figure 4 In one embodiment, the storage system 506 can be implemented as a database management system appropriate for the electronic device 50. Although the exemplary embodiment describes the use of a database management system, the electronic device 50 is not limited to such implementations. For example, the electronic device 50 could be the server of a multi-tiered system, in which case the storage system 506 could be implemented as a database management system appropriate for the server.
[0097] The programs / utility 508, having a set (at least one) of program modules 507, can be stored in, for example, the memory 502 by way of example, and not limitation, as well as an operating system, one or more application programs, other program modules, and program data, each or some combination thereof, can include implementation of a network environment. The program modules 507 generally carry out the functions and / or methodologies of embodiments described herein.
[0098] The electronic device 50 can also communicate with one or more external devices 509 such as a keyboard or pointing device, a display 510, etc.; one or more devices that enable a user to interact with the electronic device 50; and / or one or more devices (e.g., modems, network cards, etc.) that enable the electronic device 50 to communicate with one or more other computing devices. Such communication can occur via an input / output (I / O) interface 511. Still yet, the electronic device 50 can communicate with one or more networks (such as one or more local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via the network adapter 512. As depicted, the network adapter 512 communicates with the other components of the electronic device 50 via the bus 503. It should be appreciated that the bus 503 represents what can be one or more busses (e.g., an address bus, data bus, and / or control bus) that enables the communication of information between various components of the electronic device 50. Figure 4 Other hardware and / or software modules that can be used in conjunction with the electronic device 50, such as microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc., are not shown in FIG. 5, but can be incorporated into the electronic device 50.
[0099] The processing unit 501 performs various functions, such as implementing the artificial intelligence accounting data entry method provided by the embodiments of the present application, by executing programs stored in the system memory 502.
[0100] In another embodiment of the present application, the present application also provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to perform an artificial intelligence accounting data entry method, the method comprising:
[0101] In the case of receiving at least one piece of accounting data to be entered, based on a pre-trained current classification model, the accounting data to be entered is classified to obtain the classification result of each piece of accounting data to be entered; the current classification model is obtained based on training of a historical accounting data set; the classification result includes a subject code; each piece of accounting data to be entered and the subject code corresponding to the accounting data to be entered are processed to obtain an accounting entry result.
[0102] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device.
[0103] The computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave, in which computer readable program code is embodied. Such propagated data signals can take a wide variety of forms, including but not limited to electro-magnetic signals, optical signals, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a storage medium, that is capable of storing the program for use by or in connection with the instruction execution system, apparatus or device.
[0104] The program code embodied on the computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the above.
[0105] The computer program code for carrying out operations of the embodiments of the present application can be written in one or more programming languages or combinations of languages including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages such as "C" or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0106] The above merely provides the preferred embodiment of the application, and cannot allude the protection scope of the application, therefore any equivalent changes made according to the claims of the application shall be within the scope of the application.
Claims
1. An accounting data entry method using artificial intelligence, characterized by, The method comprises the following steps: In the case of receiving at least one piece of to-be-posted accounting data, classifying the to-be-posted accounting data based on a pre-trained current classification model to obtain a classification result of each piece of to-be-posted accounting data; The current classification model is obtained based on training of a historical accounting data set; and the classification result comprises a subject code; Processing each piece of to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data to obtain an accounting posting result; Before the step of classifying the to-be-posted accounting data based on the pre-trained current classification model to obtain a classification result of each piece of to-be-posted accounting data, the method further comprises the following steps: Obtaining a historical accounting data set, training an initial classification model through the historical accounting data set, and obtaining a trained current classification model in the case that the classification result of the initial classification model meets a preset rule; The initial classification model comprises an initial LinearSVC classification model; The step of training the initial classification model through the historical accounting data set and obtaining the trained current classification model in the case that the classification result of the initial classification model meets the preset rule comprises the following steps: For each piece of historical accounting data in the historical accounting data set, processing a next piece of historical accounting data of the current piece of historical accounting data through the initial LinearSVC classification model in the case that the processing number of the current piece of historical accounting data through the initial LinearSVC classification model reaches N and the N classification results comprise multiple historical subject codes of the current piece of historical accounting data, and the number of any one historical subject code is greater than the number of non-historical subject codes, until all the historical accounting data are processed to obtain the trained current LinearSVC classification model, wherein one classification result is obtained for each piece of historical accounting data through each training.
2. The artificial intelligence-based accounting data entry method of claim 1, wherein, Before the step of processing each piece of to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data, the method further comprises the following step: Adding each piece of to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data to a table to obtain to-be-processed table data; The step of processing each piece of to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data comprises the following step: Identifying the to-be-processed table data and processing the identified to-be-processed data. 3.The AI-based accounting data entry method of claim 1, wherein, The historical accounting data set comprises multiple pieces of historical accounting data and multiple historical subject codes of each piece of historical accounting data, the historical accounting data comprises a time series account and / or a journal account, and the historical accounting data has the corresponding multiple historical subject codes.
4. The artificial intelligence-based accounting data entry method of claim 3, wherein, After the step of obtaining the historical accounting data, the method further comprises the following step: Preprocessing the historical accounting data set to obtain a historical accounting vector set, wherein the historical accounting vector set comprises multiple historical accounting vectors; The step of training the initial classification model through the historical accounting data set and obtaining the trained current classification model in the case that the classification result of the initial classification model meets the preset rule comprises the following steps: For each historical accounting vector, the initial LinearSVC classification model is repeatedly processed N times, and at the end of each processing, the penalty coefficient of the initial LinearSVC classification model is adjusted to obtain a new penalty coefficient. The initial LinearSVC classification model with the new penalty coefficient is processed again until the processing number reaches N times, and the N classification results meet the preset rule. Then, the next historical accounting vector of the historical accounting vector is processed by the initial LinearSVC classification model until all historical accounting vectors are processed to obtain the current LinearSVC classification model. Each time the next historical accounting vector is processed, the penalty coefficient of the initial LinearSVC classification model is the initial value. 5.The AI-based accounting data entry method of claim 4, wherein, Before the historical accounting data set is obtained, the method further includes: constructing an attribute dictionary containing accounting feature information; The preprocessing of the historical accounting data set to obtain a historical accounting vector set includes: The historical accounting data in the historical accounting data set is segmented to obtain a plurality of word groups; According to the attribute dictionary, each word group is vectorized and preprocessed to obtain a historical accounting vector corresponding to each historical accounting data to obtain the historical accounting vector set. 6.The AI-based accounting data entry method of claim 1, wherein, The processing of each to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data to obtain an accounting posting result includes: Determine the data storage area corresponding to the subject code, and store at least one to-be-posted accounting data corresponding to the subject code in the data storage area.
7. An accounting data entry apparatus of artificial intelligence, characterized by, It includes: A current classification model acquisition module is configured to acquire a historical accounting data set, train an initial classification model based on the historical accounting data set, and obtain a trained current classification model when the classification result of the initial classification model meets a preset rule. The initial classification model includes an initial LinearSVC classification model. The initial classification model is trained based on the historical accounting data set, and the trained current classification model is obtained when the classification result of the initial classification model meets a preset rule. It includes: For each historical accounting data in the historical accounting data set, when the processing number of the current historical accounting data by the initial LinearSVC classification model reaches N times, and in the N classification results, the number of historical subject codes of the current historical accounting data is greater than the number of non-historical subject codes, the next historical accounting data of the current historical accounting data is processed by the initial LinearSVC classification model until all historical accounting data is processed to obtain a trained current LinearSVC classification model. Each training of each historical accounting data obtains a classification result. The classification result acquisition module is configured to, in a case where at least one piece of to-be-posted accounting data is received, classify the to-be-posted accounting data based on a current classification model obtained through pre-training, and obtain a classification result of each piece of to-be-posted accounting data; the current classification model is obtained through training based on a historical accounting data set; and the classification result includes a subject code. The accounting posting module is configured to process each piece of to-be-posted accounting data and the subject code corresponding to the to-be-posted accounting data, and obtain an accounting posting result.
8. An electronic device, comprising: The electronic device includes: one or more processors; a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the artificial intelligence accounting data posting method as claimed in any one of claims 1-6.
9. A storage medium containing computer-executable instructions, wherein: The computer executable instructions, when executed by a computer processor, are configured to perform the artificial intelligence accounting data posting method as claimed in any one of claims 1-6.
Citation Information
Patent Citations
Method and system of automatically generating accounting titles and accounting entries
CN107480116A