Report template generation method and device, computer equipment, readable storage medium and program product

By obtaining report requirements documents and generating prompts, the script generation model is used to obtain data to obtain the script, solving the problem of low efficiency and high cost of existing statement development forms, and realizing efficient report template generation.

CN119378513APending Publication Date: 2025-01-28KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411296449.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing report development form requires developers to manually write formulas and scripts, resulting in high development costs and low efficiency.

Method used

By obtaining the report requirements document, the data source information and numerical information of the report items are extracted, the prompts are generated, and the input script generates model to obtain the data obtaining script, and finally generates the report template based on the script.

Benefits of technology

The development efficiency of the report template has been improved, the accuracy and generating efficiency of the data acquisition script are enhanced, and the development difficulty of the report demand document is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378513A_ABST
    Figure CN119378513A_ABST
Patent Text Reader

Abstract

The invention relates to a report template generation method and device, computer equipment, a readable storage medium and a program product. The method comprises the following steps: acquiring a report demand document; obtaining data source information and numerical value information corresponding to the report items in the report template based on the report requirement document, wherein the data source information and the numerical value information are used for representing related information of the report items in the business dimension; generating cue words based on the data source information and the numerical value information; inputting the cue word into a script generation model to obtain a data acquisition script corresponding to the report item; and generating a report template based on the data acquisition script, wherein the data acquisition script is used for representing logic of target values of report items in the report template. By adopting the method, the development efficiency of the report template can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a report template generation method, device, computer equipment, computer-readable storage medium and computer program product. Background Art

[0002] With the development of information technology, data processing technology has emerged. By processing data information, such as sorting, classification, statistics, etc., information can be obtained in a more intuitive and direct way. Reports are one of the ways to display the results of information processing. Some cells in the report may have formulas built in to simplify the report generation process.

[0003] However, the current form of report development usually requires developers to sort out the data acquisition and calculation logic of each cell in the report and manually write formulas and scripts. This may result in extremely high development costs for report templates, and due to human misunderstandings, writing errors, etc., the development efficiency of report templates will also be reduced. Summary of the invention

[0004] Based on this, it is necessary to provide a report template generation method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the development efficiency of report templates in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for generating a report template, comprising:

[0006] Obtain report requirement documents;

[0007] Obtaining data source information and value information of business dimensions corresponding to report items in the report template based on the report requirement document;

[0008] Generate a prompt word based on the data source information and the numerical value information;

[0009] Input the prompt word into the script generation model to obtain the data acquisition script corresponding to the report item;

[0010] The report template is generated based on the data acquisition script, and the data acquisition script is used to represent the logic of obtaining the target value of the report item in the report template.

[0011] In one embodiment, the generating of prompt words based on the data source information and the numerical value information includes:

[0012] Obtain reference information corresponding to the data source information and the numerical information from a preset script generation reference library;

[0013] The prompt word is generated based on the reference information.

[0014] In one embodiment, the step of generating a reference library from a preset script to obtain reference information corresponding to the data source information and the numerical information includes:

[0015] If the data source information corresponds to off-table information, then obtaining data table information and filtering condition information corresponding to the data source information from the preset script generation reference library, and obtaining field information corresponding to the numerical information based on the data table information;

[0016] The step of generating the prompt word based on the reference information includes:

[0017] The prompt word is generated based on the data table information, field information and the filtering condition information.

[0018] In one embodiment, before generating the prompt word based on the data source information and the numerical information, the process includes:

[0019] Obtaining report item identification information of the report item;

[0020] Storing the report item identification information in the preset script generation reference library;

[0021] The step of generating a reference library from a preset script to obtain reference information corresponding to the data source information and the numerical information includes:

[0022] If the data source information corresponds to information in a table, then obtaining report item identification information corresponding to the data source information and report item information corresponding to the numerical information from the preset script generation reference library;

[0023] The step of generating the prompt word based on the reference information includes:

[0024] The prompt word is generated based on the report item identification information and the report item relationship information.

[0025] In one embodiment, the method further comprises:

[0026] Obtaining a script format corresponding to the reference information from the preset script generation reference library;

[0027] The prompt word is generated based on the script format and the reference information.

[0028] In one embodiment, after inputting the prompt word into the script generation model to obtain the data acquisition script corresponding to the report item, the method includes:

[0029] If the format of the data acquisition script does not match the data source information, re-execute the step of generating a prompt word based on the data source information and the numerical information;

[0030] Acquire preset filtering condition information, and obtain business data corresponding to the data acquisition script based on the preset filtering condition information;

[0031] If the business data does not conform to the preset data rules, the step of generating prompt words based on the data source information and the numerical information is re-executed.

[0032] In one embodiment, generating the report template based on the data acquisition script includes:

[0033] Obtaining a style corresponding to the report template based on the report requirement document;

[0034] Based on the style, the data acquisition script corresponding to the report item is embedded in the cell corresponding to the report item to generate the report template.

[0035] In one embodiment, the method further comprises:

[0036] Obtain the filter condition information and report type entered by the user;

[0037] Obtaining a corresponding report template based on the report type;

[0038] Obtaining a data acquisition script corresponding to a report item in the report template;

[0039] If the data acquisition script corresponds to an out-of-table value, the filtering condition information is substituted into the data acquisition script to obtain a value corresponding to the report item;

[0040] If the data acquisition script corresponds to a value in the table, obtain the value corresponding to the report item identification information in the data acquisition script, and substitute the value corresponding to the report item identification information into the data acquisition script to obtain the value corresponding to the report item;

[0041] Fill the values ​​of the report items into corresponding cells to generate the target report.

[0042] In a second aspect, the present application also provides a report template generation device, comprising:

[0043] Requirements acquisition module, used to obtain report requirements documents;

[0044] A parsing module, used to obtain data source information and value information of business dimensions corresponding to report items in the report template based on the report requirement document;

[0045] A prompt word generation module, used to generate prompt words based on the data source information and the numerical value information;

[0046] A script generation module, used for inputting the prompt word into a script generation model to obtain a data acquisition script corresponding to the report item;

[0047] A template generation module generates the report template based on the data acquisition script, wherein the data acquisition script is used to represent the logic of obtaining the target value of the report item in the report template.

[0048] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0049] Obtain report requirement documents;

[0050] Obtaining data source information and value information of business dimensions corresponding to report items in the report template based on the report requirement document;

[0051] Generate a prompt word based on the data source information and the numerical value information;

[0052] Input the prompt word into the script generation model to obtain the data acquisition script corresponding to the report item;

[0053] The report template is generated based on the data acquisition script, and the data acquisition script is used to represent the logic of obtaining the target value of the report item in the report template.

[0054] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0055] Obtain report requirement documents;

[0056] Obtaining data source information and value information of business dimensions corresponding to report items in the report template based on the report requirement document;

