An automated accounting document generation apparatus and method

By building a metadata database and a view generator, the problems of existing technologies in accounting voucher generation being unable to quickly respond to business changes and support multiple data sources have been solved. This has enabled an automated and flexible voucher generation process, reducing system upgrade and maintenance costs.

CN115577054BActive Publication Date: 2026-02-10CHONGQING TRADING CO AGEL ECOMMERCE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211296524.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-21
Publication Date
2026-02-10
Estimated Expiration
2042-10-21

AI Technical Summary

Technical Problem

Existing accounting voucher generation methods cannot quickly respond to changes in business needs and cannot support multiple data sources, resulting in low efficiency and high maintenance costs.

Method used

By building a relational metadata database to manage the metadata of multiple heterogeneous data source tables, and using view sets and view generators to achieve data processing across heterogeneous data sources, the system upgrade requirements are reduced, and only business personnel need to configure it to generate vouchers.

Benefits of technology

It enables the automatic generation of vouchers without system upgrades when business data changes, improving generation efficiency and flexibility while reducing maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115577054B_ABST
    Figure CN115577054B_ABST
Patent Text Reader

Abstract

The application provides an automatic accounting document generation device and method. The device comprises a data source management module, a meta-database construction module, a view set construction module, a view generator, a document template configuration module and a document generation module. The data source management module constructs a meta-database to manage the metadata of a plurality of heterogeneous data source tables. The view set construction module constructs a view set for each business scenario, configures a view data source table for each view set, and defines a view field for each view. The view generator is used to write a view field acquisition program of the view and to obtain a view field data value. The document template configuration module sets a document template for each business scenario, configures a view set for each document template, and obtains a value of a document element through a view in the view set. The document generation module obtains a corresponding document template according to an input business type, and outputs an accounting document. In the case of flexible and changeable business data, the business data can be introduced into a corresponding data source table for document generation without system upgrade, and when the business requirement changes, the data source, the view and the document template only need to be configured accordingly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an automated accounting voucher generation device and method. Background Technology

[0002] Accounting vouchers are written documents that record economic transactions, clarify economic responsibilities, and are prepared in a certain format for use in accounting books. They are used to record the occurrence of economic transactions, clarify economic responsibilities, and serve as written evidence for bookkeeping.

[0003] In existing technologies, the business database prepares and stores the data needed to generate accounting vouchers in a wide table through manual modeling. Then, the voucher template generates accounting vouchers by selecting fields from the corresponding wide table in the business database and configuring the appropriate voucher generation rules. Specifically, this includes:

[0004] Step 1: Manually create the data model (wide table) required to configure the voucher template for the corresponding business. For example... Figure 1 The business database shown includes a business order table and a corresponding business order details table. A wide table is manually created, mapping fields from the business order and business order details tables to the wide table to meet the voucher template configuration requirements. After manually creating the business data wide table, the voucher template accesses the `order_for_voucher` wide table via a database connection and reads its fields (e.g., `store_id`) as a rule for generating a specific element in the voucher entry. For example, when the entry is configured as "store_id==10001", its summary will display as: "Store xxx".

[0005] Step 2: Configure the voucher template to access the data source in the business database, such as... Figure 2 As shown, the voucher template is assembled by reading fields from a wide table through a database connection.

[0006] Step 3: The business system calls the voucher template to generate accounting vouchers, such as... Figure 3 As shown, the business system inputs the business document number to the accounting platform. The accounting platform's voucher template filters out the corresponding data from the corresponding wide table in the business database by the business document number, and then generates accounting vouchers according to the voucher template generation rules.

[0007] While the existing methods for generating accounting vouchers can save some manpower, they still have the following problems:

[0008] 1. Inability to quickly respond to changing business needs. When new business needs arise, the business tables in the business database will change. This could be by creating a new table or by adding fields to an existing table. This process requires development teams to go from database modeling to writing code for business data transformation, and finally deploying the database to generate the corresponding data in the voucher data source table. Only then can business personnel adjust the voucher template based on the newly generated wide table. This process is time-consuming, requires collaboration from multiple roles, is inefficient, and has high maintenance costs.

[0009] 2. Inability to support multiple data sources (requirements for multiple business databases). In actual business scenarios, especially expense reimbursement scenarios, because forms are dynamic, relational databases are often not suitable for storage. In such cases, document-oriented databases, such as MongoDB or Elasticsearch, are added. For voucher templates, multiple heterogeneous data sources need to be combined for data processing during the voucher configuration and voucher generation stages, which is difficult to achieve with the above-mentioned accounting voucher generation methods. Summary of the Invention

