Report generation method, device, computer equipment and storage medium

By automatically matching data in spreadsheets or text documents with keywords in report templates, target data is generated, which solves the problem of low manual extraction efficiency and achieves automation and efficiency improvement in report generation.

CN113076722BActive Publication Date: 2024-08-23BEIJING MININGLAMP SOFTWARE SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110261022.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-10
Publication Date
2024-08-23
Estimated Expiration
2041-03-10

AI Technical Summary

Technical Problem

In business operations, when managers need to extract data from multiple spreadsheets to generate reports, existing technology relies on manual reading and refining, resulting in inefficiencies.

Method used

Provide a report generation method that automatically determines the target data and generates a report by obtaining the data to be extracted and the report template data, using keywords in the template to match the data content, and avoiding manual reading and extraction.

Benefits of technology

It improves the efficiency of report generation, reduces manual intervention, and realizes automated data extraction and report generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113076722B
    Figure CN113076722B
Patent Text Reader

Abstract

The present invention discloses a report generation method, device, computer equipment and storage medium. The method comprises: obtaining data to be extracted; obtaining report template data; determining target data according to keywords contained in the report template data and data content contained in the data to be extracted; and generating report data according to the target data. The present invention can automatically obtain data to be extracted and report template data by a machine, then determine target data according to keywords contained in the report template data and data content contained in the data to be extracted, and finally generate report data according to the target data. The machine can extract target data matching the report template data from the data to be extracted, avoid manual report reading and content extraction, and improve the generation efficiency of report data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to information automation processing technology, and in particular to a report generation method, device, computer equipment and storage medium. Background Art

[0002] As spreadsheets become more and more popular, more and more companies use spreadsheets for statistics and work reporting in their daily work. The formats of daily weekly and daily reports in corporate operations often change, and most of them are submitted in the form of spreadsheets.

[0003] When managers need to extract data from multiple spreadsheets reported by subordinates, they need to manually read the reported spreadsheets and then manually refine them to form reports. Generating reports manually is time-consuming, labor-intensive, and inefficient. Summary of the invention

[0004] The present invention provides a report generation method, device, computer equipment and storage medium to improve the report generation efficiency.

[0005] In a first aspect, an embodiment of the present invention provides a report generation method, comprising:

[0006] Get the data to be extracted;

[0007] Get report template data;

[0008] Determine the target data according to the keywords contained in the report template data and the data content contained in the data to be extracted;

[0009] Generate report data based on target data.

[0010] In a second aspect, an embodiment of the present invention further provides a report generating device, including:

[0011] A module for acquiring data to be extracted, used for acquiring data to be extracted;

[0012] A report template data acquisition module is used to acquire report template data;

[0013] A target data extraction module, used to determine the target data according to the keywords contained in the report template data and the data content contained in the data to be extracted;

[0014] The report data generation module is used to generate report data according to target data.

[0015] In a third aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:

[0016] one or more processors;

[0017] a storage device for storing one or more programs,

[0018] When one or more programs are executed by one or more processors, the one or more processors implement the report generation method as shown in the embodiment of the present application.

[0019] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the report generation method as shown in the embodiment of the present application.

[0020] The report generation method provided by the present invention obtains data to be extracted and report template data, determines target data according to keywords contained in the report template data and data content contained in the data to be extracted; and generates report data according to the target data. Compared with the problem of low report generation efficiency caused by manual extraction of report data, the present invention can automatically obtain data to be extracted and report template data by a machine, then determine target data according to keywords contained in the report template data and data content contained in the data to be extracted, and finally generate report data according to the target data. The machine can extract target data matching the report template data from the data to be extracted, avoid manual report reading and content extraction, and improve the generation efficiency of report data. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a flow chart of a report generating method in Embodiment 1 of the present invention;

[0022] Figure 2 is a flow chart of a report generating method in Embodiment 2 of the present invention;

[0023] Figure 3 is a flowchart of another report generating method in Embodiment 2 of the present invention;

[0024] Figure 4 is a schematic diagram of the structure of a report generating device in Embodiment 3 of the present invention;

[0025] Figure 5 It is a schematic diagram of the structure of the computer device in the fourth embodiment of the present invention. DETAILED DESCRIPTION

[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0027] Embodiment 1

[0028] Figure 1This is a flow chart of a report generation method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of generating electronic work reports. The method can be executed by a computer device, which can be a personal computer, a laptop computer, a tablet computer, etc., and specifically includes the following steps:

[0029] Step 110: Obtain data to be extracted.

[0030] The data to be extracted may be data containing the content to be extracted. The data to be extracted may be a generated spreadsheet or text document. The spreadsheet may be an Excel spreadsheet, and the text document may be a Word document.

