CN112149390A - Report generation method, system, computer device and computer-readable storage medium - Google Patents

Report generation method, system, computer device and computer-readable storage medium Download PDF

Info

Publication number
CN112149390A
CN112149390A CN202011038224.3A CN202011038224A CN112149390A CN 112149390 A CN112149390 A CN 112149390A CN 202011038224 A CN202011038224 A CN 202011038224A CN 112149390 A CN112149390 A CN 112149390A
Authority
CN
China
Prior art keywords
data
report
format
document
template
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.)
Pending
Application number
CN202011038224.3A
Other languages
Chinese (zh)
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.)
Ping An Asset Management Co Ltd
Original Assignee
Ping An Asset Management 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 Ping An Asset Management Co Ltd filed Critical Ping An Asset Management Co Ltd
Priority to CN202011038224.3A priority Critical patent/CN112149390A/en
Publication of CN112149390A publication Critical patent/CN112149390A/en
Pending legal-status Critical Current

Links

Images

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/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • 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/174Form filling; Merging

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)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a report generation method, which comprises the following steps: receiving a template document, wherein the template document comprises chart template data and a data format corresponding to the chart template data; carrying out format conversion on the template document, and carrying out character replacement on the chart template data according to the data format of the chart template data to obtain a first format document; carrying out format conversion on the first format document based on a report generation engine to obtain a second format document; acquiring report data, wherein the report data comprises coded data; and performing character replacement on the coded data in the second format document through the report generating engine to generate a report file. The report file of the present invention is stored in a blockchain in a suspicious manner. The invention also relates to a medical science and technology, which can be used for generating diagnosis reports, inspection reports and the like in a medical system.

Description