[0010] The present invention aims to at least solve the technical problems existing in the prior art, so that when business data and requirements change, only business personnel need to make corresponding configurations, without software engineers needing to make corresponding code adjustments and system upgrades according to changes in business requirements, vouchers can be automatically generated. The present invention provides an automated accounting voucher generation device and method.

[0011] To achieve the above-mentioned objectives of the present invention, according to a first aspect of the present invention, an automated accounting voucher generation apparatus is provided, comprising: a data source management module for constructing a relational metadata database, wherein the metadata database is used to store and manage metadata of multiple heterogeneous data source tables; a view set construction module for constructing a view set containing multiple views for each business scenario, wherein each view corresponds to a sub-business scenario under the corresponding business scenario, and configuring a view data source table for each view set, wherein the view data source table includes metadata of at least one data source table in the metadata database, and each view defines at least one view field; and a view generator for inputting or writing a view field retrieval program for a view, and generating a view based on the view field retrieval program. The system queries data from the corresponding dataset in the view data source table based on filtering parameters, and retrieves the view field data values ​​based on the queried data. The voucher template configuration module sets a corresponding voucher template for each business scenario and configures a view set for each voucher template. The voucher template includes at least one voucher element, and the value of the voucher element is obtained through the view field of the view in the view set configured for the voucher template. The voucher generation interface is used to input the business type and filtering parameters. The voucher generation module obtains the corresponding voucher template based on the input business type, inputs the filtering parameters into the view generator, calls the view generator to obtain the view field data values ​​of the view in the voucher template configuration view set, and outputs the accounting voucher after obtaining the view field data values.

[0012] To achieve the above-mentioned objectives of the present invention, based on the same inventive concept, according to a second aspect of the present invention, the present invention provides an automated accounting voucher generation method, comprising: step S1, inputting a business type and filtering parameters; step S2, obtaining a corresponding voucher template according to the input business type, wherein the voucher template is configured with a view set, the view set includes multiple views, the view set is configured with a view data source table, the view data source table includes metadata of at least one data source table, the voucher template includes at least one voucher element, each voucher element is configured with a view in the view set, and the view defines at least one view field; step S3, inputting the filtering parameters into a view generator, calling the view generator to obtain the view field data values ​​of the views in the view set configured in the voucher template, and outputting an accounting voucher after obtaining the view field data values ​​in the voucher template.

[0013] The above technical solution: The data source management module abstracts and unifies the business data required for accounting voucher generation into a metadata database. Flexible configuration, such as external data source identification codes, allows complex and varied heterogeneous upper-level business data to be smoothly connected to the data source tables. This enables the import of business data into the corresponding data source tables for voucher generation without system upgrades or deployments, even when business data is flexible and constantly changing. The metadata database provides unified and centralized management of metadata from multiple heterogeneous data source tables. Views and view generators allow the imported data to flexibly meet the data requirements for accounting voucher generation without requiring system upgrades. In summary, this device can automatically generate vouchers from business data. When business data and requirements change, only business personnel need to configure the data source, views, and voucher templates accordingly; software engineers do not need to adjust code or upgrade the system based on changes in business requirements. By inputting or writing view field retrieval programs in the view generator, the view generator can generate views across heterogeneous data sources, offering flexibility, ease of modification for users, and no need for system software upgrades. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of the process of creating a wide table in the existing technology;

[0015] Figure 2 This is a schematic diagram illustrating the configuration of voucher templates for data sources in existing accounting platforms.

[0016] Figure 3 This is a schematic diagram of the accounting voucher generation process in the existing technology;

[0017] Figure 4 This is a schematic diagram of the structure of the automated accounting voucher generation device in Embodiment 1 of the present invention;

[0018] Figure 5 This is a schematic diagram of the overall process of voucher generation in an application scenario according to Embodiment 1 of the present invention;

[0019] Figure 6 This is the metadata database display interface in Embodiment 1 of the present invention;

[0020] Figure 7 This is a schematic diagram of external data source connection in Embodiment 1 of the present invention;

[0021] Figure 8 This is a schematic diagram of the view set setting in Embodiment 1 of the present invention;

[0022] Figure 9 This is a schematic diagram of the view setting and view generator in Embodiment 1 of the present invention;

[0023] Figure 10 This is a first schematic diagram of the voucher template configuration in Embodiment 1 of the present invention;