[0031] In the case of generating a work report, the data to be extracted includes the work report content to be extracted. If the data to be extracted is a spreadsheet, different fields are recorded in the header of the spreadsheet. The fields contain field attributes related to the work report, such as daily work plan, daily work completion status, etc. The column where each header field of the spreadsheet is located is used to record the work report content corresponding to the header field. If the data to be extracted is a text document, the text document contains multiple paragraphs consisting of titles and paragraphs. The work report content is recorded in the paragraphs, and the title is used to identify the work theme stated in the paragraph content.

[0032] The generated data to be extracted can be stored in advance. When the process of the present invention is triggered, the stored data to be extracted is read.

[0033] Step 120: Obtain report template data.

[0034] The report template data includes keywords included in the generated report. In the scenario of generating a work report, the report template data may include multiple keywords related to the work report, such as this week's work goals, this week's completion status, etc. The generated data to be extracted may be pre-stored. When executing step 120, the stored report template data is read.

[0035] Step 130: Determine target data according to the keywords included in the report template data and the data content included in the data to be extracted.

[0036] The keywords contained in the report template data are used to match the data content to be extracted. If the match is successful, the target data is determined according to the matched data content. Exemplarily, the paragraph or field containing the matched data content in the data to be extracted can be determined as the target data. When the data to be extracted is a spreadsheet, the content of the cell containing the matched data content is used as the target data. When the data to be extracted is a text document, the paragraph containing the matched data content is used as the target data.

[0037] Step 140: Generate report data according to the target data.

[0038] After the target data is determined, report data is generated according to a preset report format. The report data includes the target data determined in step 130 .

[0039] The report generation method provided by the present invention obtains data to be extracted and report template data, determines target data according to keywords contained in the report template data and data content contained in the data to be extracted; and generates report data according to the target data. Compared with the problem of low report generation efficiency caused by manual extraction of report data, the present invention can automatically obtain data to be extracted and report template data by a machine, then determine target data according to keywords contained in the report template data and data content contained in the data to be extracted, and finally generate report data according to the target data. The machine can extract target data matching the report template data from the data to be extracted, avoid manual report reading and content extraction, and improve the generation efficiency of report data.

[0040] Embodiment 2

[0041] Figure 2 The flowchart of the report generation method provided for the second embodiment of the present invention is a further explanation of the above embodiment. The user can pre-create the form template and the report template to realize the configuration of the form template and the report template to improve the usability. Before obtaining the data to be extracted, it also includes: creating a form template, the form template includes a plurality of pre-configured fields; generating form data in response to the field content input by the user according to the form template; before obtaining the report template data, it also includes: determining keywords in response to the first vocabulary input by the user, and generating report template data according to the keywords. Based on the above implementation, the report generation method can be implemented in the following manner:

[0042] Step 210: Create a form template, where the form template includes multiple pre-configured fields.

[0043] The user creates a form template in advance. Creating a form template includes setting the format of the form template and the fields contained in the form. In the embodiment of the present invention, the first row of the form data is called the header. The header contains field information, and the field information is used to describe the field content recorded in a column. Multiple fields can be set in the header to configure multiple fields of the form template. Exemplarily, three fields are set: project name, work goal for this week, and completion for this week. The three fields correspond to the three columns of the form template respectively. Project name, work goal for this week, and completion for this week are respectively located in the first column of their respective columns.

[0044] Optionally, pre-set tables in the MySQL database to complete the recording of information. The form template creates the form_template table, and the report template creates the report_template table.

[0045] The user can configure the template type of the form template (such as weekly report or daily report, etc.), define the template name, select the template status (enable / disable, etc.) and set the fields included in the form. The fields support text, amount, number and drop-down box field types. Among them, the user can edit the selection items in the drop-down box. According to the user's design of the form template, a record of the form template is added to the form_template table, and a new table such as week_report_xxx is created in the database, which contains the user's settings for each field of the template.

[0046] Step 220: Generate form data in response to field content input by the user according to the form template.

[0047] When generating form data, the user can select a created form template, and then enter the corresponding field content according to the fields contained in the header of the form template to obtain the form data.

[0048] For example, in the second column of the column where the project name field is located, enter "data value-added" as the field content of the project name. In the second column of the column where the work goal for this week is located, enter "complete the signing process of the data governance project content change application report" as the field content of the work goal for this week. In the second column of the column where the completion field for this week is located, enter "track the rectification of abnormal data in various companies" as the field content of the completion field for this week.

[0049] It should be noted that users of different levels can choose different form templates. For example, a group leader can use all form templates within the group's permissions, such as form templates applicable to individuals and form templates applicable to the group. The group leader can configure the permissions of group members to use form templates applicable to individuals. In this case, individuals cannot use form templates applicable to the group, thereby achieving permission management of form templates.

[0050] After the user has filled in the form data, the form data is stored. The form data filled in by the user can be used as the data to be extracted. Alternatively, the form data is converted into the data to be extracted through step 230.

[0051] Step 240: Obtain data to be extracted.

[0052] The format of the data to be extracted can be an electronic form (i.e., form data) or a text document, but since electronic forms and text documents are files of different formats, they cannot be processed in a unified extraction method. Based on this, an embodiment of the present invention provides a method for extracting the contents of electronic forms and text documents and forming them into a unified format. When the data to be extracted is form data, the data to be extracted is determined based on the form data, which can be implemented in the following manner: determining a title tag based on field information in the header of the form data; determining a body tag based on the field content of the form data; generating the data to be extracted based on the title tag and the body tag, and the data to be extracted is a directory structure of Hypertext Markup Language (HTML).

[0053] The form data includes the header and field content. Extract the field information of the header as the HTML title tag. Use the field content of the form data as the HTML body tag. The title tag includes the HTML <h1> to< / h1> <h6> Label,< / h6> <h1> The highest label level,< / h1> <h6> The tag level is the lowest. Multiple tags can be in a subordinate relationship or a parallel relationship. Tags at the same level are in a parallel relationship. Multiple subordinate tags can be embedded in a superior tag, for example< / h6> <h1> A tag can contain at least one< / h1> <h2> Each h2 tag can be embedded with at least one< / h2> <h3> Tags, and so on.< / h3> <h1> Multiple tags under< / h1> <h2> The labels are in parallel relationship.< / h2> <h2> Tags belong to embedded< / h2> <h1>Label.

[0054] < / h1> <h1> The tag starts with "< / h1> <h1> "End marker is"< / h1> ". At the start tag <h1> and the end tag< / h1> The content of the title tag, i.e. the field information, is recorded between the start tag and the end tag of the body tag. The content of the body tag, i.e. the field content, is recorded between the start tag and the end tag.

[0055] For example, assume that the spreadsheet is as shown in Table 1:

[0056] Table 1

[0057]

[0058]

[0059] The directory structure of HTML obtained according to the above method is:

[0060] <h1> Title tag A's main content A< / h1>

[0061] <h2> Title tag a1< / h2>

[0062] Title tag a1 body content a11

[0063] <h2> Title tag a2< / h2>

[0064] Title tag a2 main content a21

[0065] <h1> Title tag A's body content B< / h1>

[0066] <h2> Title tag a1< / h2>

[0067] Title tag a1 main content a12

[0068] <h2> Title tag a2< / h2>

[0069] Title tag a2 main content a22

[0070] By the above method, the form data can be converted into an HTML directory structure, which records different levels of data content through title tags and body tags. The subsequent steps can determine the target data based on the HTML directory structure, so that the application solution can identify any form data and improve ease of use.

[0071] When the data to be extracted is a text document, the data to be extracted is determined based on the form data, which can be implemented in the following way: obtain the text document; determine the title tag based on the title content of the text document; determine the body tag based on the paragraph content of the text document; generate the data to be extracted based on the title tag and the body tag, and the data to be extracted is an HTML directory structure.

[0072] A text document may contain multiple title contents, and each title content contains at least one paragraph. For example, a text document contains multiple first-level title contents, and each first-level title content includes at least one second-level title content, and the title content has corresponding paragraphs. The title content is used as the title tag, and the paragraph content of the text document is used as the body tag. The title of the text document and the paragraphs under the title are extracted to form a title tag and a body tag. Since there is a progressive and parallel relationship between the titles in the text document, there is an attribution and parallel relationship between the generated title tags.

[0073] For example, assume that the content of the text document is:

[0074] 1. The main content of the title tag A

[0075] 1-1. Title tag a1

[0076] 1.1.1) The main content a11 of the title tag a1.

[0077] 1-2 Title tag a2

[0078] 1.2.1) The main content a21 of the title tag a2.

[0079] 2. The main content of the title tag A

[0080] 2-1. Title tag a1

[0081] 2.1.1) The main content a12 of the title tag a1.

[0082] 2-2 Title tag a2

[0083] 2.2.1) The main content a22 of the title tag a2.

[0084] The directory structure of HTML determined according to the above method is:

[0085] <h1> Title tag A's main content A< / h1>

[0086] <h2> Title tag a1< / h2>

[0087] Title tag a1 body content a11

[0088] <h2> Title tag a2< / h2>