[0057] Generate a prompt word based on the data source information and the numerical value information;

[0058] Input the prompt word into the script generation model to obtain the data acquisition script corresponding to the report item;

[0059] The report template is generated based on the data acquisition script, and the data acquisition script is used to represent the logic of obtaining the target value of the report item in the report template.

[0060] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0061] Obtain report requirement documents;

[0062] Obtaining data source information and value information of business dimensions corresponding to report items in the report template based on the report requirement document;

[0063] Generate a prompt word based on the data source information and the numerical value information;

[0064] Input the prompt word into the script generation model to obtain the data acquisition script corresponding to the report item;

[0065] The report template is generated based on the data acquisition script, and the data acquisition script is used to represent the logic of obtaining the target value of the report item in the report template.

[0066] The above-mentioned report template generation method, device, computer equipment, computer-readable storage medium and computer program product obtain a report requirement document, which contains data source information and numerical information of each report item of the report. Therefore, the data source information and numerical information of the business dimension corresponding to the report item in the report template can be obtained based on the report requirement document. Defining the report requirement document from the business level can reduce the difficulty of developing the report requirement document. Thereafter, prompt words can be generated based on the data source information and numerical information. The prompt words are used to input into the script generation model to obtain the data acquisition script corresponding to the report item. The data acquisition script is used to characterize the logic of obtaining the target value of the report item. In this way, by inputting the prompt words into the script generation model to generate the data acquisition script, the accuracy of the generated data acquisition script can be improved, and the matching degree between the data acquisition script generated by the large model and the demand information of the report item can be improved, as well as the generation efficiency of the data acquisition script can be improved, thereby improving the generation efficiency of the report template. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the corresponding technologies, the drawings required for use in the embodiments of the present application or the corresponding technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other corresponding drawings can be obtained based on these drawings without paying any creative work.

[0068] FIG1 is an application environment diagram of a method for generating a report template in one embodiment;

[0069] FIG2 is a schematic diagram of a report template in one embodiment;

[0070] FIG3 is a flow chart of a method for generating a report template in one embodiment;

[0071] FIG4 is a schematic diagram of a report requirement document in one embodiment;

[0072] FIG5 is a schematic diagram of a first interface of a script generating a reference library in one embodiment;

[0073] FIG6 is a schematic diagram of a second interface of a script generating a reference library in one embodiment;

[0074] FIG7 is a schematic diagram of a first process of generating a prompt word in one embodiment;

[0075] FIG8 is a schematic diagram showing an overview of the process of a method for generating a report template in one embodiment;

[0076] FIG9 is a schematic diagram of a second process of generating prompt words in one embodiment;

[0077] FIG10 is a schematic diagram of a third flow chart of generating prompt words in another embodiment;

[0078] FIG11 is a schematic diagram of a relationship table in one embodiment;

[0079] FIG12 is a schematic diagram of a process for generating a target report in one embodiment;

[0080] FIG13 is a schematic diagram of an interface for uploading a report requirement document in one embodiment;

[0081] FIG14 is a logic diagram of a method for generating a report template in one embodiment;

[0082] FIG15 is a structural block diagram of a report template generating device in one embodiment;

[0083] FIG. 16 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0084] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0085] The method for generating a report template provided in an embodiment of the present application can be applied in an application environment as shown in FIG. 1. Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on a cloud or other network server. The terminal 102 is used to obtain a report requirement document prepared by a report developer and send the report requirement document to the server. After the server 104 receives the report requirement document sent by the terminal 102, it obtains the data source information and numerical information corresponding to the report item in the report template based on the report requirement document, generates a prompt word based on the data source information and numerical information, inputs the prompt word into the script generation model to obtain the data acquisition script corresponding to the report item, and finally generates a report template based on the data acquisition script of each report item. The report template can be stored in the data storage system, so that when the user wants to generate a related report later, the server can obtain the corresponding report template, and obtain the target value of the report item of the related report based on the data acquisition script corresponding to the report item in the report template, and send the report template filled with the target value to the terminal, so as to display the related report filled with the target value on the terminal. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, and tablet computers. The server 104 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0086] In the report development process, the report developer needs to understand the report requirements and set the formulas and scripts corresponding to the report items in the report to generate a report template. In this way, when a certain report needs to be obtained, the specific value corresponding to the report item can be obtained based on the formula and script corresponding to the report item in the corresponding report template. The report item corresponds to the cell in the table template that needs to be filled with data. As shown in Figure 2, "Total (lowercase)" in the "Tax Refund (Credit) Application Approval Form" corresponds to a report item. The formula corresponding to the report item is shown as the target formula 201 in Figure 2. However, the current report development form is usually that the developer sorts out the data acquisition and calculation logic of each report item in the report and manually writes formulas and scripts. Since the cost of understanding the requirements and the development cost of converting the requirements into formula scripts are extremely high, and human understanding is prone to deviations and human writing may have large subjective errors, the efficiency of report development is low and the development cost is high. To solve the above problems, the present application proposes the following embodiments.

[0087] In an exemplary embodiment, as shown in FIG3 , a method for generating a report template is provided, which is described by taking the method applied to the server in FIG1 as an example, and includes the following steps 302 to 310. Among them:

[0088] Step 302: Obtain a report requirement document.

[0089] Among them, the report requirement document refers to a document that can describe the requirement information of the report and the report items it includes. The requirement information may include report information and data information. Report information refers to relevant information about the report, such as the name of the report, the module to which the report belongs, the permission control of the report, the display format of the report, etc. Data information refers to relevant information about the data displayed in the report, such as the content used by the data to represent (such as: the content corresponding to 2,000 yuan is "operating income"), the value logic of the data (such as: which page under which business segment is obtained from the business system), the scope of the data (such as: the operating income generated between January 1, 2024 and January 31, 2024, or which organization the report content belongs to), etc.

[0090] Exemplarily, as shown in FIG4 , FIG4 shows the report requirement document corresponding to the tax summary table. The corresponding report is used to count the operating income of a tax organization during a certain comparison period. Among them, the report requirement document is written in the form of a table. In this way, the style of the "Tax Summary Table" report can be set. The report requirement document is written in the form of a table, which is not only convenient for report developers to write the document, but also conducive to the subsequent verification of the report template after the report template is generated, such as verification of the report style (such as whether the style is consistent with the report requirement document), verification of the cell (such as whether the formula script of the cell is consistent with the report requirement document), etc.

