Document customization report generation method and device based on data conversion and medium
Through the document customization report generation method based on data conversion, users can customize operators and templates to solve the problems of cumbersome operation and fixed content of traditional report generation methods, realize the flexibility and convenience of report generation and reduce labor costs.
Patent Information
- Application Number
- CN202510210951.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-06-24
AI Technical Summary
Traditional report generation methods are cumbersome, fixed content is difficult to adapt to the complexity and diversity needs of data governance, and it is difficult for non-R&D personnel to modify report templates and generate content.
Provide a method for generating document custom report based on data conversion. By obtaining original data and custom report templates, a data governance operator library can be built. Users can select and combine operators, configure rules to generate data conversion rules, process original data and insert dynamic content placeholders, and finally generate a document custom report.
It realizes the flexibility and convenience of report generation, and non-technical personnel can also customize report templates and data placement, reducing labor costs and improving the efficiency and adaptability of report generation.
Smart Images

Figure CN120197592A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing, and in particular, to a method, apparatus, and medium for generating a customized report of a document based on data conversion. Background Art
[0002] In the information age, data governance has become an essential and important link for enterprises and organizations. Data governance not only concerns the quality of data, but also directly affects the decision-making efficiency and business development of enterprises. In the process of data governance, generating accurate and timely reports is the key to evaluating the governance effect and guiding subsequent work. However, there are many limitations in traditional report generation methods. On the one hand, the operation is cumbersome and requires a large amount of manual intervention, resulting in low efficiency; on the other hand, the content of the report is fixed and it is difficult to meet the complex and diverse needs of data governance.
[0003] Currently, although there are some methods for automatically generating reports for Word or Excel documents, most of these methods are based on fixed templates or preset rules, and the content of the generated reports lacks flexibility and pertinence. Especially when non-developers want to modify the report template and generated content, they often need the assistance of developers and even need to modify the source code, which greatly limits the flexibility and convenience of report generation. Specifically, non-developers cannot display the required data at specific positions in Word or Excel document reports, and cannot modify the logical relationship between the original data and the data displayed in the report.
[0004] Therefore, there is an urgent need for a more easily operable method for generating customized reports, so that non-developers can also modify the display position of data in the document report and modify the logical relationship between the displayed data and the original data.
[0005] Application Content
[0006] The present application provides a method for generating a customized report of a document based on data conversion. Users can customize the operator parameters and the combination method of operators according to their needs, as well as the display position of data in the document report template, so as to flexibly modify the document report template.
[0007] To achieve the above object, the present application adopts the following technical solutions:
[0008] In the first aspect, the present application provides a method for generating a customized report of a document based on data conversion, including:
[0009] Obtain the original data and the customized report template;
[0010] Construct a data governance operator library including multiple operators for data processing and analysis;
[0011] Obtain the operator selected by the user and display the selected operator in the form of a graphical interface;
[0012] Set the graphical interface of the operator so that multiple operators can be connected through the input end or the output end;
[0013] Obtain the configuration rules of the operator by the user, where the configuration rules include the combination order and connection relationship among multiple operators;
[0014] Generate a data conversion rule according to the configuration rule, and process the original data based on the data conversion rule to obtain report display data;
[0015] Obtain the data display position, and insert a dynamic content placeholder at a specific position in the customized report template based on the data display position;
[0016] Render the report display data into the dynamic content placeholder to obtain a document customized report.
[0017] In a preferred example of the present application, it can be further set that inserting the dynamic content placeholder at a specific position in the customized report template based on the data display position includes:
[0018] Judge the document type of the customized report template;
[0019] When it is recognized that the document type is Word, set bookmarks in the document according to the variable names in the report display data;
[0020] Combine the data display position and the bookmark, and insert the bookmark as a dynamic content placeholder at a specific position in the customized report template.
[0021] In a preferred example of the present application, it can be further set that rendering the report display data into the dynamic content placeholder includes:
[0022] Render the value of the variable in the report display data that has the same name as the bookmark into the dynamic content placeholder.
[0023] In a preferred example of the present application, it can be further set that after processing the original data based on the data conversion rule, it further includes:
[0024] Process the report display data using an attribute operator, and the operation rule of the attribute operator is to generate multiple new variables with dynamic values from the variables of the report display data according to a preset rule;
[0025] Add the new variable to the report display data.
[0026] In a preferred example of the present application, it can be further set that before processing the original data, it further includes:
[0027] Using operators related to data filtering to clean the original data and remove invalid and abnormal data.
[0028] In a preferred example of the present application, it can be further set that it further includes outputting the document customization report in multiple formats, and the multiple formats include PDF, Word, or Excel.
[0029] In a second aspect, the present application provides a device for generating a document customization report based on data conversion, and the device includes:
[0030] A data acquisition module for acquiring original data and a customization report template;
[0031] An operator setting module for constructing a data governance operator library containing multiple operators for data processing and analysis; acquiring the operators selected by the user and presenting the selected operators in a graphical interface manner; setting the graphical interface of the operators so that multiple operators can be connected through input terminals or output terminals; acquiring the configuration rules of the operators by the user, and the configuration rules include the combination order and connection relationship between multiple operators;
[0032] A template configuration module for generating data conversion rules according to the configuration rules, processing the original data based on the data conversion rules to obtain report display data; acquiring a data display position and inserting a dynamic content placeholder at a specific position in the customization report template based on the data display position;
[0033] A report output module for rendering the report display data into the dynamic content placeholder to obtain a document customization report.
[0034] In a third aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method for generating a document customization report based on data conversion as described in any one of the above.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, it implements the method for generating a document customization report based on data conversion as described in any one of the above.
[0036] In a fifth aspect, the present application provides a computer program product, including computer instructions, and when the computer instructions are executed by a processor, it implements the steps of the method for generating a document customization report based on data conversion as described in any one of the above.
[0037] In summary, compared with the prior art, the beneficial effects brought by the technical solution provided in the embodiment of the present application at least include:
[0038] Compared with the prior art, the method of the present application allows users to custom-select operators and the combination methods of operators according to actual needs, flexibly combine multiple operators to form a complex processing flow, with intuitive and simple operations, and non-technical personnel can also operate, efficiently and flexibly meeting the customized report generation requirements in different scenarios, and reducing the labor cost of customized report generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flowchart of a method for generating a customized report for a document based on data conversion provided in an embodiment of the present application.
[0040] Figure 2 It is a combined graph of data governance operators for a method for generating a customized report for a document based on data conversion provided in an embodiment of the present application.
[0041] Figure 3 It is a module diagram of a device for generating a customized report for a document based on data conversion provided in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0043] In an embodiment of the present application, a method for generating a customized report for a document based on data conversion is provided. Please refer to Figure 1 as shown, the method includes:
[0044] S100: Obtain original data and a customized report template.
[0045] Specifically, the customized report template is a customized report template created by the user, and its format can be Word, Excel, etc.
[0046] S200: Construct a data governance operator library including multiple operators for data processing and analysis; obtain the operators selected by the user, and display the selected operators in a graphical interface; set the image interface of the operators so that multiple operators can be connected through input ends or output ends; obtain the configuration rules of the operators by the user, and the configuration rules include the combination order and connection relationship between multiple operators.
[0047] Specifically, first, construct a library containing various data governance operators such as data cleaning, transformation, aggregation, and analysis, and then display the operators in a graphical interface. For example, Figure 2 As shown, each operator displays its name, input end, and output end.
[0048] Next, set the graphical interface of the operators so that multiple operators can be connected through the input end or output end. For example, Figure 2 As shown, the operators in the figure allow users to freely combine and connect the input end or output end through lines, so as to obtain the connection relationship and combination order between the operators, that is, the configuration rule.
[0049] S300: Generate a data conversion rule according to the configuration rule, process the original data based on the data conversion rule to obtain report display data; obtain the data display position, and insert a dynamic content placeholder at a specific position in the customized report template based on the data display position.
[0050] Specifically, the report display data is the key data indicators obtained after processing the original data using combined operators, such as text data, table data, and chart data.
[0051] S400: Render the report display data into the dynamic content placeholder to obtain a document customized report.
[0052] Specifically, render the report display data into the dynamic content placeholder through a data rendering tool.
[0053] In this embodiment, users can customize the selection of operators and the combination method of operators according to actual needs, flexibly combine multiple operators to form a complex processing flow, which is intuitive and simple to operate. Non-technical personnel can also operate it, efficiently and flexibly meeting the customized report generation requirements in different scenarios and reducing the labor cost of customized report generation.
[0054] In some embodiments, the inserting a dynamic content placeholder at a specific position in the customized report template based on the data display position includes:
[0055] Judge the document type of the customized report template;
[0056] When it is recognized that the document type is Word, set bookmarks in the document according to the variable names in the report display data;
[0057] Combine the data display position and the bookmarks, and insert the bookmarks as dynamic content placeholders at specific positions in the customized report template.
[0058] Further, the rendering the report display data into the dynamic content placeholder includes:
[0059] Render the value of the variable in the report display data that is the same as the name of the bookmark into the dynamic content placeholder.
[0060] In specific implementation, first generate an operator bookmark specification according to the data to be rendered in the customized report template, that is, set the bookmark name according to the variable name in the report display data in the document. Then, use the bookmark function of the Word document and insert bookmarks at the specified positions in the customized template in combination with the user-defined data display positions. The Word is one of the Office series software of Microsoft Corporation.
[0061] Then, use the report generation operator in the operator library to automatically parse the name of the bookmark, dynamically generate the corresponding input parameters of the operator, and render the value of the variable in the report display data that is the same as the name of the bookmark into the dynamic content placeholder.
[0062] In this embodiment, the commonly used function of bookmarks in the Word document is used to assist in generating customized reports, reducing the labor cost of report generation, and enabling non-technical personnel to manually modify or set the data rendering position in the customized report template.
[0063] In some embodiments, after processing the original data based on the data conversion rule, it further includes:
[0064] Use an attribute operator to process the report display data, and the operation rule of the attribute operator is to generate multiple new variables with dynamic values from the variables of the report display data according to a preset rule;
[0065] Add the new variables to the report display data.
[0066] In specific implementation, the input of the attribute processing operator is the variable of the report display data, and the output is the new variable obtained by operating the variable according to a certain operation rule. If the value of the variable changes, the operation result will also change accordingly, so it is dynamic.
[0067] In this embodiment, by using the bookmark function and the attribute operator, the dynamic generation of the report content is realized. That is, after changing the value of the variable in the report display data according to the actual needs of the user and the data analysis results, the computer can automatically fill in the value of the new variable that changes with the change of the variable, improving the efficiency of data rendering.
[0068] In some embodiments, before processing the original data, it further includes:
[0069] Use an operator of the data filtering related type to clean the original data and remove invalid and abnormal data.
[0070] In this embodiment, through preset operators and data governance processes, the accuracy and reliability of the data are ensured, thereby improving the accuracy and reliability of the generated report content.
[0071] In some embodiments, it further includes outputting the document customization report in multiple formats, and the multiple formats include PDF, Word, or Excel.
[0072] In this embodiment, multiple document formats are supported for output, such as Word, etc., which is convenient for users to select the appropriate output format according to actual needs.
[0073] This application also provides a device for generating a document customization report based on data conversion. Please refer to Figure 3 as shown, the device includes:
[0074] A data acquisition module 100, configured to obtain raw data and a customization report template;
[0075] An operator setting module 200, configured to build a data governance operator library including multiple operators for data processing and analysis; obtain the operators selected by the user and display the selected operators in a graphical interface manner; set the image interface of the operators so that multiple operators can be connected through input ends or output ends; obtain the configuration rules of the operators by the user, and the configuration rules include the combination order and connection relationship between multiple operators;
[0076] A template configuration module 300, configured to generate data conversion rules according to the configuration rules, process the raw data based on the data conversion rules to obtain report display data; obtain the data display position and insert dynamic content placeholders at specific positions in the customization report template based on the data display position;
[0077] A report output module 400, configured to render the report display data into the dynamic content placeholders to obtain a document customization report.
[0078] The functions of each module in the above device for generating a document customization report based on data conversion correspond to the steps in the above method embodiment for generating a document customization report based on data conversion, and their functions and implementation processes will not be elaborated here one by one.
[0079] This application also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the method for generating a document customization report based on data conversion as described in any of the above embodiments are implemented.
[0080] The present application further provides a computer-readable storage medium, on which a program is stored. Herein, the computer-readable storage medium refers to a carrier for storing data, which may include, but is not limited to, floppy disks, optical discs, hard disks, flash memories, USB flash drives, and / or Memory Sticks, etc. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. For the working process, working details, and technical effects of the computer-readable storage medium provided in this embodiment, reference may be made to the embodiments of the method for generating a customized report of a document based on data conversion in the foregoing text, which will not be elaborated herein.
[0081] The application further provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the method for generating a customized report of a document based on data conversion as described in any of the foregoing embodiments.
[0082] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the foregoing embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium, and when the computer program is executed, it may include the processes of the embodiments of the foregoing methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application may include non-volatile and / or volatile memories. Non-volatile memories may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM).
[0083] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope recorded in this specification. The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A document customization report generation method based on data conversion, characterized in that: include: Access raw data and customized report templates; Build a data governance operator library containing multiple operators for data processing and analysis; Obtain the operator selected by the user, and display the selected operator in a graphical interface; Set the operator's graphical interface so that multiple operators can be connected through input or output terminals; Acquire a user's configuration rule for the operator, wherein the configuration rule includes a combination order and a connection relationship between multiple operators; Generate data conversion rules according to the configuration rules, process the original data based on the data conversion rules, and obtain report presentation data; obtaining a data display location, and inserting a dynamic content placeholder at a specific location in the customized report template based on the data display location; The report presentation data is rendered into the dynamic content placeholder to obtain a document customized report.
2. The method for generating a customized document report based on data conversion according to claim 1, characterized in that: The inserting a dynamic content placeholder at a specific location in the customized report template based on the data display location comprises: Determine the document type of the custom report template; When the document type is identified as Word, a bookmark is set in the document according to the variable name in the report display data; The data display location and the bookmark are combined, and the bookmark is inserted into a specific location in the customized report template as a dynamic content placeholder.
3. The method for generating a customized document report based on data conversion according to claim 2, characterized in that: The rendering of the report display data into the dynamic content placeholder includes: The value of the variable with the same name as the bookmark in the report display data is rendered into the dynamic content placeholder.
4. The method for generating a customized document report based on data conversion according to claim 1, characterized in that: After processing the original data based on the data conversion rule, the method further includes: Using an attribute operator to process the report display data, the operation rule of the attribute operator is to generate multiple new variables with dynamic values from the variables of the report display data according to a preset rule; The new variable is added to the report presentation data.
5. The method for generating a customized document report based on data conversion according to claim 1, characterized in that: Before processing the raw data, it also includes: The raw data is cleaned using operators of data filtering related types to remove invalid and abnormal data.
6. The method for generating a customized document report based on data conversion according to claim 1, characterized in that: The method also includes exporting the document customized report in a variety of formats, including PDF, Word or Excel.
7. A document customization report generation device based on data conversion, characterized in that: include: Data acquisition module, used to obtain raw data and customize report templates; The operator setting module is used to build a data governance operator library containing multiple operators for data processing and analysis; obtain the operator selected by the user and display the selected operator in a graphical interface; set the operator's graphical interface so that multiple operators can be connected through input terminals or output terminals; obtain the user's configuration rules for the operator, and the configuration rules include the combination order and connection relationship between multiple operators; A template configuration module, used to generate data conversion rules according to the configuration rules, process the original data based on the data conversion rules, and obtain report display data; obtaining a data display location, and inserting a dynamic content placeholder at a specific location in the customized report template based on the data display location; The report output module is used to render the report display data into the dynamic content placeholder to obtain a document customized report.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for generating a document customized report based on data conversion according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, wherein when the program is executed by a processor, the method for generating a document customized report based on data conversion according to any one of claims 1 to 6 is implemented.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method for generating a document customized report based on data conversion according to claims 1 to 6 are implemented.