[0089] Title tag a2 main content a21

[0090] <h1> Title tag A's body content B< / h1>

[0091] <h2> Title tag a1< / h2>

[0092] Title tag a1 main content a12

[0093] <h2> Title tag a2< / h2>

[0094] Title tag a2 main content a22

[0095] Through the above method, a text document can be converted into an HTML directory structure, and the directory structure records data content at different levels through title tags and body tags. The subsequent steps can determine the target data based on the HTML directory structure, so that the present application scheme can identify any text document and improve ease of use. The text document and form data can be unified into an HTML directory structure, and the target data determination method based on the HTML directory structure can simplify the target data determination method and improve the target data determination efficiency.

[0096] Step 250: Determine keywords in response to the first vocabulary input by the user, and generate report template data according to the keywords.

[0097] When the user configures the report template data, a configuration interface of the report template data is displayed, and the user enters the first word as a keyword in the interface. The user can set the first word according to his or her own expectations.

[0098] During the implementation process, it was found that the keywords entered by users were relatively simple. Only one keyword was entered for a certain report requirement point, and different users entered different keywords for the same requirement point, resulting in incomplete keyword coverage. Based on this, report template data can be generated based on keywords, which can be implemented in the following way:

[0099] Determine a second word based on the first word, the second word being a synonym of the first word; determine a keyword based on the first word and the second word; and generate report template data based on the keyword.

[0100] When the user inputs a first word, a synonym of the first word can be searched as a second word, and the set of the first word and the second word is used as a set of keywords, which is stored in the report template data.

[0101] Users can define keywords and further set synonyms for keywords. This makes it easier to use keywords to associate the data carriers generated by the report and extract the content of the data carriers. According to the user's design of the report template, a record of the template is added to the report_template table.

[0102] After the user inputs the first word, the second word determined based on the first word is used as a synonym of the first word, which can improve the coverage of the keyword for the same report demand point, and then more valid target data can be extracted from the data to be extracted, preventing the target data from being missed due to the omission of the second word, thereby improving the completeness of information acquisition.

[0103] It should be noted that two methods can be provided: online filling and offline file import. In the above template management interface, select the enabled form template (weekly or daily reports must have and only have one template in use), and the page displays the field content according to the form format designed in the enabled template. The user fills in the data content according to the field. For example, the designed template is <Project name, completed this week, planned for next week, support required>. Alternatively, perform offline import, that is, first write the field content in the spreadsheet (Excel table), and then directly import the spreadsheet (Excel table). The field format of the spreadsheet can be obtained from the provided "Download Template".

[0104] Step 260: Obtain report template data.

[0105] Step 270: Determine target data according to the keywords included in the report template data and the data content included in the data to be extracted.

[0106] After converting a text document or spreadsheet into an HTML directory structure, the target data can be determined based on the HTML directory structure in the following ways:

[0107] Determine whether the first title tag contains a target keyword, where the target keyword is any keyword contained in the report template data;

[0108] If the first title tag contains the target keyword, the first title tag, the first body tag of the first title tag, and the second title tag and the second body tag subordinate to the first title tag are determined as target data;

[0109] If the first title tag does not contain the target keyword, determining whether the first body tag of the first title tag contains the target keyword;

[0110] If the first body tag of the first title tag contains the target keyword, the first body tag of the first title tag and the second title tag and the second body tag subordinate to the first title tag are determined as target data tags;

[0111] If the first body tag of the first title tag does not contain the target keyword, it is determined whether the second title tag subordinate to the first title tag contains the target keyword, and so on, all title tags and body tags are traversed.

[0112] The first title tag can contain multiple parallel second title tags. The first title tag can have multiple parallel tags. Each second title tag can contain multiple parallel third title tags, and so on. A high-level title tag contains a low-level title tag, and a low-level title tag is subordinate to the high-level tag that contains the low-level tag. In the above example, the levels of the title tags from high to low are <h1> Label,< / h1> <h2> Label,< / h2> <h3> Label,< / h3> <h4> Label,< / h4> <h5> Label,< / h5> <h6>Tags. Each level of heading tags can have body tags.

[0113] Traversing from high-level title tags to low-level title tags in sequence, the first title tag represents the high-level title tag in any traversal, and the second title tag represents the low-level title tag in the traversal cycle.

[0114] In the above example, extract< / h6> <h1>< / h1> The title tag A in the title is looped through the keywords one by one. If the title tag A contains keywords, the keywords are extracted. <h1> Title Tag A< / h1> All under the structure <h2>and the contents therein as target data.