[0091] It is understandable that the data information displayed in the report includes fixed information and variable information. For example, the "Tax Summary Table", "Declared Amount", "Difference Amount", "Comparison Period" and the like in FIG4 are fixed information, and the variable information may be the "Numerical Value Corresponding to the Provision Amount", "Numerical Value Corresponding to the Declared Amount", "Numerical Value Corresponding to the Difference Amount" and other information in FIG4 that needs to be filled with actual data later. Optionally, in order to facilitate the server to distinguish between fixed information and variable information, the data information may include specific words. For example, the specific word may be "value =". In this way, when the server processes the demand information, when it reads "value =", it confirms that the information of the cell is variable information, and the specific value needs to be filled in when the target report is generated later. Among them, the cell filled with the numerical value corresponding to the declared amount can be written in the report demand document The corresponding method and value logic of the declared amount. For example, in FIG4, the method of obtaining the numerical value corresponding to the declared amount is "external data acquisition", and the value logic can be "based on the 'filter condition information', based on the 'business page query path', query the target page; value = the value of the target cell in the target table in the target page". For example, it can be "Based on the value of the tax organization and comparison period field in the table header, query the prepayment income tax return form in the enterprise income tax → tax return → prepayment return; value = the prepayment income tax return form - the amount of the first row of the main table or the value of the option column, the prepayment return form declaration status = declaration successful". Among them, "the value of the tax organization and comparison period field in the table header" is the "filter condition information", and "enterprise income tax → tax return → prepayment return" is the "business page query path". The business page query path is used to determine the target page in the form of a query path. "Prepayment income tax return form" is the "target page", and "the amount of the first row of the main table or the value of the option column" is the "target cell value". In this embodiment, "filter condition information" is used to filter the display data of the target page. For example, the business system in this embodiment stores the business data of multiple tax organizations in any time period, so the data of tax organization A can be displayed on the target page, and the data of tax organization B can also be displayed. Therefore, in order to obtain the specific required data, "filter condition information" can be described in the report requirement document. The data acquisition method can refer to whether the specific value of the cell is taken from outside the table or from inside the table. The method of obtaining data outside the table can refer to obtaining data from an external data source, such as querying from a database. The method of obtaining data inside the table refers to obtaining data through cells inside the report (for example, through logical operations between cells). The specific value can be text or number.

[0092] The value logic is used to describe the data source information and value information of the cell, such as the conditions under which the value of the cell is queried from which table in the business system, which cell value in the table is taken, or which cells' logical operation results are equal to the corresponding values ​​of which cells in the report.

[0093] Optionally, the value logic may also include the format of the value in the cell, that is, the number of digits in the integer part and the number of digits in the decimal part of the value in the cell. For example, the numerical format of "declared amount" described in the report requirement document is "13 digits for integer and 2 digits for decimal".

[0094] Exemplarily, after the report developer has written the report requirement document, ie, defined the report information of the report and the data information corresponding to each cell, the report requirement document is sent to the server through the terminal, so that the server receives the report requirement document.

[0095] Step 304: obtaining data source information and value information corresponding to the report items in the report template based on the report requirement document.

[0096] Among them, data source information and value information are used to characterize the relevant information of the report item in the business dimension. Data source information refers to the source of the value of the report item, such as a table or a page, or other report items. Value information refers to how to obtain the specific value of the report item, such as a field in a table, or logical operations between other report items. For example, the data source information corresponding to the "accrual amount" is the accrual draft page and the specific query conditions of the accrual draft page in the business system (for example, "accrual draft query in the enterprise income tax → tax accrual → accrual draft according to the header tax organization, comparison period field value, query in corporate income tax → tax accrual → accrual draft, query range is the accrual draft within the comparison period (comparison period start ≤ accrual to the tax period ≤ comparison period end), take the latest accrual draft, accrual draft document status = reviewed"), the corresponding value information is, for example, "the tax summary table in the accrual draft page - the first line of the main table item in the current year". The data source information corresponding to the "difference amount", that is, "operating income", is the value of the "declared amount" and the value of the "accrued amount" of this bank, and the corresponding numerical information is the difference. Optionally, when describing the report requirement document, the server can correctly parse the symbols in the report requirement document according to the content in the report requirement document. For example, for a specific symbol in the report requirement document, such as "-", the server can parse the meaning of the symbol based on the method of obtaining data. For the demand information corresponding to the off-table data, such as "value = the accumulated amount value of the first line of the item in the accrual draft-tax summary table this year", the symbol "-" can represent the subordinate relationship between the former and the latter, that is, it represents the tax summary table in the accrual draft page. For data extraction in the table, the symbol "-" can represent the subtraction operation between the former and the latter, for example, the specific value filled in the cell is the value of the declared amount of this bank minus the value of the accrued amount of this bank. It can be understood that Figure 4 is only an example of a report requirement document. In some other embodiments, the report requirement information of certain cells can also be a general requirement description such as "the income of department B of tax organization A in September".

[0097] Data source information and value information are both set from the business dimension and are used to characterize the relevant information of the report item in the business dimension. In other words, the report developer determines the data source of the report item through the application, for example, a table in the second page included in the first page of the application. The value information is obtained from a field in a table in the second page. This can simplify the report requirement document, improve the accuracy and efficiency of the report requirement document writing, and the report developer can verify the correctness of the data source information and value information by himself, reducing subjective errors.

[0098] For example, after obtaining the report requirement document, the server may parse the report requirement document to extract data source information and value information corresponding to the report item from the report requirement document, that is, the data source information and value information filled in the cell.

[0099] It is understandable that after obtaining the report requirement document, the server will generate a one-to-one corresponding report item identifier for the cells that need to be filled with data, that is, the report items that need to be filled with data. This makes it easier to generate a data acquisition script for the report item based on the data source information and the value information, and then the report item identifier and the data acquisition script can be matched one by one, thereby improving the accuracy of the report model.

[0100] Step 306: Generate prompt words based on the data source information and the value information.

[0101] Step 308: input the prompt word into the script generation model to obtain the data acquisition script corresponding to the report item.

[0102] The prompt words are used to be input into the script generation model to generate the data acquisition script. The script generation model can be obtained based on the language model. By inputting the prompt words, the script generation model can be guided to generate the required data acquisition script. The data acquisition script is used to represent the logic of obtaining the target value of the report item in the report template, such as a formula, script, etc. The target value can be text or a number.

[0103] For example, the prompt word may specify a format to restrict the result format of the data acquisition script generated by the script generation model. Or the prompt word may also specify some database tables, fields, etc. so that the script generation model generates corresponding query statements.

[0104] In some embodiments, the server may obtain reference information corresponding to the data source information and the numerical information from a preset script-generated reference library; and then generate prompt words based on the reference information.

[0105] Optionally, after obtaining the reference information, if the data source information corresponds to off-table information, the server obtains data table information and filter condition information corresponding to the data source information from a preset script-generated reference library, and obtains field information corresponding to the numerical information based on the data table information; and then generates prompt words based on the data table information, field information and filter condition information.