Report generation method, system, computer device and computer-readable storage medium
Technical Field
Embodiments of the present invention relate to the field of information systems, and in particular, to a report generation method, a report generation system, a computer device, and a computer-readable storage medium.
Background
Automated reports are widely used in a variety of scenarios, such as combination physical examination reports, bond detail reports, and so forth. When a user wants to put data or pictures of a certain page into a certain document, the user has the requirement scene, and the certain page is conveniently archived or checked.
The traditional report is made in such a way that the front end performs picture partial rendering, then performs base64 format encoding, and transmits encoded data to the back end, and the back end writes the picture data into a document. The realization mode occupies larger bandwidth in the report transmission process, so that when the data interface of the current page is not rendered, the page intercepted by the front end is a loaded picture, and the display is incomplete.
Disclosure of Invention
In view of this, embodiments of the present invention provide a report generating method, a report generating system, a computer device, and a computer readable storage medium, which solve the problem of bandwidth occupation caused by transmission and improve the downloading speed of a user.
In order to achieve the above object, an embodiment of the present invention provides a report generation method, including:
receiving a template document, wherein the template document comprises chart template data and a data format corresponding to the chart template data;
carrying out format conversion on the template document, and carrying out character replacement on the chart template data according to the data format of the chart template data to obtain a first format document;
carrying out format conversion on the first format document based on a report generation engine to obtain a second format document;
acquiring report data, wherein the report data comprises coded data;
and performing character replacement on the coded data in the second format document through the report generating engine to generate a report file.
Further, the step of receiving a template document previously comprises:
acquiring graph template data, and a data format and a configuration file of the graph template data;
and storing the chart template data into the configuration file in the data format corresponding to the chart template data, and setting a replaceable attribute for the chart template data to obtain a template document.
Further, converting the format of the template document, and performing character replacement on the chart template data according to the data format of the chart template data to obtain a first format document, including:
identifying the replaceable attribute of the chart template data when the template document is subjected to format conversion;
acquiring corresponding characters according to the data format corresponding to the replaceable attribute and the chart template data;
and replacing the chart template data with characters corresponding to the chart template data to obtain a first format document.
Further, the obtaining report data, the report data including encoded data includes:
sending a data acquisition request to a block chain in which the report data is stored;
and receiving report data returned based on the data acquisition request.
Further, the performing, by the report generation engine, character replacement on the encoded data in the second format document, and generating a report file includes:
performing character replacement on the coded data into the second format document according to the data format of the coded data to obtain a target document;
and drawing the target document through the report generating engine to obtain a report file.
Further, the format conversion of the first format document based on the report generation engine to obtain a second format document further includes:
and when the format of the first format document is converted by the report generating engine, setting an expression for the chart template data to obtain a second format document, wherein the expression comprises data characters of the chart template data.
Further, the performing, by the report generation engine, character replacement on the encoded data in the second format document, and generating a report file further includes:
analyzing each expression in the second format document by using the report generation engine, and determining a target data character corresponding to each expression;
and acquiring coded data corresponding to the target data characters based on the target data characters, replacing the coded data with the corresponding expression, and generating the report file.
In order to achieve the above object, an embodiment of the present invention further provides a report generation system, including:
the receiving module is used for receiving a template document, and the template document comprises chart template data and a data format corresponding to the chart template data;
the first conversion module is used for carrying out format conversion on the template document and carrying out character replacement on the chart template data according to the data format of the chart template data to obtain a first format document;
the second conversion module is used for carrying out format conversion on the first format document based on the report generation engine to obtain a second format document;
the acquisition module is used for acquiring report data, and the report data comprises encoded data;
and the generating module is used for filling the report data and the coded data into the second format document through the report generating engine and generating a report file.
To achieve the above object, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program that is executable on the processor, and the computer program, when executed by the processor, implements the steps of the report generation method as described above.
To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is executable by at least one processor to cause the at least one processor to execute the steps of the report generation method described above.
According to the report generation method, the report generation system, the computer device and the computer readable storage medium, the template document is converted, the character replacement is performed on the chart template data according to the data format of the chart template data of the template document to obtain the first format document, the first format document is further converted to obtain the second format document which can be directly filled with the report data by the template engine, and the report file is generated by the template engine, so that the problem that bandwidth occupation is caused by front-end transmission of base64 encoded data is solved, the downloading speed of a user is improved, and meanwhile the problem that a non-identical page cannot be subjected to screenshot is solved.
Drawings
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 step S120 in the first embodiment of the report generating method according to the present invention.
Fig. 3 is a flowchart of step S160 in the first embodiment of the report generating method according to the present invention.
Fig. 4 is a flowchart of a first embodiment of step S180 in a first embodiment of a report generating method according to the present invention.
Fig. 5 is a flowchart of a second embodiment of step S180 in the first embodiment of the report generating method according to the present invention.
Fig. 6 is a schematic diagram of program modules of a second embodiment of the report generating system according to the present invention.
Fig. 7 is a schematic diagram of a hardware structure of a third embodiment of the computer apparatus according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a report generation method according to a first embodiment of the present invention is shown. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description is made by way of example with the computer device 2 as the execution subject. The details are as follows.
Step S100, receiving a template document, wherein the template document comprises chart template data and a data format corresponding to the chart template data.
Specifically, the template document is a doc format document, the graph template data is data in the form of a table or a picture, and the data format may be in the form of a numerical value, a character, or a binary number, and is described by a data type and a data length. The picture data in the chart template data is set as a base64 coding type, and other data are set according to requirements.
Illustratively, the step S100 includes, before the step:
obtaining chart template data, and a data format and a configuration file of the chart template data.
Specifically, a configuration file is defined in which layout information of the displayed report is defined. The layout information includes: the page application comprises a toolbar, a page setting panel, an attribute panel, a scale, a measuring tool panel, an operation button, an interactive display interface and the like.
And storing the chart template data into the configuration file in the data format corresponding to the chart template data, and setting a replaceable attribute for the chart template data to obtain a template document.
Specifically, the graph template data is stored in a configuration file in a data format, for example, the picture data is stored as base64 encoded data, the replaceable attribute of the graph template data is set as a placeholder parameter ($ { }), the template data is obtained after the setting is completed, and the setting of the replaceable attribute is convenient for data matching.
And step S120, converting the format of the template document, and performing character replacement on the chart template data according to the data format of the chart template data to obtain a first format document.
Specifically, the template document is a doc format document, and the first format document is an xml format document. The doc document is visual, and is converted into an xml format, wherein xml is a label language, but not binary, and the doc document is extremely convenient and accurate to operate and modify. When the schema data is converted into the xml document, the schema data which needs to be displayed in the template document is replaced, and the schema data which needs to be rendered is replaced by a placeholder and filled into a replaceable attribute $ { }, for example: which fixed data is presented, such as any section of an article; replacing the circular list with < # if > < # list > characters; replacing the picture position with an image character; if a circular table exists, list setting is carried out on the < c: ser > character of the table, < # if > setting is carried out on the < w: p > character of the table, and the first format document is obtained after the setting is stored.
Exemplarily, referring to fig. 2, the step S120 specifically includes:
step S121, identifying the replaceable attribute of the chart template data when the format of the template document is converted.
Specifically, the replaceable attribute is set according to the requirement, for example, picture data is replaced, table data is replaced cyclically, and $ { } can be set for marking.
And step S122, acquiring corresponding characters according to the data format corresponding to the replaceable attributes and the chart template data.
Specifically, the characters corresponding to the picture data are $ { image }, and the characters corresponding to the table are < c: ser > and < w: p >. If the cyclic list is the cyclic list, the corresponding character is also provided with a < # if > tag and a < # list > tag, the < c: ser > is associated with the < # if > tag, and the < w: p > is associated with the < # if > tag.
And S123, replacing the chart template data with characters corresponding to the chart template data to obtain a first format document.
Specifically, when the template data is converted into the first format document data, the picture data at the picture position is replaced by the corresponding character according to the requirement, the table data corresponding to the table position is also replaced by the corresponding character, if a cyclic table exists, the cyclic table finds the character < c: ser > tag corresponding to the table for list, and the character < w: p > tag for < # if >.
Step S140, performing format conversion on the first format document based on the report generating engine to obtain a second format document.
Specifically, the xml format document of the second format document is saved as an ftl format document for graphic drawing by a freemarker tool. The report generation engine is freemarker: i.e. a generic tool for generating output text (HTML web page, e-mail, configuration file, source code, etc.), i.e. report files, based on a second format document and report data that needs to be replaced.
Exemplarily, the step S140 specifically includes:
and when the format of the first format document is converted by the report generating engine, setting an expression for the chart template data to obtain a second format document, wherein the expression comprises data characters of the chart template data.
Specifically, the required report data is indicated by the position fields, each position field needs to correspond to a target data character, and the data under the target data character is the data required to be contained in the report file. In order to obtain the required report data from the blockchain, an expression corresponding to each position field is set, and the expression includes information of target data characters, such as: the field name of the picture, etc. The generated second format document comprises each position field and an expression corresponding to each position field.
Step S160, report data is acquired, and the report data includes encoded data.
Specifically, the report data is pre-stored in the block chain, the report data is picture data which is pre-analyzed to be base64 encoded data, the encoded data is convenient for directly acquiring data, the problem that bandwidth occupation is caused by front-end transmission of base64 is solved, the downloading speed of a user is improved, and meanwhile the problem that a non-identical page cannot be subjected to screenshot is solved. The picture report data is converted into encoded data encoded by base64, and then the encoded data is placed in a second format document, and then the replacement picture can be quickly modified.
Exemplarily, referring to fig. 3, the step S160 specifically includes:
step S161, sending a data acquisition request to the blockchain storing the report data.
Specifically, report data is stored in the blockchain in advance, and uploading the report data to the blockchain can ensure the safety and the fair transparency of the report data to users. The user equipment may download the report data from the blockchain to verify that the report data has been tampered with. The blockchain referred to in this example is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
And step S162, receiving report data returned based on the data acquisition request.
Specifically, the data acquisition request carries an identifier of report data, identifier matching is performed on the block chain, and if the identifier matching is successful, report data is returned.
Step S180, performing character replacement on the encoded data in the second format document by the report generating engine, and generating a report file.
Specifically, the template engine can directly fill the encoded data in the report data into the second format document to obtain the report file. And the freemarker engine is utilized to automatically fill report data into the second format document from the data source to generate a report file, and the freemarker engine can realize the automatic filling of the data and can more conveniently generate the report file.
Exemplarily, referring to fig. 4, the first embodiment of the step S180 includes:
and step S181, performing character replacement on the coded data into the second format document according to the data format of the coded data to obtain a target document.
Specifically, the corresponding characters are replaced by the coded data to obtain the target document, the problem that bandwidth occupation is caused by front-end transmission of base64 coded data is solved, the downloading speed of a user is improved, and meanwhile the problem that non-identical pages cannot be subjected to screenshot is solved.
Step S182, drawing the target document through the report generating engine to obtain a report file.
Specifically, the report file is drawn and rendered by the report generation engine, and the report file is generated. The user can draw, download and check the report file, and can also draw a report page through the front end, so that the user can check the report conveniently.
Exemplarily, referring to fig. 5, the second embodiment of the step S180 includes:
step S180A, parsing each expression in the second format document by using the report generating engine, and determining a target data character corresponding to each expression.
Specifically, each expression in the second format document is analyzed by using a freemarker engine, a target data character corresponding to each expression is determined, target data corresponding to the target data character corresponding to each expression is obtained from the block chain, and the target data is report data.
Step S180B, obtaining encoded data corresponding to the target data characters based on the target data characters, replacing the corresponding expression with the encoded data, and generating the report file.
Specifically, the corresponding expression is replaced by the target data, and a report file is generated. In the embodiment of the invention, for each expression, the information of the corresponding target data character is carried in the expression, the freemarker engine can determine the target data character corresponding to the expression by analyzing the expression, and further can acquire the target data under the target data character, and the target data is replaced by the corresponding expression based on the second format document to generate the report file. In the second format document, the expression is located at the position of the corresponding position field, after replacement, the report data is located at the position of the position field, and the generated report file contains each position field and the target data located on each position field. The invention also relates to medical science and technology, and can be used for generating diagnosis reports, examination reports and the like in a medical system.
Example two
Referring to fig. 6, a schematic diagram of program modules of a second embodiment of the report generating system of the present invention is shown. In the present embodiment, the report generating system 20 may include or be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors to implement the present invention and the above-described report generating method. Program modules referred to herein in the context of embodiments of the invention are generally intended to be a collection of computer program instructions that are capable of performing a specified function and that, when executed by a report generating system 20, are more appropriately described than the program itself. The following description will specifically describe the functions of the program modules of the present embodiment:
the receiving module 200 is configured to receive a template document, where the template document includes chart template data and a data format corresponding to the chart template data.
Specifically, the template document is a doc format document, and the chart template data can be in the form of numerical values, characters or binary numbers, and is described by data types and data lengths. The picture data in the chart template data is set as a base64 coding type, and other data are set according to requirements.
And the first conversion module 202 is configured to perform format conversion on the template document, and perform character replacement on the chart template data according to the data format of the chart template data to obtain a first format document.
Specifically, the template document is a doc format document, and the first format document is an xml format document. The doc document is visual, and is converted into an xml format, wherein xml is a label language, but not binary, and the doc document is extremely convenient and accurate to operate and modify. When the schema data is converted into the xml document, the schema data which needs to be displayed in the template document is replaced, and the schema data which needs to be rendered is replaced by a placeholder and filled into a replaceable attribute $ { }, for example: which fixed data is presented, such as any section of an article; replacing the circular list with < # if > < # list > characters; replacing the picture position with an image character; if a circular table exists, list setting is carried out on the < c: ser > character of the table, < # if > setting is carried out on the < w: p > character of the table, and the first format document is obtained after the setting is stored.
Illustratively, the first conversion module 202 is specifically configured to:
identifying the replaceable attributes of the chart template data when converting the format of the template document.
Specifically, the replaceable attribute is set according to the requirement, for example, picture data is replaced, table data is replaced cyclically, and $ { } can be set for marking.
And acquiring corresponding characters according to the data format corresponding to the replaceable attribute and the chart template data.
Specifically, the characters corresponding to the picture data are $ { image }, and the characters corresponding to the table are < c: ser > and < w: p >. If the cyclic list is the cyclic list, the corresponding character is also provided with a < # if > tag and a < # list > tag, the < c: ser > is associated with the < # if > tag, and the < w: p > is associated with the < # if > tag.
And replacing the chart template data with characters corresponding to the chart template data to obtain a first format document.
Specifically, when the template data is converted into the first format document data, the picture data at the picture position is replaced by the corresponding character according to the requirement, the table data corresponding to the table position is also replaced by the corresponding character, if a cyclic table exists, the cyclic table finds the character < c: ser > tag corresponding to the table for list, and the character < w: p > tag for < # if >.
And the second conversion module 204 is configured to perform format conversion on the first format document based on the report generating engine to obtain a second format document.
Specifically, the xml format document of the second format document is saved as an ftl format document for graphic drawing by a freemarker tool. The report generation engine is freemarker: i.e. a generic tool for generating output text (HTML web page, e-mail, configuration file, source code, etc.), i.e. report files, based on a second format document and report data that needs to be replaced.
Illustratively, the second conversion module 204 is specifically configured to:
and when the format of the first format document is converted by the report generating engine, setting an expression for the chart template data to obtain a second format document, wherein the expression comprises data characters of the chart template data.
Specifically, the required report data is indicated by the position fields, each position field needs to correspond to a target data character, and the data under the target data character is the data required to be contained in the report file. In order to obtain the required report data from the blockchain, an expression corresponding to each position field is set, and the expression includes information of target data characters, such as: the field name of the picture, etc. The generated second format document comprises each position field and an expression corresponding to each position field.
An obtaining module 206, configured to obtain report data, where the report data includes encoded data.
Specifically, the report data is pre-stored in the block chain, the report data is picture data which is pre-analyzed to be base64 encoded data, the encoded data is convenient for directly acquiring data, the problem that bandwidth occupation is caused by front-end transmission of base64 is solved, the downloading speed of a user is improved, and meanwhile the problem that a non-identical page cannot be subjected to screenshot is solved. The picture report data is converted into encoded data encoded by base64, and then the encoded data is placed in a second format document, and then the replacement picture can be quickly modified.
Illustratively, the obtaining module 206 is specifically configured to:
and sending a data acquisition request to the block chain in which the report data is stored.
Specifically, report data is stored in the blockchain in advance, and uploading the report data to the blockchain can ensure the safety and the fair transparency of the report data to users. The user equipment may download the report data from the blockchain to verify that the report data has been tampered with. The blockchain referred to in this example is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
And receiving report data returned based on the data acquisition request.
Specifically, the data acquisition request carries an identifier of report data, identifier matching is performed on the block chain, and if the identifier matching is successful, report data is returned.
A generating module 208, configured to populate, by the report generating engine, the report data and the encoded data into the second format document, and generate a report file.
Specifically, the template engine can directly fill the encoded data in the report data into the second format document to obtain the report file. And the freemarker engine is utilized to automatically fill report data into the second format document from the data source to generate a report file, and the freemarker engine can realize the automatic filling of the data and can more conveniently generate the report file.
Illustratively, the generating module 208 is further configured to:
and performing character replacement on the coded data into the second format document according to the data format of the coded data to obtain a target document.
Specifically, the corresponding characters are replaced by the coded data to obtain the target document, the problem that bandwidth occupation is caused by front-end transmission of base64 coded data is solved, the downloading speed of a user is improved, and meanwhile the problem that non-identical pages cannot be subjected to screenshot is solved.
And drawing the target document through the report generating engine to obtain a report file.
Specifically, the report file is drawn and rendered by the report generation engine, and the report file is generated. The user can draw, download and check the report file, and can also draw a report page through the front end, so that the user can check the report conveniently.
Illustratively, the generating module 208 is further configured to:
and analyzing each expression in the second format document by using the report generation engine, and determining a target data character corresponding to each expression.
Specifically, each expression in the second format document is analyzed by using a freemarker engine, a target data character corresponding to each expression is determined, target data corresponding to the target data character corresponding to each expression is obtained from the block chain, and the target data is report data.
And acquiring coded data corresponding to the target data characters based on the target data characters, replacing the coded data with the corresponding expression, and generating the report file.
Specifically, the corresponding expression is replaced by the target data, and a report file is generated. In the embodiment of the invention, for each expression, the information of the corresponding target data character is carried in the expression, the freemarker engine can determine the target data character corresponding to the expression by analyzing the expression, and further can acquire the target data under the target data character, and the target data is replaced by the corresponding expression based on the second format document to generate the report file. In the second format document, the expression is located at the position of the corresponding position field, after replacement, the report data is located at the position of the position field, and the generated report file contains each position field and the target data located on each position field.
EXAMPLE III
Fig. 7 is a schematic diagram of a hardware architecture of a computer device according to a third embodiment of the present invention. In the present embodiment, the computer device 2 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a preset or stored instruction. The computer device 2 may be a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like. As shown in FIG. 7, the computer device 2 includes, but is not limited to, at least a memory 21, a processor 22, a network interface 23, and a report generating system 20, which may be communicatively coupled to each other via a system bus. Wherein:
in this embodiment, the memory 21 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2. In other embodiments, the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the computer device 2. Of course, the memory 21 may also comprise both internal and external memory units of the computer device 2. In this embodiment, the memory 21 is generally used for storing an operating system installed in the computer device 2 and various types of application software, such as the program codes of the report generating system 20 in the second embodiment. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is typically used to control the overall operation of the computer device 2. In this embodiment, the processor 22 is configured to run the program code stored in the memory 21 or process data, for example, run the report generating system 20, so as to implement the report generating method of the first embodiment.
The network interface 23 may comprise a wireless network interface or a wired network interface, and the network interface 23 is generally used for establishing communication connection between the server 2 and other electronic devices. For example, the network interface 23 is used to connect the server 2 to an external terminal via a network, establish a data transmission channel and a communication connection between the server 2 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like. It is noted that fig. 7 only shows the computer device 2 with components 20-23, but it is to be understood that not all shown components are required to be implemented, and that more or less components may be implemented instead.
In this embodiment, the report generating system 20 stored in the memory 21 may be further divided into one or more program modules, and the one or more program modules are stored in the memory 21 and executed by one or more processors (in this embodiment, the processor 22) to complete the present invention.
For example, fig. 6 shows a schematic diagram of program modules of the second embodiment implementing the report generating system 20, in this embodiment, the report generating system 20 may be divided into a receiving module 200, a first converting module 202, a second converting module 204, an obtaining module 206, and a generating module 208. Herein, the program modules referred to herein refer to a series of computer program instruction segments capable of performing specific functions, and are more suitable than programs for describing the execution process of the report generating system 20 in the computer device 2. The specific functions of the program modules 200 and 208 have been described in detail in the second embodiment, and are not described herein again.
Example four
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of the present embodiment is used for a computer program, and when executed by a processor, implements the report generation method of the first embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A report generation method, comprising:
receiving a template document, wherein the template document comprises chart template data and a data format corresponding to the chart template data;
carrying out format conversion on the template document, and carrying out character replacement on the chart template data according to the data format of the chart template data to obtain a first format document;
carrying out format conversion on the first format document based on a report generation engine to obtain a second format document;
acquiring report data, wherein the report data comprises coded data;
and performing character replacement on the coded data in the second format document through the report generating engine to generate a report file.
2. The report generation method of claim 1, wherein the step of receiving a template document is preceded by:
acquiring graph template data, and a data format and a configuration file of the graph template data;
and storing the chart template data into the configuration file in the data format corresponding to the chart template data, and setting a replaceable attribute for the chart template data to obtain a template document.
3. The report generating method according to claim 2, wherein converting the format of the template document, and performing character replacement on the chart template data according to the data format of the chart template data to obtain a first format document comprises:
identifying the replaceable attribute of the chart template data when the template document is subjected to format conversion;
acquiring corresponding characters according to the data format corresponding to the replaceable attribute and the chart template data;
and replacing the chart template data with characters corresponding to the chart template data to obtain a first format document.
4. The report generation method of claim 1, wherein the obtaining report data, the report data including encoded data, comprises:
sending a data acquisition request to a block chain in which the report data is stored;
and receiving report data returned based on the data acquisition request.
5. The report generation method of claim 1, wherein the performing, by the report generation engine, character replacement of the encoded data in the second format document and generating a report file comprises:
performing character replacement on the coded data into the second format document according to the data format of the coded data to obtain a target document;
and drawing the target document through the report generating engine to obtain a report file.
6. The report generation method of claim 1, wherein the format converting the first format document based on the report generation engine to obtain a second format document further comprises:
and when the format of the first format document is converted by the report generating engine, setting an expression for the chart template data to obtain a second format document, wherein the expression comprises data characters of the chart template data.
7. The report generation method of claim 6, wherein said performing, by said report generation engine, character replacement of said encoded data in said second format document, generating a report file further comprises:
analyzing each expression in the second format document by using the report generation engine, and determining a target data character corresponding to each expression;
and acquiring coded data corresponding to the target data characters based on the target data characters, replacing the coded data with the corresponding expression, and generating the report file.
8. A report generating system, comprising:
the receiving module is used for receiving a template document, and the template document comprises chart template data and a data format corresponding to the chart template data;
the first conversion module is used for carrying out format conversion on the template document and carrying out character replacement on the chart template data according to the data format of the chart template data to obtain a first format document;
the second conversion module is used for carrying out format conversion on the first format document based on the report generation engine to obtain a second format document;
the acquisition module is used for acquiring report data, and the report data comprises encoded data;
and the generating module is used for filling the report data and the coded data into the second format document through the report generating engine and generating a report file.
9. A computer arrangement, characterized in that the computer arrangement comprises a memory, a processor, the memory having stored thereon a computer program being executable on the processor, the computer program, when executed by the processor, realizing the steps of the report generating method according to any of the claims 1-7.
10. A computer-readable storage medium, having stored therein a computer program executable by at least one processor to cause the at least one processor to perform the steps of the report generation method according to any of claims 1-7.
CN202011038224.3A 2020-09-28 2020-09-28 Report generation method, system, computer device and computer-readable storage medium Pending CN112149390A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011038224.3A CN112149390A (en) 2020-09-28 2020-09-28 Report generation method, system, computer device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011038224.3A CN112149390A (en) 2020-09-28 2020-09-28 Report generation method, system, computer device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN112149390A true CN112149390A (en) 2020-12-29

Family

ID=73895629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011038224.3A Pending CN112149390A (en) 2020-09-28 2020-09-28 Report generation method, system, computer device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN112149390A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667724A (en) * 2020-12-31 2021-04-16 魔元术(苏州)信息科技有限公司 Automatic acquisition and amplification method for billboard chart style library
CN114862566A (en) * 2022-07-05 2022-08-05 天津金城银行股份有限公司 Product configuration system, product configuration method, electronic device, and medium
CN115293123A (en) * 2022-07-19 2022-11-04 盐城金堤科技有限公司 Document template generation method, report online generation method and device
CN116226053A (en) * 2023-05-05 2023-06-06 中国民航信息网络股份有限公司 Text processing method, device and equipment
CN116227454A (en) * 2023-02-28 2023-06-06 易方达基金管理有限公司 Universal automatic report generation method and system
CN116522892A (en) * 2023-07-03 2023-08-01 广东省特种设备检测研究院中山检测院 Automatic generation method and generation system of report template

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667724A (en) * 2020-12-31 2021-04-16 魔元术(苏州)信息科技有限公司 Automatic acquisition and amplification method for billboard chart style library
CN114862566A (en) * 2022-07-05 2022-08-05 天津金城银行股份有限公司 Product configuration system, product configuration method, electronic device, and medium
CN115293123A (en) * 2022-07-19 2022-11-04 盐城金堤科技有限公司 Document template generation method, report online generation method and device
CN116227454A (en) * 2023-02-28 2023-06-06 易方达基金管理有限公司 Universal automatic report generation method and system
CN116226053A (en) * 2023-05-05 2023-06-06 中国民航信息网络股份有限公司 Text processing method, device and equipment
CN116226053B (en) * 2023-05-05 2024-03-22 中国民航信息网络股份有限公司 Text processing method, device and equipment
CN116522892A (en) * 2023-07-03 2023-08-01 广东省特种设备检测研究院中山检测院 Automatic generation method and generation system of report template
CN116522892B (en) * 2023-07-03 2023-12-19 广东省特种设备检测研究院中山检测院 Automatic generation method and generation system of report template

