Certificate file generation method and device, electronic equipment and computer readable medium

CN118012829BActive Publication Date: 2026-10-30MULTIPOINT LIFE (CHENGDU) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410244036.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-04
Publication Date
2026-10-30
Estimated Expiration
2044-03-04

AI Technical Summary

Technical Problem

使用POI技术解析文本文件导致了计算机存储资源的浪费

Benefits of technology

[0014]本公开的上述各个实施例具有如下有益效果:通过本公开的一些实施例的凭证文件生成方法,减少了计算机算力资源的浪费。具体来说,造成了计算机算力资源的浪费的原因在于:采用逐一定制化代码开发的方式生成凭证文件,需要编写编译代码来处理凭证文件与预设应用的兼容性问题。在生成凭证文件时,需要更多的计算资源来编译、构建和测试的上述编译代码,造成了计算机算力资源的浪费。基于此,本公开的一些实施例的凭证文件生成方法,首先,响应于检测到作用于凭证文件生成界面中的凭证模版文件上传控件,在上述凭证模版文件上传控件的第一预设位置显示文件选择上传框,以供用户从本地预设文件夹中上传与预设目标应用兼容的预设凭证模版文件,其中,上述凭证文件生成界面包括:凭证模版名称显示框、各个凭证模版属性信息输入框。由此,可以通过界面交互选择上传用于生成凭证文件且与预设目标应用兼容的预设凭证模版文件。然后,将上述文件选择上传框中用户选择的预设凭证模版文件的文件名作为凭证模版名称显示在上述凭证模版名称显示框中。由此,可以显示凭证模版名称。接着,响应于检测到作用于上述各个凭证模版属性信息输入框的输入操作,将对应上述各个凭证模版属性信息输入框的各个输入信息与上述凭证模版名称显示框中的凭证模版名称确定为凭证模版属性信息,其中,上述各个输入信息包括以下至少一项:表头行号、编码类型、换行符。由此,可以通过界面交互得到用于对预设凭证模版文件进行解析的凭证模版属性信息。将上述凭证模版属性信息与上述预设凭证模版文件上传至预设服务器,以供上述预设服务器对上述预设凭证模版文件进行解析,其中,上述预设凭证模版文件是以文件流的方式上传至上述预设服务器。由此,可以对预设凭证模版文件进行解析。响应于从上述预设服务器接收到对应上述预设凭证模版文件的凭证模版解析信息,根据上述凭证模版解析信息,执行凭证数据配置处理,以生成凭证数据配置信息集。由此,可以得到用于生成凭证文件的凭证数据配置信息集。从预设数据库获取凭证信息集,其中,上述凭证信息集中的凭证信息包括各个字段值信息。由此,可以得到表征价值流转信息的凭证信息。根据上述凭证数据配置信息集、上述凭证信息集与上述预设凭证模版文件,执行映射填充处理,以生成凭证文件。由此,可以生成凭证文件。也因为采用界面交互选择上传用于生成凭证文件且与预设目标应用兼容的预设凭证模版文件。在与预设目标应用兼容的预设凭证模版文件基础上,根据所获取到的凭证信息集,生成了凭证文件。不需要生成与执行处理凭证文件与预设应用之间兼容性问题的编译代码,减少了计算机算力资源的浪费。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118012829B_ABST
    Figure CN118012829B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a credential file generation method and device, electronic equipment and a computer readable medium. A specific implementation of the method comprises: displaying a file selection upload box at a first preset position of an upload control of a credential template file; displaying the file name of a preset credential template file selected by a user in the file selection upload box as a credential template name in a credential template name display box; determining each input information corresponding to each credential template attribute information input box and the credential template name in the credential template name display box as the credential template attribute information; uploading the credential template attribute information and the preset credential template file to a preset server for the preset server to analyze the preset credential template file; performing a credential data configuration process to generate a set of credential data configuration information; obtaining a set of credential information from a preset database; and performing a mapping filling process to generate a credential file. The implementation reduces the waste of computer computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to the field of computer technology, and more specifically to credential document generation methods, apparatus, electronic devices, and computer-readable media. Background Technology

[0002] With the continuous development of computer technology, automated processing and data processing capabilities have been greatly improved. The development of computers has provided a more efficient, accurate, and reliable method for generating voucher documents. Voucher documents are files that record information about the flow of value (financial data, financial transaction information). Currently, the common method for generating voucher documents is to develop customized code one by one based on preset customization requirements (e.g., voucher data format requirements, compatibility requirements between the voucher document and preset financial applications) and voucher data (accounting data).

[0003] However, when generating voucher files using the above method, the following technical problems often arise:

[0004] First, generating voucher files using a step-by-step, customized code development approach requires writing compiled code to handle compatibility issues between the voucher files and pre-defined applications. This process demands significant computing resources for compiling, building, and testing the aforementioned compiled code, resulting in a waste of computer resources.

[0005] However, in practice, it has been found that due to the different file types of the preset voucher template files, the following technical problems further exist when using POI technology to parse the preset voucher template files:

[0006] Secondly, pre-set voucher template files are typically divided into two types (spreadsheet files and text files). While POI technology is suitable for parsing spreadsheet files, compatibility issues may lead to lower accuracy in parsing text files. Furthermore, POI technology requires loading the file content into memory for processing, whereas plain text files contain less data and can be read and processed directly. Therefore, using POI technology to parse text files results in a waste of computer storage resources.

[0007] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0008] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0009] Some embodiments of this disclosure provide credential document generation methods, apparatuses, electronic devices, and computer-readable media to address one or more of the technical problems mentioned in the background section above.

[0010] In a first aspect, some embodiments of this disclosure provide a method for generating a voucher file. The method includes: in response to detecting a voucher template file upload control applied to a voucher file generation interface, displaying a file selection upload box at a first preset position of the voucher template file upload control, allowing a user to upload a preset voucher template file compatible with a preset target application from a local preset folder. The voucher file generation interface includes: a voucher template name display box and various voucher template attribute information input boxes; displaying the filename of the preset voucher template file selected by the user in the file selection upload box as the voucher template name in the voucher template name display box; in response to detecting an input operation applied to the various voucher template attribute information input boxes, confirming the input information corresponding to each of the various voucher template attribute information input boxes with the voucher template name in the voucher template name display box. The following steps are taken: Define the voucher template attribute information, wherein each of the above input information includes at least one of the following: header row number, encoding type, and newline character; upload the voucher template attribute information and the above preset voucher template file to a preset server for the preset server to parse the preset voucher template file, wherein the preset voucher template file is uploaded to the preset server as a file stream; in response to receiving voucher template parsing information corresponding to the preset voucher template file from the preset server, perform voucher data configuration processing based on the voucher template parsing information to generate a voucher data configuration information set; retrieve a voucher information set from a preset database, wherein the voucher information in the voucher information set includes the value information of each field; and perform mapping and filling processing based on the voucher data configuration information set, the voucher information set, and the above preset voucher template file to generate a voucher file.

[0011] Secondly, some embodiments of this disclosure provide a voucher document generation apparatus, comprising: a first display unit configured to, in response to detecting a voucher template file upload control applied to a voucher document generation interface, display a file selection upload box at a first preset position of the voucher template file upload control, for users to upload preset voucher template files compatible with preset target applications from a local preset folder, wherein the voucher document generation interface includes: a voucher template name display box and various voucher template attribute information input boxes; a second display unit configured to display the filename of the preset voucher template file selected by the user in the file selection upload box as the voucher template name in the voucher template name display box; and a determining unit configured to, in response to detecting an input operation applied to the various voucher template attribute information input boxes, determine the input information corresponding to each of the various voucher template attribute information input boxes and the voucher template name in the voucher template name display box as the voucher template name. The document contains several input information sets, including: document attribute information, input information, and a newline character; an upload unit configured to upload the document attribute information and the preset document template file to a preset server for parsing, wherein the preset document template file is uploaded to the preset server as a file stream; a first execution unit configured to, in response to receiving document template parsing information corresponding to the preset document template file from the preset server, perform document data configuration processing based on the document template parsing information to generate a document data configuration information set; an acquisition unit configured to acquire a document information set from a preset database, wherein the document information in the document information set includes the value information of each field; and a second execution unit configured to, based on the document data configuration information set, the document information set, and the preset document template file, perform mapping and filling processing to generate a document file.

[0012] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0013] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0014] The above embodiments of this disclosure have the following beneficial effects: the certificate file generation method of some embodiments of this disclosure reduces the waste of computer computing resources. Specifically, the waste of computer computing resources is caused by the fact that generating certificate files by developing customized code one by one requires writing compiled code to handle the compatibility issues between the certificate files and the preset application. When generating certificate files, more computing resources are needed to compile, build, and test the compiled code, resulting in a waste of computer computing resources. Based on this, the certificate file generation method of some embodiments of this disclosure firstly, in response to detecting the certificate template file upload control acting on the certificate file generation interface, displays a file selection upload box at a first preset position of the certificate template file upload control, so that the user can upload a preset certificate template file compatible with the preset target application from a local preset folder. The certificate file generation interface includes: a certificate template name display box and various certificate template attribute information input boxes. Thus, the user can select and upload a preset certificate template file compatible with the preset target application for generating certificate files through interface interaction. Then, the file name of the preset certificate template file selected by the user in the file selection upload box is displayed as the certificate template name in the certificate template name display box. Therefore, the voucher template name can be displayed. Next, in response to detecting input operations applied to the aforementioned voucher template attribute information input boxes, the input information corresponding to each of the aforementioned voucher template attribute information input boxes and the voucher template name in the aforementioned voucher template name display box are determined as voucher template attribute information. The aforementioned input information includes at least one of the following: header row number, encoding type, and newline character. Therefore, voucher template attribute information used for parsing the preset voucher template file can be obtained through interface interaction. The aforementioned voucher template attribute information and the aforementioned preset voucher template file are uploaded to a preset server for the preset server to parse the aforementioned preset voucher template file. The aforementioned preset voucher template file is uploaded to the preset server as a file stream. Therefore, the preset voucher template file can be parsed. In response to receiving voucher template parsing information corresponding to the aforementioned preset voucher template file from the preset server, voucher data configuration processing is performed based on the aforementioned voucher template parsing information to generate a voucher data configuration information set. Therefore, a voucher data configuration information set used to generate voucher files can be obtained. A voucher information set is retrieved from a preset database, where the voucher information includes the values ​​of various fields. This yields voucher information representing value transfer information. Based on the voucher data configuration information set, the voucher information set, and the preset voucher template file, a mapping and filling process is performed to generate a voucher file. This allows for the generation of a voucher file. Furthermore, an interactive interface is used to select and upload a preset voucher template file compatible with the target application for voucher file generation.Based on a pre-defined voucher template file compatible with the target application, a voucher file is generated according to the acquired voucher information set. This eliminates the need to generate and execute compiled code to handle compatibility issues between the voucher file and the pre-defined application, reducing the waste of computing resources. Attached Figure Description

[0015] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0016] Figure 1 This is a flowchart of some embodiments of the certificate document generation method according to this disclosure;

[0017] Figure 2 This is a schematic diagram of a voucher file generation interface according to some embodiments of the voucher file generation method of this disclosure;

[0018] Figure 3 This is a schematic diagram of the initial credential data configuration page according to some embodiments of the credential file generation method of this disclosure;

[0019] Figure 4 This is a schematic diagram of a voucher data configuration page according to some embodiments of the voucher file generation method of this disclosure;

[0020] Figure 5 This is a schematic diagram of the structure of some embodiments of the credential document generation apparatus according to the present disclosure;

[0021] Figure 6 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0022] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0023] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0024] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0025] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0026] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0027] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0028] Figure 1 A flow 100 of some embodiments of a credential file generation method according to the present disclosure is shown. The credential file generation method includes the following steps:

[0029] Step 101: In response to detecting the voucher template file upload control applied to the voucher file generation interface, a file selection upload box is displayed at the first preset position of the voucher template file upload control, so that the user can upload a preset voucher template file compatible with the preset target application from a local preset folder.

