CN117252180B - Report generation method and device, electronic equipment and storage medium - Google Patents

Report generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117252180B
CN117252180B CN202311524457.8A CN202311524457A CN117252180B CN 117252180 B CN117252180 B CN 117252180B CN 202311524457 A CN202311524457 A CN 202311524457A CN 117252180 B CN117252180 B CN 117252180B
Authority
CN
China
Prior art keywords
report
component
metadata
data
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311524457.8A
Other languages
Chinese (zh)
Other versions
CN117252180A (en
Inventor
李平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taiping Finance Technology Services Shanghai Co ltd
Original Assignee
Taiping Finance Technology Services Shanghai Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taiping Finance Technology Services Shanghai Co ltd filed Critical Taiping Finance Technology Services Shanghai Co ltd
Priority to CN202311524457.8A priority Critical patent/CN117252180B/en
Publication of CN117252180A publication Critical patent/CN117252180A/en
Application granted granted Critical
Publication of CN117252180B publication Critical patent/CN117252180B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a report generation method, a report generation device, electronic equipment and a storage medium, wherein the method comprises the following steps: generating report element assembly data according to the report element data; splitting and recombining the report element component data to obtain a metadata component; responding to the component configuration request of the metadata component, and configuring a basic report template to obtain a target type report; wherein the component configuration request includes at least one of: component drag request, value configuration request, and value type configuration request. The technical scheme of the invention improves the efficiency and flexibility of report generation.

Description

Report generation method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer software application, in particular to a report generation method, a report generation device, electronic equipment and a storage medium.
Background
With the development of big data age, the computer software application technology is continuously updated and iterated, and the technical method for generating various types of reports is also endless.
Most of the existing report generation methods are more traditional reporting processes and modes of fixed format reporting, and a great deal of labor cost and time cost are required for development and transformation in the process of report generation aiming at different application scenes.
In the process of realizing the invention, the inventor finds that the format of the report automatic generation in the prior art is relatively fixed, and the problems of poor flexibility, low automation degree, poor customization and expansibility and the like generally exist, so that the requirements of different application scenes on the report customized generation are difficult to meet.
Disclosure of Invention
The embodiment of the invention provides a report generation method, a report generation device, electronic equipment and a storage medium, which improve the efficiency and flexibility of report generation.
According to an aspect of the present invention, there is provided a report generation method, including:
generating report element assembly data according to the report element data;
splitting and recombining the report element component data to obtain a metadata component;
responding to the component configuration request of the metadata component, and configuring a basic report template to obtain a target type report;
wherein the component configuration request includes at least one of: component drag request, value configuration request, and value type configuration request.
According to another aspect of the present invention, there is provided a report generating apparatus including:
the report element component data generation module is used for generating report element component data according to the report element data;
The data splitting and reorganizing module is used for splitting and reorganizing the report element assembly data to obtain metadata assemblies;
the target type report generation module is used for responding to the component configuration request of the metadata component and configuring the basic report template to obtain a target type report;
wherein the component configuration request includes at least one of: component drag request, value configuration request, and value type configuration request.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the report generating method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a report generating method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment, the report element component data is generated according to the report element data, the report element component data is split and recombined to obtain the metadata component, and finally, the basic report template is configured to obtain the target type report in response to the component configuration request of the metadata component, so that the problems of poor flexibility, low automation degree, poor expansibility, low efficiency and the like in the report development process in the prior art are solved, and the report generation efficiency and flexibility are improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a report generating method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a report generating method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a tax report generation method according to a second embodiment of the present invention;
FIG. 4 is a schematic diagram of a report design configuration client interface according to a second embodiment of the present invention;
FIG. 5 is a schematic diagram of a metadata component according to a second embodiment of the present invention;
FIG. 6 is a schematic diagram of a value setting window according to a second embodiment of the present invention;
fig. 7 is a schematic diagram of a report generating device according to a third embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the term "object" and the like in the description of the present invention and the claims and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a report generating method according to an embodiment of the present invention, where the embodiment is applicable to a situation where a report is generated by self-definition according to a service requirement, and the method may be performed by a report generating device, where the device may be implemented by software and/or hardware, and may be generally integrated in an electronic device, where the electronic device may be a terminal device or a server device, and the embodiment of the present invention does not limit a specific device type of the electronic device. Accordingly, as shown in fig. 1, the method includes the following operations:
S110, generating report element assembly data according to the report element data.
The report element data may be original data required to report. The report element component data may be used to generate the base report element data for the metadata component.
In the embodiment of the invention, the report element data can be acquired at regular time intervals, the integrity and the legality of the acquired report element data can be checked, and the checked report element data can be used as report element assembly data. The report element data can be derived from a local database or derived from a third-party data management platform; the report element data can be item data, pin item data, entry data and the like, and in the embodiment of the invention, the collection mode of the report element data and the type of the report element data are not particularly limited.
S120, splitting and recombining the report element component data to obtain a metadata component.
The metadata component can be a component which is generated according to report element component data and is dragged by a user when the user performs report design.
Correspondingly, after the report element component data are obtained through the steps, the metadata network model can be utilized to split, reorganize and package the report element component data to obtain the metadata component, so that a user can drag the metadata component according to self-service requirement user definition, and configuration items in the metadata component, such as assignment of fields, are configured, and the like, so that transcoding-free development is realized to generate a corresponding service report.
S130, responding to a component configuration request of the metadata component, and configuring a basic report template to obtain a target type report; wherein the component configuration request includes at least one of: component drag request, value configuration request, and value type configuration request.
Wherein the component configuration request may be a request for prompting metadata component configuration for the base reporting model. The base reporting model may be a blank report that does not contain reporting components and reporting data. The target type report may be a report meeting the business needs of the user. The component drag request may be a request to drag an operation on a metadata component in a report. The value configuration request may be a request for value configuration of values within cells in the report. The value type configuration request may be a request to configure a value type of a value in a cell in a report.
In the embodiment of the invention, the target type report can be obtained by configuring the basic report template by responding to the component configuration request of the metadata component according to the self business requirement of the user, so that the efficiency and the flexibility of report generation are improved.
According to the technical scheme of the embodiment, the report element component data is generated according to the report element data, the report element component data is split and recombined to obtain the metadata component, and finally, the basic report template is configured to obtain the target type report in response to the component configuration request of the metadata component, so that the problems of poor flexibility, low automation degree, poor expansibility, low efficiency and the like in the report development process in the prior art are solved, and the report generation efficiency and flexibility are improved.
Example two
Fig. 2 is a flowchart of a report generating method according to a second embodiment of the present invention, where the present embodiment is implemented based on the foregoing embodiment, and in the present embodiment, a plurality of specific alternative implementation methods for configuring a base report template to obtain a target type report are provided. Accordingly, as shown in fig. 2, the method of this embodiment may include:
s210, generating report element assembly data according to the report element data.
In an optional embodiment of the invention, the generating report element component data according to the report element data may include: receiving the report element data under the condition that the current system time is determined to be the report period time point; carrying out validity check on the report element data; generating report element component data according to the report element data under the condition that the report element data passes the validity check; the method may further comprise: and under the condition that the report element data does not pass the validity check, storing the report element data as an abnormal log record.
Alternatively, the report element data may include tax report element data.
The current system time may be a system time in the current state. The report reporting period time point can be the period time of collecting report element data, which is determined according to the business requirement of the user. The exception log record may be for recording report element data that fails the validity check. The tax report element data may be raw data that requires tax report declaration.
In the embodiment of the invention, the report element data can be received according to the report reporting period, and the report reporting period is taken as an example for explanation, and the report element data can be received at the beginning of each month, and the integrity and the legality of the report element data are checked. If the report element data passes the validity check, report element component data can be generated according to the report element data, and if the report element data does not pass the validity check, the report element data can be stored as an abnormal log record. The report reporting period can be daily report, monthly report, quaternary report and annual report, and the time range of the report reporting period is not specifically limited in the embodiment of the invention.
In a specific example, report element data is taken as tax report element data for illustration, and a report reporting period can be determined by setting a timing task. And if the current system time is the report period time point, receiving tax report element data. The tax report element data may include subject data, sales item data, and entry data. Further, validity verification can be performed on the report element data. The validity check may include an integrity check of the data rank value and a correctness check of the rank value type, among others. If the report element data passes the validity check, the report element component data can be generated according to the report element data, and if the report element data does not pass the validity check, the report element data can be stored as an abnormal log record for subsequent data checking and correction.
S220, splitting and recombining the report element component data to obtain a basic metadata object.
Wherein the base metadata object may be a minimum unit data object of the generate metadata component.
In the embodiment of the invention, the metadata component model can be utilized to split, reorganize and package the report element component data to obtain the basic metadata object. Wherein the basic metadata object may be a metadata model object of minimum granularity and standard uniformity. Exemplary, the subject data in the tax report element data through the validity check can be obtained through splitting, reorganizing and packaging: beginSubjectMetaData, currentSubjectMetaData, endSubjectMetaData, outputinvencemethadata, and inputinvencemethadata.
S230, establishing a mapping relation between the basic metadata object and the metadata component.
S240, combining object types of the basic metadata objects according to the mapping relation to obtain the metadata component.
Accordingly, a mapping relation between the basic metadata object and the metadata component is established, and when a special service needs, the metadata type can be expanded or recombined to generate the metadata component matched with the special service by utilizing the mapping relation between the basic metadata object and the metadata component. For example, the object types of the basic metadata objects may be combined according to a mapping relationship between the basic metadata objects and the metadata component to obtain the pin invoice summary metadata and the entry invoice summary metadata.
S250, responding to the component configuration request of the metadata component, and configuring the basic report template to obtain a target type report.
In an optional embodiment of the present invention, the configuring the base report template to obtain the target type report may include: acquiring target dictionary data matched with the target type report; and initializing the lower menu of the report head of the basic report template according to the target dictionary data to obtain the interface style of the lower menu of the report head of the target type report.
The target dictionary data can be data required for initializing a menu under the head of the report of the basic report template. The report header submenu may be a drop down list of the report header of the target type report.
In the embodiment of the invention, the target dictionary data matched with the target type report can be obtained by responding to the component configuration request of the metadata component. Furthermore, initializing the lower menu of the report head of the basic report template according to the target dictionary data to realize rendering of the lower menu of the target report head and obtain the interface style of the lower menu of the report head of the target type report. For example, target dictionary data can be acquired by responding to an asynchronous request, and the submenu at the head of the report of the basic report template is rendered according to the target dictionary data.
In an optional embodiment of the present invention, the configuring the base report template to obtain the target type report in response to the component configuration request of the metadata component may include: acquiring and loading a metadata list; responding to a component dragging request of a target metadata component in the metadata list, and displaying a component configuration interface of the target metadata component; and responding to a value configuration request of a component configuration interface of the target metadata component, and generating a value of each component attribute in the target metadata component.
Wherein the metadata list may be a list listing required for rendering the metadata configuration component. The component configuration interface may be a window interface that configures the component.
In the embodiment of the invention, the metadata list can be obtained and loaded by responding to the component configuration request of the metadata component, further, the component configuration interface of the target metadata component can be displayed by responding to the component dragging request of the target metadata component in the metadata list, and the value of each component attribute in the target metadata component can be generated by responding to the value configuration request of the component configuration interface of the target metadata component. The metadata list can be obtained by responding to the asynchronous request and loading the metadata list which is already built in the current report, further, the target metadata component can be displayed on the component configuration interface by responding to the component dragging request of the target metadata component in the metadata list, and the value of each component attribute in the target metadata component can be obtained by responding to the value configuration request of the component configuration interface of the target metadata component.
In an optional embodiment of the present invention, the configuring the base report template to obtain the target type report in response to the component configuration request of the metadata component may include: responding to a cell configuration request of a target table cell in the basic report template, and displaying a cell configuration interface of the target table cell; responding to a cell value type configuration request of the cell configuration interface, and determining the cell value type of the target table cell; wherein, the cell value type may include at least one of: and calculating field values, fixed values and expressions.
The cell configuration request may be a request for indicating that the cells of the target report are configured. The cell configuration interface may be a window interface that configures the cells.
In the embodiment of the invention, the cell configuration interface of the target table cell can be displayed by responding to the cell configuration request of the target table cell in the basic report template, and the cell value type of the target table cell can be determined by using the cell value type configuration request of the cell configuration interface. Illustratively, the field value type may select a value field through an interface sheet of the metadata component, and the get-around after the selection is completed may set the selected value field code to the current cell. The fixed value type can be a self-defined fixed value set for a designated cell, the fixed value to be set is directly recorded in a value content input box, and the input value is set to the current cell after the input is completed and the carriage returns. The expression calculation type value can be obtained by combining field values in a plurality of metadata components or a single metadata component, carrying out mathematical calculation on the value fields, and carrying out pre-calculation verification on the currently set expression after the carriage return is completed. If the expression verification is not passed, prompting resetting; and if the verification is passed, setting the set expression into the current cell.
Fig. 3 is a flowchart of a tax report generating method according to the second embodiment of the present invention, and in a specific example, as shown in fig. 3, the declaration element data may be core subject data, sales item billing data, and entry invoice data. The core subject data, the sales item billing data and the entry invoice data are used as report element data to carry out validity check, and the report element data which does not pass the validity check are stored as a record log for subsequent correction; the report element data passing the validity check can be used as report element component data to construct a subject data component, a sales item data component and an entry data component. Furthermore, the Excel cell initialization and the newly built ledger initialization are carried out on the ledgers of the clients, namely, the initialization style design and the number obtaining relation setting are carried out on the basic report templates. After the initialization processing, the report account table, namely the target type report, can be displayed on the user interface through updating the account. The target type report forms can comprise tax dimension report forms, financial dimension report forms, tax report forms and the like.
Fig. 4 is a schematic diagram of a report design configuration client interface provided in the second embodiment of the present invention, in a specific example, as shown in fig. 4, the report design configuration client may be used by a system administrator to freely and flexibly design a value-added tax declaration ledger according to the actual service requirement of a user, that is, may obtain different report template interfaces according to report types, may be a lower menu at the head of a report, may be a simple list of a rank mode, may be a report form of a complex style, and different report types may also be rendered in different corresponding manners. Taking the report head lower menu as an example for explanation, the report head lower menu can call dictionary data through an asynchronous request after the page rendering is completed, and load and render the returned dictionary data into a corresponding drop-down list. The business types can include financial dimension report form, tax monitoring report form, financial tax check report form and tax return report form. The table types may include detail tables, fill tables, and group tables. The form rendering area of the detail form type client interface will be defined as a row form mode, with the entire form area being used with $ {.fieldname } placeholder to indicate list mode fill data. The filling table type is used for limiting the table to be filled with data in a cell mode by using the $ { fieldName } placeholder indicator table during initialization, but each value cell of the report needs to be subjected to value setting by double clicking.
Fig. 5 is a schematic diagram of a metadata component provided in a second embodiment of the present invention, in a specific example, as shown in fig. 5, the metadata component may be a subject initial borrower component, and dragging the subject initial borrower component to a large table area cell by a mouse exhales a value setting window according to the dragged cell, where the value setting window includes a component name, a subject code, a subject type, and a subject amount. The metadata component may be a subject basic information component, dragging the subject basic information component to the large table area cell through a mouse exhales a value setting window according to the dragged cell, wherein the value setting window includes a component name, a subject code, a subject type and a subject use. The metadata component can be a sales invoice summarizing component, and dragging the sales invoice summarizing component to a large table area cell through a mouse exhales a value setting window according to the dragged cell, wherein the value setting window comprises a component name, a reporting unit number, an invoice summarizing amount and an invoice summarizing tax. The metadata component can be an entry invoice summarizing component, and dragging the entry invoice summarizing component to a large table area cell through a mouse exhales a value setting window according to the dragged cell, wherein the value setting window comprises a component name, a reporting unit number, an invoice summarizing amount and an invoice summarizing tax. The metadata component may be a sell invoice detail component that, by dragging the sell invoice detail component to a large form area cell via a mouse, exhales a value setting window according to the dragged cell, wherein the value setting window includes a component name, an invoice code, an invoice number, an invoicing date, an invoice amount, a tax rate, an invoice tax, a purchase party name, a purchase party tax number, a sell party name, and a sell party tax number. The metadata component may also be an entry invoice detail component, dragging the entry invoice detail component to a large form area cell through a mouse exhales a value setting window according to the dragged cell, wherein the value setting window includes a component name, an invoice code, an invoice number, an invoicing date, an invoice amount, a tax rate, an invoice tax, a purchase party name, a purchase party tax number, a sale party name and a sale party tax number. And after the rendering loading of the left component column is finished, asynchronously calling the metadata list, loading the metadata list which is already constructed in the current declaration report, and respectively rendering the metadata list with the request response into metadata configuration components of corresponding types according to the metadata object types, and displaying the metadata configuration components in the component column. The metadata component can be rewritten by a mouse selected drag event, namely, the mouse drags the metadata component to the cells of the large table area to set a window according to the value of the drag cells.
Fig. 6 is a schematic diagram of a value setting window provided in the second embodiment of the present invention, in a specific example, as shown in fig. 6, the value setting window may be exhaled by a double-click cell, and the value types may include: field value, fixed value and expression calculation. The field value setting window can comprise a value type, a value field and a subject name. The fixed value type can be a self-defined fixed value set for a designated cell, the fixed value to be set is directly recorded in a value content input box, the input value can be set to the current cell after the input is completed, and the fixed value setting window can comprise the value type and the value content. The expression calculation type value can be obtained by combining field values in a plurality of metadata components or a single metadata component, carrying out mathematical calculation on the value fields, and carrying out pre-calculation verification on the currently set expression after the carriage return is completed. If the expression verification is not passed, prompting resetting; if the verification is passed, the set expression is set to the current cell, and the expression calculation setting window may include a value type and a specific expression, and it should be noted that the expression may support concatenation of a mathematical expression and a character type field with a value type field in the metadata component.
The target type report drawing area body may be a cell area limiting a rank to 100×100, and simultaneously set an ID of each cell as a rank coordinate combination of the cells. For example, the cells in the first row and the second column may be configured to: 1-2. The right mouse button menu of the form design area can be redesigned into an Excel-like cell operation right button menu through a browser DOM (Document Object Model) mechanism, and the menu can comprise a header, a row height, a column width, cell merging, a frame style, a background style, font setting, clear content and the like. The custom right key style setup menu function may set the style setup value to the style value save < input > of the corresponding cell after the setup is completed, with the save format exemplified as: font, "bold", size:12px, color: "red", and simultaneously, the setting value may be converted into a layered style for immediate rendering to the user display interface.
Furthermore, data submission can be initiated after the report is completed and the design of the style and the setting of the value relation are completed, all contents of the < table > element nodes in the DOM of the current table area are read by the front end, the style setting < input > under all the < td > element nodes and the value of the value expression cache < input > are traversed, the value values are taken out and set in the parameter object, then the < input > element nodes are removed and text compression is carried out, and the < table > element point-added contents are compressed into a whole row. The parameter object format obtained by completing the above operation steps may include a value expression description data array and a specific value expression string set by a cell. The # { outputInvoint.amountj in the exemplary # { outputInvoint.taxonomy } "may represent a value variable, the outputInvoint may be a metadata component code, that is, a pin invoice detail metadata component, and the amountmay represent a field code, that is, an amount field, under the pin invoice detail metadata component.
Correspondingly, after the steps are completed, the target type report can be stored, and the specific operation steps are as follows:
first, an HTML (HyperText Markup Language ) report page file can be generated. Specifically, program script filtering is performed on the table_dom field value in the parameter, the filtered result content is filled into a < body > part in a standard HTML unified template customized based on FTL (FreeMarker Template Language, freeMark template engine), and then the filled HTML content is written into a designated directory stored in the shared NAS file. In order to ensure that the file reading speed is not affected due to the rapid increase of the page file, the file storage can store the page file according to the structure that a certain field code is used as a primary directory and the date is used as a secondary directory.
Second, a report form excel template may be generated. Specifically, according to the content of the table_dom obtained by parsing in the first step, an Excel component POI (Point of Information, information points) is used to convert an HTML table into an Excel file object, then a cell setting word style_config in the parameter is traversed, style setting is performed on the generated Excel, and the generated Excel template file is stored in a shared NAS (Network Attached Storage ) by using the same directory structure as that in the first step.
And finally, storing the target type report expression data. Specifically, the request parameters can be parsed and converted into report configuration data and metadata objects, and then the data is saved in a database through an ORM (Object Relational Mapping, object relationship mapping) mapping framework.
After the target type report is stored, the target type report can be displayed and exported on a user interface. Specifically, the user can initiate a target type report access request in the browser, and after the server receives the request, the server can query a report HMTL page template file corresponding to the shared text NAS storage according to the login information of the current requesting user and the target type report ID of the request. And inquiring the corresponding cell access relation configuration data according to the target type report ID, and traversing the access relation configuration data. And (3) configuring the access of the expression type, inquiring the value corresponding to each display symbol variable in the expression according to the metadata code, the value field, the current reporting period and the reporting unit ID in the expression, and further taking the variable value and the expression as an entry. And performing calculation on the expression by using an averager expression calculation engine, and caching a corresponding calculation result. And configuring the directly valued fetch, and directly using the queried field value of the metadata component to carry out assignment and then caching. After traversing, configuring all the access configuration, combining a plurality of attributes in the metadata model object according to the access relation to form a < table > part cell ID form (format form is 1-1) in the HTML template as a parameter name, configuring the expressionValue attribute of the metadata model object according to the access relation as a parameter value, combining a key value pair Map as an input parameter, transmitting the key value pair Map to a FreeMark HTML template engine, analyzing a report HTML template, and returning an analysis result to a browser for rendering and displaying.
When a user initiates the export of target type report data, the server can use the logic pair which is the same as the cell fetch configuration processing of the HTML page, perform the fetch configuration entry calculation processing on the cell fetch configuration corresponding to the target type report, load the corresponding excel template by using the excel component POI, configure the cell coordinates appointed in the metadata model object according to the fetch relation by using the value of each cell calculated in the last step, fill the cell, and return the cell to the browser in a response mode of file downloading flow after the filling is completed.
According to the technical scheme, report element component data are generated according to the report element data, the report element component data are split and recombined to obtain the basic metadata object, then the mapping relation between the basic metadata object and the metadata component is established, the metadata component is obtained by combining object types of the basic metadata object according to the mapping relation, finally the basic report template is configured to obtain a target type report in response to a component configuration request of the metadata component, the problems of poor flexibility, low automation degree, poor expansibility, low efficiency and the like in the report development process in the prior art are solved, the report element data are defined in a standardized mode, and further the metadata component convenient to drag and use is generated according to the report element data, and the report generation efficiency and flexibility are improved.
Example III
Fig. 7 is a schematic diagram of a report generating device according to a third embodiment of the present invention, as shown in fig. 7, where the device includes: report element component data generation module 310, data splitting and reorganizing module 320, and target type report generation module 330, wherein:
a report element component data generating module 310, configured to generate report element component data according to the report element data;
the data splitting and reorganizing module 320 is configured to split and reorganize the report element component data to obtain a metadata component;
the target type report generating module 330 is configured to respond to the component configuration request of the metadata component and configure the basic report template to obtain a target type report;
wherein the component configuration request includes at least one of: component drag request, value configuration request, and value type configuration request.
According to the technical scheme of the embodiment, the report element component data is generated according to the report element data, the report element component data is split and recombined to obtain the metadata component, and finally, the basic report template is configured to obtain the target type report in response to the component configuration request of the metadata component, so that the problems of poor flexibility, low automation degree, poor expansibility, low efficiency and the like in the report development process in the prior art are solved, and the report generation efficiency and flexibility are improved.
Optionally, the report element component data generating module 310 is specifically configured to: receiving the report element data under the condition that the current system time is determined to be the report period time point; carrying out validity check on the report element data; generating report element component data according to the report element data under the condition that the report element data passes the validity check; also used for: and under the condition that the report element data does not pass the validity check, storing the report element data as an abnormal log record.
Optionally, the data splitting and reorganizing module 320 is specifically configured to: splitting and reorganizing the report element component data to obtain a basic metadata object; establishing a mapping relation between the basic metadata object and the metadata component; and combining object types of the basic metadata objects according to the mapping relation to obtain the metadata component.
Optionally, the target type report generating module 330 is specifically configured to: acquiring target dictionary data matched with the target type report; and initializing the lower menu of the report head of the basic report template according to the target dictionary data to obtain the interface style of the lower menu of the report head of the target type report.
Optionally, the target type report generating module 330 is specifically configured to: acquiring and loading a metadata list; responding to a component dragging request of a target metadata component in the metadata list, and displaying a component configuration interface of the target metadata component; and responding to a value configuration request of a component configuration interface of the target metadata component, and generating a value of each component attribute in the target metadata component.
Optionally, the target type report generating module 330 is specifically configured to: responding to a cell configuration request of a target table cell in the basic report template, and displaying a cell configuration interface of the target table cell; responding to a cell value type configuration request of the cell configuration interface, and determining the cell value type of the target table cell; wherein the cell value type comprises at least one of the following: and calculating field values, fixed values and expressions.
Optionally, the report element data includes tax report element data.
The report generating device can execute the report generating method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method. Technical details which are not described in detail in this embodiment can be referred to the report generating method provided in any embodiment of the present invention.
Example IV
Fig. 8 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 8, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, such as a report generation method.
In some embodiments, the report generating method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the report generating method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the report generating method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.

Claims (9)

1. A report generation method, comprising:
generating report element assembly data according to the report element data;
splitting and recombining the report element component data to obtain a metadata component;
responding to the component configuration request of the metadata component, and configuring a basic report template to obtain a target type report;
wherein the component configuration request includes at least one of: a component drag request, a value configuration request and a value type configuration request;
the basic report template refers to a blank report without report components and report data;
the splitting and reorganizing the report element component data to obtain a metadata component comprises the following steps:
splitting and reorganizing the report element component data to obtain a basic metadata object;
establishing a mapping relation between the basic metadata object and the metadata component;
combining object types of the basic metadata objects according to the mapping relation to obtain the metadata component;
wherein the basic metadata object is a metadata model object with minimum granularity and unified standards.
2. The method of claim 1, wherein generating report element component data from report element data comprises:
Receiving the report element data under the condition that the current system time is determined to be the report period time point;
carrying out validity check on the report element data;
generating report element component data according to the report element data under the condition that the report element data passes the validity check;
the method further comprises the steps of:
and under the condition that the report element data does not pass the validity check, storing the report element data as an abnormal log record.
3. The method of claim 1, wherein configuring the base reporting model to obtain the target type report comprises:
acquiring target dictionary data matched with the target type report;
and initializing the lower menu of the report head of the basic report template according to the target dictionary data to obtain the interface style of the lower menu of the report head of the target type report.
4. The method according to claim 1, wherein configuring the base reporting model to obtain the target type report in response to the component configuration request of the metadata component comprises:
acquiring and loading a metadata list;
Responding to a component dragging request of a target metadata component in the metadata list, and displaying a component configuration interface of the target metadata component;
and responding to a value configuration request of a component configuration interface of the target metadata component, and generating a value of each component attribute in the target metadata component.
5. The method according to claim 1, wherein configuring the base reporting model to obtain the target type report in response to the component configuration request of the metadata component comprises:
responding to a cell configuration request of a target table cell in the basic report template, and displaying a cell configuration interface of the target table cell;
responding to a cell value type configuration request of the cell configuration interface, and determining the cell value type of the target table cell;
wherein the cell value type comprises at least one of the following: and calculating field values, fixed values and expressions.
6. The method of any of claims 1-5, wherein the report element data comprises tax report element data.
7. A report generating apparatus, comprising:
the report element component data generation module is used for generating report element component data according to the report element data;
The data splitting and reorganizing module is used for splitting and reorganizing the report element assembly data to obtain metadata assemblies;
the target type report generation module is used for responding to the component configuration request of the metadata component and configuring the basic report template to obtain a target type report;
wherein the component configuration request includes at least one of: a component drag request, a value configuration request and a value type configuration request;
the basic report template refers to a blank report without report components and report data;
the data splitting and reorganizing module is specifically configured to:
splitting and reorganizing the report element component data to obtain a basic metadata object;
establishing a mapping relation between the basic metadata object and the metadata component;
combining object types of the basic metadata objects according to the mapping relation to obtain the metadata component;
wherein the basic metadata object is a metadata model object with minimum granularity and unified standards.
8. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the report generating method of any one of claims 1-6.
9. A computer storage medium storing computer instructions for causing a processor to perform the report generation method of any one of claims 1-6.
CN202311524457.8A 2023-11-16 2023-11-16 Report generation method and device, electronic equipment and storage medium Active CN117252180B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311524457.8A CN117252180B (en) 2023-11-16 2023-11-16 Report generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311524457.8A CN117252180B (en) 2023-11-16 2023-11-16 Report generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117252180A CN117252180A (en) 2023-12-19
CN117252180B true CN117252180B (en) 2024-02-23

Family

ID=89131685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311524457.8A Active CN117252180B (en) 2023-11-16 2023-11-16 Report generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117252180B (en)

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794226A (en) * 2010-03-08 2010-08-04 山东大学 Service software construction method and system adapting to multiple business abstraction levels
CN103970527A (en) * 2013-01-28 2014-08-06 国际商业机器公司 Assistive Overlay For Report Generation
CN105843945A (en) * 2016-04-08 2016-08-10 联动优势科技有限公司 Report generation method and system
CN107145477A (en) * 2017-04-28 2017-09-08 郑州云海信息技术有限公司 A kind of reporting system based on FineReport instruments
CN111708529A (en) * 2020-06-23 2020-09-25 浪潮云信息技术股份公司 Implementation method for generating form through dragging based on angular
CN112099801A (en) * 2020-11-03 2020-12-18 广州市玄武无线科技股份有限公司 Excel analysis method and system based on metadata driving
CN112463797A (en) * 2020-12-08 2021-03-09 航天信息股份有限公司 Report generation method, system, storage medium and electronic equipment
CN113377352A (en) * 2021-07-05 2021-09-10 重庆市规划和自然资源信息中心 Big data form modeling generation method for government affair business
CN113779037A (en) * 2021-09-23 2021-12-10 上海淇玥信息技术有限公司 Worksheet processing method and device and electronic equipment
CN113822033A (en) * 2020-12-23 2021-12-21 京东科技信息技术有限公司 Report generation method, device, equipment and storage medium
WO2022007919A1 (en) * 2020-07-09 2022-01-13 阿里巴巴集团控股有限公司 Flow processing method and device, and computer system
CN114781342A (en) * 2022-05-21 2022-07-22 北京泓泰天诚科技有限公司 Report generation method, device, equipment and storage medium for petrochemical industry
CN115375421A (en) * 2022-09-05 2022-11-22 重庆锐思科技有限责任公司 Front-end finance and tax direction universal UI component library based on Vue architecture
CN115759018A (en) * 2022-11-03 2023-03-07 广州南天电脑系统有限公司 Report generation method and device, computer equipment and storage medium
WO2023073496A1 (en) * 2021-10-29 2023-05-04 Klarna Bank Ab System for identification and autofilling of web elements in forms on web pages using machine learning
CN116382643A (en) * 2023-03-24 2023-07-04 肖光睿 Running system based on low-code platform
CN116468010A (en) * 2023-02-27 2023-07-21 河钢数字技术股份有限公司 Report generation method, device, terminal and storage medium
CN116860223A (en) * 2022-09-06 2023-10-10 上海电气集团数字科技有限公司 Cloud-protogenesis-based low-code development and delivery method
CN116956847A (en) * 2023-07-25 2023-10-27 陕西师范大学 Report management method and device
CN116954597A (en) * 2022-04-14 2023-10-27 昆仑数智科技有限责任公司 Form page generation method and device, electronic equipment, storage medium and product

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7424668B2 (en) * 2005-06-15 2008-09-09 Microsoft Corporation Pre-formulated spreadsheet cell groups
US8479093B2 (en) * 2007-03-01 2013-07-02 Microsoft Corporation Metamodel-based automatic report generation
US8490050B2 (en) * 2008-04-17 2013-07-16 Microsoft Corporation Automatic generation of user interfaces
US8949317B2 (en) * 2010-01-21 2015-02-03 Versaic Inc. Metadata-configurable systems and methods for network services
US10037314B2 (en) * 2013-03-14 2018-07-31 Palantir Technologies, Inc. Mobile reports
US10503816B2 (en) * 2017-05-26 2019-12-10 Sap Se Real-time view-based reporting metadata

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794226A (en) * 2010-03-08 2010-08-04 山东大学 Service software construction method and system adapting to multiple business abstraction levels
CN103970527A (en) * 2013-01-28 2014-08-06 国际商业机器公司 Assistive Overlay For Report Generation
CN105843945A (en) * 2016-04-08 2016-08-10 联动优势科技有限公司 Report generation method and system
CN107145477A (en) * 2017-04-28 2017-09-08 郑州云海信息技术有限公司 A kind of reporting system based on FineReport instruments
CN111708529A (en) * 2020-06-23 2020-09-25 浪潮云信息技术股份公司 Implementation method for generating form through dragging based on angular
WO2022007919A1 (en) * 2020-07-09 2022-01-13 阿里巴巴集团控股有限公司 Flow processing method and device, and computer system
CN112099801A (en) * 2020-11-03 2020-12-18 广州市玄武无线科技股份有限公司 Excel analysis method and system based on metadata driving
CN112463797A (en) * 2020-12-08 2021-03-09 航天信息股份有限公司 Report generation method, system, storage medium and electronic equipment
CN113822033A (en) * 2020-12-23 2021-12-21 京东科技信息技术有限公司 Report generation method, device, equipment and storage medium
CN113377352A (en) * 2021-07-05 2021-09-10 重庆市规划和自然资源信息中心 Big data form modeling generation method for government affair business
CN113779037A (en) * 2021-09-23 2021-12-10 上海淇玥信息技术有限公司 Worksheet processing method and device and electronic equipment
WO2023073496A1 (en) * 2021-10-29 2023-05-04 Klarna Bank Ab System for identification and autofilling of web elements in forms on web pages using machine learning
CN116954597A (en) * 2022-04-14 2023-10-27 昆仑数智科技有限责任公司 Form page generation method and device, electronic equipment, storage medium and product
CN114781342A (en) * 2022-05-21 2022-07-22 北京泓泰天诚科技有限公司 Report generation method, device, equipment and storage medium for petrochemical industry
CN115375421A (en) * 2022-09-05 2022-11-22 重庆锐思科技有限责任公司 Front-end finance and tax direction universal UI component library based on Vue architecture
CN116860223A (en) * 2022-09-06 2023-10-10 上海电气集团数字科技有限公司 Cloud-protogenesis-based low-code development and delivery method
CN115759018A (en) * 2022-11-03 2023-03-07 广州南天电脑系统有限公司 Report generation method and device, computer equipment and storage medium
CN116468010A (en) * 2023-02-27 2023-07-21 河钢数字技术股份有限公司 Report generation method, device, terminal and storage medium
CN116382643A (en) * 2023-03-24 2023-07-04 肖光睿 Running system based on low-code platform
CN116956847A (en) * 2023-07-25 2023-10-27 陕西师范大学 Report management method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
制作第一个组件;Roxy;《https://help.fanruan.com/finebi/doc-view-1653.html》;第1-6页 *
表格属性;doreen0813;《https://help.fanruan.com/finebi/doc-view-124.html》;第1-8页 *
郭绍义.《Excel完全自学教程》.天津科学技术出版社,2022, *

Also Published As

Publication number Publication date
CN117252180A (en) 2023-12-19

Similar Documents

Publication Publication Date Title
CN109960629B (en) Method and device for monitoring service volume of payment system in real time
CN111782117B (en) Interface display method and device, storage medium and electronic device
CN115617888A (en) Data import method, device, equipment, storage medium and product
CN115392205A (en) Report data generation method and device, electronic equipment and storage medium
CN117252180B (en) Report generation method and device, electronic equipment and storage medium
CN117093798A (en) Rendering abnormality detection method and device, electronic equipment and storage medium
CN116382640A (en) Method, device, equipment and storage medium for managing micro-service
CN115934550A (en) Test method, test device, electronic equipment and storage medium
CN115033233A (en) Interface calling method and device, electronic equipment and storage medium
CN114596070A (en) Product optimization design platform construction method based on knowledge graph
CN114416772A (en) Data query method and device, electronic equipment and storage medium
CN114328486A (en) Data quality checking method and device based on model
CN114185871A (en) Data migration method, data migration device, medium, and electronic device
CN113079046A (en) Data access method and device, electronic equipment and medium
CN118133794B (en) Table configuration method, apparatus, device and storage medium
CN116204441B (en) Performance test method, device, equipment and storage medium of index data structure
CN116226456A (en) Message conversion method and device, electronic equipment and storage medium
CN117931176A (en) Business application generation method, device, platform and medium
CN114637796A (en) Index display method and device, electronic equipment and storage medium
CN116820656A (en) Large screen interface generation method, device, equipment and storage medium
CN117670236A (en) Mobile-terminal-based to-be-handled flow approval method, device, equipment and medium
CN115759021A (en) Configuration method, device and medium of webpage table query box and electronic equipment
CN117455684A (en) Data processing method, device, electronic equipment, storage medium and product
CN115629965A (en) Document testing method, device, equipment, medium and program product
CN117371403A (en) Form component generation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant