CN112035313B - Report generation method and device, template customization method and device, and monitoring system - Google Patents

Report generation method and device, template customization method and device, and monitoring system Download PDF

Info

Publication number
CN112035313B
CN112035313B CN202010734491.8A CN202010734491A CN112035313B CN 112035313 B CN112035313 B CN 112035313B CN 202010734491 A CN202010734491 A CN 202010734491A CN 112035313 B CN112035313 B CN 112035313B
Authority
CN
China
Prior art keywords
template
type
report
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
CN202010734491.8A
Other languages
Chinese (zh)
Other versions
CN112035313A (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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202010734491.8A priority Critical patent/CN112035313B/en
Publication of CN112035313A publication Critical patent/CN112035313A/en
Application granted granted Critical
Publication of CN112035313B publication Critical patent/CN112035313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a report generation method and device, a template self-defining method and device and a monitoring system. Wherein, the method comprises the following steps: acquiring target data; processing the target data according to the presentation type corresponding to the target data; and generating a report according to the processed data and the target template based on the matching relation between the presentation type corresponding to the target data and the presentation type contained in the target template. According to the invention, the presentation type is set, and the association between the template and the processed data is established, so that the report is automatically generated, and the process of generating the report is optimized; if the requirement of template increase or modification exists, based on the existing template, only a few changes are needed according to the presentation type contained in the template, the template does not need to be manufactured again, the template is changed flexibly and conveniently, the working efficiency of a designer is improved, reports can be generated flexibly and diversely, and the satisfaction degree of users is improved.

Description

Report generation method and device, template customization method and device, and monitoring system
Technical Field
The invention relates to the technical field of monitoring, in particular to a report generation method and device, a template customization method and device and a monitoring system.
Background
Many platforms or systems provide report export functionality, for example, online monitoring analysis and fault diagnosis platforms have functionality to export equipment health reports.
At present, the function of exporting the report is realized by that a platform makes a set of report templates in advance, parameters to be filled are left blank, and when the report is to be exported, the parameters are filled according to the blank, and the report is generated and exported. However, the template is established in advance, the template is single, different users have different requirements, a set of template needs to be manufactured again aiming at different objects, and the template is inconvenient to change.
Aiming at the problem that the report template is single and the modification difficulty is large in the prior art, so that the report cannot be generated flexibly, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a report generation method and device, a template self-defining method and device and a monitoring system, which are used for at least solving the problem that reports cannot be generated flexibly due to single report template and high template modification difficulty in the prior art.
In order to solve the above technical problem, an embodiment of the present invention provides a report generation method, including:
acquiring target data;
processing the target data according to the presentation type corresponding to the target data;
and generating a report according to the processed data and the target template based on the matching relation between the presentation type corresponding to the target data and the presentation type contained in the target template.
Optionally, processing the target data according to the presentation type corresponding to the target data includes:
determining a presentation type corresponding to the target data according to a corresponding relation between preset data and the presentation type;
and processing the target data according to the type attribute information of the presentation type corresponding to the target data to obtain first data, wherein the first data conforms to the presentation type corresponding to the target data and is in a preset format.
Optionally, generating a report according to the processed data and the target template based on a matching relationship between the presentation type corresponding to the target data and the presentation type included in the target template, includes:
reading the processed data;
calling the target template and a first type interface corresponding to the target template, wherein the presentation type of the first type interface is the same as the presentation type corresponding to the target data;
and outputting the processed data to a corresponding position in the target template through the first type interface to generate the report.
Optionally, outputting the processed data to a corresponding position in the target template through the first type interface includes:
judging whether the processed data conforms to the type attribute information in the first type interface;
if the data are not consistent with the type attribute information in the first type interface, the processed data are adjusted, and the adjusted data are made to be consistent with the type attribute information in the first type interface;
and outputting the adjusted data to the corresponding position in the target template.
Optionally, the presentation type includes at least one of: cover title, cover text, brief introduction, body text, body title, title level, summary, table, bar graph, line graph, and item introduction.
The embodiment of the invention also provides a report template self-defining method, which comprises the following steps:
receiving a template file uploaded by a user;
determining the presentation type and type attribute information contained in the template file;
and generating a self-defined template according to the presentation type and the type attribute information.
Optionally, determining the presentation type and the type attribute information included in the template file includes:
scanning and extracting page elements in the template file;
and determining the presentation type and the type attribute information contained in the template file according to the extracted page elements.
Optionally, generating a custom template according to the presentation type and the type attribute information includes: and correspondingly storing the name of the template file, the presentation type and the type attribute information as the self-defined template, wherein a corresponding type interface is established for each presentation type contained in the template file.
Optionally, after generating a custom template according to the presentation type and the type attribute information, the method further includes:
and if the user-defined template is selected as the target template, generating a report according to the processed data and the user-defined template based on the matching relation between the presentation type corresponding to the target data and the presentation type contained in the user-defined template, wherein the processed data is obtained by processing the target data according to the presentation type corresponding to the target data.
Optionally, the presentation type includes at least one of: cover title, cover text, brief introduction, body text, body title, title level, summary, table, bar graph, line graph, and item introduction.
An embodiment of the present invention further provides a report generating apparatus, including:
the acquisition module is used for acquiring target data;
the processing module is used for processing the target data according to the presentation type corresponding to the target data;
and the first generation module is used for generating a report according to the processed data and the target template based on the matching relation between the presentation type corresponding to the target data and the presentation type contained in the target template.
The embodiment of the invention also provides a report template self-defining device, which comprises:
the receiving module is used for receiving the template file uploaded by the user;
the determining module is used for determining the presentation type and the type attribute information contained in the template file;
and the second generation module is used for generating a custom template according to the presentation type and the type attribute information.
An embodiment of the present invention further provides an apparatus monitoring system, including: the report generation device and/or the report template customization device are/is provided.
Optionally, the device is an air conditioner.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a report generation method according to an embodiment of the present invention, and/or implements a report template customization method according to an embodiment of the present invention.
An embodiment of the present invention further provides an electronic device, including: one or more processors; a memory for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a report generation method, and/or a report template customization method, as described in embodiments of the present invention.
By applying the technical scheme of the invention, the association between the template and the processed data is established by setting the presentation type, so that the report is automatically generated, and the process of generating the report is optimized; if the requirement of template increase or modification exists, based on the existing template, only a few changes are needed according to the presentation type contained in the template, the template does not need to be manufactured again, the template is changed flexibly and conveniently, the working efficiency of a designer is improved, reports can be generated flexibly and diversely, and the satisfaction degree of users is improved.
Drawings
FIG. 1 is a flow chart of a report generation method provided by an embodiment of the present invention;
FIG. 2 is a flow chart of a report template customization method provided by an embodiment of the present invention;
fig. 3 is a block diagram of a report generation apparatus according to an embodiment of the present invention;
FIG. 4 is a block diagram of a report template customizing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of report generation provided by an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. 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.
The embodiment of the invention provides a report generation method, which is applicable to a device monitoring system, can automatically generate related reports such as device health reports and the like, and can also derive the reports after the reports are generated.
Fig. 1 is a flowchart of a report generation method provided in an embodiment of the present invention, and as shown in fig. 1, the method includes the following steps:
s101, target data are obtained.
The target data can be acquired according to a report generation request or a report export request, the report generation request and the report export request refer to requests input by a user through a front end, and the requests include: the target template to be used and the target data to which the report relates. The user can select the template to be used through the display interface at the front end, and the data of the needed dimension can be selected and derived according to the actual requirement. Specifically, the target data may be searched and acquired from a data source, the data source includes a database and/or a message queue, and all monitoring data in the system or the platform may be stored in the data source.
And S102, processing the target data according to the presentation type corresponding to the target data.
The presentation type refers to a presentation style of data, that is, a style in which data is displayed. The presentation type includes at least one of: cover title, cover text, brief introduction, body text, body title, title level, summary, table, bar graph, line graph, and item introduction. The target data belongs to original data and needs to be presented to a user in a certain mode in a report. The report template defines the format of the template in advance, namely the presentation types contained in the template and the type attribute information of each presentation type.
And S103, generating a report according to the processed data and the target template based on the matching relationship between the presentation type corresponding to the target data and the presentation type contained in the target template.
Each template has one or more presentation types, and specifically, when the template is stored, the name of the template, the presentation types included in the template, and type attribute information of each presentation type are stored correspondingly. The template can be called according to the matching relation between the data and the presentation type of the template, and the data and the template are combined to generate the report.
In the prior art, if the template needs to be modified, the template cannot be simply modified based on the existing template, which is basically equivalent to re-making one template, and is troublesome. In the embodiment, the association between the template and the processed data is established by setting the presentation type, so that the report is automatically generated, and the process of generating the report is optimized; if the requirement of template increase or modification exists, based on the existing template, only a few changes are needed according to the presentation type contained in the template, the template does not need to be manufactured again, the template is changed flexibly and conveniently, the working efficiency of a designer is improved, reports can be generated flexibly and diversely, and the satisfaction degree of users is improved.
For example, there is a template for a screw machine, and it is now desired to make a template for a centrifuge again in the prior art, and with the solution of the embodiment of the present invention, since the types of titles and texts are generally not changed much, and the cover page and the back cover page may be changed greatly, a back cover and a front cover may be made again, two presentation types for a centrifuge (i.e., a centrifuge front cover and a centrifuge back cover) are added, and the rest uses the existing screw machine template for reference, compared with the prior art, with the solution, the template is changed flexibly and simply.
Different users have different rights and reports that a user wants to generate or export may only contain dimensions of data within their rights. For example, when using the function of exporting reports, the user may choose to export reports of all dimensions within his authority, or may only export reports of some dimensions according to actual needs.
Optionally, before acquiring the target data, the method further includes: determining the authority of the user sending the request; judging whether the target data corresponding to the request is in the authority; if yes, acquiring the target data; if not, outputting prompt information to inform the user of exceeding the authority. Thereby avoiding user over-authorization operations.
In one embodiment, processing the target data according to the presentation type corresponding to the target data includes: determining a presentation type corresponding to the target data according to a corresponding relation between preset data and the presentation type; and processing the target data according to the type attribute information of the presentation type corresponding to the target data to obtain first data, wherein the first data conforms to the presentation type corresponding to the target data and is in a preset format.
The type attribute information refers to attribute information necessary for maintaining the presentation type, and for example, the attribute information of the title type includes: the font, the font size, the position of the title in the page, and the like; the attribute information of the histogram type includes: the meaning of the column, the value of the column, the color of the column, the width of the column, and the like. Corresponding presentation types (corresponding type attribute information is also set) can be set for each data according to the data stored in the data source. One type of data presentation may be one or more, for example, temperature data may be treated as a table or line graph presentation type. If the target data corresponds to at least two presentation types, two pieces of first data are obtained, and the first data can be matched with the first data according to the presentation types contained in the target template to be output to the corresponding position of the target template. The preset format can be a json, xml, yml or properties configuration file format and the like, and preferably, the json format is used to ensure better readability and transmissibility.
The target data are processed into the first data which are in accordance with the corresponding presentation type and in the preset format, so that the association between the presentation type and the target template can be conveniently established subsequently, and the data in the preset format can be conveniently transmitted and read.
In one embodiment, generating a report according to the processed data and the target template based on a matching relationship between a presentation type corresponding to the target data and a presentation type included in the target template includes: reading the processed data; calling the target template and a first type interface corresponding to the target template, wherein the presentation type of the first type interface is the same as the presentation type corresponding to the target data; and outputting the processed data to a corresponding position in the target template through the first type interface to generate the report.
The templates are stored in a template library, specifically, different templates can be distinguished by means of template names, and presentation types and type attribute information contained in each template are correspondingly stored under each template. Each presentation type contained in each template is correspondingly provided with a corresponding type interface, the type interfaces are functions for butting the presentation type and the type attribute information with other function modules, it can be understood that the type interfaces provide calls for corresponding services or functions, and the acquisition or use of the presentation type and the type attribute information corresponding to the type interfaces can be realized by calling the type interfaces.
The embodiment calls the template and the corresponding type interface based on the storage form of the template, realizes the output of data to the corresponding position of the template, and completes the automatic generation of the report.
Considering that the specific attribute information of the presentation type corresponding to the target data may be different from the specific attribute information of the corresponding presentation type in the target template, further, outputting the processed data to the corresponding position in the target template through the first type interface includes: judging whether the processed data conforms to the type attribute information in the first type interface; if the data are not consistent with the type attribute information in the first type interface, the processed data are adjusted, and the adjusted data are made to be consistent with the type attribute information in the first type interface; and outputting the adjusted data to the corresponding position in the target template. According to the embodiment, the type attribute information is compared, and the data is adjusted in time, so that a proper report is generated according to the template.
After the report is generated, the report is archived, then the report can be converted into a data stream to be transmitted to the front end, and the front end performs conversion processing on the data stream, so that the service downloaded to the local can be provided for a user, and the report can be exported.
The file format of the report may be: word, pdf, excel, etc. The user can select the file format according to the requirement, and can also set a default file format, such as pdf.
Based on the same inventive concept, the embodiment also provides a report template self-defining method, which can realize the self-definition of the report template, is convenient for the modification of the template and meets the requirements of users. For technical details that are not described in detail in this embodiment, reference may be made to the report generation method provided in the above-described embodiment. Referring to fig. 2, the report template customizing method includes the steps of:
s201, receiving a template file uploaded by a user.
S202, determining the presentation type and the type attribute information contained in the template file.
And S203, generating a custom template according to the presentation type and the type attribute information.
The template file uploaded by the user can be a report sample in a format of word, pdf, excel and the like. The presentation type refers to a presentation style of data, in which style the data is displayed. The type attribute information refers to attribute information necessary to maintain the presentation type. The presentation type and the type attribute information contained in the template file can embody the format of the template. The presentation type includes at least one of: cover title, cover text, brief introduction, body text, body title, title level, summary, table, bar graph, line graph, and item introduction.
In the embodiment, the user can import and upload the self-satisfied template file in consideration of the requirement of the user on the self-defined template, and the self-defined template can be generated by determining the presentation type and the type attribute information contained in the template file, so that the self-defined report template is realized, the code does not need to be manually modified, the realization is simple, and the problems of single template and high modification difficulty are solved.
Specifically, determining the presentation type and the type attribute information included in the template file includes: scanning and extracting page elements in the template file; and determining the presentation type and the type attribute information contained in the template file according to the extracted page elements.
Wherein the page elements include at least one of: text, pictures, and diagrams. Specifically, the parsing tool may be invoked to scan and extract the page elements in the template file. For characters, the characters need to be scanned and analyzed, and the positions of the characters in the page; the cover typically has a picture, a cover title, and cover text, etc. The text can have pictures, titles of various levels, text contents and the like. The pure picture can be directly stored. For charts, it is necessary to analyze color, horizontal and vertical axis titles and legends, etc. to facilitate generating echarts drawing templates, which are automatically populated with default colors when the data set exceeds the picture settings. And analyzing and determining the presentation type and the type attribute information contained in the template file according to the extracted page elements.
Specifically, generating a custom template according to the presentation type and the type attribute information includes: and correspondingly storing the name of the template file, the presentation type and the type attribute information as the self-defined template, wherein a corresponding type interface is established for each presentation type contained in the template file. The self-definition of the template is completed through the name, the contained presentation type and the type attribute information of the corresponding stored template file, and the self-defined template is obtained; the presentation type of the template can be used when the report is generated by setting the type interface, and the data is output to the corresponding position in the template.
In an optional implementation manner, after generating the custom template according to the presentation type and the type attribute information, the method further includes: and if the user-defined template is selected as the target template, generating a report according to the processed data and the user-defined template based on the matching relation between the presentation type corresponding to the target data and the presentation type contained in the user-defined template, wherein the processed data is obtained by processing the target data according to the presentation type corresponding to the target data. For details, refer to the contents described in the above embodiments of the report generation method.
According to the embodiment, when the user generates or exports the report, the user can select to use the custom template to generate the report, so that the user requirement is met, and the user experience and the user satisfaction of the report generating or exporting function are improved.
Based on the same inventive concept, the present embodiment provides a report generating apparatus, which can be used to implement the report generating method described in the above embodiments. The device may be implemented by software and/or hardware, and the device may be generally integrated in a server.
Fig. 3 is a block diagram of a report generation apparatus according to an embodiment of the present invention, and as shown in fig. 3, the report generation apparatus includes:
an obtaining module 31, configured to obtain target data;
the processing module 32 is configured to process the target data according to the presentation type corresponding to the target data;
and a first generating module 33, configured to generate a report according to the processed data and the target template based on a matching relationship between the presentation type corresponding to the target data and the presentation type included in the target template.
Optionally, the processing module 32 includes:
the first determining unit is used for determining a presentation type corresponding to the target data according to a corresponding relation between preset data and the presentation type;
and the processing unit is used for processing the target data according to the type attribute information of the presentation type corresponding to the target data to obtain first data, wherein the first data conforms to the presentation type corresponding to the target data and is in a preset format.
Optionally, the first generating module 33 includes:
a reading unit for reading the processed data;
the calling unit is used for calling the target template and a first type interface corresponding to the target template, wherein the presentation type of the first type interface is the same as the presentation type corresponding to the target data;
and the generating unit is used for outputting the processed data to a corresponding position in the target template through the first type interface to generate the report.
Optionally, the generating unit includes:
a judging subunit, configured to judge whether the processed data matches the type attribute information in the first type interface;
an adjusting subunit, configured to adjust the processed data if the processed data does not match the type attribute information in the first type interface, so that the adjusted data matches the type attribute information in the first type interface;
and the output subunit is used for outputting the adjusted data to the corresponding position in the target template.
The presentation type includes at least one of: cover title, cover text, brief introduction, body text, body title, title level, summary, table, bar graph, line graph, and item introduction.
The device can execute the report generation method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in this embodiment, reference may be made to the report generation method provided in the embodiment of the present invention.
Based on the same inventive concept, the embodiment provides a report template customizing device, which can be used for implementing the report template customizing method described in the above embodiment. The device may be implemented by software and/or hardware, and the device may be generally integrated in a server.
Fig. 4 is a block diagram of a report template customizing apparatus according to an embodiment of the present invention, and as shown in fig. 4, the apparatus includes:
a receiving module 41, configured to receive a template file uploaded by a user;
a determining module 42, configured to determine a presentation type and type attribute information included in the template file;
and a second generating module 43, configured to generate a custom template according to the presentation type and the type attribute information.
Optionally, the determining module 42 includes:
the extraction unit is used for scanning and extracting the page elements in the template file;
and the second determining unit is used for determining the presentation type and the type attribute information contained in the template file according to the extracted page elements.
Optionally, the second generating module 43 includes: and the storage unit is used for correspondingly storing the name of the template file, the presentation type and the type attribute information as the self-defined template, wherein a corresponding type interface is established for each presentation type contained in the template file.
Optionally, the apparatus further comprises: and if the user-defined template is selected as the target template, generating a report according to the processed data and the user-defined template based on the matching relationship between the presentation type corresponding to the target data and the presentation type contained in the user-defined template, wherein the processed data is obtained by processing the target data according to the presentation type corresponding to the target data.
Optionally, the presentation type includes at least one of: cover title, cover text, brief introduction, body text, body title, title level, summary, table, bar graph, line graph, and item introduction.
The device can execute the report template self-defining method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the method. For details of the report template, the report template customization method provided by the embodiment of the present invention may be referred to.
It should be noted that the report generation scheme and the report template customization scheme may be implemented in combination.
The report generating method and apparatus, and the report template customizing method and apparatus are described below with reference to fig. 5 as an example, however, it should be noted that this specific embodiment is only for better describing the present application, and does not constitute a limitation to the present application. The same or corresponding terms as those of the above-described embodiments are explained, and the description of the present embodiment is omitted.
The user selects the function of exporting the health report through the fault checking page of the online monitoring platform, optionally, the user can select whether to export the health reports of all dimensions in the right, the user can only export the health reports of part of dimensions according to the requirement, and the front end (i.e. the client 10) transmits the request and the requirement of the user to the server 20.
Server 20 receives a request from a user to derive a statement-of-health, queries the user for authorization, retrieves metadata from a data source (database 61 and/or message queue 62), and transmits the metadata to preprocessing module 30 (equivalent to processing module 32 described above).
The pre-processing module 30 receives the server generated statement of health request and metadata, processes the metadata into a unified data format, such as json format, containing the necessary fields type, content and children for identification of type, content and sub-module, and connects to the export statement of health function module 40 (corresponding to the first generation module 33 or the third generation module described above, and with the addition of export functionality).
Wherein the type types include: coverTitle, coverText (cover text, e.g. unit name, date of creation, etc.), intro (introduction, e.g. unit introduction, company introduction, etc.), text (body text), title (body title, used in conjunction with level, e.g. primary title, secondary title, etc.), summary (summary, i.e. summary language), table (table), bar (bar graph), line (line graph), and project (item introduction)
The export health report function module 40 analyzes json data according to data analysis rules, classifies the json data according to type fields, matches and calls templates and various types under the templates, processes grade titles, forms and various charts, generates a health report, transmits the health report to a server for archiving, and a user can download the health report through a client.
When a statement-of-health needs to be exported, the server will automatically generate a statement-of-health only by importing the request and the metadata needed to export the statement-of-health.
Optionally, if the user is not satisfied with the health report template or has a requirement for a custom template, the user may select to upload a template file, the server invokes the template analysis tool 50 (corresponding to the determination module 42), the template analysis tool 50 scans and extracts page elements in the template file, generates a user custom report template, and stores the newly generated custom template in the template library. Custom templates may be used when the user subsequently chooses to generate a statement-of-health.
An embodiment of the present invention further provides an apparatus monitoring system, including: the report generating device according to the above embodiment, and/or the report template customizing device according to the above embodiment.
Optionally, the device is an electric device, preferably, the device is an air conditioner, and the device monitoring system may be an air conditioner remote online monitoring system.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a report generation method as described in the above embodiments, and/or implements a report template customization method as described in the above embodiments.
An embodiment of the present invention further provides an electronic device, including: one or more processors; a memory for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a report generation method as in the above embodiments and/or a report template customization method as in the above embodiments.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (14)

1. A report generation method, comprising:
acquiring target data;
processing the target data according to the presentation type corresponding to the target data;
based on the matching relation between the presentation type corresponding to the target data and the presentation type contained in the target template, generating a report according to the processed data and the target template;
generating a report according to the processed data and the target template based on the matching relationship between the presentation type corresponding to the target data and the presentation type contained in the target template, wherein the generating the report comprises:
reading the processed data;
calling the target template and a first type interface corresponding to the target template, wherein the presentation type of the first type interface is the same as the presentation type corresponding to the target data;
and outputting the processed data to a corresponding position in the target template through the first type interface to generate the report.
2. The method of claim 1, wherein processing the target data according to the presentation type corresponding to the target data comprises:
determining a presentation type corresponding to the target data according to a corresponding relation between preset data and the presentation type;
and processing the target data according to the type attribute information of the presentation type corresponding to the target data to obtain first data, wherein the first data conforms to the presentation type corresponding to the target data and is in a preset format.
3. The method of claim 1, wherein outputting the processed data to a corresponding location in the target template via the first type interface comprises:
judging whether the processed data conforms to the type attribute information in the first type interface;
if the data are not consistent with the type attribute information in the first type interface, the processed data are adjusted, and the adjusted data are made to be consistent with the type attribute information in the first type interface;
and outputting the adjusted data to the corresponding position in the target template.
4. The method of any of claims 1-3, wherein the presentation type comprises at least one of: cover title, cover text, brief introduction, body text, body title, title level, summary, table, bar graph, line graph, and item introduction.
5. A report template customization method is characterized by comprising the following steps:
receiving a template file uploaded by a user;
determining the presentation type and type attribute information contained in the template file;
generating a self-defined template according to the presentation type and the type attribute information;
generating a custom template according to the presentation type and the type attribute information, wherein the custom template comprises the following steps: and correspondingly storing the name, the presentation type and the type attribute information of the template file as the self-defined template, wherein a corresponding type interface is established for each presentation type contained in the template file, so that the use of the presentation type of the template is realized when a report is generated by utilizing the type interface, and data is output to a corresponding position in the template.
6. The method of claim 5, wherein determining the presentation type and the type attribute information contained in the template file comprises:
scanning and extracting page elements in the template file;
and determining the presentation type and the type attribute information contained in the template file according to the extracted page elements.
7. The method of claim 5, after generating a custom template from the presentation type and type attribute information, the method further comprising:
and if the user-defined template is selected as the target template, generating a report according to the processed data and the user-defined template based on the matching relation between the presentation type corresponding to the target data and the presentation type contained in the user-defined template, wherein the processed data is obtained by processing the target data according to the presentation type corresponding to the target data.
8. The method of any of claims 5 to 7, wherein the presentation type comprises at least one of: cover title, cover text, brief introduction, body text, body title, title level, summary, table, bar graph, line graph, and item introduction.
9. A report generating apparatus, comprising:
the acquisition module is used for acquiring target data;
the processing module is used for processing the target data according to the presentation type corresponding to the target data;
a first generation module, configured to generate a report according to the processed data and the target template based on a matching relationship between a presentation type corresponding to the target data and a presentation type included in the target template;
the first generation module comprises:
a reading unit for reading the processed data;
the calling unit is used for calling the target template and a first type interface corresponding to the target template, wherein the presentation type of the first type interface is the same as the presentation type corresponding to the target data;
and the generating unit is used for outputting the processed data to a corresponding position in the target template through the first type interface to generate the report.
10. A report template customization apparatus, comprising:
the receiving module is used for receiving the template file uploaded by the user;
the determining module is used for determining the presentation type and the type attribute information contained in the template file;
the second generation module is used for generating a custom template according to the presentation type and the type attribute information;
the second generation module comprises: and the storage unit is used for correspondingly storing the name of the template file, the presentation type and the type attribute information as the self-defined template, wherein a corresponding type interface is established for each presentation type contained in the template file, so that the use of the presentation type of the template is realized when a report is generated by using the type interface, and data is output to a corresponding position in the template.
11. An equipment monitoring system, comprising: the report generation apparatus of claim 9, and/or the report template customization apparatus of claim 10.
12. The system of claim 11, wherein the device is an air conditioner.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements a report generation method according to any one of claims 1 to 4 and/or implements a report template customization method according to any one of claims 5 to 8.
14. An electronic device, comprising: one or more processors; memory for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a report generation method as claimed in any one of claims 1 to 4 and/or a report template customization method as claimed in any one of claims 5 to 8.
CN202010734491.8A 2020-07-27 2020-07-27 Report generation method and device, template customization method and device, and monitoring system Active CN112035313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010734491.8A CN112035313B (en) 2020-07-27 2020-07-27 Report generation method and device, template customization method and device, and monitoring system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010734491.8A CN112035313B (en) 2020-07-27 2020-07-27 Report generation method and device, template customization method and device, and monitoring system

Publications (2)

Publication Number Publication Date
CN112035313A CN112035313A (en) 2020-12-04
CN112035313B true CN112035313B (en) 2022-03-04

Family

ID=73583293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010734491.8A Active CN112035313B (en) 2020-07-27 2020-07-27 Report generation method and device, template customization method and device, and monitoring system

Country Status (1)

Country Link
CN (1) CN112035313B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112966967A (en) * 2021-03-26 2021-06-15 北京亿耘科技有限公司 Ecological monitoring report generation method, server and storage medium
CN113436699A (en) * 2021-06-29 2021-09-24 深圳市核子基因科技有限公司 Method, system, electronic device and storage medium for generating new corona nucleic acid detection report
CN113778448A (en) * 2021-09-18 2021-12-10 上海中通吉网络技术有限公司 Method for automatically generating front-end page based on YApi interface document
CN113850059B (en) * 2021-12-01 2022-03-22 北京一起教育科技有限责任公司 Method and device for generating evaluation report and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609967A (en) * 2012-02-17 2012-07-25 杭州电子科技大学 Generating and typesetting method of image-text report
CN109948134A (en) * 2019-03-21 2019-06-28 润电能源科学技术有限公司 A kind of report automatic generation method, system and electronic equipment and storage medium
CN110032720A (en) * 2018-12-28 2019-07-19 万康源(天津)基因科技有限公司 A kind of visualization report typesetting and automatic generation method and system based on XML

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7428986B2 (en) * 2005-09-19 2008-09-30 Silverbrook Research Pty Ltd Printing a health report using a mobile device
CN110764842A (en) * 2019-10-17 2020-02-07 山东浪潮商用系统有限公司 Method for automatically generating analysis diagram and loading document by java background

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609967A (en) * 2012-02-17 2012-07-25 杭州电子科技大学 Generating and typesetting method of image-text report
CN110032720A (en) * 2018-12-28 2019-07-19 万康源(天津)基因科技有限公司 A kind of visualization report typesetting and automatic generation method and system based on XML
CN109948134A (en) * 2019-03-21 2019-06-28 润电能源科学技术有限公司 A kind of report automatic generation method, system and electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112035313A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN112035313B (en) Report generation method and device, template customization method and device, and monitoring system
CN106933862B (en) Method and device for generating mail report
CN107145784B (en) Vulnerability scanning method and device and computer readable medium
CN109241095B (en) Rapid query method, terminal and storage medium
CN111694565A (en) Data visualization application development method and system
CN112149390A (en) Report generation method, system, computer device and computer-readable storage medium
US20170364981A1 (en) Brand-Based Product Management
CN112686015A (en) Chart generation method, device, equipment and storage medium
CN110765101A (en) Label generation method and device, computer readable storage medium and server
CN110827938A (en) Method and system for automatically generating medical record document template
CN112418813B (en) AEO qualification intelligent rating management system and method based on intelligent analysis and identification and storage medium
CN110309217A (en) Lead-in and lead-out method, device, terminal and the computer readable storage medium of data
CN113177390A (en) Intelligent document processing method and device, computer readable medium and electronic equipment
CN111709218A (en) Intelligent reporting platform and intelligent reporting method based on dynamic multiple data sources
CN111464425B (en) Mail generation method, device, equipment and storage medium
CN112905178A (en) Method, device, equipment and medium for generating business function page
CN109542408B (en) Intelligent template configuration method and device
CN111046632A (en) Data extraction and conversion method, system, storage medium and electronic equipment
CN112632165A (en) Page form export EXCEL method and device, computer equipment and storage medium
CN111177238B (en) User-defined data set generation method
CN117892698B (en) Text gradual change rendering method, equipment and storage medium
JP2013025726A (en) Information processing device, information processing system, information processing method and program
CN116796392B (en) Prototype preview method, prototype preview apparatus, and readable storage medium
US20230335001A1 (en) Document Processing Method, Information Processing Device, And Computer Program Product
CN116991856A (en) Data updating method, device, equipment, medium and product in reading process

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