[0030] In some embodiments, the executing entity of the voucher file generation method (e.g., a computing device) may, in response to detecting a voucher template file upload control acting on the voucher file generation interface, display a file selection upload box at a first preset position of the voucher template file upload control, allowing the user to upload a preset voucher template file compatible with a preset target application from a local preset folder. The voucher file generation interface includes: a voucher template name display box and input boxes for various voucher template attribute information. The voucher file generation interface can be a page for generating voucher files. The voucher file can be a file used to record value transfer information (financial data, financial transaction information). The voucher template file upload control can be an interactive element for uploading a preset voucher template file compatible with a preset target application. The preset voucher template file can be a file representing a voucher template. The interactive element can be a file selection button. The preset target application can be an application for processing value transfer information. The value transfer information can be voucher information corresponding to the transfer of goods. The file selection upload box can be an interactive element for uploading the preset voucher template file. The user can be a person managing voucher information. The aforementioned local preset folder can be a folder used to store preset voucher template files. The aforementioned voucher template name display box is an interactive element used to display the filename of the uploaded preset voucher template file. The aforementioned voucher template attribute information input boxes are interactive elements used to input template attribute information. The aforementioned template attribute information can represent the attributes of the aforementioned preset voucher template file. The aforementioned template attribute information may include, but is not limited to, one of the following: header row number, encoding type, and newline character. The aforementioned header row number can be the row number where the header is located.

[0031] As an example, the displayed certificate file generation interface can be referenced. Figure 2 . Figure 2 The interface displays the voucher file generation interface 201, the voucher template file upload control 202, the file selection upload box 203, the voucher template attribute information input box 204, and the voucher template name display box 205.

[0032] Step 102: Display the filename of the preset voucher template file selected by the user in the file selection upload box as the voucher template name in the voucher template name display box.

[0033] In some embodiments, the execution entity may display the filename of the preset voucher template file selected by the user in the file selection upload box in the voucher template name display box.

[0034] Step 103: In response to the detection of input operations applied to each voucher template attribute information input box, determine each input information corresponding to each voucher template attribute information input box and the voucher template name in the voucher template name display box as voucher template attribute information.

[0035] In some embodiments, the execution entity may, in response to detecting an input operation performed on each of the voucher template attribute information input boxes, determine the input information corresponding to each of the voucher template attribute information input boxes and the voucher template name in the voucher template name display box as voucher template attribute information. The input information includes at least one of the following: header row number, encoding type, and newline character.

[0036] Step 104: Upload the voucher template attribute information and the preset voucher template file to the preset server so that the preset server can parse the preset voucher template file.

[0037] In some embodiments, the executing entity may upload the aforementioned credential template attribute information and the aforementioned preset credential template file to a preset server for the preset server to parse the preset credential template file. The preset credential template file is uploaded to the preset server as a file stream.

[0038] Step 105: In response to receiving voucher template parsing information for the corresponding preset voucher template file from the preset server, voucher data configuration processing is performed based on the voucher template parsing information to generate a voucher data configuration information set.

[0039] In some embodiments, the execution entity may, in response to receiving voucher template parsing information corresponding to the preset voucher template file from the preset server, perform voucher data configuration processing based on the voucher template parsing information to generate a voucher data configuration information set. The voucher template parsing information may be information obtained by the server parsing the preset voucher template file.

[0040] In some optional implementations of certain embodiments, the aforementioned credential template parsing information is generated through the following steps:

[0041] The first step is to read the voucher template data information corresponding to the preset voucher template file based on the aforementioned voucher template attribute information and the aforementioned file stream. This voucher template data information includes each line of data. In practice, firstly, the preset server can determine the encoding type in the aforementioned voucher template attribute information as the target encoding type. Then, the preset server can execute preset conversion code to convert the aforementioned file stream into a character sequence corresponding to the aforementioned target encoding type. Next, the preset server can determine the newline character in the aforementioned voucher template attribute information as the target newline character. Finally, the preset server can segment the aforementioned character sequence based on the newline character to obtain each line of data. The preset conversion code can be programming language code that converts the aforementioned file stream into a character sequence.

[0042] The second step is to determine the file extension in the above voucher template name as the target file extension.

[0043] Third, in response to determining that the target file suffix is ​​the same as one of the first preset suffixes in the first preset suffix set, the following table file parsing steps are performed on the above voucher template data information:

[0044] The first sub-step, in response to determining that the header row number in the above voucher template attribute information is a preset threshold, executes the following steps:

[0045] Sub-step one involves determining each row of data in the aforementioned voucher template data information as the initial target row dataset. The aforementioned first preset suffix set may include, but is not limited to, at least one of the following: .xls, .xlsx. The aforementioned preset threshold can be 1.

[0046] Sub-step two involves determining the row data corresponding to the header row number in the aforementioned voucher template data as the header row data. This header row data includes column names. Each column name can be text describing the data type or meaning represented by each column in the spreadsheet.

[0047] Sub-step three involves defining the initial target row data (excluding the header row data) as the target row dataset. The target row data in this dataset includes at least one of the following: field information and a field identifier corresponding to that field information. The field information can represent the name of a column in a spreadsheet. For example, the field information can be, but is not limited to, one of the following: date, voucher name, voucher number, or summary. The field identifier can indicate the purpose of the field information. As an example, the field information could be "date". The field identifier corresponding to "date" could be "voucher header".

[0048] Sub-step four: Determine the above header row data and the above target row dataset as the voucher template parsing information.

[0049] Fourth step: In response to determining that the target file extension is the same as one of the second preset extensions in the second preset extension set, the following text file parsing steps are performed:

[0050] The first sub-step involves determining the encoding type in the aforementioned voucher template attribute information as the target encoding type. The aforementioned second preset suffix set may include, but is not limited to, at least one of the following: .txt, .csv.

[0051] The second sub-step involves determining the decoder corresponding to the aforementioned target encoding type as the target decoder. This decoder can be an application that restores information from its encoded form to its original form. For example, the target encoding type can be UTF-8. Therefore, the decoder corresponding to the aforementioned UTF-8 encoding type can be a UTF-8 decoder.

[0052] The third sub-step involves inputting the aforementioned file stream into the target decoder to obtain a character stream.