[0024] Figure 11 This is a second schematic diagram of the voucher template configuration in Embodiment 1 of the present invention;

[0025] Figure 12 This is a flowchart of Embodiment 2 of the present invention. Detailed Implementation

[0026] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0027] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0028] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0029] Example 1

[0030] This embodiment discloses an automated accounting voucher generation device, such as... Figure 4 As shown, it includes:

[0031] The data source management module constructs a relational metadata database, which stores and manages metadata from multiple heterogeneous data source tables. The metadata database preferably, but not limited to, uses a MySQL database. Preferably, the data source management module supports relational database data sources and document dataset data sources, with heterogeneous data source tables including data tables and documents. The data source management module supports reading data from data source tables in local schema-type relational databases, such as MySQL, and also supports reading data from local non-relational database data source tables, such as document-oriented databases. Customization of non-relational database data source tables is also supported. Figure 6 As shown, the custom data source table contains metadata such as table name, field names, field types, lengths, and uniqueness. The data source management module centrally manages the metadata of multiple heterogeneous data source tables.

[0032] Preferably, the metadata of the data source table includes the table name, field names, field types, lengths, and uniqueness. For example... Figure 6 As shown, after adding metadata for a custom data source table to the metadata database, if the custom data source table is a document, a document with the same name needs to be created in the document database to store the actual business data, thus linking the document database and the metadata database by name.

[0033] In a further preferred embodiment, the data source management module also manages the relationships between the various data source tables, such as associating the order source table with the corresponding order details table.

[0034] The view set construction module builds a corresponding view set containing multiple views for each business scenario. Each view corresponds to a sub-business scenario within that scenario. Each view set is configured with a view data source table, which includes metadata from at least one data source table in the metadata database. Each view defines at least one view field. Business scenarios include expense reimbursement scenarios and business sales scenarios. Expense reimbursement scenarios can further include sub-scenarios such as travel expense reimbursement and meal expense reimbursement, while business sales scenarios can include sub-scenarios such as order reimbursement and invoice reimbursement. Therefore, an expense reimbursement scenario corresponds to one view set, with the travel expense reimbursement and meal expense reimbursement sub-scenarios each corresponding to a view within that view set; similarly, a business sales scenario corresponds to one view set, with the order and invoice sub-scenarios each corresponding to a view within that view set.

[0035] like Figure 8 The diagram illustrates the view set construction process. It requires establishing a view set name and configuring a view data source table for the view set. This table contains metadata for at least one data source table. These associated data source tables constitute a dataset. Views within this view set can only retrieve data from this dataset to calculate view field values. In other words, the dataset contains the data source tables required by any view within the view set. These data source tables can be local tables managed by the data source management module or custom source tables. More preferably, the view set construction module sets a primary data source table in the view data source table of the view set and configures filtering parameters. For example... Figure 8 As shown, a data source table can be set as the master table using the "Set as Master Table" button. Operators can configure this as needed. Filtering parameters are... Figure 8The filtering conditions in the view set are preferably, but not limited to, business order number, receipt number, or order number. After setting the corresponding filtering conditions in the main table, the view generator can filter out business data rows that match the filtering parameters from numerous data rows in the dataset when generating accounting vouchers from the voucher template. The view generator reads the data from these business data rows to calculate the data values ​​for the view fields. The filtering conditions are defined when the view set is defined, where the data source table is set as the corresponding filtering condition in the main table. The input parameters are passed in key:value format, where the key corresponds to the table field name in the filtering condition. This allows the program to find the business data rows used to generate vouchers.

[0036] Figure 9 The image shows the view settings interface in the view set construction module. After setting the view number and view name, you also need to set the view fields. View fields are equivalent to the output variables of the view, and they include the view field number, name, and value description. For example... Figure 9 As shown, the view field name is Total Amount. A view is a virtual concept, different from a physical view in a traditional database. The voucher generation template can obtain the values ​​of the view fields by calling the configured view.

[0037] The view generator is used to input or write view field retrieval procedures for a view, and to query data from the corresponding dataset in the view data source table based on the filter parameters, and to obtain the view field data values ​​based on the queried data. Figure 9 The interface of the view generator is also shown. The view generator has a program input window. Preferably, in order to facilitate the direct running of the view generator when calling the view and to associate the view field acquisition program with the view without having to repeatedly enter the view field acquisition program, a view generator is embedded in each view.

