File generation method and device, equipment and medium

By acquiring document generation templates and processing tables from financial institutions, key fields and related data are automatically determined, solving the problem of low efficiency in generating regulatory reporting documents for financial institutions and achieving efficient and accurate document generation.

CN121835640APending Publication Date: 2026-04-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, financial institutions generate regulatory reporting documents inefficiently, relying on manual methods that result in long processing times and insufficient accuracy and completeness.

Method used

By acquiring the current business's document generation template, candidate processing table, and corresponding table generation program, the basic data and related data of the template fields and key fields are automatically determined, and the target file is generated.

Benefits of technology

It achieves automated generation of target files, improves file generation efficiency, reduces manual workload, and enhances the accuracy and completeness of file generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835640A_ABST
    Figure CN121835640A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a file generation method and device, equipment and a medium, and relates to the technical field of financial science and technology. The method comprises the steps of obtaining a current file generation template, a candidate processing table and a corresponding candidate table generation program of a current service; determining a current template field and a current template table identifier in the current file generation template, and determining a current processing table from the candidate processing tables according to the current template table identifier; determining a current key field in the corresponding current processing table according to the current template field, and determining field basic data of the corresponding current key field according to the current processing table; determining a current table generation program corresponding to the current processing table from the candidate table generation programs, and determining current associated data corresponding to the current processing table according to the current table generation program and the current processing table; and according to the field basic data, the current associated data and the current file generation template, obtaining a target file of the current service. And the generation efficiency of the target file is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of financial technology, and in particular to a document generation method, apparatus, device and medium. Background Technology

[0002] With economic development, financial institutions are required to submit relevant documents and materials to higher-level regulatory agencies on a regular or irregular basis to facilitate oversight and timely detection and prevention of potential risks. Currently, the documents and materials submitted by financial institutions for regulatory purposes are typically generated manually, resulting in low efficiency. Summary of the Invention

[0003] This invention provides a method, apparatus, device, and medium for generating files, thereby improving the efficiency of file generation.

[0004] According to one aspect of the present invention, a file generation method is provided, applied to a file generation system, the method comprising:

[0005] Obtain the current file generation template, candidate processing table, and corresponding candidate table generation program for the current business;

[0006] The current template field and the current template table identifier in the current file generation template are determined, and the current processing table is determined from the candidate processing table based on the current template table identifier;

[0007] Based on the current template fields, determine the current key fields in the corresponding current processing table, and based on the current processing table, determine the basic data of the corresponding current key fields.

[0008] The current table generation program corresponding to the current processing table is determined from the candidate table generation program, and the current associated data of the corresponding current processing table is determined based on the current table generation program and the current processing table.

[0009] Based on the basic field data, the current associated data, and the current file generation template, the target file for the current business is obtained.

[0010] According to another aspect of the present invention, a document generation apparatus is provided, configured in a document generation system, the apparatus comprising:

[0011] The data acquisition module is used to acquire the current file generation template, candidate processing table, and corresponding candidate table generation program for the current business.

[0012] The current processing table determination module is used to determine the current template field and the current template table identifier in the current file generation template, and determine the current processing table from the candidate processing table based on the current template table identifier;

[0013] The field basic data determination module is used to determine the current key field in the corresponding current processing table based on the current template fields, and to determine the field basic data of the corresponding current key field based on the current processing table.

[0014] The current associated data determination module is used to determine the current table generation program corresponding to the current processing table from the candidate table generation program, and determine the current associated data of the corresponding current processing table based on the current table generation program and the current processing table;

[0015] The target file determination module is used to obtain the target file of the current business based on the basic field data, the current associated data, and the current file generation template.

[0016] According to another aspect of the present invention, an electronic device is provided, comprising:

[0017] One or more processors;

[0018] Memory, used to store one or more programs;

[0019] When one or more programs are executed by one or more processors, the one or more processors are able to execute any of the file generation methods provided in the embodiments of the present invention.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute any of the file generation methods provided in the embodiments of the present invention.

[0021] According to another aspect of the present invention, a computer program product is provided, including a computer program / instructions, which, when executed by a processor, implement any of the file generation methods provided in the embodiments of the present invention.

[0022] This invention provides a file generation scheme, which involves: acquiring the current file generation template, candidate processing table, and corresponding candidate table generation program for the current business; determining the current template fields and current template table identifier in the current file generation template, and determining the current processing table from the candidate processing table based on the current template table identifier; determining the current key fields in the corresponding current processing table based on the current template fields, and determining the basic data of the corresponding current key fields based on the current processing table; determining the current table generation program corresponding to the current processing table from the candidate table generation program, and determining the current associated data of the corresponding current processing table based on the current table generation program and the current processing table; and obtaining the target file for the current business based on the basic field data, the current associated data, and the current file generation template. The above solution determines the current key fields in the current processing table based on the current template fields and the current template table identifier in the current file generation template, determines the basic data of the current key fields based on the current processing table, and determines the current associated data of the current processing table based on the current table generation program. Finally, based on the basic field data, the current associated data, and the current file generation template, the target file for the current business is obtained, thus achieving automated generation of target files and improving the efficiency of target file generation.

[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart of a file generation method provided in Embodiment 1 of the present invention;

[0026] Figure 2 This is a flowchart of a file generation method provided in Embodiment 2 of the present invention;

[0027] Figure 3 This is a schematic diagram of the structure of a document generation device provided in Embodiment 4 of the present invention;

[0028] Figure 4 This is a schematic diagram of the structure of an electronic device that implements a file generation method according to Embodiment 5 of the present invention. Detailed Implementation

[0029] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0030] Example 1

[0031] Figure 1 This is a flowchart of document generation provided in Embodiment 1 of the present invention. This embodiment can be applied to the situation of automatically generating documents required by financial institutions for regulatory reporting. The method can be executed by a document generation device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the document generation function.

[0032] See Figure 1 The document generation method shown is applied to a document generation system and includes:

[0033] S110. Obtain the current file generation template, candidate processing table, and corresponding candidate table generation program for the current business.

[0034] Here, "current business" refers to the business of generating documents required for regulatory reporting by financial institutions at the current moment. "Candidate processing table" refers to the data table used to generate the documents corresponding to the current business. "Candidate table generation program" refers to the program used to generate the candidate processing table. "Current document generation template" refers to the template used to generate the documents corresponding to the current business.

[0035] The file generation system can be used to generate target files.

[0036] S120. Determine the current template field and the current template table identifier in the current file generation template, and determine the current processing table from the candidate processing table based on the current template table identifier.

[0037] Here, "Current Template Field" refers to the field in the template generated from the current file. "Current Template Table Identifier" is the identifier of the table to which the current template field belongs in the template generated from the current file. "Current Processing Table" refers to the candidate processing table corresponding to the current template table identifier. The current template table identifier can be used to uniquely identify the current processing table.

[0038] S130. Based on the current template fields, determine the current key fields in the corresponding current processing table, and based on the current processing table, determine the basic data of the corresponding current key fields.

[0039] Here, the current key field refers to the field in the currently processed table that matches the current template field. The basic field data refers to the basic attribute data of the current key field. For example, the basic field data may include the field's English name, Chinese name, dictionary value, and the table in which the field belongs.

[0040] In an optional embodiment, determining the current key field in the corresponding current processing table based on the current template field includes: extracting candidate key fields from the current processing table, and determining the reference key field corresponding to the candidate key field based on the preset field correspondence of the corresponding current processing table; taking the reference key field that matches the current template field of the corresponding current processing table as the target key field, and taking the candidate key field corresponding to the target key field as the current key field.

[0041] Here, candidate key fields refer to the fields in the currently processed table. Preset field mapping refers to the pre-defined mapping between fields in the currently processed table and fields in the candidate file generation template. Reference key fields refer to the standard fields corresponding to the candidate key fields. Target key fields refer to the reference key fields that successfully match the fields in the current template. The candidate file generation template refers to the pre-defined format template used to generate the file.