[0053] The fourth sub-step is to determine the newline character in the above-mentioned voucher template attribute information as the target newline character.

[0054] The fifth sub-step involves segmenting the character stream based on the target newline character to obtain individual lines of data. In practice, the execution entity can segment the character stream using the target newline character as the delimiter to obtain individual lines of data. For example, the character stream could be "A,1,B,2,C,3\nD,4,E,5,F,6\n". The target newline character could be "\n". Therefore, the resulting lines of data could be "{A,1,B,2,C,3}, {D,4,E,5,F,6}".

[0055] The sixth sub-step involves identifying the rows of data corresponding to the header row numbers from the aforementioned rows as the header row data. This header row data includes the column names.

[0056] The seventh sub-step involves identifying all rows of data except the header row from the aforementioned rows of data as the target row dataset. The target row data in the target row dataset includes at least one of the following: field information and field identifiers corresponding to the aforementioned field information.

[0057] The eighth sub-step involves determining the aforementioned header row data and the aforementioned target row dataset as voucher template parsing information.

[0058] The above technical solution and its related content, as an inventive point of this disclosure, solve the second technical problem mentioned in the background: "Since preset voucher template files are usually divided into two types (spreadsheet file type and text file type), and POI technology is suitable for parsing spreadsheet file types, when parsing text files, compatibility issues may lead to lower accuracy of the parsed information. At the same time, POI technology needs to load the file content into memory for processing, while plain text files have less content and can be directly read and processed. Using POI technology to parse text files leads to a waste of computer storage resources." The factors leading to lower parsing accuracy are often as follows: Since preset voucher template files are usually divided into two types (spreadsheet file type and text file type), and POI technology is suitable for parsing spreadsheet file types, when parsing text files, compatibility issues may lead to lower accuracy of the parsed information. At the same time, POI technology needs to load the file content into memory for processing, while plain text files have less content and can be directly read and processed. Using POI technology to parse text files leads to a waste of computer storage resources. Solving these factors can improve the accuracy of parsed information and reduce the waste of computer storage resources. To achieve this effect, this disclosure employs the following steps: First, based on the aforementioned voucher template attribute information and the aforementioned file stream, voucher template data information corresponding to the aforementioned preset voucher template file is read, wherein the aforementioned voucher template data information includes: each row of data. Thus, voucher template data information for parsing the aforementioned preset voucher template file can be obtained. Next, the file extension in the aforementioned voucher template name is determined as the target file extension. Thus, the target file extension for determining the parsing method can be obtained. Next, in response to determining that the aforementioned target file extension is the same as a first preset extension in the first preset extension set, the following table file parsing steps are performed on the aforementioned voucher template data information: First sub-step, in response to determining that the header row number in the aforementioned voucher template attribute information is a preset threshold, the following steps are performed: Sub-step one, each row of data in the aforementioned voucher template data information is determined as the initial target row dataset. Sub-step two, the row data corresponding to the aforementioned header row number in the aforementioned voucher template data information is determined as header row data, wherein the aforementioned header row data includes each column name. Therefore, the header row data used to generate voucher template parsing information can be obtained. Sub-step three: All initial target row data in the above initial target row dataset, excluding the header row data, are determined as the target row dataset. The target row data in the above target row dataset includes at least one of the following: field information and field identifiers corresponding to the above field information. Therefore, the target row dataset corresponding to the above preset voucher template file can be obtained. Sub-step four: The above header row data and the above target row dataset are determined as the voucher template parsing information.Therefore, voucher template parsing information, including header row data and the target row dataset, corresponding to the preset voucher template file, can be obtained. In the above table file parsing step, the file content is not loaded into memory before parsing, reducing the waste of computer storage resources. Next, in response to determining that the target file suffix is ​​the same as one of the second preset suffixes in the second preset suffix set, the following text file parsing steps are performed: First sub-step: the encoding type in the above voucher template attribute information is determined as the target encoding type. This determines the encoding type corresponding to the file stream. Second sub-step: the decoder corresponding to the above target encoding type is determined as the target decoder. This provides the target decoder for decoding the file stream. Third sub-step: the above file stream is input to the target decoder to obtain a character stream. This provides the character stream representing the text information within the preset voucher template file. Fourth sub-step: the newline character in the above voucher template attribute information is determined as the target newline character. This provides the target newline character for segmenting the above character stream to obtain the individual rows of data. The fifth sub-step involves segmenting the character stream based on the target newline character to obtain individual line data. This yields the individual line data included in the text information of the preset voucher template file. The sixth sub-step identifies the line data corresponding to the header row number as the header row data, which includes column names. The seventh sub-step identifies the remaining line data (excluding the header row data) as the target row dataset, which includes at least one of the following: field information and a field identifier corresponding to the field information. Finally, the header row data and the target row dataset are used to determine the voucher template parsing information. This yields the voucher template parsing information. Because the file extension in the voucher template name is determined before parsing the information corresponding to the preset voucher template file, and parsing steps corresponding to the filename extension (table file parsing, text file parsing) are used, inaccuracies in parsing information due to compatibility issues are reduced, improving parsing accuracy. At the same time, neither the table file parsing step nor the text file parsing step mentioned above loads the file content into memory before parsing, thus reducing the waste of computer storage resources.

[0059] In some optional implementations of certain embodiments, the execution entity may, in response to receiving voucher template parsing information corresponding to the preset voucher template file from the preset server, perform voucher data configuration processing based on the voucher template parsing information to generate a voucher data configuration information set:

[0060] The first step involves displaying an initial voucher data configuration page in response to receiving voucher template parsing information corresponding to the aforementioned preset voucher template file from the preset server. This initial voucher data configuration page includes various initial horizontal lists, corresponding mapping field input boxes, and corresponding field type conversion rule selection controls. The initial voucher data configuration page can be used to configure mapping fields and select field type conversion rules. Each initial horizontal list corresponds to a corresponding mapping field input box in the mapping field input boxes. Each initial horizontal list corresponds to a corresponding field type conversion rule selection control in the field type conversion rule selection controls. The initial horizontal lists can be horizontal lists that are not yet filled with voucher template parsing information. The mapping field input boxes can be interactive elements for inputting mapping field values. Mapped field values ​​can be characters. The field type conversion rule selection controls in the field type conversion rule selection controls can be interactive elements for configuring field value type conversion rule information in the voucher information. The field type conversion rule information can represent rules for converting a data field from one data type to another. For example, the field value type conversion rule information can be "to data".