[0038] like Figure 9As shown, in the program input window of the view generator, the view field retrieval program is entered or written. The view field retrieval program is preferably, but not limited to, a DLS language script. The purpose of the script is to use the scripting language to query the field data required by the corresponding view that matches the filtering parameters from the database of the view set, and return the data values ​​of the view fields to the caller according to the view definition. The caller is preferably, but not limited to, a voucher template. The view field data value calculation formulas or algorithms included in the view field retrieval program need to be set by staff according to the business scenario. When the view fields change, the user only needs to change the view field retrieval program; no system software upgrade or deployment is required, which is very convenient. Furthermore, by setting up a view generator, this invention can retrieve data matching the filtering parameters across databases, especially across heterogeneous databases, realizing cross-heterogeneous database view generation, such as cross-relational databases and document databases. This greatly simplifies the data retrieval process, enabling the accounting voucher generation stage to combine multiple heterogeneous data sources for data processing.

[0039] The voucher template configuration module sets up corresponding voucher templates for each business scenario and configures a view set for each voucher template. Each voucher template includes at least one voucher element. The value of the voucher element is obtained through view fields of views in the view set configured for the voucher template. For example, the value of a view field can be directly used as the value of the voucher element. Each voucher element can be obtained through one or more view fields of one or more views. There is a one-to-one correspondence between business scenarios and voucher templates, such as... Figure 10 The diagram shows a configuration illustration for a voucher template. When configuring a voucher template, it first specifies the view set used for its data source; there can only be one view set, such as... Figure 10 Select the repayment view set, and then use the specific view when configuring a specific voucher element. In the view details, select the MongoDB repayment table view, select the view fields, and configure the corresponding voucher element generation rules. The voucher element generation rules are set by the operator according to their own needs, which is existing technology and will not be described in detail here.

[0040] like Figure 11 As shown, the voucher template configuration module also sets the business type for the voucher template. The business type is set when the voucher template is defined, and it is set according to the specific business scenario of the enterprise. In this way, the program can locate the voucher template.

[0041] The voucher generation interface is used to input the business type and filtering parameters; preferably, the business type includes business scenario and sub-business scenario.

[0042] The voucher generation module obtains the corresponding voucher template based on the input business type, inputs the filter parameters into the view generator, calls the view generator to obtain the view field data values ​​of the view in the voucher template configuration view set, outputs the accounting voucher after the voucher template obtains the view field data values, assembles the view field data values, and generates the accounting voucher according to the pre-set voucher template generation rules.

[0043] In this embodiment, preferably, the automated accounting voucher generation device further includes an external data interface module, which interfaces the business data from external data sources into the data source table. Each external data source corresponds to at least one external data source identification code. The external data interface module interfaces the business data from the external data source into the data source table using the external data source identification code, distinguishing and interfaceing the external data into the corresponding table and fields. One data source table can interface with multiple external data sources through multiple external data source identification codes, ultimately forming business data.

[0044] In this embodiment, more preferably, the external data source identification code represents the set data mapping rule between the external data source and the data source table, such as... Figure 7 As shown, after entering the external data source identification code bx#10000000 in the external data integration module, the mapping rules between the external data source and the data in the data source table are displayed below. Each external data source identification code represents a mapping rule. When task requirements change, operators only need to modify the mapping rules of the external data source identification code, which is convenient and quick, without the need for system software upgrades.

[0045] In this embodiment, more preferably, a data source table connects to multiple external data sources through multiple external data source identifiers, enabling the data source table to obtain business data from multiple external data sources.

[0046] In one application scenario of this embodiment, the overall process of generating accounting vouchers is as follows: Figure 5 As shown, it includes:

[0047] Step 1: Data source definition. This mainly involves the data source management module managing the data source, which uniformly manages all available business data and serves as the data source for generating accounting vouchers.

[0048] Step 2: View sets and view definitions. View sets and views categorize and organize the data sources needed for various business scenarios, making it easier to generate vouchers and call them later.

[0049] Step 3: Voucher Template Configuration. This involves configuring the voucher template view set and view, thus establishing the connection between the voucher template and the data source.

[0050] Step 4: Call the voucher generation interface, passing in the business type and filter parameters. Locate the corresponding voucher template based on the business type, select the corresponding data row fields based on the filter parameters, and generate the accounting voucher by calculating the view field data values ​​based on the obtained data row fields.