[0042] Understandably, for any candidate key field, the standard field, i.e. the reference key field, is determined based on the preset field correspondence of the current processing table where the candidate key field is located. The reference key field is then matched with the current template field corresponding to the current processing table. The successfully matched reference key field is taken as the target key field. Finally, the candidate key field corresponding to the target key field is taken as the current key field, which improves the accuracy of the determined current key field.

[0043] S140. Determine the current table generation program corresponding to the current processing table from the candidate table generation program, and determine the current associated data of the corresponding current processing table based on the current table generation program and the current processing table.

[0044] Here, "current table generation program" refers to the program that generates candidate tables corresponding to the currently processed table. "Current related data" refers to the lineage data of the currently processed table.

[0045] S150. Generate a template based on the basic field data, current associated data, and current file to obtain the target file for the current business.

[0046] The target file refers to the file corresponding to the current business.

[0047] This invention provides a file generation scheme, which involves: acquiring the current file generation template, candidate processing table, and corresponding candidate table generation program for the current business; determining the current template fields and current template table identifier in the current file generation template, and determining the current processing table from the candidate processing table based on the current template table identifier; determining the current key fields in the corresponding current processing table based on the current template fields, and determining the basic data of the corresponding current key fields based on the current processing table; determining the current table generation program corresponding to the current processing table from the candidate table generation program, and determining the current associated data of the corresponding current processing table based on the current table generation program and the current processing table; and obtaining the target file for the current business based on the basic field data, the current associated data, and the current file generation template. The above solution determines the current key fields in the current processing table based on the current template fields and the current template table identifier in the current file generation template, determines the basic data of the current key fields based on the current processing table, and determines the current associated data of the current processing table based on the current table generation program. Finally, based on the basic field data, the current associated data, and the current file generation template, the target file for the current business is obtained, thus achieving automated generation of target files and improving the efficiency of target file generation.

[0048] Based on the above technical solutions, a method for determining field basic data, field related data, and table related data based on a model is also provided. In an optional embodiment, the method further includes: determining the current parsing category for parsing the current processing table; wherein the current parsing category is one of field-level attribute parsing, field-level relationship parsing, and table-level relationship parsing; determining the current parsing model from preset candidate parsing models according to the current parsing category; inputting the current processing table and the current table generation program into the current parsing model to obtain the current category parsing data under the current parsing category; wherein the current category parsing data is one of field basic data, field related data, and table related data.

[0049] Here, "current parsing category" refers to the type of parsing performed on the current processing table at the current moment. "Field-level attribute parsing" refers to parsing the basic attributes of the current key fields in the current processing table at the field level. "Field-level relationship parsing" refers to parsing the lineage relationships of the current key fields in the current processing table at the field level. "Table-level relationship parsing" refers to parsing the lineage relationships of the current processing table at the table level.

[0050] Here, candidate parsing models refer to pre-trained models used to perform different categories of parsing on the current processing table and the current table generation program. The current parsing model refers to the candidate parsing model corresponding to the current parsing category. The parsing data for the current category refers to the parsing result output by the current parsing model.

[0051] Understandably, by determining the current parsing model based on the current parsing category, and inputting the current processing table and the current table generation program into the current parsing model, the current category parsing data under the current parsing category is obtained, which improves the efficiency and accuracy of the determined current category parsing data.

[0052] Example 2

[0053] Figure 2 This is a flowchart of a file generation method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment further refines the operation of "determining the current associated data of the corresponding current processing table according to the current table generation program and the current processing table" into "for any current processing table, determining the field associated data of the current key field in the current processing table according to the current table generation program corresponding to the current processing table; determining the reference table generation subroutine in the current table generation program corresponding to the current processing table, and determining the table associated data between the current processing table and the corresponding reference processing table according to the reference table generation subroutine; generating current associated data including field associated data and table associated data," thereby improving the mechanism for determining the current associated data. It should be noted that for parts not detailed in this embodiment, please refer to the descriptions in other embodiments.

[0054] See Figure 2 The document generation methods shown include:

[0055] S210. Obtain the current document generation template, candidate processing table, and corresponding candidate table generation program for the current business.

[0056] S220. Determine the current template field and the current template table identifier in the current file generation template, and determine the current processing table from the candidate processing table based on the current template table identifier.

[0057] S230. Based on the current template fields, determine the current key fields in the corresponding current processing table, and based on the current processing table, determine the basic data of the corresponding current key fields.

[0058] For example, if it is not possible to extract the basic data of the corresponding current key field from the current processing table alone, the basic data of the corresponding current key field can be determined based on the current processing table and the current table generation program.

[0059] S240. Determine the current table generation program corresponding to the current processing table from the candidate table generation program.

[0060] S250. For any current processing table, determine the field association data of the current key field in the current processing table according to the current table generation program corresponding to the current processing table.

[0061] Among them, field-related data refers to the field-level lineage relationship data of the current key field in the currently processed table.

[0062] In one optional embodiment, determining the field association data of the current key field in the current processing table according to the current table generation program corresponding to the current processing table includes: for any current key field in the current processing table, determining the current field generation program corresponding to the current key field from the current table generation program corresponding to the current processing table; determining whether the field type of the current key field is an external dependent field type according to the current field generation program; if so, extracting the field source data of the current key field according to the current field generation program, and performing business parsing on the current field generation program to obtain the field generation data of the current key field; generating the field association data of the current key field including the field source data, the field generation data, and the current field generation program.

[0063] Here, "current field generation procedure" refers to at least a portion of the current table generation procedure corresponding to the current processing table, used to determine the field value of the current key field. "External dependency field type" refers to the field type that relies on data from other candidate processing tables besides the current processing table to determine the field value. "Field type" refers to the field category of the current key field.

[0064] In this context, "field source data" refers to the source data from other candidate processing tables needed to determine the field value of the current key field for the external dependency field type. For example, field source data may include the field source table name, source field name, and source system.

[0065] Here, "Source Table Name" can be understood as the name of the candidate processing table needed to determine the value of the corresponding current key field. "Source Field Name" can be understood as the name of the field in another candidate processing table needed to determine the value of the corresponding current key field. "Source System" can be understood as the system to which the candidate processing tables belong for determining the value of the corresponding current key field.

[0066] Field generation data refers to the data used to generate field values ​​for the current key fields that belong to the external dependency field type. For example, field generation data may include processing methods and processing business logic.

[0067] Here, "processing method" refers to the way the value of the corresponding current key field is determined. "Processing business logic" refers to the business logic that determines the value of the corresponding current key field.

[0068] Understandably, by determining whether the field type of the current key field belongs to an external dependent field type based on the current field generation program corresponding to the current key field, and if so, extracting the corresponding field source data of the current key field from the current field generation program, and performing business parsing on the current field generation program to obtain the corresponding field generation data of the current key field, the system finally generates field association data including field source data, field generation data, and the corresponding current key field of the current field generation program, thereby improving the accuracy and comprehensiveness of the generated field association data.

[0069] S260. Determine the reference table generation subroutine in the current table generation program corresponding to the current processing table, and determine the table association data between the current processing table and the corresponding reference processing table based on the reference table generation subroutine.

[0070] The reference table generation subroutine refers to at least a portion of the current table generation program used to call other candidate processing tables besides the current processing table itself. A reference processing table is a candidate processing table that is related to the current processing table. Table relationship data refers to the table-level lineage data of the current processing table.

[0071] It should be noted that for any current processing table, the generation of the current processing table may require the participation of other candidate processing tables, i.e., reference processing tables. In this case, the table association data between the current processing table and the corresponding reference processing table can be determined based on the reference table generation subroutine in the current table generation program.

[0072] In one optional embodiment, the table association data between the current processing table and the corresponding reference processing table is determined based on the reference table generation subroutine, including: extracting the table dependency data of the corresponding reference processing table from the reference table generation subroutine, and performing business parsing on the reference table generation subroutine to obtain the table business logic of the corresponding reference processing table; generating table association data including table dependency data, table business logic and the reference table generation subroutine.

