Report output method and device, electronic equipment and computer readable storage medium
By filtering form content and version information in the form database, the target form template is determined, which solves the problem of low report development efficiency after form changes in management software and enables fast and accurate report generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CORELAND
- Filing Date
- 2022-08-30
- Publication Date
- 2026-07-07
Smart Images

Figure CN115422903B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a report output method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Currently, in the process of data processing for text files, there is a large amount of data that needs to be processed or the same operations need to be repeated. Generally, after users enter data into a form, they will use a two-dimensional table to generate a report of the form data selected within a certain range of conditions.
[0003] In existing technologies, each new form developed in management software requires separate development to determine the corresponding report. If the input items in the form are changed or added / deleted, the report needs to be redeveloped to adapt to the changes in form items. Because some management software uses a wide variety of forms, current methods for creating two-dimensional reports from forms are inefficient and cannot output reports quickly and accurately. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a report output method, apparatus, electronic device and computer-readable storage medium to improve the problem of low message output efficiency in the prior art.
[0005] To address the aforementioned problems, firstly, embodiments of this application provide a report output method, the method comprising:
[0006] The form database is filtered according to the filtering criteria to obtain the form content and form version information. The form content refers to the content data filled in multiple forms, and the form version information refers to the version identification information of the form content.
[0007] Determine the target form template based on the form version information;
[0008] Based on the form content and the target form template, a target report is generated for output.
[0009] In the above implementation process, the form version may change or be updated during report generation. By filtering multiple form data in the database according to filtering conditions, it is possible to obtain the form content of multiple versions and types of form data, as well as the form version information corresponding to the content. Based on the form version information, the target form template of the corresponding form framework structure is obtained. The actual form content is then combined with the overall framework template. According to the report output requirements, it is possible to quickly and accurately generate relevant messages based on the different forms, improving the accuracy and real-time performance of the target messages, and enhancing the output efficiency and effectiveness of the messages. This approach is applicable to various scenarios and meets diverse user needs.
[0010] Optionally, determining the target form template based on the form version information includes:
[0011] The initial form template corresponding to the target form of the current version is determined based on the form version information, wherein the initial form template is the frame template of the target form;
[0012] Extract the template title content from the initial form template;
[0013] The target form template is constructed based on the template title content.
[0014] In the above implementation process, the frame template contained in the target form is extracted as the initial form template, and the template title content of the initial form template is extracted to construct the corresponding frame template as the target form template when generating the message. This allows for iterative processing of one or more versions of the form contained in the form version information, thereby determining the corresponding target form template and effectively improving the effectiveness and relevance of the target form template.
[0015] Optionally, determining the initial form template corresponding to the target form of the current version based on the form version information includes:
[0016] The target form corresponding to the current version is determined based on the form version information;
[0017] Determine the form type of the target form;
[0018] Based on the form type, the corresponding form template is determined as the initial form template.
[0019] In the above implementation process, since the form version information can include version information of one or more forms that have changed or been updated, there may be different types of multiple forms. Therefore, the target form corresponding to the current version can be determined through the form version information, and one or more corresponding form templates can be determined based on the form type of the target form as the initial form template. This allows the corresponding framework template to be determined in terms of both version and type, thus enabling the initial form template to be applicable to multiple versions of forms of the corresponding type.
[0020] Optionally, extracting the template title content of the initial form template includes:
[0021] Determine whether the initial form template is the first template among multiple form templates;
[0022] When the current initial form template is the first template, the title is assembled based on the current initial form template to obtain the corresponding assembled title; the assembled titles are then merged to obtain the template title content;
[0023] When the current initial form template is not the first template, the title content corresponding to the first template is used as the template title content of the initial form template.
[0024] In the above implementation process, a single form type can include multiple forms, thus having multiple corresponding form templates. To improve the efficiency of extracting template title content, it can be determined whether the current initial form template is the first template among multiple form templates of the same form type. If it is the first template, then the other templates in the same form type have not been processed, and the title assembly and merging operation can be performed on the current initial form template to extract the corresponding template title content. If it is not the first template, then the first template among the other templates in the same form type has been processed and the corresponding title content has been obtained. Since the types are the same, the current initial form template can directly use this title content as the template title content without further extraction, reducing the workload of calculation and effectively improving the efficiency of determining the title content of multiple form templates of the same form type.
[0025] Optionally, the step of assembling a title based on the current initial form template to obtain the corresponding assembled title includes:
[0026] The first title of the current initial form template is set according to the assembly component, wherein the assembly component includes a column component or a table component, and the first title is a multi-line title;
[0027] Set the title template information in the first title to obtain the second title;
[0028] Add title data to the second title to obtain the third title, wherein the title data is data determined according to the target form corresponding to the initial form template;
[0029] The third title is arranged according to a preset order to obtain the assembled title.
[0030] In the above implementation process, considering the assembly components such as category components and table components in the form, the title frame in the initial form template can be set as the first title of a multi-line title. The title template information is then set in the first title to obtain the second title of the template. Next, the title data from the target form is added to the second title to determine the filled third title. Finally, the third title is sorted and looped according to a preset order to obtain the assembled title. This allows for the appropriate setting and assembly of columns, internal tables, or external tables in the form, improving the compatibility of the assembled title and making it suitable for various forms.
[0031] Optionally, merging the assembled titles to obtain the template title content includes:
[0032] Identify the assembly components and / or individual components in the assembly title;
[0033] Merge the individual header rows and blank rows in the individual components to obtain a single header cell;
[0034] Alternatively, the column ranges of the column components in the assembled components can be merged to obtain column cells;
[0035] Alternatively, the table range of the table component in the assembly component can be merged to obtain a table cell, with the individual title cell, and / or the column cell, and / or the table cell serving as the template title content.
[0036] In the above implementation process, because compatibility with multiple title types is ensured during assembly, the obtained assembled title can contain one or more types of title components, such as column components, table components, assembled components, and ordinary individual components. During merging, each component can be processed accordingly based on its type, allowing for the merging of different types of components. This results in multiple types of merged cells serving as template title content, making the template title content applicable to various forms and effectively improving its effectiveness and compatibility.
[0037] Optionally, generating a target report for output based on the form content and the target form template includes:
[0038] Identify multiple target titles of different types and lengths in the target form template;
[0039] Based on preset filling rules, the form content is filled into the corresponding target title to obtain the filling title. The filling rules include at least one of the following: individual filling rules, column filling rules, or table filling rules.
[0040] Configure the target report for output based on the component type for filling in the title.
[0041] In the above implementation process, since the form content includes various types of information, and the target form template also contains multiple target titles of different types and lengths, different content from the form can be filled into the corresponding target titles according to different filling rules. Multiple filled titles can be obtained, and then configured according to the component type of the titles so that each title can be displayed in its corresponding manner, thus obtaining the target message for output. This allows for the assembly and display of content from the target form template according to different filling rules and configuration methods, thereby quickly generating the corresponding target message. This enables the target message to be displayed in real-time for multiple different versions of the form, effectively improving the compatibility and real-time performance of the target message.
[0042] Optionally, the method further includes:
[0043] Obtain the report output requirements;
[0044] The corresponding filtering conditions are determined based on the output requirements.
[0045] In the above implementation method, the output requirements of the report can be the user's usage requirements or the actual situation requirements. Based on the output requirements, the corresponding filtering conditions can be determined, and the database can be filtered accordingly to obtain the required form filling content and form version information.
[0046] Secondly, embodiments of this application also provide an output device, the device comprising:
[0047] The filtering module is used to filter the form database according to the filtering conditions and obtain the form content and form version information. The form content is the content data filled in multiple forms, and the form version information is the version identification information of the form content.
[0048] The determination module is used to determine the target form template based on the form version information;
[0049] The generation module is used to generate a target report for output based on the form content and the target form template.
[0050] Thirdly, this application also provides an electronic device, which includes a memory and a processor. The memory stores program instructions, and when the processor reads and runs the program instructions, it executes the steps in any of the above-described implementations of the report output method.
[0051] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer program instructions, which, when read and executed by a processor, perform steps in any of the above-described implementations of the report output method.
[0052] In summary, this application provides a report output method, apparatus, electronic device, and computer-readable storage medium that can filter and obtain the filled content and version information of multiple versions and types of forms, thereby determining the framework template of the report data, and combining the actual filled content of the form with the framework template. It can quickly and accurately generate relevant messages for output based on the report output requirements of various form versions, improving the efficiency and effectiveness of message output. Attached Figure Description
[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 A block diagram illustrating an electronic device provided in an embodiment of this application;
[0055] Figure 2 A flowchart illustrating a report output method provided in an embodiment of this application;
[0056] Figure 3 A detailed flowchart of step S300 provided for an embodiment of this application;
[0057] Figure 4 A detailed flowchart of step S310 provided for an embodiment of this application;
[0058] Figure 5 A detailed flowchart of step S320 provided for an embodiment of this application;
[0059] Figure 6A detailed flowchart of step S3202 provided for an embodiment of this application;
[0060] Figure 7 A detailed flowchart of step S400 provided for an embodiment of this application;
[0061] Figure 8 This is a schematic diagram of a report output device provided in an embodiment of this application.
[0062] Icons: 100 - Electronic device; 111 - Memory; 112 - Memory controller; 113 - Processor; 114 - Peripheral interface; 115 - Input / output unit; 116 - Display unit; 500 - Report output device; 510 - Filtering module; 520 - Determining module; 530 - Generation module. Detailed Implementation
[0063] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.
[0064] Currently, in the report output process, each new form developed in management software requires separate development to determine the corresponding report. If the input items in the form are changed or added / deleted, the report needs to be redeveloped, such as modifying or adding / deleting the content, to adapt to the changes in form items. Because some management software has many types of forms, the traditional method of creating two-dimensional reports based on forms is not only prone to errors, such as omissions or incorrect entries, but also inefficient, requiring constant modifications to adapt to form changes. For example, when form items change, the report needs special handling for the changed items, which is also prone to errors. Furthermore, multiple versions of the same type of form can exist, and current reports cannot distinguish between these versions. Therefore, the current method of creating two-dimensional reports based on forms cannot quickly and accurately output the corresponding reports, resulting in low output efficiency and effectiveness.
[0065] To address the aforementioned issues, this application provides a report output method applicable to electronic devices, such as servers, personal computers (PCs), tablets, smartphones, and personal digital assistants (PDAs) with logical calculation capabilities. This method generates corresponding message data based on the specific content of the form and the combination of the framework template, effectively improving the output efficiency and effectiveness of the messages.
[0066] Optionally, please refer to Figure 1 , Figure 1 This is a block diagram illustrating an electronic device according to an embodiment of this application. The electronic device 100 may include a memory 111, a memory controller 112, a processor 113, a peripheral interface 114, an input / output unit 115, and a display unit 116. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device 100. For example, the electronic device 100 may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0067] The aforementioned memory 111, memory controller 112, processor 113, peripheral interface 114, input / output unit 115, and display unit 116 are electrically connected directly or indirectly to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The aforementioned processor 113 is used to execute executable modules stored in the memory.
[0068] The memory 111 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 111 stores programs. After receiving execution instructions, the processor 113 executes the programs. The methods executed by the electronic device 100 as defined in any embodiment of this application can be applied to the processor 113, or implemented by the processor 113.
[0069] The aforementioned processor 113 may be an integrated circuit chip with signal processing capabilities. The processor 113 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a digital signal processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor.
[0070] The peripheral interface 114 described above couples various input / output devices to the processor 113 and the memory 111. In some embodiments, the peripheral interface 114, the processor 113, and the memory controller 112 can be implemented on a single chip. In other instances, they can be implemented on separate chips.
[0071] The aforementioned input / output unit 115 is used to provide users with input data, such as receiving user input requests. The input / output unit 115 can be, but is not limited to, a mouse and keyboard.
[0072] The aforementioned display unit 116 provides an interactive interface (e.g., a user interface) between the electronic device 100 and the user, or displays image data for the user's reference. In this embodiment, the display unit can be a liquid crystal display (LCD) or a touch display. If it is a touch display, it can be a capacitive touchscreen or a resistive touchscreen that supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations generated simultaneously from one or more locations on the touch display and pass the sensed touch operations to the processor for calculation and processing. In this embodiment, the display unit 116 can display the filled content of each form, the frame template, and the specific data of the generated target message, etc.
[0073] The electronic device in this embodiment can be used to execute the various steps in the message output methods provided in the embodiments of this application. The implementation process of the message output methods is described in detail below through several embodiments.
[0074] Please see Figure 2 , Figure 2This is a flowchart illustrating a report output method provided in an embodiment of this application. The method may include steps S200-S400.
[0075] Step S200: Filter the form database according to the filtering criteria to obtain the form content and form version information.
[0076] The form content consists of data entered into multiple forms, which may include specific entries for each item and records of how those entries were entered. Form version information identifies different versions of the form. The database can store multiple historical form data sets.
[0077] Optionally, when storing historical form data in a database, different types of data within the form data can be stored separately. For example, the entered content in the form data can be stored in a content sub-database, and the version information of the form data can be stored in a version sub-database. Furthermore, the data in the various sub-databases can be related; for instance, a particular entered content in the content sub-database might correspond to version number two.
[0078] Optionally, before filtering, the report's output requirements can be obtained; the corresponding filtering conditions can then be determined based on these requirements. The report's output requirements can be user needs or actual situational needs, and can be identified based on text, voice, or other data. For example, the output requirement could be selecting a specific type of report to output. The filtering conditions determined by the output requirement can also be in the form of text, time, etc., such as filtering form data of a certain type in a database, or filtering form data within a certain time period.
[0079] Step S300: Determine the target form template based on the form version information.
[0080] Because there is a correlation between the form content and the form version information, the corresponding form version information is also retrieved when obtaining the form content. Based on the form version information, the framework template of the form data corresponding to the current version can be determined, which serves as the target form template for the generated report.
[0081] Step S400: Based on the form content and the target form template, generate the target report for output.
[0082] After obtaining the form content and the target form template, which is the form's framework template, the form content can be assembled into the target form template to generate a complete target message that reflects form version changes and project modifications for output.
[0083] exist Figure 1 In the illustrated embodiment, the system can quickly and accurately generate relevant messages based on the output requirements of the report by combining different versions of the form. This improves the accuracy and real-time performance of the target message, as well as the output efficiency and effectiveness of the message. It is applicable to various scenarios and meets the diverse usage needs of users.
[0084] Optionally, please refer to Figure 3 , Figure 3 This is a detailed flowchart of step S300 provided in an embodiment of the present application. Step S300 may also include steps S310-S330.
[0085] Step S310: Determine the initial form template corresponding to the target form of the current version based on the form version information.
[0086] The target form is the form corresponding to the current version, determined based on the form version information, and the initial form template is the frame template of the target form. When there are multiple versions of the form, the information of multiple form files can be looped through to determine multiple target forms corresponding to each version.
[0087] Step S320: Extract the template title content of the initial form template.
[0088] This includes initializing the initial form template and extracting the template title content.
[0089] Step S330: Construct the target form template based on the template title content.
[0090] Among them, the template title content can be used as the structure of the title, and the corresponding framework template can be used as the target form template when generating messages.
[0091] exist Figure 3 In the illustrated embodiment, one or more versions of the form contained in the form version information can be processed cyclically to determine the corresponding target form template, thereby effectively improving the effectiveness and relevance of the target form template.
[0092] Optionally, please refer to Figure 4 , Figure 4 The following is a detailed flowchart of step S310 provided in an embodiment of this application. Step S310 may also include steps S3101-S3103.
[0093] Step S3101: Determine the target form corresponding to the current version based on the form version information.
[0094] This allows you to query the database based on the form version information to retrieve the target form corresponding to the current version.
[0095] Optionally, before performing a query, keywords in the form version information can be obtained, the process data information corresponding to each version can be determined based on the keywords, and related information related to the process data information can be obtained in batches, such as obtaining department names based on department IDs, in order to determine the query conditions for the query.
[0096] Step S3102: Determine the form type of the target form.
[0097] Since the form version information can include version information of one or more forms that have changed or been updated, and there may be different types of forms among multiple forms, the form type corresponding to the target form can be determined, thereby determining multiple versions of the form corresponding to that form type, and enabling the processing of multiple different versions of the form.
[0098] Step S3103: Based on the form type, determine the corresponding form template as the initial form template.
[0099] This allows you to search for multiple versions of form data corresponding to the form type, and use the framework templates of multiple versions of form data as the initial form template.
[0100] exist Figure 4 In the illustrated embodiment, the corresponding framework template can be determined in terms of both version and type, thereby enabling the initial form template to be applicable to multiple versions of forms of the corresponding type.
[0101] Optionally, please refer to Figure 5 , Figure 5 This is a detailed flowchart of step S320 provided in an embodiment of the present application. Step S320 may also include steps S3201-S3204.
[0102] Step S3201: Determine whether the initial form template is the first template among multiple form templates.
[0103] In this case, a single form type can include multiple forms, thus having multiple corresponding form templates. To improve the efficiency of extracting template title content, it can be determined whether the current initial form template belongs to the first template among multiple form templates of the same form type.
[0104] Step S3202: When the current initial form template is the first template, assemble the title based on the current initial form template and obtain the corresponding assembled title.
[0105] If it is the first template, then the other templates in this form type have not been processed. The current initial form template can be extracted first to obtain multiple titles, and then the multiple titles can be assembled to obtain the corresponding assembled title.
[0106] Step S3203: Merge the assembled titles to obtain the template title content.
[0107] Since there may be multiple blank lines in the assembled title, in order to reduce the impact of blank lines on the title, the assembled title can be merged to obtain the corresponding template title content.
[0108] Step S3204: If the current initial form template is not the first template, use the title content corresponding to the first template as the template title content of the initial form template.
[0109] In the case where it is not the first template, the first template among the other templates corresponding to this form type has already been processed and obtained the corresponding title content. Since the types are the same, the current initial form template can directly use this title content as the template title content without needing to perform an extraction operation.
[0110] exist Figure 5 In the illustrated embodiment, the workload of obtaining template title content is effectively reduced, and the efficiency of determining the title content of multiple form templates of the same form type is improved.
[0111] Optionally, please refer to Figure 6 , Figure 6 The following is a detailed flowchart of step S3202 provided in an embodiment of this application. Step S3202 may also include steps S32021-S32024.
[0112] Step S32021: Set the first title of the current initial form template according to the assembled components.
[0113] The assembly components include column components or table components, with the first title being a multi-line title. Considering that each form may contain column components or table components, the first title can be set to a multi-line title, for example, a two-line title.
[0114] Optionally, the column component may include one or more column titles and column options, and the table component may also include one or more options. The table component may be set separately within the frame template or within the column component.
[0115] Step S32022: Set the title template information in the first title to obtain the second title.
[0116] Specifically, the title of the first line in the first title can be set to the standard template information of multiple processes such as "process number", "process title", "initiation time", "applicant", "department", "status" and "processing opinion", and the standard title content of the second line can be set to empty, thus obtaining a second title with title template information.
[0117] Step S32023: Add heading data to the second heading to obtain the third heading.
[0118] The title data is determined based on the target form corresponding to the initial form template. Dynamic title data can be obtained based on the initial form template corresponding to the current version information. The title data can be JSON data, which can be converted into a JSON object and added to the second title to determine the third title after filling.
[0119] Step S32024: Arrange the third title according to the preset order to obtain the assembled title.
[0120] The preset order can be arranged from top to bottom for multiple rows in the form corresponding to the third title, or from left to right for multiple columns. It can retrieve information about the name of the title component in each title of the third title, or extract keyword information from the title, and then sort them according to the preset order. When there are multiple third titles, it can also cyclically arrange multiple third titles according to the preset order to obtain multiple assembled titles.
[0121] Optionally, when sorting, if a column component is encountered, the column title can be used as the title of the first row, and the components within the column can be used as the titles of the second row, and so on. Components that need to be excluded (such as images, buttons, etc.) within a column component can be hidden from the title, and their identifiers can be recorded, such as recording the fields to be excluded, to prevent them from being written during data insertion. The sorting process for table components is similar to that for column components.
[0122] For example, when sorting column components, you can also obtain the JSON data object in the column, get the position of the column component when sorting the current title, and loop through multiple option items in the column component to add keywords from the column component to the title sorting.
[0123] Optionally, during the merging process, the assembly components and / or individual components in the assembly title can be identified; and merging can be performed separately for different components. For example, merging individual header rows and blank rows in individual components to obtain individual header cells can merge multiple default rows into one cell; merging based on the column range of the column component in the assembly component to obtain column cells can merge the first row of a column range into one cell; merging based on the table range of the table component in the assembly component to obtain table cells can merge the first row of a table range into one cell. The individual header cell, and / or column cell, and / or table cell are used as the template title content. This allows for merging of different types of components, resulting in multiple types of merged cells used as template title content. This makes the template title content applicable to various forms, effectively improving the effectiveness and compatibility of the template title content.
[0124] exist Figure 6 In the illustrated embodiment, columns, inner tables, or outer tables in the form can be set and assembled accordingly, improving the compatibility of assembled titles and making it suitable for various versions of forms.
[0125] Optionally, please refer to Figure 7 , Figure 7 The following is a detailed flowchart of step S400 provided in an embodiment of this application. Step S400 may also include steps S410-S430.
[0126] Step S410: Identify multiple target titles of different types and lengths in the target form template.
[0127] This involves first determining the length of the title, which in turn determines the length of the content to be filled in, and then adding the content information corresponding to the standard title information to obtain multiple target titles of different types and lengths.
[0128] Optionally, since a form entry may contain tables, and tables may contain multiple rows of records, and there may be multiple tables, when assembling the content, a form entry can be used as the row number of the table with the most rows in the current form in the report. Alternatively, multi-level list objects can be created to store the data.
[0129] Step S420: Based on the preset filling rules, fill in the form content into the corresponding target titles to obtain the filling titles.
[0130] The filling rules include at least one of the following: individual filling rules, column filling rules, or table filling rules. Since the form filling content includes not only the specific content to be filled in, but also the record information when the specific content is filled in, the filling content corresponding to the title can be determined based on the record information. According to different filling rules, the specific content to be filled in one or more option items in the corresponding target title can be filled in, resulting in multiple filling titles with actual content.
[0131] Optionally, when filling in the information, multiple target titles can be cycled through to fill in the corresponding content information based on the identification information of the target title. If the content information corresponds to a component that needs to be excluded from the target title, the processing is skipped.
[0132] Step S430: Configure the target report for output based on the component type of the title entered.
[0133] Optionally, when filling in the form, you can configure it according to the component type of the title and the preset configuration rules, so that different components, such as drop-down boxes, radio buttons, multi-selection, columns, tables, etc., can display the corresponding information in the table of the report and obtain the corresponding target report.
[0134] For example, the title type can be determined based on the title information of the target title, and the processing can be configured according to different types. For instance, when the title type is a selector, radio button, or radio selection button, the specific option content is displayed according to the saved selection value; if it is a checkbox, such as a check button or shuttle box, multiple selections are displayed separated by commas; when the title type is a switch, it can be displayed as "yes" or "no"; when the title type is a date, such as time and date, multiple dates, month, year, week, etc., it is displayed in the specified format; when the title type is a date range, such as date and time range, time range, month range, etc., it is displayed in the specified format and separated by punctuation marks; when the title type is a cascading selector, such as a cascading panel, people tree, label, etc., it is displayed according to the content selected on the screen and separated by punctuation marks.
[0135] Optionally, when the title type is a dynamic component or a table component, you can loop through each row in the table, fill in the data, and record the fields that need to be excluded. You can also display a single component in the same way as described above; when the table is completely empty, fill it with spaces; if the number of rows in the current table is less than the number of rows in the previous table, you can add blank rows until the number of rows is the same.
[0136] Optionally, when a table component is present, since tables typically have multiple rows, the content of a single component can be added to each row to display the table.
[0137] exist Figure 7 In the illustrated embodiment, the target form template can be assembled and displayed according to different filling rules and configuration methods, thereby quickly generating the corresponding target message. This enables the target message to be displayed in real time for multiple different versions of the form, effectively improving the compatibility and real-time performance of the target message.
[0138] Please see Figure 8 , Figure 8 This is a schematic diagram of a report output device provided in an embodiment of this application. The report output device 500 may include:
[0139] The filtering module 510 is used to filter the form database according to the filtering conditions and obtain the form content and form version information. The form content is the content data filled in multiple forms, and the form version information is the version identification information of the form content.
[0140] Module 520 is used to determine the target form template based on the form version information;
[0141] The generation module 530 is used to generate a target report for output based on the form content and the target form template.
[0142] In an optional implementation, the determining module 520 may further include a determining submodule, an extracting submodule, and a constructing submodule;
[0143] The determination submodule is used to determine the initial form template corresponding to the target form of the current version based on the form version information. The initial form template is the frame template of the target form.
[0144] The extraction submodule is used to extract the template title content of the initial form template;
[0145] The build submodule is used to construct the target form template based on the template title content.
[0146] In an optional implementation, the determination submodule may further include a version unit, a type unit, and a determination unit;
[0147] Version unit, used to determine the target form corresponding to the current version based on the form version information;
[0148] The type unit is used to determine the form type of the target form;
[0149] The determination unit is used to determine the corresponding form template as the initial form template based on the form type.
[0150] In an optional implementation, the extraction submodule may further include a judgment submodule, a first submodule, and a second submodule;
[0151] The judgment submodule is used to determine whether the initial form template is the first template among multiple form templates;
[0152] The first submodule is used to assemble titles based on the current initial form template when the current initial form template is the first template, obtain the corresponding assembled titles, and merge the assembled titles to obtain the template title content;
[0153] The second submodule is used to use the title content of the first template as the template title content of the initial form template when the current initial form template is not the first template.
[0154] In an optional implementation, the first submodule may further include an assembly unit, used to set the first title of the current initial form template according to the assembly component, wherein the assembly component includes a column component or a table component, and the first title is a multi-line title; set title template information in the first title to obtain a second title; add title data to the second title to obtain a third title, wherein the title data is data determined according to the target form corresponding to the initial form template; and arrange the third title according to a preset order to obtain the assembled title.
[0155] In an optional implementation, the first submodule may further include a merging unit for determining the assembly components and / or individual components in the assembly title; merging the individual title rows and blank rows in the individual components to obtain individual title cells; or merging according to the column range of the column components in the assembly components to obtain column cells; or merging according to the table range of the table components in the assembly components to obtain table cells, using the individual title cells and / or column cells and / or table cells as template title content.
[0156] In an optional implementation, the generation module 530 may further include a title submodule, a fill submodule, and a configuration submodule;
[0157] The title submodule is used to identify multiple target titles of different types and lengths in the target form template;
[0158] The fill-in submodule is used to fill in the form content into the corresponding target title based on preset fill-in rules to obtain the fill-in title. The fill-in rules include at least one of the following: individual fill-in rules, column fill-in rules, or table fill-in rules.
[0159] The configuration submodule is used to configure the target report for output based on the component type entered in the title.
[0160] In an optional implementation, the report output device 500 may further include a demand module, which acquires the output demand for the report and determines the corresponding filtering conditions based on the output demand.
[0161] Since the principle of the report output device 500 in this embodiment is similar to that of the aforementioned report output method embodiment, the implementation of the report output device 500 in this embodiment can refer to the description in the above-mentioned report output method embodiment, and the repeated parts will not be described again.
[0162] This application also provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, they perform the steps of any of the report output methods provided in this embodiment.
[0163] In summary, the embodiments of this application provide a report output method, apparatus, electronic device, and computer-readable storage medium, which can filter and obtain the filled content and version information of multiple versions and types of forms, thereby determining the framework template of the report data, and combining the actual filled content of the form with the framework template. It can quickly and accurately generate relevant messages for output based on the report output requirements of various forms, improving the efficiency and effectiveness of message output.
[0164] In the several embodiments provided in this application, it should be understood that the disclosed device can also be implemented in other ways. The device embodiments described above are merely illustrative; for example, the block diagrams in the accompanying drawings illustrate the possible architecture, functions, and operations of the device according to various embodiments of this application. In this regard, each block in the block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram, and combinations of block diagrams, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0165] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0166] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0167] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0168] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
[0169] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A report output method, characterized in that, The method includes: The form database is filtered according to the filtering criteria to obtain the form content and form version information. The form content refers to the content data filled in multiple forms, and the form version information refers to the version identification information of the form content. Determine the target form template based on the form version information; Based on the form content and the target form template, a target report for output is generated; The step of determining the target form template based on the form version information includes: determining the initial form template corresponding to the current version of the target form based on the form version information, wherein the initial form template is the frame template of the target form; extracting the template title content of the initial form template; and constructing the target form template based on the template title content. The step of extracting the template title content of the initial form template includes: determining whether the initial form template is the first template among multiple form templates; when the current initial form template is the first template, assembling a title based on the current initial form template to obtain a corresponding assembled title; merging the assembled titles to obtain the template title content; when the current initial form template is not the first template, using the title content corresponding to the first template as the template title content of the initial form template. The step of assembling a title based on the current initial form template to obtain a corresponding assembled title includes: setting a first title of the current initial form template according to the assembly components, wherein the assembly components include a column component or a table component, and the first title is a multi-line title; setting title template information in the first title to obtain a second title; adding title data to the second title to obtain a third title, wherein the title data is data determined according to the target form corresponding to the initial form template; and arranging the third title according to a preset order to obtain the assembled title.
2. The method according to claim 1, characterized in that, The step of determining the initial form template corresponding to the target form of the current version based on the form version information includes: The target form corresponding to the current version is determined based on the form version information; Determine the form type of the target form; Based on the form type, the corresponding form template is determined as the initial form template.
3. The method according to claim 1, characterized in that, The process of merging the assembled titles to obtain the template title content includes: Identify the assembly components and / or individual components in the assembly title; Merge the individual header rows and blank rows in the individual components to obtain a single header cell; Alternatively, the column ranges of the column components in the assembled components can be merged to obtain column cells; Alternatively, the table range of the table component in the assembly component can be merged to obtain a table cell; the individual title cell, and / or the column cell, and / or the table cell can be used as the template title content.
4. The method according to claim 1, characterized in that, The step of generating a target report for output based on the form content and the target form template includes: Identify multiple target titles of different types and lengths in the target form template; Based on preset filling rules, the form content is filled into the corresponding target title to obtain the filling title. The filling rules include at least one of the following: individual filling rules, column filling rules, or table filling rules. Configure the target report for output based on the component type for filling in the title.
5. A report output device, characterized in that, The device includes: The filtering module is used to filter the form database according to the filtering conditions and obtain the form content and form version information. The form content refers to the content data filled in multiple forms, and the form version information refers to the version identification information of the form content. The determination module is used to determine the target form template based on the form version information; The generation module is used to generate a target report for output based on the form content and the target form template; The determining module includes a determining submodule, an extraction submodule, and a constructing submodule; the determining submodule is used to determine the initial form template corresponding to the target form of the current version based on the form version information, wherein the initial form template is the frame template of the target form; the extraction submodule is used to extract the template title content of the initial form template; the constructing submodule is used to construct the target form template based on the template title content; The extraction submodule includes a judgment submodule, a first submodule, and a second submodule. The judgment submodule is used to determine whether the initial form template is the first template among multiple form templates. The first submodule is used to assemble a title based on the current initial form template when the current initial form template is the first template, and obtain the corresponding assembled title; the assembled titles are then merged to obtain the template title content. The second submodule is used to use the title content corresponding to the first template as the template title content of the initial form template when the current initial form template is not the first template. The first submodule includes an assembly unit; the assembly unit is used to set a first title of the current initial form template according to the assembly components, wherein the assembly components include a column component or a table component, and the first title is a multi-line title; set title template information in the first title to obtain a second title; add title data to the second title to obtain a third title, wherein the title data is data determined according to the target form corresponding to the initial form template; and arrange the third title according to a preset order to obtain the assembled title.
6. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores program instructions, and when the processor executes the program instructions, it performs the steps of the method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The readable storage medium stores computer program instructions, which, when executed by a processor, perform the steps of the method according to any one of claims 1-4.