[0061] As an example, the initial voucher data configuration page shown can be referenced. Figure 3 . Figure 3 The document displays the initial voucher data configuration page 301, the initial horizontal list 302, the mapping field input box 303, and the field type conversion rule selection control 304.

[0062] The second step involves updating each initial horizontal list in the initial voucher data configuration page based on the voucher template parsing information. This updates the initial voucher data configuration page, resulting in the final voucher data configuration page. In practice, the executing entity first updates each initial horizontal list in the initial voucher data configuration page. Then, the executing entity determines the updated initial voucher data configuration page as the final voucher data configuration page.

[0063] As an example, the initial voucher data configuration page shown can be referenced. Figure 4 . Figure 4 The document displays the voucher data configuration page 401.

[0064] The third step is to determine the information in each initial horizontal list in the above voucher data configuration page as the information in each horizontal list.

[0065] Fourth, in response to the detection of input operations applied to the aforementioned mapping field input boxes, the input information corresponding to each of the aforementioned mapping field input boxes is determined as the mapping field input information. Specifically, one of the mapping field input information corresponds to one of the horizontal list information in each of the aforementioned horizontal list information.

[0066] Fifth, in response to detecting a selection operation applied to at least one of the field type conversion rule selection controls, the information corresponding to at least one of the selection operations is determined as at least one conversion rule information. The at least one conversion rule information corresponds to one of the horizontal list information in each of the horizontal list information.

[0067] Step 6: Generate a voucher data configuration information set based on the input information of each of the above mapping fields, at least one of the above conversion rule information, and each of the above horizontal list information.

[0068] In some optional implementations of certain embodiments, the aforementioned execution entity may update each initial horizontal list in the initial voucher data configuration page according to the aforementioned voucher template parsing information through the following steps:

[0069] The first step is to determine the target initial horizontal list as the initial horizontal list that corresponds to the preset position in the initial voucher data configuration page among the above initial horizontal lists.

[0070] The second step is to fill the header row data from the parsed voucher template information into the target initial horizontal list of each initial horizontal list to update the initial horizontal list.

[0071] The third step involves filling the target row dataset from the parsed voucher template information into each of the initial horizontal lists except for the target initial horizontal list, thereby updating the initial horizontal lists. Specifically, one target row in the target row dataset corresponds to one initial horizontal list in each of the initial horizontal lists except for the target initial horizontal list.

[0072] In some optional implementations of certain embodiments, the aforementioned execution entity can generate a voucher data configuration information set by following these steps: based on the input information of each of the aforementioned mapping fields, the aforementioned at least one conversion rule information, and the aforementioned horizontal list information.

[0073] The first step is to perform the following steps for each of the horizontal list items mentioned above:

[0074] Sub-step one: Determine the target mapping field value from the mapping field input information that corresponds to the horizontal list information in the above mapping field input information.

[0075] Sub-step two: In response to determining that there is transformation rule information corresponding to the horizontal list information in at least one of the above transformation rule information, the following steps are performed:

[0076] The first sub-step is to determine the conversion rule information corresponding to the above horizontal list information as the target conversion rule information.

[0077] The second sub-step involves determining the aforementioned horizontal list information, the aforementioned target mapping field values, and the aforementioned target conversion rule information as the voucher data configuration information.

[0078] Sub-step three: In response to determining that there is no conversion rule information corresponding to the horizontal list information in at least one of the above conversion rule information, the horizontal list information and the target mapping field value are determined as voucher data configuration information.

[0079] The second step is to define the determined configuration information of each voucher data as a voucher data configuration information set.

[0080] Step 106: Obtain the voucher information set from the preset database.

[0081] In some embodiments, the aforementioned executing entity may obtain a voucher information set from a preset database. The voucher information set includes various field value information. The preset database may be a MySQL database. The voucher information in the voucher information set may represent value transfer information (financial data, financial transaction information). The field value information in the various field value information may represent field values. For example, the voucher information may be "Voucher No.: 20240112, Voucher Date: 2024-01-12, Summary: POS Outflow, Account: Accounts Receivable 1000 Yuan". The field value information may be "Voucher No.: 20240112". The field value corresponding to the above field value information may be 20240112.

[0082] Step 107: Based on the voucher data configuration information set, voucher information set and preset voucher template file, perform mapping and filling processing to generate voucher files.

[0083] In some embodiments, the aforementioned execution entity may perform mapping and filling processing based on the aforementioned voucher data configuration information set, the aforementioned voucher information set, and the aforementioned preset voucher template file to generate a voucher file.

[0084] In some optional implementations of certain embodiments, the aforementioned execution entity can proceed through the following steps:

[0085] The first step is to perform the following mapping and filling process for each voucher in the above voucher information set:

[0086] The first sub-step involves converting the field values ​​in the aforementioned voucher information into programming object information. The programming object information includes at least one of the following: field values ​​and attribute values. In practice, the executing entity can convert the field values ​​into programming object information by executing preset code. This preset code can be programming language code that converts the field values ​​into programming object information. The programming object information can represent objects in a programming language. For example, it can represent Java objects.

[0087] The second sub-step involves determining the target mapping field value in each voucher data configuration information within the aforementioned voucher data configuration information set, thereby obtaining the target mapping field value set.

[0088] The third sub-step involves identifying the target mapping field values ​​in the aforementioned target mapping field value set that are equal to the attribute values ​​included in the aforementioned programming object information as the respective matching target mapping field values. Specifically, one of the aforementioned matching target mapping field values ​​corresponds to one corresponding programming object information within the aforementioned programming object information.