[0073] Table dependency data refers to the data used to characterize the reference processing table's role in generating the corresponding current processing table. For example, table dependency data may include the source table name, table filtering conditions, table join methods, and table join conditions.

[0074] Here, the source table name can be understood as the name of the reference processing table needed to generate the current processing table. The table filter condition refers to the filter conditions used to generate the reference processing table. The table join method refers to the join method between the current processing table and the reference processing table needed to generate it, such as inner join, left join, and right join. The table join condition refers to the join condition between the current processing table and the reference processing table needed to generate it.

[0075] Among them, the table business logic refers to the business logic that connects the current processing table with the reference processing table required to generate the current processing table.

[0076] Understandably, by extracting the table dependency data of the reference processing table associated with the current processing table from the reference table generation subroutine, and performing business parsing on the reference table generation subroutine to obtain the table business logic of the corresponding current processing table, the table association data including table dependency data, table business logic, and reference table generation subroutine is finally generated, thus improving the accuracy and comprehensiveness of the determined table association data.

[0077] S270. Generate current association data including field association data and table association data.

[0078] S280. Generate a template based on the basic field data, current associated data, and current file to obtain the target file for the current business.

[0079] This invention provides a file generation scheme that refines the operation of determining the current associated data of the corresponding current processing table based on the current table generation program and the current processing table. Specifically, for any current processing table, based on the current table generation program corresponding to that current processing table, the scheme determines the field-related data of the current key field in the current processing table; determines the reference table generation subroutine in the current table generation program corresponding to that current processing table; and, based on the reference table generation subroutine, determines the table-related data between the current processing table and the corresponding reference processing table. This generates current associated data including both field-related data and table-related data, thus improving the mechanism for determining current associated data. The above scheme, by determining the field-related data of the current key field in the corresponding current processing table based on the current table generation program corresponding to that current processing table, and determining the table-related data between the current processing table and the corresponding reference processing table based on the reference table generation subroutine in the current table generation program corresponding to that current processing table, and finally generating current associated data including both field-related data and table-related data, improves the accuracy and comprehensiveness of the determined current associated data.

[0080] Example 3

[0081] This invention provides an optional example based on the above embodiments. It should be noted that for parts not described in detail in this invention's embodiments, please refer to the descriptions in other embodiments.

[0082] Regulatory reporting by financial institutions refers to the periodic or ad-hoc submission of data and reports by financial institutions regarding their financial status, operations, risk management, and compliance status, as required by regulatory agencies. Regulatory reporting is a legally mandated obligation for financial institutions, requiring standardized reporting formats and accurate content. Currently, to ensure compliance with regulatory requirements, financial institutions typically use manual methods to complete the regulatory reporting statistical system. This system mainly includes two modules: lineage analysis of external regulatory reporting fields; and lineage analysis of the underlying source tables for external regulatory reporting forms. First, the data management department and development department collaborate to manually clarify the reporting statistical requirements, the actual processing lineage of production data, and conduct preliminary verification of consistency between requirements and production. Then, the data management department leads the manual drafting of the statistical system document. The statistical system is then distributed to the relevant regulatory departments for verification and countersignature confirmation. Finally, the statistical system is printed and archived throughout the bank.

[0083] In existing technologies, the generation of statistical system documents is time-consuming and involves a large amount of manual work, especially in areas such as manually sorting out the actual processing relationships of production data and verifying the consistency between requirements and production. Furthermore, the accuracy and completeness of manual sorting and verification are relatively low, often requiring dozens of rounds of revisions. Simultaneously, the entire system generation involves multiple departments across various business areas, including development departments and data management departments at headquarters and branches. Centralized, rushed office work is time-consuming and incurs high travel expenses, while online collaboration is inefficient and of low quality. Overall, it requires a huge investment of human, financial, and time resources. Therefore, an automated method for generating regulatory reporting systems that can improve efficiency and accuracy while saving manpower is extremely important.