[0051] The automated accounting voucher generation device disclosed in this embodiment can be integrated into an accounting platform. The accounting platform is connected and communicates with the business system and the business database respectively. When it is necessary to generate accounting vouchers, the business system can pass in the business type and filtering parameters through the voucher generation interface. The automated accounting voucher generation device on the accounting platform retrieves data rows from the business database and generates accounting vouchers.

[0052] Example 2

[0053] This embodiment discloses an automated accounting voucher generation method. This embodiment can be run based on the device provided in Embodiment 1, such as... Figure 12 As shown, it includes:

[0054] Step S1: Input the business type and filter parameters.

[0055] Step S2: Obtain the corresponding voucher template according to the input business type. The voucher template is configured with a view set, which includes multiple views. The view set is configured with a view data source table, which includes metadata of at least one data source table. The voucher template includes at least one voucher element. Each voucher element is configured with a view in the view set, and the view definition has at least one view field.

[0056] Step S3: Input the filter parameters into the view generator, call the view generator to obtain the view field data values ​​of the view in the voucher template configuration view set, and output the accounting voucher after obtaining the view field data values. The view generator is used to input or write the view field retrieval program for the view, and to query data from the corresponding dataset of the view data source table based on the filter parameters according to the view field retrieval program, and to obtain the view field data values ​​based on the queried data.

[0057] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. An automated accounting voucher generation device, characterized in that, include: The data source management module constructs a relational metadata database, which is used to store and manage metadata of multiple heterogeneous data source tables. The view set construction module builds a view set containing multiple views for each business scenario. Each view corresponds to a sub-business scenario under the business scenario. The module configures a view data source table for each view set. The view data source table includes metadata from at least one data source table in the metadata database. Each view defines at least one view field. The view generator is used to input or write view field retrieval procedures for a view, and to query data from the corresponding dataset in the view data source table based on the filter parameters, and to obtain the view field data values ​​based on the queried data. The voucher template configuration module sets a corresponding voucher template for each business scenario and configures a view set for each voucher template. The voucher template includes at least one voucher element, and the value of the voucher element is obtained through the view field of the view in the view set configured for the voucher template. The voucher generation interface is used to input the business type and filter parameters; The voucher generation module retrieves the corresponding voucher template based on the input business type, inputs the filter parameters into the view generator, calls the view generator to retrieve the view field data values ​​of the view in the voucher template configuration view set, and outputs the accounting voucher after the voucher template retrieves the view field data values.

2. The automated accounting voucher generation device as described in claim 1, characterized in that, It also includes an external data interface module, which connects the business data from the external data source to the data source table.

3. The automated accounting voucher generation device as described in claim 2, characterized in that, Each external data source corresponds to at least one external data source identification code. The external data docking module connects the business data of the external data source to the data source table through the external data source identification code. The external data source identification code represents the set data mapping rules between the external data source and the data source table.

4. The automated accounting voucher generation device as described in claim 3, characterized in that, A data source table connects to multiple external data sources through multiple external data source identifiers.

5. The automated accounting voucher generation device as described in any one of claims 1-4, characterized in that, The view set construction module sets a data source table as the main table in the view data source table of the view set and configures filtering parameters.

6. The automated accounting voucher generation device as described in claim 5, characterized in that, The data source table includes data tables and documents.

7. The automated accounting voucher generation device as described in claim 1, 2, 3, 4, or 6, characterized in that, The metadata of the data source table includes the table name, field names, field types, lengths, and uniqueness.

8. The automated accounting voucher generation device as described in claim 1, 2, 3, 4, or 6, characterized in that, The business types include business scenarios and sub-business scenarios.

9. The automated accounting voucher generation device as described in claim 1, 2, 3, 4, or 6, characterized in that, The filtering parameter is the business order number or order number.

10. An automated accounting voucher generation method, characterized in that, include: Step S1: Input the business type and filter parameters; Step S2: Obtain the corresponding voucher template according to the input business type. The voucher template is configured with a view set, which includes multiple views. The view set is configured with a view data source table, which includes metadata of at least one data source table. The voucher template includes at least one voucher element. Each voucher element is configured with a view in the view set, and the view defines at least one view field. Step S3: Input the filter parameters into the view generator, call the view generator to obtain the view field data values ​​of the view in the voucher template configuration view set, and output the accounting voucher after the voucher template obtains the view field data values.

Citation Information

Patent Citations

  • Method and device for generating accounting document based on SAP system

    CN110570291A

  • Financial cloud platform accounting voucher configuration method

    CN110782330A