Accounting term automatic identification method and system based on neural network
By constructing a scenario-based accounting terminology corpus and introducing a scenario-aware mechanism, combined with a bidirectional long short-term memory network and a conditional random field layer, the problems of accuracy and cross-scenario adaptability in accounting terminology recognition were solved, achieving efficient automatic recognition of accounting terms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF FINANCE & ECONOMICS
- Filing Date
- 2025-11-12
- Publication Date
- 2026-05-08
AI Technical Summary
Existing neural network-based accounting term recognition methods lack accuracy and cross-scenario adaptability when dealing with complex and ever-changing accounting texts, and struggle to accurately capture the contextual information of accounting terms in long sentences.
A scenario-based accounting terminology corpus is constructed. A scenario-aware bidirectional long short-term memory network and a conditional random field layer are used. Through the scenario-aware mechanism and the multi-attention model, feature representation vectors of accounting terms for specific scenarios are generated. The term boundaries and categories are labeled by learning the dependencies between accounting term labels.
It improves the recognition accuracy of accounting terms in different scenarios and long texts, enhances the generalization ability of the model, adapts to the development needs of new terms and scenarios in the accounting field, supports batch recognition and result export, and can be applied to accounting information extraction, financial data structuring and audit text analysis.
Smart Images

Figure CN121997925A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and more specifically to a method and system for automatic recognition of accounting terms based on neural networks. Background Technology
[0002] Accounting information plays a crucial role in corporate decision-making and economic analysis. Accounting terminology is the basic building block of accounting information, and accurately identifying accounting terms in texts is fundamental to accounting information processing and financial data analysis.
[0003] Currently, accounting terminology recognition mainly relies on manual identification and rule-based identification methods. Manual identification is inefficient and easily affected by human factors, making it difficult to guarantee accuracy. Rule-based identification methods require the manual formulation of a large number of rules, which are poorly adaptable to complex and ever-changing accounting texts, resulting in unsatisfactory recognition results.
[0004] With the development of neural network technology, significant achievements have been made in the field of natural language processing. Applying neural network technology to accounting terminology recognition is expected to improve the accuracy and efficiency of recognition. However, existing neural network-based terminology recognition methods still have room for improvement when dealing with accounting terminology, due to the highly specialized and semantically complex nature of accounting terms. Furthermore, existing accounting terminology recognition methods are mostly designed for single-type or single-context terms, lacking the ability to perceive the differences in terminology across different accounting scenarios (such as financial statements, audit reports, and tax returns), leading to decreased accuracy in cross-scenario recognition. Simultaneously, the models are prone to information dilution when processing long texts, making it difficult to accurately capture the contextual relationships between accounting terms in long sentences.
[0005] Therefore, how to propose an automatic recognition method and system for accounting terms based on neural networks to overcome the shortcomings of existing technologies is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] In view of this, the present invention provides an automatic accounting term recognition method and system based on neural networks, overcoming the problems of low efficiency, poor accuracy, weak scene adaptability, and insufficient long text processing capabilities in existing accounting term recognition technologies. By introducing a scene-aware mechanism and a multi-attention model, the accuracy and generalization ability of accounting terms in different scenarios and long texts are improved. To achieve the above objectives, the present invention adopts the following technical solution: An automatic accounting terminology recognition method based on neural networks includes: Construct a scenario-based accounting terminology corpus and preprocess it to generate fusion vectors; A scene-aware bidirectional long short-term memory network is established based on fusion vectors; A bidirectional long short-term memory network is used as the encoder to convert the fusion vector into a hidden layer state matrix. By calculating the association weight between each time step and the scenario in the hidden layer state matrix, and the probability weight of each time step belonging to accounting terms, a feature representation vector of accounting terms for a specific scenario is finally generated. An accounting term recognition model is constructed by inputting the feature representation vectors of accounting terms into a conditional random field layer and labeling the term boundaries and categories by learning the dependencies between accounting term labels. The accounting text to be recognized is input into the accounting terminology recognition model to obtain the recognition results.
[0007] Optionally, the construction of the scenario-based accounting terminology corpus includes: Collect accounting text data from financial statements, audit reports, tax return documents, and accounting practice guides, and annotate the accounting terms in the text; Establish a terminology-scenario mapping table to record common variations of terms in different scenarios.
[0008] Optionally, the preprocessing to generate the fusion vector includes: The annotated text is segmented into words, and for unregistered words in the accounting field, supplementary identification is performed by statistically analyzing the co-occurrence frequency of words in the text and contextual features; Remove stop words and special symbols from the text, standardize the capitalization of English accounting terms, and standardize synonyms. The Word2Vec model is used to convert the preprocessed text data into word vectors with an n×d dimension. At the same time, the scene category information is encoded into scene vectors. The word vectors are fused with the corresponding scene vectors by concatenating the vectors to generate word-scene fusion vectors.
[0009] Optionally, the use of a bidirectional long short-term memory network as an encoder includes: using the word-scene fusion vector as the serialization input of the bidirectional long short-term memory network, converting the word-scene fusion vector of the text into a hidden layer state matrix, and outputting the overall sentence representation vector to perform preliminary encoding of text semantic features and scene features.
[0010] Optionally, the use of a bidirectional long short-term memory network specifically includes: adding a scene input gate, a scene forget gate, and a scene output gate to the input gate, forget gate, and output gate of BiLSTM, and controlling the amount of scene vector input in each gate, as shown in the following formula: Scene input gate: ; Scene Forgetting Gate: ; Scene output portal: ; ; ; ; ; Hidden layer state: ; in, Let S be the word-scene fusion vector corresponding to time step t, and S be the scene vector. This is the previous hidden state. Hide the state at the current time step. For the sigmoid function, For element-wise multiplication, , For weighted matrices, , This is a bias term.
[0011] Optionally, the step of calculating the association weight between each time step and the scenario in the hidden layer state matrix, and the probability weight of each time step belonging to accounting terms, to finally generate an accounting term feature representation vector for a specific scenario includes: Set up a scene attention module and a term attention module. The scene attention module calculates the association weight between each time step and the scene in the hidden layer state matrix based on the sentence overall representation vector and the scene vector. The terminology attention module calculates the probability weight of each time step belonging to an accounting term in the hidden layer state matrix based on the features of the accounting terminology dictionary. The scene attention weight and term attention weight are determined based on the scene attention module and the term attention module, and the scene attention weight and term attention weight are fused together. The hidden layer state matrix is weighted and averaged based on the fusion weights to generate a feature representation vector of accounting terms for a specific scenario.
[0012] Optionally, the step of determining scene attention weights and term attention weights based on the scene attention module and the term attention module, and performing weight fusion on the scene attention weights and term attention weights, includes: Scene attention weights: ; Terminology attention weight: ; Fusion weights: ,in, These are the weighting coefficients; Based on fusion weight By performing a weighted average on the hidden layer state matrix, a feature representation vector of accounting terminology for a specific scenario is generated: ,in, , This is the attention weight matrix. , Let T be the attention bias term and T be the terminology feature vector.
[0013] Optionally, the step of inputting the feature representation vector of accounting terms into the conditional random field layer, and labeling the term boundaries and categories by learning the dependencies between accounting term labels, includes: The terminology feature representation vector is input into the Conditional Random Field (CRF) layer. The CRF layer learns the dependencies between accounting term labels and annotates the term boundaries and categories. At the same time, a fully connected layer is added before the CRF layer to perform dimensional mapping and nonlinear transformation on the terminology feature representation vector, which is used to improve the model's ability to recognize complex terms.
[0014] Optionally, the loss function of the Conditional Random Field (CRF) layer includes: A composite loss function combining the cross-entropy loss function and the log-likelihood loss function of the CRF layer is used, and the formula is as follows: ,in, For loss weighting coefficients, Used to optimize term category prediction error Used to optimize term label sequence dependency errors.
[0015] Optionally, an automatic accounting terminology recognition system based on neural networks includes: Preprocessing module: used to build a scenario-based accounting terminology corpus and perform preprocessing to generate fusion vectors; Model building module: Establish a scene-aware bidirectional long short-term memory network based on fusion vectors; Transformation module: Used to convert the fused vector into a hidden layer state matrix using a bidirectional long short-term memory network as an encoder; The generation module is used to generate a feature representation vector of accounting terms for a specific scenario by calculating the association weight between each time step and the scenario in the hidden layer state matrix and the probability weight of each time step belonging to accounting terms. The annotation module is used to build an accounting term recognition model. It inputs the feature representation vectors of accounting terms into the conditional random field layer and annotates the term boundaries and categories by learning the dependencies between accounting term labels. Recognition module: Used to input the accounting text to be recognized into the accounting terminology recognition model to obtain the recognition result.
[0016] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method and system for automatic recognition of accounting terms based on neural networks, which has the following beneficial effects: This invention proposes an automatic accounting terminology recognition method based on neural networks, comprising: constructing a scenario-based accounting terminology corpus and preprocessing it to generate fusion vectors; establishing a scenario-aware bidirectional long short-term memory network based on the fusion vectors; using the bidirectional long short-term memory network as an encoder to convert the fusion vectors into a hidden layer state matrix, and calculating the association weights between each time step and the scenario, and the probability weights of each time step belonging to an accounting term, to finally generate an accounting terminology feature representation vector for a specific scenario; constructing an accounting terminology recognition model, inputting the accounting terminology feature representation vectors into a conditional random field layer, and labeling the terminology boundaries and categories by learning the dependencies between accounting terminology labels; and inputting the accounting text to be recognized into the accounting terminology recognition model to obtain the recognition result.
[0017] This invention constructs a scenario-based accounting terminology corpus and introduces a scenario-aware mechanism, enabling the model to accurately identify terminology differences in different accounting scenarios (financial statements, audits, taxation, etc.), thus solving the problem of low cross-scenario recognition accuracy in traditional methods. The multi-attention Encoder-Decoder model effectively avoids information dilution in long texts, accurately capturing the contextual relationships of accounting terms in long sentences. The combination of a composite loss function and a CRF layer optimizes the accuracy of terminology category prediction and strengthens the learning of dependency relationships in terminology label sequences, significantly outperforming rule-based and single neural network-based methods. The system provides a corpus update interface and incremental model training function, adapting to the evolving needs of new accounting terms and scenarios. It also supports batch recognition and result export, enabling direct application to practical business operations such as accounting information extraction, financial data structuring, and audit text analysis, providing efficient technical support for accounting informatization. Attached Figure Description
[0018] 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 embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of a neural network-based automatic accounting terminology recognition method provided by the present invention.
[0020] Figure 2 This invention provides a structural framework diagram of an automatic accounting terminology recognition system based on neural networks. Detailed Implementation
[0021] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0022] An embodiment of the present invention discloses an automatic recognition method for accounting terms based on a neural network, as Figure 1 shown, including: Construct a scenario-based accounting term corpus and perform preprocessing to generate a fusion vector; Based on the fusion vector, establish a bidirectional long short-term memory network with scene awareness; Use the bidirectional long short-term memory network as an encoder to convert the fusion vector into a hidden layer state matrix, and by calculating the association weights between each time step in the hidden layer state matrix and the scene, and the probability weights of each time step belonging to an accounting term, finally generate an accounting term feature representation vector for a specific scene; Construct an accounting term recognition model, input the accounting term feature representation vector into the conditional random field layer, and by learning the dependency relationships between accounting term labels, label the term boundaries and categories; Input the accounting text to be recognized into the accounting term recognition model to obtain the recognition result.
[0023] Further, the construction of the scenario-based accounting term corpus includes: collecting accounting text data in financial statements, audit reports, tax return documents, and accounting practice guides, and annotating the accounting terms in the text; the annotation content includes the term name, the belonging scene category (such as the balance sheet scene, the enterprise income tax return scene, etc.) and the term词性; Establish a term-scene mapping table to record the common expression variants of terms in different scenes. For example, the taxable income can be abbreviated as taxable income in the tax scene.
[0024] Further, the preprocessing to generate the fusion vector includes: Use a combination of a dictionary-based (fusion accounting professional dictionary) and a statistics-based word segmentation method to segment the annotated text. For out-of-vocabulary words in the accounting field, supplement and identify them by statistically analyzing the co-occurrence frequency and context features of words in the text; Remove the stop words (such as words with no actual semantic meaning like "of", "in", etc.), special symbols (such as #, @, and irrelevant numbers) in the text, perform unified case conversion on English accounting terms (such as IFRS), and perform standardization processing on synonymous terms (such as "bad debt reserve" and "bad account reserve"); The Word2Vec model is used to convert the preprocessed text data into word vectors with an n×d dimension (n is the number of words in the text, and d is the dimension of a single word vector, ranging from 100 to 300). At the same time, scene category information is encoded into scene vectors (with the same dimension as the word vectors). By concatenating the vectors, the word vectors are fused with the corresponding scene vectors to generate word-scene fusion vectors, enabling the model to initially perceive the scene features to which the terms belong.
[0025] Furthermore, the use of a bidirectional long short-term memory network as the encoder includes: using the word-scene fusion vector as the serialized input to the bidirectional long short-term memory network, enabling the model to extract semantic features of the text from both forward (left to right) and backward (right to left) directions, while simultaneously capturing the association between scenes and terms. The word-scene fusion vector of the text is converted into a hidden layer state matrix H, and the overall sentence representation vector v is output. s We will perform preliminary encoding of text semantic features and scene features.
[0026] Furthermore, the use of a bidirectional long short-term memory network specifically includes: adding a scene input gate, a scene forget gate, and a scene output gate to the input gate, forget gate, and output gate of the BiLSTM, controlling the amount of scene vector input in each gate, as shown in the following formula: Scene input gate: ; Scene Forgetting Gate: ; Scene output portal: ; ; ; ; ; Hidden layer state: ; in, Let S be the word-scene fusion vector corresponding to time step t, and S be the scene vector. This is the previous hidden state. Hide the state at the current time step. For the sigmoid function, For element-wise multiplication, , For weighted matrices, , This is a bias term.
[0027] Using the network structure described above, the hidden layer state matrix H=[h1,h2,...,h] is output at each time step. n(n is the text length) and the overall sentence representation vector v with scene awareness. s This provides multi-dimensional feature support for subsequent attention mechanisms.
[0028] Furthermore, the step of calculating the association weights between each time step and the scenario in the hidden layer state matrix, and the probability weights of each time step belonging to accounting terms, to ultimately generate an accounting term feature representation vector for a specific scenario includes: We set up a scene attention module and a terminology attention module. The scene attention module is based on the sentence's overall representation vector v. s Given the scene vector S, calculate the association weights between each time step and the scene in the hidden layer state matrix H; The terminology attention module calculates the probability weight of each time step belonging to an accounting term in the hidden layer state matrix H based on the features of the accounting terminology dictionary. The scene attention weight and term attention weight are determined based on the scene attention module and the term attention module, and the scene attention weight and term attention weight are fused together. The hidden layer state matrix is weighted and averaged based on the fusion weights to generate a feature representation vector of accounting terms for a specific scenario.
[0029] Furthermore, the step of determining scene attention weights and term attention weights based on the scene attention module and the term attention module, and then performing weight fusion on the scene attention weights and term attention weights, includes: Scene attention weights: ; Terminology attention weight: ; Fusion weights: ,in, These are the weighting coefficients; Based on fusion weight The hidden layer state matrix H is weighted and averaged to generate a feature representation vector of accounting terms for a specific scenario: ,in, , This is the attention weight matrix. , Let T be the attention bias term and T be the terminology feature vector.
[0030] Furthermore, the step of inputting the feature representation vector of accounting terms into the conditional random field layer, and labeling the term boundaries and categories by learning the dependencies between accounting term labels, includes: The terminology feature representation vector is input into the Conditional Random Field (CRF) layer. The CRF layer learns the dependencies between accounting term labels (such as impairment loss often following assets and book value often following liabilities) to accurately label term boundaries and categories. At the same time, a fully connected layer is added before the CRF layer to perform dimensional mapping and nonlinear transformation on the terminology feature representation vector to improve the model's ability to recognize complex terms.
[0031] Furthermore, the loss function of the Conditional Random Field (CRF) layer includes: A composite loss function combining the cross-entropy loss function and the log-likelihood loss function of the CRF layer is used, and the formula is as follows: ,in, This is the loss weighting coefficient, with a value ranging from 0.8 to 1.2. Used to optimize term category prediction error Used to optimize term label sequence dependency errors.
[0032] Specifically, the contextualized accounting terminology corpus is divided into training, validation, and test sets in a 7:2:1 ratio. The Adam optimizer (with an initial learning rate of 0.001 that dynamically decays with each training epoch) is used to train the model. Every 5 training epochs, the model performance is evaluated using the validation set (accuracy, recall, and F1 score as indicators). When the F1 score on the validation set shows no improvement for 3 consecutive epochs, training is stopped, and the optimal model parameters are saved.
[0033] Furthermore, automatic recognition of accounting terms is performed: (1) Text processing to be identified: For the accounting text to be identified (such as the company's annual financial report and tax return), the text is segmented, cleaned and converted into a word-scene fusion vector according to the preprocessing method. If the text does not have a clear scene category, the scene is automatically marked and a scene vector is generated by matching text keywords (such as the tax scene corresponding to taxes payable and the financial statement scene corresponding to inventory write-downs).
[0034] (2) Terminology recognition reasoning: The processed word-scene fusion vector is input into the trained accounting terminology recognition model. The semantic and scene features are extracted by Scene-AwareBiLSTM, and the feature representation is optimized by the multi-attention Encoder-Decoder model. Finally, the term labeling results are output by the CRF layer, including the start position, end position, term name and scene category of the term in the text.
[0035] Furthermore, the recognition results are optimized and feedback is provided: (1) Result verification: Establish an accounting terminology correction dictionary and verify the recognition results output by the model. If there are errors in terminology (such as misidentifying accumulated depreciation as accumulated depletion) or mismatch in scenario categories (such as labeling audit adjustment in audit scenario as tax scenario), corrections will be made based on the dictionary.
[0036] (2) Model iteration: Collect identification error cases in actual applications, supplement them to the scenario-based accounting terminology corpus, and perform incremental training on the model regularly (e.g., every quarter) to continuously optimize the model's identification performance under new scenarios and new terms.
[0037] In a specific implementation, an automatic accounting terminology recognition system based on neural networks, such as... Figure 2 As shown, it includes: The preprocessing module is used to build a scenario-based accounting terminology corpus and preprocess it to generate fusion vectors. Specifically, it collects accounting text data from multiple scenarios, annotates accounting terms (including term name, scenario category, and part of speech), establishes a term-scenario mapping table, and forms a scenario-based accounting terminology corpus. It also provides a corpus update interface, allowing users to manually add new scenarios and terminology data. It includes a word segmentation unit, a data cleaning unit, and a word vector fusion unit: the word segmentation unit uses a combination of dictionary and statistical methods to segment accounting text; the data cleaning unit removes stop words and special symbols and standardizes synonyms; the word vector fusion unit concatenates word vectors with scenario vectors to generate word-scenario fusion vectors. Model building module: Establish a scene-aware bidirectional long short-term memory network based on fusion vectors; The conversion module uses a bidirectional long short-term memory network as an encoder to convert the fused vector into a hidden layer state matrix. Based on the word-scene fusion vector, it extracts text semantic features and scene features by adding a scene gate to the BiLSTM network, and outputs the hidden layer state matrix and the overall sentence representation vector to provide feature support for subsequent modules.
[0038] The generation module is used to generate a feature representation vector of accounting terms for a specific scenario by calculating the association weight between each time step and the scenario in the hidden layer state matrix and the probability weight of each time step belonging to accounting terms. It includes an encoding unit and a decoding unit: the encoding unit uses scene-aware BiLSTM to perform preliminary feature encoding; the decoding unit calculates the fusion weight through scene attention and term attention, optimizes the term feature representation, and outputs a term feature vector for a specific scenario.
[0039] The annotation module is used to build an accounting term recognition model. It inputs the feature representation vectors of accounting terms into the conditional random field layer and annotates the term boundaries and categories by learning the dependencies between accounting term labels. It integrates a composite loss function calculation unit and a model optimization unit to realize the training, validation and parameter saving of the model. It supports users to customize training parameters (such as learning rate and loss weight coefficient) and provides a visual interface for the training process (displaying loss curve and accuracy curve).
[0040] Recognition Module: This module takes the accounting text to be recognized and inputs it into the accounting terminology recognition model to obtain the recognition results. It receives the pre-processed text data to be recognized, calls the trained model to perform term recognition, and outputs the recognition results including the term's location, name, and scenario category. It supports batch text input and result export (formats include Excel and JSON).
[0041] Furthermore, it also includes: a result optimization and feedback module: used to verify and identify results and correct errors through a terminology error correction dictionary, while collecting error cases to provide data support for corpus updates and model iterations, and allowing users to manually mark erroneous results and feed them back to the system.
[0042] In a specific embodiment, an automatic accounting terminology recognition method based on neural networks is tested and verified as follows: (I) Experimental Environment Hardware environment: CPU is Intel Xeon Gold 6248, GPU is NVIDIA Tesla V100 (32GB VRAM), and memory is 128GB; Software environment: Operating system is Ubuntu 20.04, deep learning framework is TensorFlow 2.8, Python version is 3.8, and the Word2Vec tool uses Gensim 4.1.2.
[0043] (II) Corpus Construction
[0044] We collected 1,000 annual financial reports of A-share listed companies from 2019 to 2024, 500 audit reports from accounting firms, 300 enterprise value-added tax returns, and 200 accounting practice guides. We used the BIO annotation format (B indicates the beginning of a term, I indicates the middle of a term, and O indicates a non-term) to annotate the accounting terms in the text. The annotated term types include asset-related terms (such as fixed assets), liability-related terms (such as short-term loans), equity-related terms (such as paid-in capital), profit and loss-related terms (such as main business revenue), and special terms (such as audit opinions and tax payable). A total of more than 15,000 terms were annotated, and a scenario-based corpus of approximately 5 million words was established.
[0045] (III) Model Training and Evaluation
[0046] (1) Parameter settings: Word2Vec word vector dimension d=200, Scene-Aware BiLSTM hidden unit number dc=256, scene vector dimension da=200, attention weight coefficient λ=0.5, composite loss function weight β=1.0, Adam optimizer initial learning rate=0.001, training rounds maximum of 50 rounds.
[0047] (2) Performance evaluation: The results were compared with traditional methods on the test set, and are shown in Table 1 below: Table 1 Performance Evaluation Results
[0048] As shown in the table, the method of this invention is significantly better than the traditional method in terms of accuracy, recall and F1 score. In particular, the F1 score is improved by 5.8 percentage points compared with the BiLSTM-CRF model, which verifies the effectiveness of scene perception and multiple attention mechanism.
[0049] (iv) Practical Application Cases
[0050] Using a listed company's 2024 annual financial report (text length 8000+ words) as the text to be identified, the system of this invention is used for terminology recognition: (1) The system automatically identifies the text scene as a financial statement scene and generates a word-scene fusion vector; (2) The model identified a total of 328 accounting terms, including 112 asset terms (such as cash and cash equivalents and accounts receivable), 85 liability terms (such as accounts payable and long-term loans), 63 equity terms (such as share capital and surplus reserve), and 68 profit and loss terms (such as operating revenue and administrative expenses). (3) After manual verification, the recognition accuracy rate was 93.6%, with only 5 deviations in the term boundary labeling (such as mistakenly splitting asset impairment loss-inventory into asset impairment loss and inventory). After correction by the result optimization module, the accuracy rate was improved to 98.2%, meeting the actual financial text processing needs.
[0051] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0052] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for automatic recognition of accounting terms based on neural networks, characterized in that, include: Construct a scenario-based accounting terminology corpus and preprocess it to generate fusion vectors; A scene-aware bidirectional long short-term memory network is established based on fusion vectors; A bidirectional long short-term memory network is used as the encoder to convert the fusion vector into a hidden layer state matrix. By calculating the association weight between each time step and the scenario in the hidden layer state matrix, and the probability weight of each time step belonging to accounting terms, a feature representation vector of accounting terms for a specific scenario is finally generated. An accounting term recognition model is constructed by inputting the feature representation vectors of accounting terms into a conditional random field layer and labeling the term boundaries and categories by learning the dependencies between accounting term labels. The accounting text to be recognized is input into the accounting terminology recognition model to obtain the recognition results.
2. The method for automatic recognition of accounting terms based on neural networks according to claim 1, characterized in that, The construction of the scenario-based accounting terminology corpus includes: Collect accounting text data from financial statements, audit reports, tax return documents, and accounting practice guides, and annotate the accounting terms in the text; Establish a terminology-scenario mapping table to record common variations of terms in different scenarios.
3. The method for automatic recognition of accounting terms based on neural networks according to claim 1, characterized in that, The preprocessing to generate the fusion vector includes: The annotated text is segmented into words, and for unregistered words in the accounting field, supplementary identification is performed by statistically analyzing the co-occurrence frequency of words in the text and contextual features; Remove stop words and special symbols from the text, standardize the capitalization of English accounting terms, and standardize synonyms. The Word2Vec model is used to convert the preprocessed text data into word vectors with an n×d dimension. At the same time, the scene category information is encoded into scene vectors. The word vectors are fused with the corresponding scene vectors by concatenating the vectors to generate word-scene fusion vectors.
4. The method for automatic recognition of accounting terms based on neural networks according to claim 3, characterized in that, The method of using a bidirectional long short-term memory network as an encoder includes: taking the word-scene fusion vector as the serialization input of the bidirectional long short-term memory network, converting the word-scene fusion vector of the text into a hidden layer state matrix, and outputting the overall sentence representation vector to perform preliminary encoding of text semantic features and scene features.
5. The method for automatic recognition of accounting terms based on neural networks according to claim 4, characterized in that, The use of a bidirectional long short-term memory network specifically includes: adding a scene input gate, a scene forget gate, and a scene output gate to the input gate, forget gate, and output gate of BiLSTM, and controlling the amount of scene vector input in each gate, as shown in the following formula: Scene input gate: ; Scene Forgetting Gate: ; Scene output portal: ; ; ; ; ; Hidden layer state: ; in, Let S be the word-scene fusion vector corresponding to time step t, and S be the scene vector. This is the previous hidden state. Hide the state at the current time step. For the sigmoid function, For element-wise multiplication, , For weighted matrices, , This is a bias term.
6. The method for automatic recognition of accounting terms based on neural networks according to claim 1, characterized in that, The process of calculating the association weights between each time step and the scenario in the hidden layer state matrix, and the probability weights of each time step belonging to accounting terms, ultimately generates an accounting terminology feature representation vector for a specific scenario, including: Set up a scene attention module and a term attention module. The scene attention module calculates the association weight between each time step and the scene in the hidden layer state matrix based on the sentence overall representation vector and the scene vector. The terminology attention module calculates the probability weight of each time step belonging to an accounting term in the hidden layer state matrix based on the features of the accounting terminology dictionary. The scene attention weight and term attention weight are determined based on the scene attention module and the term attention module, and the scene attention weight and term attention weight are fused together. The hidden layer state matrix is weighted and averaged based on the fusion weights to generate a feature representation vector of accounting terms for a specific scenario.
7. The method for automatic recognition of accounting terms based on neural networks according to claim 6, characterized in that, The step of determining scene attention weights and terminology attention weights based on the scene attention module and the terminology attention module, and then performing weight fusion on the scene attention weights and terminology attention weights includes: Scene attention weights: ; Terminology attention weight: ; Fusion weights: ,in, These are the weighting coefficients; Based on fusion weight By performing a weighted average on the hidden layer state matrix, a feature representation vector of accounting terminology for a specific scenario is generated: ,in, , This is the attention weight matrix. , Let T be the attention bias term and T be the terminology feature vector.
8. The method for automatic recognition of accounting terms based on neural networks according to claim 1, characterized in that, The step of inputting the feature representation vector of accounting terms into the conditional random field layer and annotating the term boundaries and categories by learning the dependencies between accounting term labels includes: The terminology feature representation vector is input into the Conditional Random Field (CRF) layer. The CRF layer learns the dependencies between accounting term labels and annotates the term boundaries and categories. At the same time, a fully connected layer is added before the CRF layer to perform dimensional mapping and nonlinear transformation on the terminology feature representation vector, which is used to improve the model's ability to recognize complex terms.
9. The method for automatic recognition of accounting terms based on neural networks according to claim 8, characterized in that, The loss function of the Conditional Random Field (CRF) layer includes: A composite loss function combining the cross-entropy loss function and the log-likelihood loss function of the CRF layer is used, and the formula is as follows: ,in, For loss weighting coefficients, Used to optimize term category prediction error Used to optimize term label sequence dependency errors.
10. An automatic accounting terminology recognition system based on neural networks, characterized in that, include: Preprocessing module: used to build a scenario-based accounting terminology corpus and perform preprocessing to generate fusion vectors; Model building module: Establish a scene-aware bidirectional long short-term memory network based on fusion vectors; Transformation module: Used to convert the fused vector into a hidden layer state matrix using a bidirectional long short-term memory network as an encoder; The generation module is used to generate a feature representation vector of accounting terms for a specific scenario by calculating the association weight between each time step and the scenario in the hidden layer state matrix and the probability weight of each time step belonging to accounting terms. The annotation module is used to build an accounting term recognition model. It inputs the feature representation vectors of accounting terms into the conditional random field layer and annotates the term boundaries and categories by learning the dependencies between accounting term labels. Recognition module: Used to input the accounting text to be recognized into the accounting terminology recognition model to obtain the recognition result.