Certificate template generation method and device, equipment, storage medium and program product
Through the semantic understanding model, the document fields are automatically determined and mapping conditions are generated, which solves the problem of low efficiency in the generation of financial voucher templates in the existing technology, and realizes more efficient voucher template generation.
Patent Information
- Application Number
- CN202411597906.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-11
AI Technical Summary
In the prior art, the efficiency of generating financial voucher templates is low and requires manual configuration by professionals.
Automatically determine the target document field through the semantic understanding model, and generate a credential template based on mapping conditions to reduce manual operations.
It improves the efficiency of generating credential templates, reduces the need for manual configuration, and improves work efficiency.
Smart Images

Figure CN119416765A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, storage medium and computer program product for generating a voucher template. Background Art
[0002] With the development of computer technology, more and more enterprises process financial data through financial systems. Enterprises can convert documents into financial vouchers through ERP (Enterprise Resource Planning) systems for accounting and storage.
[0003] When generating financial vouchers based on business documents, voucher templates can be used to generate financial vouchers. Voucher templates are templates for generating vouchers based on business documents set according to accounting books. Currently, voucher templates are usually manually configured by professionals, which leads to the problem of low efficiency in generating voucher templates. Summary of the invention
[0004] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for generating voucher templates that can improve the efficiency of generating voucher templates in response to the above technical problems.
[0005] This application provides a method for generating a voucher template, comprising:
[0006] Obtain the voucher entry line information and candidate document field information corresponding to the target document type;
[0007] Determining, by means of a first semantic understanding model, a target document field that matches the voucher entry line information from the candidate document field information;
[0008] Obtain the target field content of the target document field;
[0009] Inputting the candidate document field information, the voucher entry line information and the target field content into a second semantic understanding model, and outputting a first mapping condition between the target voucher subject in the voucher entry line information and the target field content;
[0010] A voucher template corresponding to the target document type is generated based on the first mapping condition.
[0011] The present application also provides a device for generating a voucher template, comprising:
[0012] The information acquisition module is used to obtain the voucher entry line information and candidate document field information corresponding to the target document type;
[0013] A data screening module, used to determine a target document field matching the voucher entry line information from the candidate document field information through a first semantic understanding model;
[0014] A content acquisition module, used to acquire the target field content of the target document field;
[0015] A data mapping module, used for inputting the candidate document field information, the voucher entry line information and the target field content into a second semantic understanding model, and outputting a first mapping condition between the target voucher subject in the voucher entry line information and the target field content;
[0016] A template generation module is used to generate a voucher template corresponding to the target document type based on the first mapping condition.
[0017] The present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps described in the above-mentioned method for generating a voucher template when executing the computer program.
[0018] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps described in the above-mentioned method for generating a voucher template are implemented.
[0019] The present application also provides a computer program product, including a computer program, which implements the steps described in the above-mentioned method for generating a voucher template when executed by a processor.
[0020] The above-mentioned voucher template generation method, device, computer equipment, storage medium and computer program product first obtain the voucher entry line information and candidate document field information corresponding to the target document type, and determine the target document field matching the voucher entry line information from the candidate document field information through the first semantic understanding model. The semantic understanding model has a strong semantic understanding ability, and can quickly determine the target document field matching the voucher entry line information from the candidate document field information, thereby eliminating the need to manually determine the target document field matching the voucher entry line information from the candidate document field information, which helps to improve efficiency. Further, the target field content of the target document field is obtained, and the candidate document field information, the voucher entry line information and the target field content are input into the second semantic understanding model, and the first mapping condition between the target voucher account in the voucher entry line information and the target field content is output. The semantic understanding model has a strong semantic understanding ability, and can quickly generate the first mapping condition between the target voucher account in the voucher entry line information and the target field content, thereby eliminating the need to manually configure the mapping condition between the document field and the voucher account. Finally, a voucher template corresponding to the target document type is generated based on the first mapping condition. In this way, by performing semantic analysis on the candidate document field information and voucher entry line information corresponding to a type of document through the semantic understanding model, a voucher template corresponding to a type of document can be quickly generated, effectively reducing manual operations and improving the efficiency of generating voucher templates. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] FIG1 is an application environment diagram of a method for generating a voucher template in one embodiment;
[0023] FIG2 is a schematic diagram of a flow chart of a method for generating a voucher template in one embodiment;
[0024] FIG3 is a schematic diagram of an interface of an AI accounting model in one embodiment;
[0025] FIG4 is a schematic diagram of an interface of accounting matters in one embodiment;
[0026] FIG5 is a schematic flow chart of a method for generating a voucher template in another embodiment;
[0027] FIG6 is a schematic diagram of a process flow of a voucher template in one embodiment;
[0028] FIG7 is a structural block diagram of a device for generating a voucher template in one embodiment;
[0029] FIG8 is a diagram showing the internal structure of a computer device in one embodiment;
[0030] FIG. 9 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0032] The method for generating a voucher template provided in an embodiment of the present application can be applied in an application environment as shown in FIG. 1 . Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, can be integrated on the server 104, or can be placed on the cloud or other devices. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0033] It is understandable that the terminal and the server can be used alone to execute the method for generating a voucher template provided in the embodiment of the present application. The terminal and the server can also be used together to execute the method for generating a voucher template provided in the embodiment of the present application.
[0034] For example, the server obtains the voucher entry line information and candidate document field information corresponding to the target document type, and determines the target document field that matches the voucher entry line information from the candidate document field information through the first semantic understanding model. The server obtains the target field content of the target document field, inputs the candidate document field information, the voucher entry line information, and the target field content into the second semantic understanding model, and outputs the first mapping condition between the target voucher account in the voucher entry line information and the target field content. The server generates a voucher template corresponding to the target document type based on the first mapping condition.
[0035] It can be understood that the terminal can display the candidate document field information and voucher entry line information corresponding to the target document type, display the target document field in the candidate document field information that matches the voucher entry line information, display the first mapping condition between the target voucher account and the target field content in the voucher entry line information, and display the voucher template corresponding to the target document type.
[0036] In one embodiment, as shown in FIG2 , a method for generating a voucher template is provided, and the method is applied to a computer device as an example, and the computer device can be a terminal or a server. It can be understood that the method can be executed by the terminal or the server itself alone, or can be implemented through interaction between the terminal and the server. Wherein:
[0037] Step S202, obtaining voucher entry line information and candidate document field information corresponding to the target document type.
[0038] The target document type refers to the document type for which the corresponding voucher template is to be generated. It is understood that the target document type can be any document type for which a voucher template needs to be generated. It is understood that one document type corresponds to one voucher template, that is, one type of document corresponds to one voucher template, and multiple documents of the same type can be converted into corresponding financial vouchers (referred to as vouchers) through one voucher template. For example, there are corresponding voucher templates for reimbursement documents, procurement documents, asset management documents, and deposit documents.
[0039] For the target document type, the corresponding voucher entry line information can be pre-configured. The voucher entry line information includes the entry line description information of each of the multiple voucher entry lines. The voucher entry line refers to the entry line to be set in the voucher template. The entry line description information of the voucher entry line includes some basic information of the voucher entry line. For example, the entry line description information of the voucher entry line includes the debit and credit direction of the voucher entry line, the account range and other description information. The debit and credit direction is divided into debit and credit. The account range refers to the account value range of the voucher account in the voucher entry line. At least one voucher account can be determined based on the account range. For example, the account range can be directly the account name of a fixed voucher account; the account range can also be the account accounting rule of a class of voucher accounts. After the document is converted into a voucher, one row of data in the voucher corresponds to a voucher account, and the voucher account is determined from the account range of the corresponding voucher entry line based on the document content of the document. For example, the account range of a voucher entry line includes three voucher accounts: bank transfer-Bank A, bank transfer-Bank B, and bank transfer-Bank C. After a deposit document is converted into a voucher, the voucher account corresponding to a row of data in the voucher is one of the three voucher accounts.
[0040] For the target document type, the corresponding candidate document field information can be pre-configured. The candidate document field information includes field description information of multiple candidate document fields. The candidate document field is a candidate document field and a document field to be screened. The candidate document field is a field in a document that may be used as the data source of the voucher account in the voucher template. The document belonging to the target document type includes multiple document fields, from which the document fields that may be used as the data source of the voucher account are selected as candidate document fields, that is, the document fields that may have an impact on converting the document into a voucher are selected as candidate document fields. The candidate document field information includes field description information of some document fields in a category of documents. For example, a category of documents includes a large number of document fields, and the document fields that are obviously not related to accounting and finance can be filtered to obtain candidate document fields. The field description information of the candidate document field includes some basic information of the candidate document field. For example, the field description information of the candidate document field includes description information such as the field identifier, business description, and field type of the candidate document field.
[0041] It can be understood that different document types have their own corresponding voucher entry line information and candidate document field information.
[0042] Specifically, the computer device can obtain the voucher entry line information and candidate document field information corresponding to the target document type, determine the mapping conditions between the voucher account and the document field according to the voucher entry line information and the candidate document field information, and obtain the voucher template according to the mapping conditions. In this way, the voucher template can convert the document into a voucher according to the mapping conditions.
[0043] Step S204: Determine, through the first semantic understanding model, a target document field that matches the voucher entry line information from the candidate document field information.
[0044] The semantic understanding model is a natural language processing model based on deep learning, which can learn and understand the grammar and semantics of natural language. The semantic understanding model can be a large language model (Large Language Model, LLM for short). It can be understood that the first semantic understanding model can be any semantic understanding model.
[0045] The candidate document field information includes the field description information of each of the multiple candidate document fields, and the target document field is a document field selected from the multiple candidate document fields. It can be understood that there can be multiple target document fields. The target document field is a field that affects the voucher account, and the relevant content of the voucher account in the voucher can be generated according to the relevant content of the target document field in the document.
[0046] Specifically, currently, it is usually professionals who manually determine the target document fields, which places high demands on professionals and has low manual operation efficiency. In the method of the present application, with the help of the powerful understanding ability of the semantic understanding model, the target document field that matches the voucher entry line information is determined from the candidate document field information through the first semantic understanding model. The voucher entry line information and the candidate document field information can be converted into question text, and the question text is used to inquire which candidate document fields in the candidate document field information match the voucher entry line information. The question text is input into the first semantic understanding model, and the first semantic understanding model outputs the answer text of the question text. The answer text is the target document field determined to match the voucher entry line information in the candidate document field information.
[0047] It can be understood that the first semantic model can be a general large language model, or it can be a special large language model obtained by adjusting the general large language model based on the training sample set. The training sample set includes multiple training samples and training labels for each training sample. The training sample includes the voucher entry line information and candidate document field information corresponding to the document type of the known target document field, and the training label is the known target document field. The training sample is input into the first semantic model to obtain the predicted label corresponding to the training sample, and based on the difference between the predicted label corresponding to the training sample and the training label, the model parameters of the general large language model are adjusted until the convergence condition of the model training is met to obtain a special large language model. The model accuracy of the special large language model is higher than the model accuracy of the general large language model.
[0048] Step S206, obtaining the target field content of the target document field.
[0049] The target field content of the target document field includes the field value of the target document field. For example, if the field name of the target document field is asset acquisition method, the target field content may be various specific asset acquisition methods. It is understood that when generating a document, the user can fill in the specific asset acquisition method under the document field of asset acquisition method as needed.
[0050] Specifically, the computer device can obtain the field value of the target document field as the target field content of the target document field. It can be understood that when converting a document into a voucher, the field value of the target document field is an important factor in determining which voucher account the relevant amount in the document is attributed to. For example, for the voucher account of fixed asset impairment provision, the document field in the document that affects the voucher account specifically includes the document field of asset category whose field value is fixed assets; for the voucher account of intangible asset impairment provision, the document field in the document that affects the voucher account specifically includes the document field of asset category whose field value is intangible assets.
[0051] Step S208, input the candidate document field information, voucher entry line information and target field content into the second semantic understanding model, and output the first mapping condition between the target voucher subject in the voucher entry line information and the target field content.
[0052] It can be understood that the second semantic understanding model can be any semantic understanding model. The first semantic understanding model and the second semantic understanding model can be the same semantic understanding model or different semantic understanding models. For example, the first semantic understanding model and the second semantic understanding model can be semantic understanding models with different model scales; the first semantic understanding model and the second semantic understanding model can be semantic understanding models with different model algorithms.
[0053] The voucher entry line information includes the entry line description information of multiple voucher entry lines. Each voucher entry line has its own corresponding target voucher account. The entry line description information includes the account range, and the target voucher account is determined according to the account range.
[0054] The first mapping condition refers to the mapping condition between the target voucher account and the target field content. The first mapping condition may include a mapping relationship between the target voucher account and the target field content. There are multiple target voucher accounts and target field contents. Based on the first semantic model, it is possible to obtain which target field contents are needed, but the correspondence and mapping relationship between the target field content and the target voucher account is not yet known. Based on the second semantic model, the correspondence and mapping relationship between the target field content and the target voucher account can be obtained. Furthermore, the first mapping condition may also include an amount calculation formula between the target field content and the target voucher account. The amount calculation formula is used to calculate the amount that needs to be recorded in the target voucher account based on the relevant amount of the target field content.
[0055] Specifically, currently, it is usually professionals who manually configure the mapping conditions between the target voucher subject and the target field content, which places high demands on professionals and has low manual operation efficiency. In the method of the present application, with the help of the powerful understanding ability of the semantic understanding model, the candidate document field information, the voucher entry line information and the target field content are input into the second semantic understanding model, and the second semantic understanding model outputs the first mapping condition between the target voucher subject and the target field content in the voucher entry line information. The candidate document field information, the voucher entry line information and the target field content can be converted into question text, and the question text is used to inquire what the mapping condition is between the target voucher subject and the target field content in the voucher entry line information, and the question text is input into the second semantic understanding model, and the second semantic understanding model outputs the answer text of the question text, and the answer text is the first mapping condition between the target voucher subject and the target field content in the voucher entry line information.
[0056] It can be understood that the second semantic model can be a general large language model, or it can be a special large language model obtained by adjusting the general large language model based on the training sample set. The training sample set includes multiple training samples and training labels for each training sample. The training sample includes the voucher entry line information, candidate document field information and target field content corresponding to the document type of the known first mapping condition, and the training label is the known first mapping condition. The training sample is input into the second semantic model to obtain the predicted label corresponding to the training sample, and based on the difference between the predicted label corresponding to the training sample and the training label, the model parameters of the general large language model are adjusted until the convergence condition of the model training is met to obtain a special large language model. The model accuracy of the special large language model is higher than the model accuracy of the general large language model.
[0057] In one embodiment, the model scale of the first semantic understanding model is smaller than the model scale of the second semantic understanding model. The complexity of the processing task of the first semantic understanding model is smaller than the complexity of the processing task of the second semantic understanding model. Therefore, the first semantic understanding model can adopt a small model and the second semantic understanding model can adopt a large model. Using semantic understanding models of different scales for different tasks helps to improve the efficiency of generating voucher templates.
[0058] Step S210: Generate a voucher template corresponding to the target document type based on the first mapping condition.
[0059] The voucher template is a template used to convert a document into a voucher. One type of document corresponds to one voucher template.
[0060] Specifically, the computer device may generate a voucher template corresponding to the target document type based on the first mapping condition. The voucher template includes the first mapping condition, and converts the document content of the target document belonging to the target document type into the voucher content of the target voucher corresponding to the target document according to the first mapping condition.
[0061] In the above-mentioned method for generating a voucher template, first, the voucher entry line information and candidate document field information corresponding to the target document type are obtained, and the target document field matching the voucher entry line information is determined from the candidate document field information through the first semantic understanding model. The semantic understanding model has a strong semantic understanding ability, and can quickly determine the target document field matching the voucher entry line information from the candidate document field information, thereby eliminating the need to manually determine the target document field matching the voucher entry line information from the candidate document field information, which helps to improve efficiency. Further, the target field content of the target document field is obtained, and the candidate document field information, the voucher entry line information, and the target field content are input into the second semantic understanding model, and the first mapping condition between the target voucher account in the voucher entry line information and the target field content is output. The semantic understanding model has a strong semantic understanding ability, and can quickly generate the first mapping condition between the target voucher account in the voucher entry line information and the target field content, thereby eliminating the need to manually configure the mapping condition between the document field and the voucher account. Finally, a voucher template corresponding to the target document type is generated based on the first mapping condition. In this way, by performing semantic analysis on the candidate document field information and voucher entry line information corresponding to a type of document through the semantic understanding model, a voucher template corresponding to a type of document can be quickly generated, effectively reducing manual operations and improving the efficiency of generating voucher templates.
[0062] In one embodiment, determining a target document field that matches the voucher entry line information from the candidate document field information by using the first semantic understanding model includes:
[0063] A first prompt template is obtained for prompting the model to perform data screening; the first prompt template includes a question definition part, a question background part and a question answering process; the question answering process is used to prompt the semantic understanding model to think about the process when answering the question description part according to the question background part;
[0064] Fill in the question background part in the first prompt template based on the candidate document field information and the voucher entry line information, and obtain the first prompt question based on the filled first prompt template;
[0065] The first prompt question is input into the first semantic understanding model, and the target document field in the candidate document field information that matches the voucher entry line information is output.
[0066] The prompt template includes a question definition part, a question background part, and a question answering process, which are used to generate prompt questions. The question definition part is the core of the question, which is used to prompt the model to respond directly. The question background part is the context or background of the question, which is used to prompt the model the environment and conditions of the question. The question answering process is the process and steps of answering the question, which is used to prompt the model's thinking process when answering the question description part based on the question background part;
[0067] The first prompt template is a prompt template used to convert candidate document field information and voucher entry line information into a first prompt question. The first prompt question is used to request the semantic understanding model to provide documents in the candidate document field information that match the voucher entry line information.
[0068] Specifically, the computer device can obtain the first prompt template, fill in the question background part in the first prompt template based on the candidate document field information and the voucher entry line information, obtain the first prompt question based on the filled first prompt template, and obtain the first prompt question based on the filled first prompt template. That is, fill the candidate document field information and the voucher entry line information into the corresponding positions in the question background part in the first prompt template, so as to obtain the first prompt question. The computer device can input the first prompt question into the first semantic understanding model, and the first semantic understanding model outputs the answer to the first prompt question, and obtains the target document field in the candidate document field information that matches the voucher entry line information according to the answer to the first prompt question.
[0069] In a specific application, users can configure voucher entry line information through the interface. Referring to Figure 3, users can configure the AI accounting model, which includes basic information and detailed description of voucher entry. The detailed description of voucher entry is the voucher entry line information. The detailed description of voucher entry includes the account range and entry rule description of each voucher entry line. There are two value-taking methods for the account range, one is to configure fixed accounts, and the other is to configure account accounting information (ie account accounting rules). The account range is used to constrain the accounting accounts (ie voucher accounts) output by the AI model (ie semantic understanding model). The entry rule description is used to describe the meaning and significance of the voucher account, so that the AI model can understand the voucher account.
[0070] Users can configure candidate document field information through the interface. Referring to Figure 4, users can configure accounting matters, which include basic information, basic information of accounting matters, and source of accounting matter entries. The source of accounting matter entries is the candidate document field information. The source of accounting matter entries includes the value expression (i.e., field identifier) of the candidate document field, expression name (i.e., field name), business description (field meaning), field type, and other information. In the AI accounting model, the corresponding accounting matters are associated.
[0071] The prompt (i.e., the first prompt question) that needs to be input into the small model (i.e., the first semantic understanding model) generated based on the voucher entry line information plus the candidate document field information can be as follows:
[0072] ###You are a financial person###
[0073] ###You need to give the field name and Chinese description in the system according to the Chinese accounting standards, and combine the given account and the description of the rule to obtain the account, as well as the given example to give the field number that needs to use the specific value###
[0074] ###This is the field name and Chinese description in the system:
[0075] billno document number
[0076] realcard.number asset code
[0077] realcard.asset.name Asset name
[0078] currency.name Currency
[0079] policy.name Accounting policy
[0080] realcard.originmethod.nameAsset acquisition method
[0081] fincard.assetcat.name Asset category
[0082] decval Impairment in this period###
[0083] ###The following are the borrowing and lending directions, account names, and account rule descriptions, currencies
[0084] Debit asset impairment loss summary, take asset name and remarks, book currency
[0085] Debit Fixed assets impairment provision Fixed assets impairment account book currency
[0086] Debit Intangible Assets Impairment Provision Intangible Assets Impairment Account Book Currency
[0087] Loan Right-of-use asset impairment provision Lease asset impairment book currency###
[0088] ###-workflow:
[0089] Step 1: Find the part of asset impairment in the Latest Enterprise Accounting Standards
[0090] Step 2: Match the metadata field information with the given field identifier to obtain the information of the field in the system.
[0091] Step 3: Based on the provided account name, account rule description, and debit and credit direction, and in accordance with enterprise accounting standards, generate the following rules: {"Accounting Account": "x", selection condition: FZCLB>='XXXX' or FZCLB<='YYYY', currency: RMB, original amount: FX-FY, base currency amount: FN+FM}
[0092] Format Notes: 1. The base currency amount and the original currency amount are the calculation formulas of the field numbers in the system.
[0093] 2. The currency is selected from the number and value of the field in the system
[0094] 3. You can use <, >, =, <> (not equal to), in and other operators in the screening conditions
[0095] Step 4: Return the field number that needs to be used in the rule. Example: {“curency.name”}###
[0096] Input prompt into the small model, and the output data of the small model can be as follows:
[0097] {
[0098] "realcard.asset.name": "asset category"
[0099] "currency.name": "currency"
[0100] "decval": "current period impairment"
[0101] }
[0102] According to the field number (i.e. field identifier) output by the small model, you can query the specific field value. Asset categories include fixed assets, intangible assets, and leased assets. Currencies include US dollars, RMB, and Canadian dollars. Current period impairment includes >0.
[0103] It can be understood that in the present application, the originally complex field names of the document fields are converted into concise business descriptions. The business descriptions are content that is easier for the semantic understanding model to understand. Abstracting the complex field names into concise business descriptions can facilitate the semantic understanding model to understand the semantics of the document fields and avoid misunderstandings.
[0104] In the above embodiment, the candidate document field information and the voucher entry line information are combined with the first prompt template to obtain a first prompt question that is easier for the first semantic understanding model to understand. The first semantic understanding model can quickly and accurately output the target document field that matches the voucher entry line information in the candidate document field information by answering the first prompt question. The first prompt question includes a question answering process, which helps to improve the model output of more accurate answers.
[0105] In one embodiment, the candidate document field information, the voucher entry line information and the target field content are input into the second semantic understanding model, and the first mapping condition between the target voucher subject in the voucher entry line information and the target field content is output, including:
[0106] Obtain a second prompt template for prompting the model to perform data mapping;
[0107] Fill in the question background part in the second prompt template based on the candidate document field information, the voucher entry line information and the target field content, and obtain the second prompt question based on the filled second prompt template;
[0108] The second prompt question is input into the second semantic understanding model, and the first mapping condition between the target voucher subject and the target field content in the voucher entry line information is output.
[0109] The second prompt template is used to convert candidate document field information, voucher entry line information and target field content into a second prompt question. The second prompt question is used to request the semantic understanding model to provide a mapping condition between the target voucher account in the voucher entry line information and the target field content.
[0110] It can be understood that if the second prompt template includes a question definition part, a question background part and a question answering process, the question definition part, the question background part and the question answering process of the first prompt template and the second prompt template are different.
[0111] Specifically, the computer device can obtain the second prompt template, fill in the question background part in the second prompt template based on the candidate document field information, the voucher entry line information and the target field content, and obtain the second prompt question based on the filled second prompt template. That is, the candidate document field information, the voucher entry line information and the target field content are filled into the corresponding positions in the question background part of the second prompt template, so as to obtain the second prompt question. The computer device can input the second prompt question into the second semantic understanding model, and the second semantic understanding model outputs the answer to the second prompt question, and obtains the first mapping condition between the target voucher account in the voucher entry line information and the target field content according to the answer to the second prompt question.
[0112] In a specific application, the prompt (i.e., the second prompt question) that needs to be input into the large model (i.e., the second semantic understanding model) generated based on the voucher entry line information plus the candidate document field information can be as follows:
[0113] ###You are a financial person###
[0114] ###You need to generate the conditions that need to be met to obtain the account based on the given field names and Chinese descriptions in the system according to the Chinese accounting standards, and combine the given account and the description of the rules for obtaining the account, as well as the given examples###
[0115] ###This is the field name and Chinese description in the system:
[0116] billno document number
[0117] realcard.number asset code
[0118] realcard.asset.name Asset name
[0119] currency.name Currency
[0120] policy.name Accounting policy
[0121] realcard.originmethod.nameAsset acquisition method
[0122] fincard.assetcat.name Asset category
[0123] decval Impairment in this period###
[0124] ###Number and value of fields in the system
[0125] currency.name: USD, RMB, CAD
[0126] fincard.assetcat.name: Fixed assets, intangible assets, leased assets
[0127] decval:>0###
[0128] ###The following are the borrowing and lending directions, account names, and account rule descriptions, currencies
[0129] Debit asset impairment loss summary, take asset name and remarks, book currency
[0130] Debit Fixed assets impairment provision Fixed assets impairment account book currency
[0131] Debit Intangible Assets Impairment Provision Intangible Assets Impairment Account Book Currency
[0132] Loan Right-of-use asset impairment provision Lease asset impairment book currency###
[0133] ###-workflow:
[0134] Step 1: Find the part of asset impairment in the Latest Enterprise Accounting Standards
[0135] Step 2: Match the metadata field information with the given field identifier to obtain the information of the field in the system.
[0136] Step 3: Based on the provided account name, account rule description, and debit and credit directions, and in accordance with enterprise accounting standards, generate the following rule Json: {"Accounting Account": "x", selection condition: FZCLB>='XXXX' or FZCLB<='YYYY', currency: RMB, original currency amount: FX-FY, base currency amount: FN+FM}
[0137] Step 4: Combine all Json into Json Array and return the answer. Do not add extra solutions###
[0138] Input prompt into the big model, and the output data of the big model can be as follows: [
[0140] {
[0141] "Voucher Account": "Asset Impairment Loss"
[0142] "Condition":"decval>0"
[0143] "Currency": "Book currency"
[0144] "Original currency amount": "decval"
[0145] "Base currency amount": "decval"
[0146] }
[0147] {
[0148] "Voucher Subject": "Fixed Assets Impairment Provision"
[0149] "Condition": "fincard.assetcat.name='Fixed assets' and decval>0"
[0150] "Currency": "Book currency"
[0151] "Original currency amount": "decval"
[0152] "Base currency amount": "decval"
[0153] }
[0154] {
[0155] "Voucher Account": "Intangible Asset Impairment Provision"
[0156] "Condition": "fincard.assetcat.name='Intangible assets' and decval>0"
[0157] "Currency": "Book currency"
[0158] "Original currency amount": "decval"
[0159] "Base currency amount": "decval"
[0160] }
[0161] {
[0162] "Voucher Account": "Provision for impairment of right-of-use assets"
[0163] "Condition": "fincard.assetcat.name='Leased assets' and decval>0"
[0164] "Currency": "Book currency"
[0165] "Original currency amount": "decval"
[0166] "Base currency amount": "decval"
[0167] } ]
[0169] In the above embodiment, the candidate document field information, voucher entry line information, and target field content are combined with the second prompt template to obtain a second prompt question that is easier for the second semantic understanding model to understand. By answering the first prompt question, the second semantic understanding model can more accurately output the target document field in the candidate document field information that matches the voucher entry line information.
[0170] In one embodiment, the method for generating a voucher template further includes:
[0171] Get the target document belonging to the target document type;
[0172] Determine the first mapping relationship hit by the target document from each first mapping relationship included in the voucher template;
[0173] Based on the first mapping relationship hit by the target document, the document content corresponding to the target field content of the target document in the target document is converted into the account content of the corresponding target voucher account;
[0174] Generate the target voucher of the target document based on the account content of the target voucher account.
[0175] The document type of the target document is the target document type. The target document may be any document belonging to the target document type. There may be multiple target field contents, and the target document may include several of them. For example, the target field contents include three asset categories, namely fixed assets, intangible assets, and leased assets, and the target document may only include one of the asset categories. The document contents corresponding to the target field contents in the target document include the amounts related to the target field contents.
[0176] Specifically, the computer device obtains a target document belonging to a target document type, and converts the target document into a financial voucher (ie, a target voucher) based on a voucher template corresponding to the target document type.
[0177] The computer device matches the target document with each first mapping relationship included in the voucher template, determines the first mapping relationship hit by the target document from each first mapping relationship included in the voucher template, and converts the document content corresponding to the target field content of the target document in the target document into the account content of the corresponding target voucher account based on the first mapping relationship hit by the target document. For example, the voucher template includes first mapping conditions corresponding to four target voucher accounts, namely, asset impairment loss, fixed asset impairment provision, intangible asset impairment provision, and right-of-use asset impairment provision, respectively, and the first mapping relationship includes a mapping relationship between the target voucher account and the target field content and an amount calculation formula. If the target document includes the document field of current period impairment and the field value of current period impairment is greater than 0, it is determined that the target document hits the first mapping condition corresponding to the asset impairment loss, and then the field value of the current period impairment is converted into the debit amount of the target voucher account of asset impairment loss according to the amount calculation formula in the first mapping condition. If the field value of the document field of asset category in the target document is fixed assets, and the field value of current period impairment is greater than 0, it is determined that the target document hits the first mapping condition corresponding to the fixed asset impairment provision, and then the field value of the current period impairment is converted into the credit amount of the target document account of the fixed asset impairment provision according to the amount calculation formula in the first mapping condition. Finally, the computer device can generate the target document of the target document based on the account content of the target document account.
[0178] In the above embodiment, based on the first mapping relationship in the voucher template corresponding to the target document type, it is possible to quickly determine from the target document belonging to the target document type which document fields need to be converted into voucher accounts and how to convert them, so that the target voucher corresponding to the target document can be quickly generated.
[0179] In one embodiment, generating a voucher template corresponding to the target document type based on the first mapping condition includes:
[0180] Obtain the account accounting information and account impact field information of the target voucher account;
[0181] Inputting the account accounting information and the account impact field information into the third semantic understanding model, and outputting the second mapping condition between each specific voucher account corresponding to the account accounting information and each impact field content corresponding to the account impact field information;
[0182] A voucher template corresponding to the target document type is generated based on the first mapping condition and the second mapping condition.
[0183] The voucher entry line information includes the entry line description information of each of the multiple voucher entry lines. The entry line description information includes the account range. The account range is divided into two cases. The account range can be a specific voucher account, and the account range can also be the account accounting information of a class of voucher accounts. The account accounting information can also be called the account accounting rule. The account accounting information of the target voucher account refers to the account accounting information of a class of voucher accounts represented by the target voucher account. The account accounting information is used to indicate the division method of each specific voucher account under the same type. The account impact field information of the target voucher account includes the account impact field and the field value of the account impact field. The account impact field is a document field that has an impact on the class of voucher accounts represented by the target voucher account in each document field corresponding to the target document type. For example, the account impact field corresponding to the three voucher accounts of the same type, namely, cash on hand, bank deposit, and bills payable, is the settlement method field in the document. The field value of the settlement method field in the document will affect the selection of the voucher account in the voucher. It is necessary to determine which of the three voucher accounts, cash on hand, bank deposit, and bills payable, is to be selected in the voucher according to the field value of the settlement method field. The contents of each impact field corresponding to the account impact field information refer to the field values of each account impact field. For the target voucher account, you can pre-configure the corresponding account accounting information and account impact field information.
[0184] It can be understood that if there are many choices of field values for a document field, and the choice of field values has a relatively fixed correspondence with some voucher accounts, the mapping conditions between each field value and each specific voucher account can be generated by configuring the account accounting rules and the account impact field information. The second mapping condition refers to the mapping condition between each specific voucher account corresponding to the account accounting rule and the target field content. The first mapping condition may include the mapping relationship between each specific voucher account corresponding to the account accounting information and each impact field content corresponding to the account impact field information. Furthermore, the second mapping condition may also include an amount calculation formula between a specific voucher account and an account impact field. The amount calculation formula is used to calculate the amount that needs to be recorded for a specific voucher account based on the relevant amount of the account impact field.
[0185] The third semantic understanding model can be any semantic understanding model. The first semantic understanding model and the third semantic understanding model can be the same semantic understanding model or different semantic understanding models. It can be understood that the third semantic model can be a general large language model or a special large language model obtained by adjusting the general large language model based on the training sample set.
[0186] Specifically, if the target voucher account directly represents a specific voucher account, the final voucher usually records the account content of the specific voucher account. If the target voucher account represents a category of voucher accounts, the final voucher usually records the account content of a specific voucher account in the category of voucher accounts.
[0187] If the target voucher account represents a type of voucher account, the computer device can obtain the account accounting information and account impact field information of the target voucher account, and input the account accounting information and account impact field information into the third semantic understanding model with the help of the powerful understanding ability of the semantic understanding model, and the third semantic understanding model outputs the second mapping conditions between the specific voucher accounts corresponding to the account accounting information and the impact field contents corresponding to the account impact field. The account accounting information and the impact field can be converted into question text, and the question text is used to inquire what the mapping conditions are between the specific voucher accounts corresponding to the account accounting information and the impact field contents corresponding to the impact field, and the question text is input into the third semantic understanding model, and the third semantic understanding model outputs the answer text of the question text, and the answer text is the second mapping condition between the specific voucher accounts corresponding to the account accounting information and the impact field contents corresponding to the impact field.
[0188] Finally, the computer device can generate a voucher template corresponding to the target document type based on the first mapping condition and the second mapping condition. The voucher template includes the first mapping condition and the second mapping condition, and converts the document content of the target document belonging to the target document type into the voucher content of the target voucher corresponding to the target document according to the first mapping condition and the second mapping condition.
[0189] In a specific application, the prompt that needs to be input into the small model (i.e., the third semantic understanding model) generated based on the account accounting information and the account impact field information can be as follows:
[0190] ###You are a financial person###
[0191] ###Now you need to generate account value rules based on the given influencing factors, combined with the given accounts and rule descriptions###
[0192] ###Here are the influencing factors:
[0193] Settlement method: JSFS01, cash
[0194] JSFS02, Cash Check
[0195] JSFS03, transfer check
[0196] JSFS04, T / T
[0197] JSFS05, Xinhui
[0198] JSFS08, Letter of Credit
[0199] JSFS06, Commercial Acceptance Bill
[0200] JSFS07, Bank Acceptance Bill###
[0201] ###The following is the subject range
[0202] 1001, Cash on hand
[0203] 1002, Bank deposits
[0204] 2201, Notes Payable###
[0205] ###-workflow:
[0206] Step 1: Find the description of the account values within the account range according to Chinese accounting standards
[0207] Step 2: Each influencing factor corresponds to an account: for example, JSFS01, cash corresponds to 1001, cash on hand
[0208] Step 3: Based on the provided account name and influencing factors, in accordance with the Enterprise Accounting Standards, the generated rule example is as follows: {"Influencing factors:{"Travel items":001, Aircraft, "Department attributes...1, Management"},"Accounting account":"6602.08 Management expenses_Travel expenses"}
[0209] Format notes: 1. Cartesian product of multiple influencing factors gives the number of rules: for example, if there are 5 types of travel items and 3 types of department attributes, there are 15 situations.
[0210] 2. All combinations of all influencing factors need to be included
[0211] Step 4: Differentiate by settlement method
[0212] Step 5: Combine all Json into Json Array and return the answer. Do not add extra solutions###
[0213] Input prompt into the small model, and the output data of the small model can be as follows: [
[0215] {"Influencing factors":{"Settlement method":"JSFS01"},"Accounting subject":"1001,Cash on hand"}
[0216] {"Influencing factors":{"Settlement method":"JSFS02"},"Accounting subject":"1002,Bank deposit"}
[0217] {"Influencing factors":{"Settlement method":"JSFS03"},"Accounting subject":"1002,Bank deposit"}
[0218] {"Influencing factors":{"Settlement method":"JSFS04"},"Accounting subject":"1002,Bank deposit"}
[0219] {"Influencing factors":{"Settlement method":"JSFSO5"},"Accounting subject":"1002,Bank deposit"}
[0220] {"Influencing factors":{"Settlement method":"JSFS08"},"Accounting subject":"1002,Bank deposit")
[0221] {"Influencing factors":{"Settlement method":"JSFS06"},"Accounting subject":"2201, Notes payable"}
[0222] {"Influencing factors":{"Settlement method":"JSFS07"},"Accounting subject":"2201, Notes payable"} ]
[0224] In one embodiment, the target voucher subject may be a first-level subject, a second-level subject, a third-level subject, etc. For any target voucher subject, if the user hopes that the voucher subject finally recorded in the voucher is the target voucher subject, then the target voucher subject may not need to configure the subject accounting information. If the user hopes that the voucher subject finally recorded in the voucher is a subordinate subject of the target voucher subject, then the target voucher subject may configure the subject accounting information. For example, if the target voucher subject is a first-level subject, then the specific voucher subjects corresponding to the subject accounting information of the target voucher subject may be the second-level subjects under the first-level subject. The first semantic processing model outputs the first mapping relationship between the first-level subject and the target document field, and the third semantic understanding model outputs the second mapping relationship between the second-level subject and the subject impact field.
[0225] In the above embodiment, the first mapping condition between the target voucher account in the voucher entry line information and the target field content of the target document field is output by the second semantic understanding model, and the second mapping condition between each specific voucher account corresponding to the account accounting information of the target voucher account and each impact field content corresponding to the account impact field of the target voucher account is output by the second semantic understanding model, which can effectively reduce the data processing pressure of the second semantic understanding model.
[0226] In one embodiment, the method for generating a voucher template further includes:
[0227] Get the target document belonging to the target document type;
[0228] Determine the first mapping condition and the second mapping condition that the target document hits from the first mapping conditions and the second mapping conditions included in the voucher template;
[0229] Based on the first mapping condition matched by the target document, the document content corresponding to the target field content of the target document in the target document is converted into the account content of the corresponding target voucher account;
[0230] Based on the second mapping condition matched by the target document, the document content corresponding to the content of the corresponding impact field of the target document in the target document is converted into the account content of the corresponding specific voucher account;
[0231] Generate the target voucher of the target document based on the account content of the target voucher account and the account content of the specific voucher account.
[0232] Specifically, the computer device can match the first mapping conditions and the second mapping conditions included in the target document and the voucher template, and determine the first mapping conditions and the second mapping conditions that the target document hits from the first mapping conditions and the second mapping conditions included in the voucher template. For example, the first mapping condition that the target document hits is first determined, and if the target voucher subject corresponding to the first mapping condition has a corresponding second mapping condition, the second mapping condition that the target document hits is then determined from the corresponding second mapping conditions. Based on the first mapping condition that the target document hits, the document content corresponding to the target field content of the target document in the target document is converted into the subject content of the corresponding target voucher subject.
[0233] The computer device can convert the document content corresponding to the target field content of the target document in the target document into the subject content of the corresponding target voucher subject based on the first mapping condition hit by the target document, and convert the document content corresponding to the impact field content of the target document in the target document into the subject content of the corresponding specific voucher subject based on the second mapping condition hit by the target document. For example, if the target document hits the first mapping condition corresponding to the first-level subject "bank transfer", the subordinate subjects of the first-level subject "bank transfer" include "bank transfer-bank A", "bank transfer-bank B", and "bank transfer-bank C", and then further determine which subordinate subject the target document hits, and determine the subject content of the subordinate subject according to the document content of the target document.
[0234] Finally, the target voucher of the target document is generated based on the account content of the target voucher account and the account content of the specific voucher account.
[0235] In the above embodiment, based on the mapping relationship in the voucher template corresponding to the target document type, it is possible to quickly determine which document fields in the target document belonging to the target document type need to be converted into voucher accounts and how to convert them. If the first mapping relationship does not have a corresponding second mapping relationship, the document field corresponding to the first mapping relationship is converted into the voucher account corresponding to the first mapping relationship based on the first mapping relationship. If the first mapping relationship has a corresponding second mapping relationship, the document field corresponding to the second mapping relationship is further converted into the voucher account corresponding to the second mapping relationship based on the second mapping relationship.
[0236] In a specific embodiment, the method of the present application can be applied to an ERP system, and can improve the efficiency of generating voucher templates and the efficiency of generating vouchers in the ERP system.
[0237] Referring to Figure 5, users can configure the AI accounting model (i.e., voucher entry line information) corresponding to the target document type in the system. The AI accounting model includes the debit and credit directions, account ranges, and entry rule descriptions of multiple voucher entry lines. The entry rule description is configured according to enterprise accounting standards and pre-made rules. The AI accounting model is used to provide the voucher account in the voucher template. The AI accounting model has associated accounting matters (i.e., candidate document field information). Accounting matters are used to provide candidate document fields that need to determine mapping conditions with voucher accounts. Users can configure accounting matters in the system. The account range can be a fixed voucher account or an account accounting rule. Convert the information of the voucher entry line in the AI accounting model into a text-based account description, convert the information of the document field in the accounting matter into a text-based field description, convert the account description and field description into prompt1 that needs to be input into the small model, input prompt1 into the small model (i.e., the first semantic understanding model), and the small model outputs the field number of the document field that needs to be taken out of the accounting matter (i.e., the target document field). Query the specific field value in the system according to the field number to obtain the specific field value (i.e., the target field content) that needs to be passed to the large model. The account description, field description and specific field value are converted into prompt2 which needs to be input into the large model, prompt2 is input into the large model (i.e. the second semantic understanding model), and the large model outputs the first mapping condition between the voucher account and the specific field value. If there is no account accounting rule in the AI accounting model, then finally, the voucher template corresponding to the target document type is generated based on the first mapping condition. If the account range of a voucher entry line in the AI accounting model is the account accounting rule (i.e. the account accounting information), then the account accounting rule is converted into a textual rule description, and the rule description and the candidate influencing factors of the voucher entry line (i.e. the account influencing field information) are converted into prompt3 which needs to be input into the small model, prompt3 is input into the small model (i.e. the third semantic understanding model), and the small model outputs the account influencing factor (i.e. the second mapping condition). Finally, the voucher template corresponding to the target document type is generated based on the first mapping condition and the second mapping condition.
[0238] Figure 6 is a schematic diagram of the interface of the voucher template generated by the method of the present application in the system. The entry screening conditions and amount-related information in the voucher template are the first mapping conditions and / or the second mapping conditions generated by the method of the present application.
[0239] In the above embodiment, the present application method increases efficiency by generating voucher templates in a way of combining a large model with a small model. The small model has fewer parameters, is more accurate for specific scenarios, and has a fast return speed. The number of times the large model is called to generate a voucher template is small, the cost is low, and the generated voucher template can be applied to all documents of the same type, which is highly efficient.
[0240] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0241] Based on the same inventive concept, the embodiment of the present application also provides a device for generating a voucher template for implementing the method for generating a voucher template involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the device for generating one or more voucher templates provided below can refer to the limitations of the method for generating a voucher template above, and will not be repeated here.
[0242] In one embodiment, as shown in FIG. 7 , a device for generating a voucher template is provided, comprising: an information acquisition module 702, a data screening module 704, a content acquisition module 706, a data mapping module 708, and a template generation module 710, wherein:
[0243] The information acquisition module 702 is used to acquire the voucher entry line information and candidate document field information corresponding to the target document type.
[0244] The data screening module 704 is used to determine the target document field that matches the voucher entry line information from the candidate document field information through the first semantic understanding model.
[0245] The content acquisition module 706 is used to acquire the target field content of the target document field.
[0246] The data mapping module 708 is used to input the candidate document field information, voucher entry line information and target field content into the second semantic understanding model, and output the first mapping condition between the target voucher subject in the voucher entry line information and the target field content.
[0247] The template generation module 710 is used to generate a voucher template corresponding to the target document type based on the first mapping condition.
[0248] In one embodiment, the data screening module 704 is further configured to:
[0249] A first prompt template is obtained for prompting the model to perform data screening; the first prompt template includes a question definition part, a question background part and a question answering process; the question answering process is used to prompt the semantic understanding model to think about the process when answering the question description part according to the question background part;
[0250] Fill in the question background part in the first prompt template based on the candidate document field information and the voucher entry line information, and obtain the first prompt question based on the filled first prompt template;
[0251] The first prompt question is input into the first semantic understanding model, and the target document field in the candidate document field information that matches the voucher entry line information is output.
[0252] In one embodiment, the data mapping module 708 is further configured to:
[0253] Obtain a second prompt template for prompting the model to perform data mapping;
[0254] Fill in the question background part in the second prompt template based on the candidate document field information, the voucher entry line information and the target field content, and obtain the second prompt question based on the filled second prompt template;
[0255] The second prompt question is input into the second semantic understanding model, and the first mapping condition between the target voucher subject and the target field content in the voucher entry line information is output.
[0256] In one embodiment, the credential template generating device is further used for:
[0257] Get the target document belonging to the target document type;
[0258] Determine the first mapping relationship hit by the target document from each first mapping relationship included in the voucher template;
[0259] Based on the first mapping relationship hit by the target document, the document content corresponding to the target field content of the target document in the target document is converted into the account content of the corresponding target voucher account;
[0260] Generate the target voucher of the target document based on the account content of the target voucher account.
[0261] In one embodiment, the template generation module 710 is further used to:
[0262] Obtain the account accounting information and account impact field information of the target voucher account;
[0263] Inputting the account accounting information and the account impact field information into the third semantic understanding model, and outputting the second mapping condition between each specific voucher account corresponding to the account accounting information and each impact field content corresponding to the account impact field information;
[0264] A voucher template corresponding to the target document type is generated based on the first mapping condition and the second mapping condition.
[0265] In one embodiment, the credential template generating device is further used for:
[0266] Get the target document belonging to the target document type;
[0267] Determine the first mapping condition and the second mapping condition that the target document hits from the first mapping conditions and the second mapping conditions included in the voucher template;
[0268] Based on the first mapping condition matched by the target document, the document content corresponding to the target field content of the target document in the target document is converted into the account content of the corresponding target voucher account;
[0269] Based on the second mapping condition matched by the target document, the document content corresponding to the content of the corresponding impact field of the target document in the target document is converted into the account content of the corresponding specific voucher account;
[0270] Generate the target voucher of the target document based on the account content of the target voucher account and the account content of the specific voucher account.
[0271] The above-mentioned device for generating voucher templates can improve the efficiency of generating voucher templates.
[0272] Each module in the above-mentioned credential template generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0273] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the method for generating a voucher template. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating a voucher template is implemented.
[0274] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for generating a voucher template is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0275] Those skilled in the art will understand that the structures shown in FIGS. 8 and 9 are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than those shown in the figures, or combine certain components, or have a different arrangement of components.
[0276] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0277] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0278] In one embodiment, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0279] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0280] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0281] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0282] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating a voucher template, characterized in that: The method comprises: Obtain the voucher entry line information and candidate document field information corresponding to the target document type; Determining, by means of a first semantic understanding model, a target document field that matches the voucher entry line information from the candidate document field information; Obtain the target field content of the target document field; Inputting the candidate document field information, the voucher entry line information and the target field content into a second semantic understanding model, and outputting a first mapping condition between the target voucher subject in the voucher entry line information and the target field content; A voucher template corresponding to the target document type is generated based on the first mapping condition.
2. The method according to claim 1, characterized in that: The determining, by using the first semantic understanding model, a target document field that matches the voucher entry line information from the candidate document field information includes: Acquire a first prompt template for prompting the model to perform data screening; the first prompt template includes a question definition part, a question background part and a question answering process; the question answering process is used to prompt the semantic understanding model to think about the process when answering the question description part according to the question background part; Filling the question background part in the first prompt template based on the candidate document field information and the voucher entry line information, and obtaining the first prompt question based on the filled first prompt template; The first prompt question is input into a first semantic understanding model, and a target document field in the candidate document field information that matches the voucher entry line information is output.
3. The method according to claim 1, characterized in that The step of inputting the candidate document field information, the voucher entry line information and the target field content into a second semantic understanding model and outputting a first mapping condition between the target voucher subject in the voucher entry line information and the target field content includes: Obtain a second prompt template for prompting the model to perform data mapping; Filling the question background part in the second prompt template based on the candidate document field information, the voucher entry line information and the target field content, and obtaining the second prompt question based on the filled second prompt template; The second prompt question is input into a second semantic understanding model, and a first mapping condition between the target voucher subject in the voucher entry line information and the target field content is output.
4. The method according to claim 1, characterized in that The method further comprises: Acquire a target document belonging to the target document type; Determine the first mapping relationship hit by the target document from each first mapping relationship included in the voucher template; Based on the first mapping relationship hit by the target document, converting the document content corresponding to the target field content of the target document in the target document into the account content of the corresponding target voucher account; Based on the subject content of the target voucher subject, a target voucher of the target document is generated.
5. The method according to claim 1, characterized in that The generating a voucher template corresponding to the target document type based on the first mapping condition includes: Obtain account accounting information and account impact field information of the target voucher account; Input the account accounting information and the account impact field information into a third semantic understanding model, and output a second mapping condition between each specific voucher account corresponding to the account accounting information and each impact field content corresponding to the account impact field information; A voucher template corresponding to the target document type is generated based on the first mapping condition and the second mapping condition.
6. The method according to claim 5, characterized in that The method further comprises: Acquire a target document belonging to the target document type; Determine the first mapping condition and the second mapping condition hit by the target document from the first mapping conditions and the second mapping conditions included in the voucher template; Based on the first mapping condition matched by the target document, converting the document content corresponding to the target field content of the target document in the target document into the account content of the corresponding target voucher account; Based on the second mapping condition matched by the target document, converting the document content corresponding to the content of the corresponding impact field of the target document in the target document into the account content of the corresponding specific voucher account; Based on the subject content of the target voucher subject and the subject content of the specific voucher subject, a target voucher of the target document is generated.
7. A device for generating a voucher template, characterized in that: The device comprises: The information acquisition module is used to obtain the voucher entry line information and candidate document field information corresponding to the target document type; A data screening module, used to determine a target document field matching the voucher entry line information from the candidate document field information through a first semantic understanding model; A content acquisition module, used to acquire the target field content of the target document field; A data mapping module, used for inputting the candidate document field information, the voucher entry line information and the target field content into a second semantic understanding model, and outputting a first mapping condition between the target voucher subject in the voucher entry line information and the target field content; A template generation module is used to generate a voucher template corresponding to the target document type based on the first mapping condition.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Automatic accounting entry compiling method and system based on large language model
CN120013696A
Cross-system asset data account checking method, system and device and storage medium
CN120181244A