Similar Documents

Publication Publication Date Title
CN112149390A (en) Report generation method, system, computer device and computer-readable storage medium
CN107766940B (en) Method and apparatus for generating a model
CN108491367B (en) Report document generation method and device, computer equipment and storage medium
CN110737630B (en) Method and device for processing electronic archive file, computer equipment and storage medium
CN112035111A (en) Page editing method, system, computer device and computer readable storage medium
CN111985202A (en) Method, equipment and storage medium for generating PDF electronic signature based on template
CN112686015A (en) Chart generation method, device, equipment and storage medium
CN109062906B (en) Translation method and device for program language resources
CN110502482B (en) User operation interface configuration method, system and data operation method
CN111984822A (en) Image generation method and device, electronic equipment and computer readable storage medium
CN115455925A (en) Contract generation method and device, electronic equipment and storage medium
CN110659258A (en) Document generation method, system, computer device and computer readable storage medium
CN111325012B (en) word report generation method and system
CN112486490B (en) Front-end code packaging method and device, electronic equipment and storage medium
CN110941401A (en) Printing method and device
CN111222517A (en) Test sample generation method, system, computer device and storage medium
CN114896161A (en) File construction method and device based on artificial intelligence, computer equipment and medium
CN111221517A (en) Model creating method and device, computer equipment and readable storage medium
CN113296785A (en) Document generation method, system, device and readable storage medium
CN113867718A (en) Picture generation method and device, computer equipment and readable storage medium
CN115712422A (en) Form page generation method and device, computer equipment and storage medium
CN113139145B (en) Page generation method and device, electronic equipment and readable storage medium
CN115016754A (en) Method and device for synchronously displaying pages among devices, electronic device and medium
CN115146602A (en) Method and device for batch generation of infrared thermal image analysis reports based on template
CN111797646B (en) Bar code identification method and terminal

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