[0115] If the title tag A does not contain keywords,< / h2> <h1> Do the above processing for the data text in the structure, and use the same method to< / h1> <h2> And extract the contents, if< / h2> <h2> Title tag a1< / h2> If the data text in hits the keyword, then extract <h2> Title tag a1< / h2> If the data text in the body content a11 of the title tag a1 hits the keyword, the content in the body is extracted as the target data.

[0116] Through the above traversal method, the target data containing keywords can be quickly extracted based on the HTML directory structure, thereby improving the extraction efficiency of the target data.

[0117] Step 280: Generate report data according to the target data.

[0118] The report generation method provided in the embodiment of the present invention provides a user-defined report template function to facilitate the generation of work reports with various contents, and the user sets the extracted keywords and synonyms of the keywords in the report template; in order to flexibly support the user to load report data, the user is provided with a customized form template function, and the form template mainly supports the user to customize the header of the report, which fixedly contains the subject, creation date, etc. The user can define the form template in advance, and other users can fill in the form data based on the template edited by the user, thereby improving the efficiency of filling in the form data. In addition, the user can define the report template data in advance, realize the user's customization of the report template data, and improve the ease of use.

[0119] In one implementation, the above embodiment can be used for an individual to generate his / her own report data. Assuming that the individual is a second user, the above method can be implemented as follows:

[0120] The second user obtains a self-editable form template and fills in the form template. The computer device generates form data in response to the field content input by the user according to the form template. The form data is stored. The second user triggers to start generating report data, and the computer device reads the stored form data of the second user. The report template data selected by the second user is read. The form data is converted into an HTML directory structure, and target data is extracted based on the directory structure and keywords contained in the report template data. Report data is generated according to the target data.

[0121] Alternatively, the second user may write data in the text document in advance, and the data is consistent with the content in the form data. The second user imports the text document. The computer device converts the text document into a directory structure of HTML, extracts target data based on the directory structure and keywords included in the report template data, and generates report data based on the target data.

[0122] In another implementation, the above embodiment can be used for generating report data for the whole group after the team leader collects the data to be extracted from the team members. In this case, the team leader can be the first user and the team members can be the second users. In response to the template configuration operation of the first user, the form template used by the second user is configured. Acquiring the data to be extracted includes: in response to the first user, acquiring the data to be extracted of multiple second users. Correspondingly, acquiring the report template data includes: acquiring the report template data selected by the first user. Correspondingly, determining the target data based on the keywords contained in the report template data and the data content contained in the data to be extracted includes: determining the target data based on the keywords contained in the report template data and the data to be extracted of each second user. Generating report data based on the target data includes: combining multiple target data determined based on the data to be extracted from multiple second users, and generating report data based on a preset template style. The above method is applied to the first user, such as Figure 3 As shown, it can be implemented in the following way:

[0123] Step 310: In response to the template configuration operation of the first user, configure a form template used by the second user.

[0124] As the team leader, the first user can configure a form template used by any member of the team, that is, a form template that the second user can use. The team leader can configure multiple form templates, and configure multiple of them as form templates used by the second user, so that the second user can select a template from the form templates used by the second user to fill in.

[0125] In addition, the first user can edit, delete, add and change the template status of the form template and report template data. The above operations are used to implement the addition, deletion, modification and query of the form_template table and report_template table in the database.

[0126] Step 320: In response to the first user, obtain data to be extracted of multiple second users.

[0127] The first user can obtain form data filled in by multiple second users, or can obtain text documents of multiple second users by importing. Both text documents and form data can be used as data to be extracted.

[0128] Furthermore, based on the above embodiment, the text document and the form data may be converted into an HTML directory structure as the data to be extracted, so that a unified recognition method can be used to extract target data from the HTML directory structure later.

[0129] Step 330: Obtain the report template data selected by the first user.

[0130] Step 340: Determine target data according to the keywords included in the report template data and the data to be extracted of each second user.

[0131] Step 350: Combine multiple target data determined based on the data to be extracted from multiple second users, and generate report data according to a preset template style.

[0132] The above method enables the first user (i.e., team leader) to extract the data to be extracted from multiple second users (i.e., team members), and then use the pre-configured report template data to determine the target data from the data to be extracted, so that the first user can produce report data for representing the work status of multiple second users.

[0133] Functions can be assigned according to user permissions at all levels. For example, ordinary employees in a department (i.e., non-administrator permissions, such as team members) only have the permission to operate their own Excel weekly / daily reports and submit their weekly / daily reports to the department head (i.e., administrator permissions) for review. The department head (e.g., team leader) can view the weekly / daily reports of everyone in the department, including himself, and review the weekly / daily reports submitted by ordinary employees, and approve or reject them. In addition, only the department head can configure the form templates and report templates of the department.