[0089] The fourth sub-step involves generating a table to be filled based on the target row dataset in the voucher template parsing information corresponding to the aforementioned preset voucher template file. In practice, firstly, the executing entity can determine the target row dataset in the aforementioned voucher template parsing information. For each target row data in the aforementioned target row dataset, the executing entity can determine the name of the column corresponding to the aforementioned field information in the preset table to be filled. Then, the executing entity can fill the first cell from top to bottom of the aforementioned column in the preset table to be filled with the aforementioned field information as the column name to update the preset table to be filled. Finally, the executing entity can determine the updated preset table to be filled as the table to be filled.

[0090] The fifth sub-step involves performing the following population steps for each of the above programming object information:

[0091] Sub-step one: Based on the matching target mapping field value corresponding to the above-mentioned programming object information, determine the cells in the table to be filled that correspond to the above-mentioned programming object information. In practice, firstly, the executing entity can determine the similarity between the matching target mapping field value and each column name in the table to be filled as each target similarity. Then, the executing entity can determine the column corresponding to the target similarity with the highest similarity among the target similarities as the column to be filled. Next, the executing entity can traverse the cells in the column to be filled from top to bottom and determine the first empty cell found as the cell to be filled.

[0092] Sub-step two: Determine the target voucher data configuration information as the voucher data configuration information that matches the value of the target mapping field in the voucher data configuration information set.

[0093] Sub-step three: In response to determining that the target voucher data configuration information does not include target conversion rule information, the field values ​​included in the programming object information are inserted into the cells to be filled in the table to be filled, so as to update the table to be filled.

[0094] The second step is to identify the updated table to be filled as the voucher data to be filled into the table.

[0095] The third step is to display the voucher data-filled table in the voucher file display interface. This voucher file display interface includes at least one of the following: an export control and a delete control. The voucher file display interface can be a page used to display the generated voucher data-filled table. The export control can be an interactive element used to export the voucher data-filled table in a preset file format. The delete control can be an interactive element used to delete the voucher data-filled table.

[0096] Fourth, in response to the detection of a selection operation applied to the export control, the voucher data is filled into a table and exported as a voucher file in a preset file format.

[0097] In some optional implementations of certain embodiments, after determining the voucher data configuration information corresponding to the matching target mapping field value in the voucher data configuration information set as the target voucher data configuration information, the execution entity may further perform the following steps:

[0098] The first step involves, in response to the determination that the target credential data configuration information includes target conversion rule information, converting the field values ​​included in the programming object information into updated field values ​​of a preset type according to the target conversion rule information. In practice, the executing entity can perform the conversion task corresponding to the target conversion rule information to convert the field values ​​included in the programming object information into updated field values ​​of a preset type.

[0099] The second step is to insert the updated field values ​​into the cells to be filled to update the table to be filled in the preset voucher template file.

[0100] The above embodiments of this disclosure have the following beneficial effects: the certificate file generation method of some embodiments of this disclosure reduces the waste of computer computing resources. Specifically, the waste of computer computing resources is caused by the fact that generating certificate files by developing customized code one by one requires writing compiled code to handle the compatibility issues between the certificate files and the preset application. When generating certificate files, more computing resources are needed to compile, build, and test the compiled code, resulting in a waste of computer computing resources. Based on this, the certificate file generation method of some embodiments of this disclosure firstly, in response to detecting the certificate template file upload control acting on the certificate file generation interface, displays a file selection upload box at a first preset position of the certificate template file upload control, so that the user can upload a preset certificate template file compatible with the preset target application from a local preset folder. The certificate file generation interface includes: a certificate template name display box and various certificate template attribute information input boxes. Thus, the user can select and upload a preset certificate template file compatible with the preset target application for generating certificate files through interface interaction. Then, the file name of the preset certificate template file selected by the user in the file selection upload box is displayed as the certificate template name in the certificate template name display box. Therefore, the voucher template name can be displayed. Next, in response to detecting input operations applied to the aforementioned voucher template attribute information input boxes, the input information corresponding to each of the aforementioned voucher template attribute information input boxes and the voucher template name in the aforementioned voucher template name display box are determined as voucher template attribute information. The aforementioned input information includes at least one of the following: header row number, encoding type, and newline character. Therefore, voucher template attribute information used for parsing the preset voucher template file can be obtained through interface interaction. The aforementioned voucher template attribute information and the aforementioned preset voucher template file are uploaded to a preset server for the preset server to parse the aforementioned preset voucher template file. The aforementioned preset voucher template file is uploaded to the preset server as a file stream. Therefore, the preset voucher template file can be parsed. In response to receiving voucher template parsing information corresponding to the aforementioned preset voucher template file from the preset server, voucher data configuration processing is performed based on the aforementioned voucher template parsing information to generate a voucher data configuration information set. Therefore, a voucher data configuration information set used to generate voucher files can be obtained. A voucher information set is retrieved from a preset database, where the voucher information includes the values ​​of various fields. This yields voucher information representing value transfer information. Based on the voucher data configuration information set, the voucher information set, and the preset voucher template file, a mapping and filling process is performed to generate a voucher file. This allows for the generation of a voucher file. Furthermore, an interactive interface is used to select and upload a preset voucher template file compatible with the target application for voucher file generation.Based on a pre-defined voucher template file compatible with the target application, a voucher file is generated according to the acquired voucher information set. This eliminates the need to generate and execute compiled code to handle compatibility issues between the voucher file and the pre-defined application, reducing the waste of computing resources.