[0106] As can be seen from the foregoing, after obtaining the report requirement document, the server can generate unique report item identification information corresponding to the report items in the document, and save the report item identification information to the script generation reference library. Optionally, if the data source information corresponds to the information in the table, the report item identification information and the report item relationship information corresponding to the numerical information can be obtained from the script generation reference library. The report item relationship information corresponds to a logical operation. For example, if the logical operation is subtraction, the corresponding report item relationship information can be sub() or a minus sign. By obtaining the report item relationship information from the reference library, the confidentiality of the generated data acquisition script can be strengthened and the exclusivity of the data acquisition script can be improved.

[0107] Step 310: Generate a report template based on the data acquisition script.

[0108] After obtaining the data acquisition script corresponding to the report item, the corresponding relationship between the report item and the formula script in the report template is obtained, and then the target value corresponding to the report item can be obtained based on the formula script.

[0109] Optionally, if the target report (a report filled with specific target values) is an online document, a relationship table corresponding to the report template corresponding to the target report can be stored in the data storage system. The relationship table is used to represent the relationship between the report items and the data acquisition script. When the user needs to obtain the target report, the server can obtain the specific value corresponding to each report item based on the relationship table, fill the specific value into the report template, and generate the target report.

[0110] Optionally, after obtaining the data acquisition script, the server may also fill the data acquisition script into the cell corresponding to the report item. When the user needs to obtain the target report, for each cell, the server reads the report template to obtain the data acquisition script built into the report template to obtain the corresponding specific value, and then generates the target report.

[0111] In the above-mentioned report template generation method, by obtaining a report requirement document, the report requirement document contains data source information and numerical information of each report item of the report. Therefore, the data source information and numerical information of the business dimension corresponding to the report item in the report template can be obtained based on the report requirement document. Defining the report requirement document from the business level can reduce the difficulty of developing the report requirement document. Thereafter, prompt words can be generated based on the data source information and numerical information. The prompt words are used to input into the script generation model to obtain the data acquisition script corresponding to the report item. The data acquisition script is used to characterize the logic of obtaining the target value of the report item. By inputting the prompt words into the script generation model to generate the data acquisition script, the accuracy of the generated data acquisition script can be improved, and the matching degree between the data acquisition script generated by the large model and the requirement information of the report item can be improved, as well as the generation efficiency of the data acquisition script can be improved, thereby improving the generation efficiency of the report template.

[0112] Since the business corresponding to the application may be numerous and may change, and the generation rules of prompt words may also be adjusted, etc., in the process of generating prompt words based on data source information and numerical information, the information related to the generation of prompt words can be stored in the script generation reference library, so that when generating prompt words, reference information related to the data information of the report item can be obtained from the script generation reference library, and then the prompt words are obtained based on the reference information. In this way, the reference information related to the generation of prompt words can be obtained centrally, and the information in the script generation reference library can be changed as needed, thereby improving the decoupling of the prompt word generation module. The information in the script generation reference library can be configured with a management page for management (refer to Figures 5 and 6). On this management page, managers can upload relevant documents. For example, in Figure 5, managers can view the knowledge documents in the reference library. For example, in Figure 6, managers can view the content of the uploaded documents.

[0113] In addition to the static information such as the uploaded documents described above, the script generation reference library also stores interface information to store dynamic information. For example, if a report item in a report requirement document is obtained from a page of an application, when obtaining the corresponding reference information, the relevant reference information can be obtained through the interface information corresponding to the page.

[0114] In an exemplary embodiment, as shown in FIG7 , the step of generating prompt words based on data source information and value information includes steps 702 to 704. Among them:

[0115] Step 702, obtaining reference information corresponding to the data source information and the value information from a preset script generation reference library.

[0116] The reference information is used to generate prompt words. The reference information may include database information (e.g., database tables and database fields corresponding to report items, fields corresponding to query conditions), data acquisition script formats (e.g., the format of the data acquisition script corresponding to external data acquisition is the first format, and the format of the data acquisition script corresponding to internal data acquisition is the second format), report item identification information, and other information.

[0117] As mentioned above, the script generation reference library stores relevant information for generating prompt words, such as product manuals, business documents, regulatory libraries, and metadata information (the correspondence between page information and database information). The knowledge documents (product manuals, business documents, regulatory libraries, etc.) in the generation reference library can be used to generate prompt words for report items whose specific values ​​are text (refer to the corresponding report item of "Tax Refund Policy Basis" in Figure 2).

[0118] Exemplarily, as shown in FIG8 , the information in the script generation reference library can be stored in the reference library in the form of vectors. When the server parses the report requirement document and obtains the data source information and numerical information corresponding to the report item, the data source information and numerical information can be vectorized to obtain the vector corresponding to the data source information and numerical information. Then, based on the obtained vector, multi-layer vector recall is performed in the script generation reference library to obtain reference information related to the report item.

[0119] Step 704: Generate prompt words based on the reference information.

[0120] After obtaining the reference information, the server can generate prompt words based on the reference information. Since the reference information is obtained based on vector recall, the reference information can expand the data information of the report item to improve the accuracy of the expression of the prompt word. For example, if the description of the data information of a report item in the report requirement document is relatively simple (such as the description information of the page path omits a page), then the relevant path of the source page of the report item can be completed through vector recall, thereby improving the completeness of the prompt word and further improving the accuracy of the generated data acquisition script.

[0121] In this embodiment, by obtaining reference information corresponding to the data source information and the numerical information from a preset script generation reference library, and then generating prompt words based on the reference information, the reference information obtained in this way is sufficient, and thus the generated prompt words are sufficient and complete. In addition, since the script generation reference library is variable, the adaptability and comprehensiveness of the method can be improved.

[0122] As mentioned above, there are two data sources for report items in a report template, one is outside the table and the other is inside the table. For report items whose data source information corresponds to outside the table, the target value of the report item comes from outside the table, for example, it is obtained from a table in a database. For report items whose data source information corresponds to inside the table, the target value of the report item comes from inside the table, for example, it is obtained by logical operations between other report items in the report. As shown in FIG. 9, in one embodiment, for report items with values ​​outside the table, the steps for obtaining reference information can refer to steps 902 to 904. Among them:

[0123] Step 902, if the data source information corresponds to off-table information, then obtain data table information and filter condition information corresponding to the data source information from a preset script generation reference library, and obtain field information corresponding to the numerical information based on the data table information.

[0124] Step 904: Generate prompt words based on the data table information, field information and filtering condition information.

[0125] Among them, the data source information includes path information for indicating how to obtain the report item information in the business dimension. The numerical information includes specific location information for indicating how to obtain the report item information in the business dimension. For example, the path information may be clicking button B on page A to jump to page C, and clicking button D on page C to jump to page E, thereby finding the report item in a table on page E. The specific location information may be a cell in the table corresponding to the data source information. For example, cell G in table F under page E, thereby finding the specific location of the report item. The data table information may be the table name or table identifier corresponding to the table represented by the data source information in the database. The data table information is used to indicate the relevant information of the table where the report item is located in the database. The field information is used to indicate the field name or field identifier corresponding to the report item in the database.