[0134] In the above method, form data can be filled in online or offline. The text document can be filled in offline and then uploaded to the computer device. Through the form and report management automation function, the offline and online filling of the form and the automatic generation of management processes and reports can be realized. The form template and report template data can be permanently stored in the computer device for summary, so as to realize the automation and permanent preservation of management data. The form template and report template data can be shared by the first user and the second user, and can be reused, so that the efficiency of data use can be improved and the cost of report output can be reduced. At the same time, the target data can be extracted from the directory structure of the text document, spreadsheet or HTML through machine automatic recognition, so that the report can be generated with a small amount of manual intervention and optimization, which saves personnel costs and reduces the probability of report errors.

[0135] Embodiment 3

[0136] Figure 4 This is a structural diagram of a form processing and production provided in the third embodiment of the present invention. This embodiment is applicable to the case of generating an electronic work report, including: a to-be-extracted data acquisition module 410, a report template data acquisition module 420, a target data extraction module 430 and a report data generation module 440, wherein:

[0137] The to-be-extracted data acquisition module 410 is used to acquire the to-be-extracted data;

[0138] The report template data acquisition module 420 is used to acquire report template data;

[0139] The target data extraction module 430 is used to determine the target data according to the keywords contained in the report template data and the data content contained in the data to be extracted;

[0140] The report data generating module 440 is used to generate report data according to the target data.

[0141] Based on the above embodiment, the present invention further comprises: a form pre-configuration module and a template pre-configuration module, wherein the form pre-configuration module is used to:

[0142] Create a form template that includes multiple pre-configured fields;

[0143] Generating form data in response to field content input by a user according to a form template;

[0144] Template preconfiguration modules are used to:

[0145] In response to a first word input by a user, a keyword is determined, and report template data is generated according to the keyword.

[0146] Based on the above embodiment, the template pre-configuration module is used to:

[0147] Determine a second word according to the first word, the second word being a synonym of the first word;

[0148] determining a keyword based on the first word and the second word;

[0149] Generate report template data based on keywords.

[0150] Based on the above embodiment, the to-be-extracted data acquisition module 410 is used to:

[0151] Determine the title tag based on the field information in the header of the form data;

[0152] Determine the body tag based on the field content of the form data;

[0153] Generate the data to be extracted according to the title tag and the body tag, and the data to be extracted is the directory structure of HTML.

[0154] Based on the above embodiment, the to-be-extracted data acquisition module 410 is used to:

[0155] Get the text document;

[0156] Determine the title tag based on the title content of the text document;

[0157] Determine the body tag based on the paragraph content of the text document;

[0158] Generate the data to be extracted according to the title tag and the body tag, and the data to be extracted is the directory structure of HTML.

[0159] Based on the above embodiment, the target data extraction module 430 is used to:

[0160] Determine whether the first title tag contains a target keyword, where the target keyword is any keyword contained in the report template data;

[0161] If the first title tag contains the target keyword, the first title tag, the first body tag of the first title tag, and the second title tag and the second body tag subordinate to the first title tag are determined as target data;

[0162] If the first title tag does not contain the target keyword, determining whether the first body tag of the first title tag contains the target keyword;

[0163] If the first body tag of the first title tag contains the target keyword, the first body tag of the first title tag and the second title tag and the second body tag subordinate to the first title tag are determined as target data tags;

[0164] If the first body tag of the first title tag does not contain the target keyword, it is determined whether the second title tag subordinate to the first title tag contains the target keyword, and so on, all title tags and body tags are traversed.

[0165] On the basis of the above embodiment, the device is applied to the client of the first user, and the template pre-configuration module is used to configure the form template used by the second user in response to the template configuration operation of the first user;

[0166] The to-be-extracted data acquisition module 410 is used to, in response to the first user, acquire the to-be-extracted data of multiple second users;

[0167] The report template data acquisition module 420 is used to acquire the report template data selected by the first user;

[0168] The target data extraction module 430 is used to determine the target data according to the keywords included in the report template data and the data to be extracted of each second user;

[0169] The report data generating module 440 is used to combine a plurality of target data determined according to the to-be-extracted data of a plurality of second users, and generate report data according to a preset template style.

[0170] The report generation device provided by the present invention comprises a data acquisition module 410 for acquiring data to be extracted, a report template data acquisition module 420 for acquiring report template data, a target data extraction module 430 for determining target data according to keywords contained in the report template data and data content contained in the data to be extracted; and a report data generation module 440 for generating report data according to the target data. Compared with the problem of low efficiency in report generation caused by manual extraction of report data, the present invention can automatically acquire data to be extracted and report template data by a machine, then determine target data according to keywords contained in the report template data and data content contained in the data to be extracted, and finally generate report data according to the target data. The machine can extract target data matching the report template data from the data to be extracted, avoid manual report reading and content extraction, and improve the efficiency of generating report data.

[0171] The report generating device provided in the embodiment of the present invention can execute the report generating method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0172] Embodiment 4

[0173] Figure 5 A schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention is shown in FIG. Figure 5 As shown, the computer device includes a processor 50, a memory 51, an input device 52 and an output device 53; the number of processors 50 in the computer device can be one or more. Figure 5 A processor 50 is taken as an example; the processor 50, memory 51, input device 52 and output device 53 in the computer device can be connected by a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0174] The memory 51 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the report generation method in the embodiment of the present invention (for example, the to-be-extracted data acquisition module 410, the report template data acquisition module 420, the target data extraction module 430, the report data generation module 440, the form pre-configuration module and the template pre-configuration module in the report generation device). The processor 50 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 51, that is, realizes the above-mentioned report generation method.

[0175] The memory 51 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 51 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 51 may further include a memory remotely arranged relative to the processor 50, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0176] The input device 52 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the computer device. The output device 53 may include a display device such as a display screen.

[0177] Embodiment 5

[0178] Embodiment 5 of the present invention further provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to execute a report generation method when executed by a computer processor, the method comprising:

[0179] Get the data to be extracted;

[0180] Get report template data;

[0181] Determine the target data according to the keywords contained in the report template data and the data content contained in the data to be extracted;

[0182] Generate report data based on target data.

[0183] Based on the above embodiment, before obtaining the data to be extracted, the method further includes:

[0184] Create a form template that includes multiple pre-configured fields;

[0185] Generating form data in response to field content input by a user according to a form template;

[0186] Before getting the report template data, also include:

[0187] In response to a first word input by a user, a keyword is determined, and report template data is generated according to the keyword.

[0188] Based on the above embodiment, report template data is generated according to keywords, including:

[0189] Determine a second word according to the first word, the second word being a synonym of the first word;

[0190] determining a keyword based on the first word and the second word;

[0191] Generate report template data based on keywords.

[0192] Based on the above embodiment, obtaining the data to be extracted includes:

[0193] Determine the title tag based on the field information in the header of the form data;

[0194] Determine the body tag based on the field content of the form data;

[0195] Generate the data to be extracted according to the title tag and the body tag, and the data to be extracted is the directory structure of HTML.

[0196] Based on the above embodiment, obtaining the data to be extracted further includes:

[0197] Get the text document;

[0198] Determine the title tag based on the title content of the text document;

[0199] Determine the body tag based on the paragraph content of the text document;

[0200] Generate the data to be extracted according to the title tag and the body tag, and the data to be extracted is the directory structure of HTML.

[0201] On the basis of the above embodiment, the target data is determined according to the keywords contained in the report template data and the data content contained in the data to be extracted, including:

[0202] Determine whether the first title tag contains a target keyword, where the target keyword is any keyword contained in the report template data;

[0203] If the first title tag contains the target keyword, the first title tag, the first body tag of the first title tag, and the second title tag and the second body tag subordinate to the first title tag are determined as target data;

[0204] If the first title tag does not contain the target keyword, determining whether the first body tag of the first title tag contains the target keyword;

[0205] If the first body tag of the first title tag contains the target keyword, the first body tag of the first title tag and the second title tag and the second body tag subordinate to the first title tag are determined as target data tags;

[0206] If the first body tag of the first title tag does not contain the target keyword, it is determined whether the second title tag subordinate to the first title tag contains the target keyword, and so on, all title tags and body tags are traversed.

[0207] Based on the above embodiment, the method is applied to the first user, and the method further includes:

[0208] In response to the template configuration operation of the first user, configuring a form template used by a second user;

[0209] Get the data to be extracted, including:

[0210] In response to the first user, obtaining data to be extracted of a plurality of second users;

[0211] Accordingly, obtain the report template data, including:

[0212] Obtaining report template data selected by the first user;

[0213] Accordingly, the target data is determined according to the keywords contained in the report template data and the data content contained in the data to be extracted, including:

[0214] Determine target data according to the keywords included in the report template data and the data to be extracted of each second user;

[0215] Generate report data based on target data, including:

[0216] A plurality of target data determined according to the to-be-extracted data of a plurality of second users are combined, and report data are generated according to a preset template style.

[0217] Of course, the storage medium containing computer executable instructions provided by an embodiment of the present invention is not limited to the above method operations, and the computer executable instructions can also execute related operations in the report generation method provided by any embodiment of the present invention.