[0084] This invention leverages the powerful language understanding, generation, reasoning, and knowledge integration capabilities of large-scale models to propose an automatic generation method for regulatory reporting statistical systems based on large-scale models. Regarding the lineage relationship analysis of external regulatory reporting fields, the method automatically generates and populates the lineage relationships for each field in the regulatory report by parsing the production codebase. Based on an understanding of the source table metadata and lineage relationships, it also generates a business processing specification for each field in the regulatory report. Regarding the lineage relationship analysis of the underlying source table for external regulatory reporting tables, the method supports the analysis of the underlying source table and its filtering and association conditions for each reporting table. The aim is to generate regulatory reporting statistical systems in an automated and intelligent manner.

[0085] This invention provides an automatic generation system (i.e., document generation system) for regulatory reporting and statistical regulations based on a large model, comprising a data layer, a parsing engine layer, and an application layer. The parsing engine layer may include a field-level attribute parsing module, a field-level relationship parsing module, and a table-level relationship parsing module. The field-level attribute parsing module is used to determine the basic data of a field. The field-level relationship parsing module is used to determine the associated data of a field. The table-level relationship parsing module is used to determine the associated data of a table.

[0086] The data layer can be used to obtain the metadata registration information of the regulatory reporting form (i.e., the candidate processing form), the production code library for processing the regulatory reporting form (i.e., the candidate form generation program), and the current file generation template.

[0087] The parsing engine layer, based on large model capabilities, supports parsing information from the data layer, including two modes: field-level parsing and table-level relationship parsing. Field-level parsing can include field-level attribute parsing and field-level relationship parsing.

[0088] Specifically, field-level parsing refers to parsing the basic information of each current key field in the current processing table (i.e., field-level attribute parsing) and the lineage relationship of each field (i.e., field-level relationship parsing); table-level relationship parsing refers to analyzing the source table of the current processing table, i.e., table-level relationship parsing can be used to determine the table-related data; the parsed basic field data, field-related data, and table-related data are then stored in a structured manner.

[0089] The application layer can be used to manage and report statistical system templates, and based on the natural language understanding generation capabilities of the large model, it generates system documents (i.e. target documents) based on the basic field data, field association data, and table association data extracted by the parsing engine layer, as well as the current document generation template, and completes the document polishing and improvement.

[0090] This invention provides a method for automatically generating regulatory reporting statistical systems based on a large model. This method can automatically extract the information required for statistical systems and automatically generate the systems, significantly reducing manual workload and improving accuracy.

[0091] It should be noted that the information collected in the embodiments of the present invention is information and data authorized by the user or fully authorized by all parties. The collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant countries and regions, and necessary confidentiality measures have been taken. It does not violate public order and good morals, and corresponding operation entry points are provided for users to choose to authorize or refuse. If the user chooses to refuse, the process will proceed to the expert decision-making process.

[0092] Example 4

[0093] Figure 3 This is a schematic diagram of a document generation device provided in Embodiment 4 of the present invention. This embodiment is applicable to the automated generation of documents required by financial institutions for regulatory reporting. The method can be executed by a document generation device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the document generation function.

[0094] like Figure 3As shown, this device is configured in a file generation system. The device includes: a data acquisition module 310, a current processing table determination module 320, a field basic data determination module 330, a current associated data determination module 340, and a target file determination module 350. Among them,

[0095] The data acquisition module 310 is used to acquire the current file generation template, candidate processing table, and corresponding candidate table generation program for the current business.

[0096] The current processing table determination module 320 is used to determine the current template field and the current template table identifier in the current file generation template, and determine the current processing table from the candidate processing table based on the current template table identifier;

[0097] The field basic data determination module 330 is used to determine the current key field in the corresponding current processing table based on the current template field, and to determine the field basic data of the corresponding current key field based on the current processing table;

[0098] The current associated data determination module 340 is used to determine the current table generation program corresponding to the current processing table from the candidate table generation program, and determine the current associated data of the corresponding current processing table based on the current table generation program and the current processing table;