[0126] Therefore, if the data source information corresponds to a table outside, the data source information can also include conditions. Regarding the data in the report, it is obvious that conditional restrictions need to be added, otherwise the generated target report may contain a large amount of useless data or data that is not required. For example, if you need to obtain a report of a certain company, if you do not add the "company" condition, the data in the generated target report may contain data from other companies. Or if you need to obtain a report within a certain time period, if you do not add the "time" condition, the data in the generated target report may include data within all time periods. For example, the "filter condition information" in Figure 4 is a condition. This condition needs to be entered by the user in the subsequent process of generating a target report based on the report template, or it can be specified by default. The filter condition information can be the name of the tax organization, time value, etc. The server performs vector recall on the conditions included in the data source information, and then the filter condition information can be obtained. The filter condition information can be the field information (such as field name or field identifier) ​​corresponding to the condition in the database. For example, through reference information, the field name of the "header tax organization" is "org".

[0127] Exemplarily, the correspondence between page information and database information is stored in the preset script generation reference library. For example, a cell in a table on a page corresponds to a field in a table in the database. Therefore, the server can obtain the data table information and filter condition information corresponding to the data source information from the preset script generation reference library, and obtain the field information corresponding to the numerical information based on the data table information. In this way, the table name corresponding to the data table information, the condition field name corresponding to the filter condition information, and the field name corresponding to the field information can be obtained, and then the prompt word corresponding to the report item is generated in combination with other information used to generate prompt words (such as the format of the data acquisition script, the above-mentioned table name, condition field name, explanation of the field name and other information).

[0128] For example, the data source information and numerical information of the report item are "Based on the value of the tax organization and comparison period fields in the table header, in the query of corporate income tax-tax provision-provision draft, the query range is the provision draft within the comparison period (comparison period start <= provision to the tax period <= comparison period end), take the latest provision draft; value = the current year cumulative amount value of the third row of the item in the provision draft-tax summary table". "The value of the tax organization and comparison period fields in the table header" is a condition, corresponding to the filtering condition information. "In the query of corporate income tax-tax provision-provision draft, the query range is the provision draft within the comparison period (comparison period start <= provision to the tax period <= comparison period end), take the latest provision draft; value = the current year cumulative amount value of the third row of the item in the provision draft-tax summary table" is used to obtain the data table information. "The current year cumulative amount value of the third row of the item" is used to obtain the field information. Therefore, based on the script-generated reference library, we can get reference information such as "the field name of the header tax organization is org, and the corresponding value is #org; the comparison period fields are skssqq and skssqz, and the corresponding values ​​are #start and #end respectively", "the table name of the tax summary table is tccit_report", "obtained by querying the database", "the field name corresponding to the cumulative amount value for this year is sumamount", and "the row number field is itemno". The prompt words obtained based on this reference information are "It is now known that the tax summary table is tccit_report, the header comparison start time field is skssqq, and the value is #start, the end time field is skssqz, and the value is #end, the organization field is org, and the value is #org, the cumulative amount value field for this year is sumamount, and the row number field is itemno. Please output the following requirement using a query statement expression: Query the cumulative amount value of this year in the third row of the item in the tax summary table corresponding to the target organization from the comparison start time to the comparison end time."

[0129] In some embodiments, the data source information may also include a data retrieval method, that is, whether the value of the report item is obtained from outside the table or from within the table. If the data source information does not clearly state the data retrieval method, the server may also obtain the data retrieval method by analyzing the data source information. For example, it may be determined whether the data source information includes a condition, and whether the data source information is other report items in the report requirement document.

[0130] In this embodiment, if the data source information corresponds to off-table information, the data table information and filtering condition information corresponding to the data source information are obtained from the preset script generation reference library, and the field information corresponding to the numerical information is obtained based on the data table information. Then, a prompt word is generated based on the data table information, field information, and filtering condition information. In this way, it is possible to determine how to determine the prompt word for the report item with off-table values. The report developer only needs to determine the location information of the report item in the business dimension without considering the relevant information in the database, thereby improving the security of the system data.

[0131] The above content describes how to generate the prompt words of the report items corresponding to the data source information outside the table. As shown in Figure 10, in one implementation, for the report items with values ​​in the table, how to obtain the reference information can be seen in steps 1002 to 1008. Among them:

[0132] Step 1002: Obtain report item identification information of the report item.

[0133] Step 1004: Store the report item identification information into a preset script generation reference library.

[0134] The report item identification information may refer to the identifier (ID) of the report item and the identification name of the report item in the report requirement document (such as "declared amount" or "accrued amount"). The report item identification information can identify a unique report item. After the server receives the report requirement document sent by the terminal, it can generate a unique report item identifier for the report item in the report requirement document, and store the report item identifier and the corresponding identification name in the script generation reference library. In this way, when generating prompt words, the report item identifier can be obtained from the script generation reference library, and then the data acquisition script can be generated using the report item identifier.

[0135] Step 1006: If the data source information corresponds to the information in the table, the report item identification information corresponding to the data source information and the report item relationship information corresponding to the numerical information are obtained from the preset script generation reference library.

[0136] Step 1008: Generate prompt words based on the report item identification information and the report item relationship information.

[0137] Among them, the report item relationship information is used to represent the logical operation information between report items, such as addition, subtraction, multiplication, division, etc. For example, the server obtains the requirement information of a certain report item, which is "value = the bank's declared amount - the provision amount". When the server parses the requirement information, it obtains that the logical operation between the report items is subtraction, and the report item names are "declared amount" and "provision amount". Then the corresponding report item identification information obtained from the reference library is "identifier A is sbje, identifier B is jtje", and the relevant prompt word content can be "identifier A minus identifier B". Then, based on the report item identification information and the report item relationship information, a prompt word is generated. The generated prompt word can be "It is known that identifier A is sbje, identifier B is jtje, please output the following requirement using an expression: identifier A minus identifier B".

[0138] In this embodiment, taking into account the generation process of the data acquisition script corresponding to the values ​​in the table, the report item identification information corresponding to the data source information and the report item relationship information corresponding to the numerical information are obtained from the script generation reference library, and then prompt words are generated based on the report item identification information and the report item relationship information. This can improve the usability of the method, and by storing the report item identification information in the reference library, the information can be centrally managed, and the reference information of the prompt words is uniformly obtained from the reference library, which can improve the robustness of the system.