[0218] Through the above description of the implementation mode, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation mode. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.

[0219] It is worth noting that in the embodiment of the above-mentioned form processing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0220] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A report generation method, characterized in that: include: Get the data to be extracted; Get report template data; Determining target data according to keywords included in the report template data and data content included in the data to be extracted; generating report data according to the target data; Before obtaining the data to be extracted, it also includes: Creating a form template, the form template comprising a plurality of pre-configured fields; generating form data in response to field content input by a user according to the form template, wherein the form data is used to obtain the data to be extracted; The step of determining the target data according to the keywords included in the report template data and the data content included in the data to be extracted includes: Determining whether the first title tag contains a target keyword, wherein the target keyword is any keyword contained in the report template data; If the first title tag contains a target keyword, determining the first title tag, a first body tag of the first title tag, and a second title tag and a second body tag subordinate to the first title tag as target data; If the first title tag does not contain the target keyword, determining whether the first body tag of the first title tag contains the target keyword; If the first body tag of the first title tag contains the target keyword, the first body tag of the first title tag and the second title tag and the second body tag subordinate to the first title tag are determined as target data tags; If the first body tag of the first title tag does not contain the target keyword, determine whether the second title tag subordinate to the first title tag contains the target keyword, and so on traverse all title tags and body tags, wherein the first title tag represents a high-level title tag in any traversal, and the second title tag represents a low-level title tag in this traversal loop.

2. The method according to claim 1, characterized in that Before acquiring the report template data, the method further includes: determining a keyword in response to the first word input by the user, and generating the report template data according to the keyword.

3. The method according to claim 2, characterized in that The step of generating report template data according to the keyword includes: Determine a second vocabulary according to the first vocabulary, wherein the second vocabulary is a synonym of the first vocabulary; determining a keyword based on the first vocabulary and the second vocabulary; Generate report template data according to the keywords.

4. The method according to claim 2, characterized in that: The step of obtaining the data to be extracted includes: Determine a title tag according to field information of the header of the form data; Determine a body tag according to the field content of the form data; The data to be extracted is generated according to the title tag and the body tag, and the data to be extracted is a directory structure of HTML.

5. The method according to claim 4, characterized in that The obtaining of the data to be extracted further includes: Get the text document; Determine a title tag according to the title content of the text document; Determine a body tag according to the paragraph content of the text document; The data to be extracted is generated according to the title tag and the body tag, and the data to be extracted is a directory structure of HTML.

6. The method according to claim 1, characterized in that The method is applied to a first user, and the method further comprises: In response to the template configuration operation of the first user, configuring a form template used by a second user; The obtaining of the data to be extracted includes: in response to the first user, obtaining the data to be extracted of a plurality of second users; Accordingly, the obtaining of the report template data includes: obtaining the report template data selected by the first user; Accordingly, determining the target data according to the keywords included in the report template data and the data content included in the data to be extracted includes: determining the target data according to the keywords included in the report template data and the data to be extracted of each second user; The generating report data according to the target data includes: combining a plurality of target data determined according to the to-be-extracted data of a plurality of second users, and generating the report data according to a preset template style.

7. A report generating device, characterized in that: include: A module for acquiring data to be extracted, used for acquiring data to be extracted; A report template data acquisition module is used to acquire report template data; A target data extraction module, used to determine target data according to the keywords contained in the report template data and the data content contained in the data to be extracted; A report data generating module, used for generating report data according to the target data; A form pre-configuration module, used to create a form template before obtaining the data to be extracted, wherein the form template includes a plurality of pre-configured fields; generating form data in response to field content input by a user according to the form template, wherein the form data is used to obtain the data to be extracted; The target data extraction module is further used to determine whether the first title tag contains a target keyword, where the target keyword is any keyword contained in the report template data; If the first title tag contains a target keyword, determining the first title tag, a first body tag of the first title tag, and a second title tag and a second body tag subordinate to the first title tag as target data; If the first title tag does not contain the target keyword, determining whether the first body tag of the first title tag contains the target keyword; If the first body tag of the first title tag contains the target keyword, the first body tag of the first title tag and the second title tag and the second body tag subordinate to the first title tag are determined as target data tags; If the first body tag of the first title tag does not contain the target keyword, determine whether the second title tag subordinate to the first title tag contains the target keyword, and so on traverse all title tags and body tags, wherein the first title tag represents a high-level title tag in any traversal, and the second title tag represents a low-level title tag in this traversal loop.

8. A computer device, characterized in that: The computer device includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the report generation method as described in any one of claims 1-6.

9. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the report generation method according to any one of claims 1 to 6 when executed by a computer processor.