[0099] The target file determination module 350 is used to obtain the target file of the current business based on the field basic data, the current associated data and the current file generation template.

[0100] This invention provides a file generation scheme, which involves: acquiring the current file generation template, candidate processing table, and corresponding candidate table generation program for the current business; determining the current template fields and current template table identifier in the current file generation template, and determining the current processing table from the candidate processing table based on the current template table identifier; determining the current key fields in the corresponding current processing table based on the current template fields, and determining the basic data of the corresponding current key fields based on the current processing table; determining the current table generation program corresponding to the current processing table from the candidate table generation program, and determining the current associated data of the corresponding current processing table based on the current table generation program and the current processing table; and obtaining the target file for the current business based on the basic field data, the current associated data, and the current file generation template. The above solution determines the current key fields in the current processing table based on the current template fields and the current template table identifier in the current file generation template, determines the basic data of the current key fields based on the current processing table, and determines the current associated data of the current processing table based on the current table generation program. Finally, based on the basic field data, the current associated data, and the current file generation template, the target file for the current business is obtained, thus achieving automated generation of target files and improving the efficiency of target file generation.

[0101] Optionally, the current associated data determination module 340 includes:

[0102] The field association data determination unit is used to determine the field association data of the current key field in any current processing table based on the current table generation program corresponding to the current processing table.

[0103] The table association data determination unit is used to determine the reference table generation subroutine in the current table generation program corresponding to the current processing table, and to determine the table association data between the current processing table and the corresponding reference processing table based on the reference table generation subroutine.

[0104] The current association data generation unit is used to generate current association data including the field association data and the table association data.

[0105] Optionally, the field-associated data determination unit is specifically used for:

[0106] For any current key field in the current processing table, determine the current field generation program corresponding to the current key field from the current table generation program corresponding to the current processing table;

[0107] Based on the current field generation procedure, determine whether the field type of the current key field is an externally dependent field type;

[0108] If so, then according to the current field generation program, extract the field source data of the current key field, and perform business analysis on the current field generation program to obtain the field generation data of the current key field;

[0109] Generate field association data that includes the field source data, the field generation data, and the current key field of the current field generation program.

[0110] Optionally, the table-related data determination unit is specifically used for:

[0111] Extract the table dependency data of the corresponding reference processing table in the reference table generation subroutine, and perform business parsing on the reference table generation subroutine to obtain the table business logic of the corresponding reference processing table.

[0112] Generate table association data that includes the table dependency data, the table business logic, and the reference table generation subroutine.

[0113] Optionally, the device further includes:

[0114] The current parsing category determination module is used to determine the current parsing category for parsing the currently processed table; wherein, the current parsing category is one of field-level attribute parsing, field-level relationship parsing, and table-level relationship parsing;

[0115] The current parsing model determination module is used to determine the current parsing model from the preset candidate parsing models based on the current parsing category;

[0116] The current category parsing data determination module is used to input the current processing table and the current table generation program into the current parsing model to obtain the current category parsing data under the current parsing category; wherein, the current category parsing data is one of field basic data, field association data, and table association data.

[0117] Optionally, the field basic data determination module 330 includes:

[0118] The reference key field determination unit is used to extract candidate key fields from the current processing table and determine the reference key fields corresponding to the candidate key fields based on the preset field correspondence relationship of the corresponding current processing table.

[0119] The current key field determination unit is used to take the reference key field that matches the current template field corresponding to the current processing table as the target key field, and take the candidate key field corresponding to the target key field as the current key field.

[0120] The file generation apparatus provided in the embodiments of the present invention can execute the file generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each file generation method.

[0121] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision and disclosure of candidate processing tables, candidate table generation programs and current file generation templates, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0122] Example 5

[0123] According to embodiments of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product.

[0124] Figure 4 This is a schematic diagram of the structure of an electronic device implementing a file generation method according to Embodiment 5 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0125] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0126] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0127] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the file generation method.

[0128] In some embodiments, the file generation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the file generation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the file generation method by any other suitable means (e.g., by means of firmware).