[0139] In another implementation, after obtaining a report requirement document and generating a unique report item identifier for a report item in the report requirement document, the server may establish a relationship table between the report item information in the report requirement document (such as name, position in the report requirement document) and the report item identifier. The relationship table corresponds to the report requirement document. The position of the report item in the report requirement document may be the row number and column number of the table of the report item in the report requirement document. Optionally, the report item identifier may be generated in the form of "row number_column number_name" or "report name_row number_column number_name". This facilitates determining the report item identifier of the report item corresponding to the data source information when the data source information corresponds to the information in the table. For example, if the data source information of the report item is "the amount reported by this bank", the report item identifier corresponding to "the amount reported by this bank" may be determined based on the row number and "the amount reported" in the report item identifier of the report item. After establishing the relationship table, when generating prompt words based on the data source information and the numerical information, the relationship table may be read to obtain the report item identification information corresponding to the data source information, and then the logical relationship between the report item identification information in the data acquisition script may be determined based on the numerical information. For example, if the data source information and numerical information of a report item is "value = the bank's declared amount - the accrued amount", then the server can directly obtain the data acquisition script "identifier A - identifier B" based on the information and the relationship table, and the script generation reference library can be omitted. However, in an embodiment of using a script to generate a reference library, for example, after the relationship table is generated, the relationship table is stored in the script generation reference library, so that when the prompt word is generated, the content required for the prompt word can be obtained from the script generation reference library, and each module can be encapsulated. In addition, extracting reference information from the script generation reference library can also adapt to more changes. For example, if the format corresponding to the logical operation changes, the script format document in the script generation reference library can be directly modified without modifying the code, thereby improving the security of the program.

[0140] As can be seen from the above content, the server can obtain key information for generating prompt words from the script generation reference library, such as table name, field name, filter condition field, report item identifier and other information. In this way, the corresponding data acquisition script can be generated based on the prompt word. In some embodiments, format restrictions can also be added to the data acquisition script to improve the proprietary nature of the generated data acquisition script, thereby improving the security of the system. In other words, the script format of the data acquisition script is specified, such as the statement for taking values ​​outside the table is not a general SQL statement, but has some proprietary restrictions. Similarly, the data acquisition script used for taking values ​​inside the table can also add some format requirements to adapt to the rules for taking values ​​inside the table. Therefore, the generation method embodiment of the report template of the present application can also obtain the script format corresponding to the reference information from the script generation reference library, and then generate prompt words based on the script format and the reference information. Among them, the server can parse the reference information or parse the data source information. If the reference information or the data source information corresponds to taking values ​​outside the table, the format of the query statement can be extracted from the reference library. If the reference information or the data source information corresponds to taking values ​​inside the table, the format of the calculation statement can be extracted from the reference library.

[0141] For example, see Figure 6, the script generation reference library stores documents with relevant information in script format. If the value is taken outside the table, the corresponding query statement uses {S[]} to indicate that the data acquisition script is a query statement, and the brackets are SQL statements. For example: {S[select id from table where org='#org']}. If the value is taken inside the table, the expression outside {C[]} is used to indicate that the data acquisition script is a calculation statement, and the brackets are the unique identifier of the report cell, such as the identifier of report cell A is key1, and the identifier of report cell B is key2. For example: {C[key1]}+ {C[key2]}.

[0142] In this embodiment, by obtaining a script format corresponding to reference information from a script generation reference library and generating prompt words based on the script format and reference information, the proprietary nature of the data acquisition script for the report item in the report template can be improved, the adaptability within the system can be improved, and the security of the system can be enhanced.

[0143] Since the data acquisition script generated based on the script generation model may have deviations, in order to improve the security of the generated data acquisition script, the generated data acquisition script can be verified. As shown in Figure 8, after the formula script is generated, the formula script is subjected to syntax verification and logic verification.

[0144] In one implementation, after the prompt word is input into the script generation model and the data acquisition script corresponding to the report item is obtained, if the format of the data acquisition script does not match the data source information, the prompt word is regenerated based on the data source information and the numerical information. For example, the data acquisition script for off-table values ​​is {C[]}. In this case, the format is wrong and the data acquisition script needs to be regenerated. Optionally, the prompt word can be restricted based on the logic check result. For example, an information restriction such as "do not use {C[]} format" is added to the prompt word.

[0145] For logic verification, the server can first obtain preset filter condition information, and obtain the business data corresponding to the data acquisition script based on the preset filter condition information; if the business data does not meet the data preset rules, the prompt word is regenerated based on the data source information and the value information. Among them, the preset filter condition information refers to the specific value corresponding to the filter condition information, which is a specific value. The business data is the specific value corresponding to the data acquisition script. The data preset rules are some requirements for specific values. For example, the specific value of a certain report item cannot be less than zero, and the specific value of report item A cannot be less than the specific value of report item B. The filter condition information is a variable in the data acquisition script. If the filter condition information is determined, the specific value corresponding to the report item in the report template can be determined, and then the specific values ​​of other report items can be obtained, that is, the target report filled with specific values ​​can be obtained. In order to perform logic verification on the data acquisition script, the preset filter condition information can be based on the preset filter condition information. The preset filter condition information is a specific value used for verification. The specific value is substituted into the data acquisition script, and the specific value of the report item in the report template can be obtained, so that the specific value can be verified based on the data preset rules, and then the logic of the report item can be judged whether it is wrong.

[0146] In this embodiment, the accuracy of the data acquisition script can be improved by performing format verification and logic verification on the data acquisition script.

[0147] After the above steps, the data acquisition script corresponding to the report item in the report template can be obtained. In one implementation, a relationship table can be established between the report item in the report template and the data acquisition script (as shown in Figure 11). When receiving an instruction from a user to generate a target report, the server can first determine the report template corresponding to the target report and the relationship table corresponding to the report template, and then obtain the target report. In another implementation, the report requirement document can be parsed to obtain the style corresponding to the report template (i.e., the style of the target report), and based on the style, the data acquisition script corresponding to the report item can be built into the cell corresponding to the report item to generate a report template. For example, the report requirement document of Figure 4 determines the table format of the report template, the position of each report item in the table, and the content filled in each cell.

[0148] In this embodiment, by writing in the form of a table in the report requirement document, it can assist report developers in determining the logic of report items, reduce the difficulty of writing report requirement documents, and the data acquisition script can be built into the report template to facilitate determining whether the data acquisition script corresponding to each cell is correct.

[0149] As shown in FIG12 , after generating the report template, the server may store the report template in a database. In a possible implementation, how to apply the report template to obtain the target report can be seen from step 1202 to step 1212. Among them:

[0150] Step 1202, obtaining the filter condition value and report type input by the user.

[0151] The filter condition value refers to the specific value corresponding to the filter condition information, such as which tax organization, which time period, and the variable in the corresponding data acquisition script. The report type refers to the report type that the user wants to generate, such as an income comparison table, a personnel table, etc. The report type can be represented by the name of the report.

[0152] Step 1204: Obtain a corresponding report template based on the report type.

[0153] For example, if a user wants to obtain an income statement, the server can obtain the report template corresponding to the income statement from the database.