[0101] Further reference Figure 5 As an implementation of the methods shown in the figures, this disclosure provides some embodiments of a credential document generation apparatus, which are similar to... Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0102] like Figure 5 As shown, the credential document generation apparatus 500 in some embodiments includes: a first display unit 501, a second display unit 502, a determination unit 503, an upload unit 504, a first execution unit 505, an acquisition unit 506, and a second execution unit 507. The first display unit 501 is configured to, in response to detecting a voucher template file upload control applied to the voucher file generation interface, display a file selection upload box at a first preset position of the voucher template file upload control, allowing the user to upload a preset voucher template file compatible with a preset target application from a local preset folder. The voucher file generation interface includes a voucher template name display box and various voucher template attribute information input boxes. The second display unit 502 is configured to display the filename of the preset voucher template file selected by the user in the file selection upload box as the voucher template name in the voucher template name display box. The determining unit 503 is configured to, in response to detecting input operations applied to the various voucher template attribute information input boxes, determine the input information corresponding to each of the various voucher template attribute information input boxes and the voucher template name in the voucher template name display box as voucher template attribute information. The information includes at least one of the following: header row number, encoding type, and newline character; the upload unit 504 is configured to upload the above-mentioned voucher template attribute information and the above-mentioned preset voucher template file to the preset server, so that the preset server can parse the above-mentioned preset voucher template file, wherein the above-mentioned preset voucher template file is uploaded to the preset server in the form of a file stream; the first execution unit 505 is configured to, in response to receiving voucher template parsing information corresponding to the above-mentioned preset voucher template file from the preset server, perform voucher data configuration processing according to the above-mentioned voucher template parsing information to generate a voucher data configuration information set; the acquisition unit 506 is configured to acquire a voucher information set from a preset database, wherein the voucher information in the above-mentioned voucher information set includes the value information of each field; the second execution unit 507 is configured to, according to the above-mentioned voucher data configuration information set, the above-mentioned voucher information set and the above-mentioned preset voucher template file, perform mapping and filling processing to generate a voucher file.

[0103] It is understandable that the units described in the device 500 are related to the reference. Figure 1 The steps in the method described above correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 500 and the units contained therein, and will not be repeated here.

[0104] The following is for reference. Figure 6 It shows a schematic diagram of the structure of an electronic device 600 suitable for implementing some embodiments of the present disclosure. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0105] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 606. RAM 606 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 606 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0106] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 6 Each box shown can represent a device or multiple devices as needed.

[0107] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of some embodiments of this disclosure.

[0108] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0109] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0110] A computer-readable medium may be contained within an electronic device or may exist independently, not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to detecting an action on a voucher template file upload control in a voucher file generation interface, display a file selection upload box at a first preset position of the voucher template file upload control, allowing the user to upload a preset voucher template file compatible with a preset target application from a local preset folder. The voucher file generation interface includes: a voucher template name display box and various voucher template attribute information input boxes; display the filename of the preset voucher template file selected by the user in the file selection upload box as the voucher template name in the voucher template name display box; and in response to detecting an input operation on each of the various voucher template attribute information input boxes, match the input information corresponding to each of the various voucher template attribute information input boxes with the voucher template name display box. The certificate template name is determined as certificate template attribute information, wherein each of the above input information includes at least one of the following: header row number, encoding type, and newline character; the above certificate template attribute information and the above preset certificate template file are uploaded to a preset server for the preset server to parse the preset certificate template file, wherein the preset certificate template file is uploaded to the preset server in the form of a file stream; in response to receiving the certificate template parsing information corresponding to the above preset certificate template file from the preset server, certificate data configuration processing is performed according to the above certificate template parsing information to generate a certificate data configuration information set; a certificate information set is obtained from a preset database, wherein the certificate information in the above certificate information set includes the value information of each field; according to the above certificate data configuration information set, the above certificate information set, and the above preset certificate template file, mapping and filling processing is performed to generate a certificate file.

[0111] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0112] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0113] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first display unit 501, a second display unit 502, a determining unit 503, an uploading unit 504, a first execution unit 505, an acquisition unit 506, and a second execution unit 507. The names of these units do not necessarily limit the specific unit itself; for example, the second display unit may also be described as "a unit that displays the filename of the preset voucher template file selected by the user in the file selection upload box as the voucher template name in the voucher template name display box."

[0114] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0115] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of technical features, but should also cover other technical solutions formed by arbitrary combinations of technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A method for generating a voucher file, comprising: In response to detecting a voucher template file upload control applied to the voucher file generation interface, a file selection upload box is displayed at a first preset position of the voucher template file upload control, so that the user can upload a preset voucher template file compatible with a preset target application from a local preset folder. The voucher file generation interface includes: a voucher template name display box and input boxes for various voucher template attribute information. The filename of the preset voucher template file selected by the user in the file selection and upload box is displayed as the voucher template name in the voucher template name display box; In response to detecting an input operation applied to each of the voucher template attribute information input boxes, the input information corresponding to each of the voucher template attribute information input boxes and the voucher template name in the voucher template name display box are determined as voucher template attribute information, wherein each input information includes at least one of the following: table header row number, encoding type, and newline character; The voucher template attribute information and the preset voucher template file are uploaded to the preset server so that the preset server can parse the preset voucher template file. The preset voucher template file is uploaded to the preset server in the form of a file stream. In response to receiving voucher template parsing information corresponding to the preset voucher template file from the preset server, voucher data configuration processing is performed based on the voucher template parsing information to generate a voucher data configuration information set, including: In response to receiving voucher template parsing information corresponding to the preset voucher template file from the preset server, an initial voucher data configuration page is displayed, wherein the initial voucher data configuration page includes each initial horizontal list, each mapping field input box corresponding to each initial horizontal list, and each field type conversion rule selection control corresponding to each initial horizontal list; Based on the voucher template parsing information, each initial horizontal list in the initial voucher data configuration page is updated to update the initial voucher data configuration page and obtain the voucher data configuration page. Each piece of information in each initial horizontal list in the voucher data configuration page is determined as the information in each horizontal list; In response to detecting an input operation applied to each of the mapping field input boxes, the input information corresponding to each of the mapping field input boxes is determined as the mapping field input information, wherein one of the mapping field input information corresponds to one of the horizontal list information in each of the horizontal list information; In response to detecting a selection operation performed on at least one of the field type conversion rule selection controls, the information corresponding to at least one selection operation is determined as at least one conversion rule information, wherein the at least one conversion rule information corresponds to one of the horizontal list information in each of the horizontal list information; Based on the input information of each mapping field, the at least one conversion rule information, and the information of each horizontal list, a voucher data configuration information set is generated; A set of voucher information is obtained from a preset database, wherein the voucher information in the set of voucher information includes the value information of each field; Based on the voucher data configuration information set, the voucher information set, and the preset voucher template file, a mapping and filling process is performed to generate a voucher file.