[0129] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0130] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0131] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0132] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0133] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0134] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system to address the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.

[0135] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0136] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for generating a file, characterized in that, Applied to a file generation system, the method includes: Obtain the current file generation template, candidate processing table, and corresponding candidate table generation program for the current business; The current template field and the current template table identifier in the current file generation template are determined, and the current processing table is determined from the candidate processing table based on the current template table identifier; Based on the current template fields, determine the current key fields in the corresponding current processing table, and based on the current processing table, determine the basic data of the corresponding current key fields. The current table generation program corresponding to the current processing table is determined from the candidate table generation program, and the current associated data of the corresponding current processing table is determined based on the current table generation program and the current processing table. Based on the basic field data, the current associated data, and the current file generation template, the target file for the current business is obtained.

2. The method according to claim 1, characterized in that, The step of determining the current associated data of the corresponding current processing table based on the current table generation program and the current processing table includes: For any currently processed table, determine the field association data of the current key field in the current processed table based on the current table generation program corresponding to the current processed table; Determine the reference table generation subroutine in the current table generation program corresponding to the current processing table, and determine the table association data between the current processing table and the corresponding reference processing table based on the reference table generation subroutine; Generate current associated data that includes the associated data of the fields and the associated data of the tables.

3. The method according to claim 2, characterized in that, The step of determining the field association data of the current key field in the current processing table based on the current table generation procedure corresponding to the current processing table includes: For any current key field in the current processing table, determine the current field generation program corresponding to the current key field from the current table generation program corresponding to the current processing table; Based on the current field generation procedure, determine whether the field type of the current key field is an externally dependent field type; If so, then according to the current field generation program, extract the field source data of the current key field, and perform business analysis on the current field generation program to obtain the field generation data of the current key field; Generate field association data that includes the field source data, the field generation data, and the current key field of the current field generation program.

4. The method according to claim 2, characterized in that, The step of generating a subroutine based on the reference table to determine the table association data between the current processing table and the corresponding reference processing table includes: Extract the table dependency data of the corresponding reference processing table in the reference table generation subroutine, and perform business parsing on the reference table generation subroutine to obtain the table business logic of the corresponding reference processing table. Generate table association data that includes the table dependency data, the table business logic, and the reference table generation subroutine.

5. The method according to claim 1, characterized in that, The method further includes: Determine the current parsing category for parsing the current processing table; wherein the current parsing category is one of field-level attribute parsing, field-level relationship parsing, and table-level relationship parsing; Based on the current parsing category, determine the current parsing model from the preset candidate parsing models; The current processing table and the current table generation program are input into the current parsing model to obtain the current category parsing data under the current parsing category; wherein, the current category parsing data is one of the following: field basic data, field association data, and table association data.

6. The method according to any one of claims 1-5, characterized in that, The step of determining the current key field in the corresponding current processing table based on the current template fields includes: Extract candidate key fields from the current processing table, and determine the reference key fields corresponding to the candidate key fields based on the corresponding preset field correspondence of the current processing table. The reference key field that matches the current template field corresponding to the current processing table is taken as the target key field, and the candidate key field corresponding to the target key field is taken as the current key field.

7. A document generation device, characterized in that, Configured in a file generation system, the apparatus method includes: The data acquisition module is used to acquire the current file generation template, candidate processing table, and corresponding candidate table generation program for the current business. The current processing table determination module is used to determine the current template field and the current template table identifier in the current file generation template, and determine the current processing table from the candidate processing table based on the current template table identifier; The field basic data determination module is used to determine the current key field in the corresponding current processing table based on the current template fields, and to determine the field basic data of the corresponding current key field based on the current processing table. The current associated data determination module is used to determine the current table generation program corresponding to the current processing table from the candidate table generation program, and determine the current associated data of the corresponding current processing table based on the current table generation program and the current processing table; The target file determination module is used to obtain the target file of the current business based on the basic field data, the current associated data, and the current file generation template.

8. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a file generation method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements a file generation method as described in any one of claims 1-6.

10. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the file generation method according to any one of claims 1-6.