[0154] Step 1206: Obtain a data acquisition script corresponding to a report item in the report template.

[0155] Step 1208, if the data acquisition script corresponds to an external value, substitute the filter condition value into the data acquisition script to obtain the target value corresponding to the report item.

[0156] Step 1210, if the data acquisition script corresponds to the value in the table, obtain the value corresponding to the report item identification information in the data acquisition script, and substitute the value corresponding to the report item identification information into the data acquisition script to obtain the target value corresponding to the report item.

[0157] Step 1212, fill the values ​​of the report items into the corresponding cells to generate the target report.

[0158] After the server obtains the report template, it can obtain the data acquisition script corresponding to the report item in the report template through the relationship table. If the data acquisition script is an off-table value, the filter condition value entered by the user can be substituted into the data acquisition target value (number or text). After obtaining the target value of the report item with off-table value, the target value of the report item with in-table value can be obtained based on the target value of these report items. For the report item with in-table value, the corresponding target value can be obtained based on the report item identification information in the data acquisition script, and then the obtained target value is substituted into the data acquisition script to obtain the target value of the report item with in-table value. Fill the target value into the corresponding cell of the report template to obtain the target report. The generated target report can be sent to the terminal to display the target report on the display interface of the terminal for easy viewing.

[0159] In this embodiment, the report template with the data acquisition script can increase the generation speed of the target report and improve the data accuracy of the target report.

[0160] In one embodiment, in order to improve the efficiency and accuracy of generating report templates, a report developer can upload a report requirement document on a terminal, and a server parses the report requirement document to obtain a corresponding report template, wherein each report item in the report template has a corresponding data acquisition script. For a detailed description, please refer to the following content.

[0161] As shown in Figure 13, the report developer clicks the "Upload button" on the terminal display interface to upload the report requirement document. When uploading the report requirement document, the user needs to fill in some report-related information, such as the name of the report, the report code, the effective date of the report, etc. In the report requirement document, each cell describes the data acquisition method, where the data acquisition method includes external data acquisition and inter-table (inter-table) calculation. External data acquisition is to obtain data from an external data source (query statement query table), and inter-table (inter-table) calculation refers to logical operations such as addition, subtraction, multiplication and division between cells of the current report. Then describe the specific logic, such as which table to query from under what conditions, which field to obtain, or which cells' logical operation values ​​are equal to which cell. As shown in Figure 14, the report developer defines the requirement document template and uploads the report requirement document on the terminal. After receiving the report requirement document, the server parses the report requirement document. Among them, the report template (such as: style) can be parsed from the report requirement document, and the report items in the report template and the corresponding report item identification information can be parsed, as well as the data source information and value information corresponding to the report items (i.e., parsing business logic). In other words, after uploading the requirement document, the system will parse the document internally. Generate templates (styles) and report items (unique identification codes for each cell in the report. Used to map cells to corresponding formulas, scripts, rules, and calculation results) and save them into the database. Then parse the required text content. In this embodiment, the process of generating formulas can be encapsulated into an application. The server inputs the parsed business logic to the application, and the application can output the corresponding formula script, that is, the data acquisition script. The application construction process may include building a knowledge base (that is, a script generation reference library), developing prompts, and task scheduling. Building a knowledge base refers to pre-setting a rich and high-quality knowledge base in the platform. The knowledge base includes static document knowledge and a dynamic knowledge base (a dynamic knowledge base is a real-time query of business data through an interface).

[0162] The processing process of generating the formula may be: if the data source information corresponds to the off-table information, then the data table information and the filtering condition information corresponding to the data source information are obtained from the preset script generation reference library, and the field information corresponding to the numerical information is obtained based on the data table information; prompt words are generated based on the data table information, the field information and the filtering condition information. The prompt words are input into the script generation model to obtain the data acquisition script corresponding to the report item.

[0163] If the data source information corresponds to the information in the table, the report item identification information corresponding to the data source information and the report item relationship information corresponding to the numerical information are obtained from the preset script generation reference library. A prompt word is generated based on the report item identification information and the report item relationship information. The prompt word is input into the script generation model to obtain the data acquisition script corresponding to the report item.

[0164] When generating prompt words, the script format of the data acquisition script corresponding to the report item is also obtained, so that the generated data acquisition script conforms to the specified format. For example, if the value is obtained outside the table, the corresponding query statement uses {S[]} to indicate that the data acquisition script is a query statement, and the brackets are SQL statements. For example: {S[select id from table where org='#org']}. If the value is obtained inside the table, the expression outside {C[]} is used to indicate that the data acquisition script is a calculation statement, and the brackets are the unique identifier of the report cell, such as the identifier of report cell A is key1, and the identifier of report cell B is key2. For example: {C[key1]}+ {C[key2]}.

[0165] When the prompt word is input into the script generation model to obtain the data acquisition script, the server can call the model multi-round conversation interface to generate a formula script.

[0166] After obtaining the data acquisition script, the server also needs to verify the obtained data acquisition script. For example, the generated data acquisition script is input into the self-checking system for verification. If the format of the data acquisition script does not match the data source information, the prompt word is regenerated based on the data source information and the numerical information. For logical verification, the server can first obtain the preset filtering condition information, and obtain the business data corresponding to the data acquisition script based on the preset filtering condition information; if the business data does not meet the preset data rules, the prompt word is regenerated based on the data source information and the numerical information. The step of regenerating the prompt word can also be specified a number of times to avoid falling into a loop and causing the system to be unresponsive. Finally, a report template is generated based on the verified data acquisition script.

[0167] In this embodiment, a highly accurate formula script is generated by using the RAG search enhancement generation technology and self-checking system of the search-generation prompt word. By limiting the prompt words and generating accurate prompt words, the matching degree between the data acquisition script generated by the large model and the demand information of the report items can be improved. And by establishing a script generation reference library, the feasibility is enhanced, which facilitates the centralized management of system information. In addition, by defining the report requirement document from the business dimension, the difficulty of writing the report requirement document can be reduced and the efficiency of report generation can be improved.

[0168] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0169] Based on the same inventive concept, the embodiment of the present application also provides a report template generation device for implementing the report template generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more report template generation devices provided below can refer to the limitations of the report template generation method above, and will not be repeated here.

[0170] In an exemplary embodiment, as shown in FIG. 15 , a report template generation device is provided, including: a demand acquisition module 1501, a parsing module 1502, a script generation module 1503 and a template generation module 1504, wherein:

[0171] The requirement acquisition module 1501 is used to acquire the report requirement document.

[0172] The parsing module 1502 is used to obtain data source information and value information of the business dimension corresponding to the report item in the report template based on the report requirement document.

[0173] The script generation module 1503 is used to generate prompt words based on the data source information and the numerical information; input the prompt words into the script generation model to obtain the data acquisition script corresponding to the report item.