2. The method according to claim 1, wherein, The step of updating each initial horizontal list in the initial voucher data configuration page according to the voucher template parsing information includes: The initial horizontal list corresponding to the preset position in the initial voucher data configuration page is determined as the target initial horizontal list; The header row data in the voucher template parsing information is filled into the target initial horizontal list in each initial horizontal list to update each initial horizontal list; The target row dataset from the voucher template parsing information is filled into each of the initial horizontal lists other than the target initial horizontal list to update each of the initial horizontal lists. Here, one target row data in the target row dataset corresponds to one of the initial horizontal lists in each of the initial horizontal lists other than the target initial horizontal list.

3. The method according to claim 1, wherein, The step of generating a voucher data configuration information set based on the input information of each mapping field, the at least one conversion rule information, and the information of each horizontal list includes: For each of the horizontal list items in the various horizontal list items, perform the following steps: The mapping field input information that corresponds to the horizontal list information in each of the mapping field input information is determined as the target mapping field value; In response to determining that there is transformation rule information corresponding to the horizontal list information in the at least one transformation rule information, the following steps are performed: The conversion rule information corresponding to the horizontal list information is determined as the target conversion rule information; The horizontal list information, the target mapping field value, and the target conversion rule information are determined as the voucher data configuration information; In response to determining that no transformation rule information corresponding to the horizontal list information exists in the at least one transformation rule information, the horizontal list information and the target mapping field value are determined as voucher data configuration information; The determined configuration information of each voucher data is defined as a voucher data configuration information set.

4. The method according to claim 1, wherein, The step of configuring an information set based on the voucher data, the voucher information set, and the preset voucher template file, and performing mapping and filling processing to generate a voucher file includes: For each piece of voucher information in the voucher information set, the following mapping and filling process is performed: The field values ​​in the voucher information are converted into programming object information, wherein the programming object information includes at least one of the following: field values ​​and attribute values; Determine the target mapping field value in each voucher data configuration information in the voucher data configuration information set to obtain the target mapping field value set; Each target mapping field value in the target mapping field value set that is equal to each attribute value included in each programming object information is determined as a matching target mapping field value, wherein one of the matching target mapping field values ​​corresponds to one programming object information in each programming object information; Based on the target row dataset in the voucher template parsing information corresponding to the preset voucher template file, a table to be filled is generated. For each piece of programming object information, perform the following population steps: Based on the matching target mapping field value corresponding to the programming object information, determine the cell to be filled in the table that corresponds to the programming object information; The voucher data configuration information that corresponds to the value of the matching target mapping field in the voucher data configuration information set is determined as the target voucher data configuration information; In response to determining that the target voucher data configuration information does not include target conversion rule information, the field values ​​included in the programming object information are inserted into the cells to be filled in the table to be filled, so as to update the table to be filled; The updated table to be filled will be used as the voucher data to fill the table; The voucher data is populated into a table and displayed on the voucher file display interface, wherein the voucher file display interface includes at least one of the following: export control, delete control, and re-import control; In response to detecting a selection operation applied to the export control, the voucher data is populated into a table and exported as a voucher file in a preset file format.

5. The method according to claim 4, wherein, After determining the voucher data configuration information corresponding to the matching target mapping field value in the voucher data configuration information set as the target voucher data configuration information, the method further includes: In response to determining that the target credential data configuration information includes target conversion rule information, the field values ​​included in the programming object information are converted into update field values ​​of a preset type according to the target conversion rule information; The updated field value is inserted into the cell to be filled in order to update the table to be filled in the preset voucher template file.

6. A voucher document generation apparatus, comprising: The first display unit is configured to, in response to detecting a voucher template file upload control applied to the voucher file generation interface, display a file selection upload box at a first preset position of the voucher template file upload control, so that the user can upload a preset voucher template file compatible with a preset target application from a local preset folder. The voucher file generation interface includes: a voucher template name display box and input boxes for various voucher template attribute information. The second display unit is configured to display the filename of the preset voucher template file selected by the user in the file selection upload box as the voucher template name in the voucher template name display box; The determining unit is configured to, in response to detecting an input operation performed on each of the voucher template attribute information input boxes, determine each input information corresponding to each of the voucher template attribute information input boxes and the voucher template name in the voucher template name display box as voucher template attribute information, wherein each input information includes at least one of the following: header row number, encoding type, and newline character; The upload unit is configured to upload the voucher template attribute information and the preset voucher template file to a preset server, so that the preset server can parse the preset voucher template file, wherein the preset voucher template file is uploaded to the preset server in the form of a file stream; The first execution unit is configured to, in response to receiving voucher template parsing information corresponding to the preset voucher template file from the preset server, perform voucher data configuration processing based on the voucher template parsing information to generate a voucher data configuration information set, including: in response to receiving voucher template parsing information corresponding to the preset voucher template file from the preset server, displaying an initial voucher data configuration page, wherein the initial voucher data configuration page includes various initial horizontal lists, various mapping field input boxes corresponding to the various initial horizontal lists, and various field type conversion rule selection controls corresponding to the various initial horizontal lists; updating the various initial horizontal lists in the initial voucher data configuration page according to the voucher template parsing information to update the initial voucher data configuration page, thereby obtaining a voucher data configuration page; and configuring the various initial horizontal lists in the voucher data configuration page... Each piece of information is determined as a horizontal list of information; in response to detecting an input operation applied to each of the mapping field input boxes, the input information corresponding to each of the mapping field input boxes is determined as mapping field input information, wherein one of the mapping field input information corresponds to one of the horizontal list information; in response to detecting a selection operation applied to at least one field type conversion rule selection control in each of the field type conversion rule selection controls, the information corresponding to at least one selection operation is determined as at least one conversion rule information, wherein the at least one conversion rule information corresponds to one of the horizontal list information; a voucher data configuration information set is generated based on the mapping field input information, the at least one conversion rule information, and the horizontal list information; The acquisition unit is configured to acquire a set of voucher information from a preset database, wherein the voucher information in the voucher information set includes the value information of each field. The second execution unit is configured to perform mapping and filling processing based on the voucher data configuration information set, the voucher information set, and the preset voucher template file to generate a voucher file.

7. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 5.

8. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Multi-format electronic certificate generation method and device, equipment and storage medium

    CN115760087A

  • Financial voucher generation method and system

    CN116416076A