[0174] The template generation module 1504 generates the report template based on the data acquisition script, where the data acquisition script is used to represent the logic of obtaining the target value of the report item in the report template.

[0175] In one embodiment, the script generation module 1503 may include a prompt word generation module and a data acquisition script generation module. The prompt word generation module may also be used to obtain reference information corresponding to the data source information and the numerical information from a preset script generation reference library; and generate the prompt word based on the reference information.

[0176] In one embodiment, the prompt word generation module can also be used to obtain data table information and filtering condition information corresponding to the data source information from the preset script generation reference library if the data source information corresponds to off-table information, and obtain field information corresponding to the numerical information based on the data table information; generate the prompt word based on the data table information, field information and the filtering condition information.

[0177] In one embodiment, the parsing module 1502 is further used to obtain report item identification information of the report item; store the report item identification information in the preset script generation reference library;

[0178] The prompt word generation module can also be used to obtain the report item identification information corresponding to the data source information and the report item relationship information corresponding to the numerical information from the preset script generation reference library if the data source information corresponds to the information in the table; and generate the prompt word based on the report item identification information and the report item relationship information.

[0179] In one embodiment, the prompt word generation module is further used to obtain a script format corresponding to the reference information from the preset script generation reference library; and generate the prompt word based on the script format and the reference information.

[0180] In one embodiment, the script verification module is also used to re-execute the step of generating prompt words based on the data source information and the numerical information if the format of the data acquisition script does not match the data source information; obtain preset filtering condition information, and obtain the business data corresponding to the data acquisition script based on the preset filtering condition information; if the business data does not comply with the data preset rules, re-execute the step of generating prompt words based on the data source information and the numerical information.

[0181] In one embodiment, the template generation module 1504 is further used to obtain the style corresponding to the report template based on the report requirement document; based on the style, the data acquisition script corresponding to the report item is embedded in the cell corresponding to the report item to generate the report template.

[0182] In one embodiment, the device includes a report generation module, which is used to obtain the filter condition value and report type input by the user; obtain the corresponding report template based on the report type; obtain the data acquisition script corresponding to the report item in the report template; if the data acquisition script corresponds to an out-of-table value, substitute the filter condition value into the data acquisition script to obtain the target value corresponding to the report item; if the data acquisition script corresponds to an in-table value, obtain the numerical value corresponding to the report item identification information in the data acquisition script, substitute the numerical value corresponding to the report item identification information into the data acquisition script to obtain the target value corresponding to the report item; fill the numerical value of the report item into the corresponding cell to generate the target report.

[0183] Each module in the report template generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0184] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG16. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store information such as a script generation reference library, a report template (the corresponding relationship between report items and data acquisition scripts). The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating a report template is implemented.

[0185] Those skilled in the art will understand that the structure shown in FIG. 16 is merely a block diagram of a partial structure corresponding to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0186] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0187] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented:

[0188] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0189] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the corresponding data must comply with the corresponding regulations.

[0190] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the corresponding hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0191] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0192] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating a report template, characterized in that: The method comprises: Obtain report requirement documents; Based on the report requirement document, data source information and value information corresponding to the report item in the report template are obtained, wherein the data source information and the value information are used to characterize relevant information of the report item in the business dimension; Generate a prompt word based on the data source information and the numerical value information; Input the prompt word into the script generation model to obtain the data acquisition script corresponding to the report item; The report template is generated based on the data acquisition script, and the data acquisition script is used to represent the logic of obtaining the target value of the report item in the report template.

2. The generation method according to claim 1, characterized in that: The generating of prompt words based on the data source information and the numerical value information includes: Obtain reference information corresponding to the data source information and the numerical information from a preset script generation reference library; The prompt word is generated based on the reference information.

3. The generation method according to claim 2, characterized in that: The step of generating a reference library from a preset script to obtain reference information corresponding to the data source information and the numerical information includes: If the data source information corresponds to off-table information, then obtaining data table information and filtering condition information corresponding to the data source information from the preset script generation reference library, and obtaining field information corresponding to the numerical information based on the data table information; The step of generating the prompt word based on the reference information includes: The prompt word is generated based on the data table information, field information and the filtering condition information.

4. The generation method according to claim 2, characterized in that: Before generating the prompt word based on the data source information and the numerical information, the method includes: Obtaining report item identification information of the report item; Storing the report item identification information in the preset script generation reference library; The step of generating a reference library from a preset script to obtain reference information corresponding to the data source information and the numerical information includes: If the data source information corresponds to information in the table, then obtaining report item identification information corresponding to the data source information and report item relationship information corresponding to the numerical information from the preset script generation reference library; The step of generating the prompt word based on the reference information includes: The prompt word is generated based on the report item identification information and the report item relationship information.

5. The generation method according to claim 2, characterized in that: The method further comprises: Obtaining a script format corresponding to the reference information from the preset script generation reference library; The prompt word is generated based on the script format and the reference information.

6. The generation method according to claim 1, characterized in that: After inputting the prompt word into the script generation model to obtain the data acquisition script corresponding to the report item, the method includes: If the format of the data acquisition script does not match the data source information, re-execute the step of generating a prompt word based on the data source information and the numerical information; Acquire preset filtering condition information, and obtain business data corresponding to the data acquisition script based on the preset filtering condition information; If the business data does not conform to the preset data rules, the step of generating prompt words based on the data source information and the numerical information is re-executed.

7. The method according to claim 1, characterized in that The generating the report template based on the data acquisition script includes: Obtaining a style corresponding to the report template based on the report requirement document; Based on the style, the data acquisition script corresponding to the report item is embedded in the cell corresponding to the report item to generate the report template.

8. The generation method according to claim 1, characterized in that: The method further comprises: Get the filter condition value and report type entered by the user; Obtaining a corresponding report template based on the report type; Obtaining a data acquisition script corresponding to a report item in the report template; If the data acquisition script corresponds to an out-of-table value, the filter condition value is substituted into the data acquisition script to obtain a target value corresponding to the report item; If the data acquisition script corresponds to a value in the table, obtain the value corresponding to the report item identification information in the data acquisition script, and substitute the value corresponding to the report item identification information into the data acquisition script to obtain the target value corresponding to the report item; Fill the values ​​of the report items into the corresponding cells to generate the target report.

9. A report template generating device, characterized in that: The device comprises: Requirements acquisition module, used to obtain report requirements documents; A parsing module, used to obtain data source information and value information of business dimensions corresponding to report items in the report template based on the report requirement document; A script generation module, used to generate prompt words based on the data source information and the numerical information; input the prompt words into a script generation model to obtain a data acquisition script corresponding to the report item; A template generation module generates the report template based on the data acquisition script, wherein the data acquisition script is used to represent the logic of obtaining the target value of the report item in the report template.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.