CN113268585A - Report file generation method and device, computer equipment and storage medium - Google Patents

Report file generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113268585A
CN113268585A CN202110467699.2A CN202110467699A CN113268585A CN 113268585 A CN113268585 A CN 113268585A CN 202110467699 A CN202110467699 A CN 202110467699A CN 113268585 A CN113268585 A CN 113268585A
Authority
CN
China
Prior art keywords
directory
page
title
file
report file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110467699.2A
Other languages
Chinese (zh)
Inventor
陈鹏
强露璐
王海丰
纪光闪
贾思远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qichacha Technology Co ltd
Original Assignee
Qichacha Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qichacha Technology Co ltd filed Critical Qichacha Technology Co ltd
Priority to CN202110467699.2A priority Critical patent/CN113268585A/en
Publication of CN113268585A publication Critical patent/CN113268585A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application relates to a report file generation method, a report file generation device, computer equipment and a storage medium, wherein a to-be-processed file data stream is obtained and comprises a blank directory page and a plurality of title texts of a report file, and the blank directory page comprises directory placeholders; generating a directory structure of the report file in the blank directory page according to the directory placeholder and each title text to obtain a final report file data stream; and generating the report file according to the final report file data stream. Because the target structure comprises each title text displayed in a hyperlink mode and the page number of each title text in the report file, the directory structure can provide the title content of the report file for a user, and the readability of the report file is improved.

Description

Report file generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a report file, a computer device, and a storage medium.
Background
With the development of computer technology, report file automatic generation technology has emerged. For example, the business information of a certain enterprise is quickly and completely presented to the user with corresponding requirements, and an enterprise business information report file can be generated through a report file automatic generation technology. However, the legibility of the report file generated in the conventional art is yet to be improved.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a directory structure generation method, apparatus, computer device, and storage medium capable of increasing the report file generation speed.
A method of generating a report file, the method comprising:
acquiring a data stream of a file to be processed, wherein the data stream of the file to be processed comprises a blank directory page and a plurality of title texts of the report file, each title text is generated based on text data corresponding to each enterprise data dimension, and the blank directory page comprises a directory placeholder;
generating a directory structure of the report file in the blank directory page according to the directory placeholder and each title text to obtain a final report file data stream; the target structure comprises each title text displayed in a hyperlink form and the page number of each title text in the report file;
generating a final report file data stream according to the file data stream to be processed and the directory structure;
and generating the report file according to the final report file data stream.
In one embodiment, before generating the directory structure, the method further comprises:
determining the title format of each title text according to the title grade corresponding to each title text;
generating a directory structure of the report file in the blank directory page according to the directory placeholder and each title text, including:
and inserting each title text into the blank directory page according to the directory placeholder and the title format of each title text to generate a directory structure of the report file.
In one embodiment, the generating the directory structure of the report file by inserting each title text into the blank directory page according to the directory placeholder and the title format of each title text includes:
responding to a refresh instruction of a report file directory field, inserting each title text into the blank directory page according to the directory placeholder and the title format of each title text, and generating a directory structure of the report file
In one embodiment, the method further comprises:
acquiring statistical information of each enterprise data dimension, and correspondingly taking the statistical information as the statistical information corresponding to each title text;
and inserting the statistical information into the corresponding position of each title text.
In one embodiment, a bracket is arranged at a corresponding position of each title text, and the statistical information is correspondingly filled in the bracket.
In one embodiment, the generating manner of the blank directory page includes:
acquiring enterprise data and an initial file data stream, wherein the initial file data stream comprises an initial blank page, and the enterprise data comprises enterprise data corresponding to the initial blank page;
and filling enterprise data corresponding to the initial blank page into the initial blank page to obtain an intermediate file data stream, and generating the blank directory page based on the intermediate file data stream.
In one embodiment, after generating the blank directory page, the method further comprises:
generating a new blank page, wherein the enterprise data further comprises enterprise data corresponding to the new blank page;
and filling the enterprise data corresponding to the new blank page into the new blank page to obtain the data stream of the file to be processed.
In one embodiment, the header format includes at least one of font size, font color, and font style.
An apparatus for generating a report file, the apparatus comprising:
the file data stream acquisition module is used for acquiring a file data stream to be processed, wherein the file data stream to be processed comprises a blank directory page and a plurality of title texts of the report file, each title text is generated based on text data corresponding to each enterprise data dimension, and the blank directory page comprises a directory placeholder;
a directory structure generation module, configured to generate a directory structure of the report file in the blank directory page according to the directory placeholder and each title text, so as to obtain a final report file data stream; the target structure comprises each title text displayed in a hyperlink form and the page number of each title text in the report file;
and the report file generation module is used for generating the report file according to the final report file data stream.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to the report file generation method and device, the computer equipment and the storage medium, a to-be-processed file data stream is obtained, wherein the to-be-processed file data stream comprises a blank directory page and a plurality of title texts of the report file, and the blank directory page comprises a directory placeholder; generating a directory structure of the report file in the blank directory page according to the directory placeholder and each title text to obtain a final report file data stream; and generating the report file according to the final report file data stream. Because the target structure comprises each title text displayed in a hyperlink mode and the page number of each title text in the report file, the directory structure can provide the title content of the report file for a user, and the readability of the report file is improved.
Drawings
FIG. 1 is a diagram of an application environment of a method for generating a report file in one embodiment;
FIG. 2 is a flow diagram illustrating a method for generating a report file in accordance with one embodiment;
FIG. 3 is a flow diagram that illustrates a method for generating a report file, according to one embodiment;
FIG. 4 is a flowchart illustrating a method for generating a report file according to an embodiment;
FIG. 5 is a diagram illustrating portions of a destination page in one embodiment;
FIG. 6 is a flowchart illustrating a manner in which a blank directory page may be generated in one embodiment;
FIG. 7 is a flowchart illustrating a method of generating a report file according to an embodiment;
FIG. 8 is a diagram illustrating portions of a destination page in one embodiment;
FIG. 9 is a block diagram showing an example of a report file generation apparatus according to the present invention;
FIG. 10 is a diagram showing an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The report file generation method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 triggers a request for generation of a report file and sends the request for generation to the server 104, the request for generation including the report type and the business identification. The server 104 searches according to the report type and the enterprise identifier to obtain enterprise data, and obtains an initial file data stream according to the report type, wherein the initial file data stream comprises an initial blank page, and the enterprise data comprises page content data corresponding to the initial blank page; the server 104 fills the page content data corresponding to the initial blank page to obtain an intermediate file data stream, generates a blank directory page based on the intermediate file data stream, and generates a new blank page after the blank directory page is generated, wherein the enterprise data further includes enterprise data corresponding to the new blank page; and filling the enterprise data corresponding to the new blank page to obtain the data stream of the file to be processed. The file data stream to be processed comprises a blank directory page and a plurality of title texts of the report file, each title text is generated based on the text data corresponding to each enterprise data dimension, and the blank directory page comprises directory placeholders. The server 104 generates a directory structure of the report file in a blank directory page according to the directory placeholder and each title text to obtain a final report file data stream; the target structure comprises each title text displayed in a hyperlink form and the page number of each title text in the report file; and generating a report file according to the data stream of the final report file.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2, a method for generating a report file is provided, which is described by taking the method as an example for being applied to the terminal in fig. 1, and includes the following steps:
and S210, acquiring a data stream of the file to be processed.
The file data stream may be a word file stream, a TEX file stream, a LaTex file stream, a slide (such as Microsoft Office PowerPoint) file stream, a spreadsheet (Excel) file stream, or the like. The file data stream to be processed comprises a blank directory page and a plurality of title texts of the report file, each title text is generated based on the text data corresponding to each enterprise data dimension, and the blank directory page comprises directory placeholders. The blank directory page is a blank page for carrying a directory structure of the report file, the target structure may be a frame for guiding a user to refer to the report file, and the target structure may adopt a list structure. The directory placeholder can be used to characterize the blank page for use as a directory page.
The enterprise data dimension can include basic information, stockholder information, enterprise external investment, legal action, enterprise risk, annual newspaper information, financial information, intellectual property, operation information and other dimensions, can also be the categories of industrial and commercial basic information, lost news, court bulletins, referee documents and court bulletins, and can also include categories of tax affairs, certificates, software copyright, tendering and bidding, employee information, judicial auction and the like. The enterprise data dimension corresponds to text data, and the text data corresponding to the enterprise data dimension is used as a title text. Title styles include font, color, segment front end, line space, reduced, etc. styles. The title style may be set in advance, or may be set according to the page size and the actual situation of the page content data. The title text is inserted into the file data stream in a title style. It will be appreciated that "inserting the header text into the file data stream" may be inserting the header text into a page of the file data stream.
Specifically, a request for generating a report file is sent to a server through a terminal, the server searches a local database according to the report request to obtain corresponding enterprise data and an initial file data stream, the initial file data stream comprises an initial blank page, page content data corresponding to a new blank page is filled into the initial blank page, then a blank directory page and the new blank page can be sequentially generated, the enterprise data is filled into the new blank page of the file data stream, and a file data stream to be processed is obtained. The file data stream to be processed comprises a blank directory page and a plurality of header texts of the report file.
And S220, generating a directory structure of the report file in the blank directory page according to the directory placeholder and each title text to obtain a final report file data stream.
The target structure comprises each title text displayed in a hyperlink form and the page number of each title text in the report file. The user can click any title text displayed in a hyperlink form, and report content corresponding to the title text can be displayed. Specifically, after the data stream of the file to be processed is obtained, in response to a generation instruction of the target structure, a directory structure of the report file is generated in a blank directory page according to the directory placeholder and each title text in the data stream of the file to be processed, so that a final data stream of the report file is obtained.
And S230, generating a report file according to the data stream of the final report file.
The report file may be a Word file, a slide file, a table file, or other format files. Specifically, since the file data stream corresponds to the file format, the final report file data stream is stored as a report file according to the file format corresponding to the file data stream, and in some embodiments, the report file may be a Word file, or may be a pdf file. It will be appreciated that the blank pages included in the file data stream and the blank directory pages generated may be understood as a file stream, unlike the pages in the report file that present information to the user.
In the method for generating the report file, a data stream of the file to be processed is obtained, wherein the data stream of the file to be processed comprises a blank directory page and a plurality of title texts of the report file, and the blank directory page comprises directory placeholders; generating a directory structure of the report file in a blank directory page according to the directory placeholder and each title text to obtain a final report file data stream; and generating a report file according to the data stream of the final report file. Because the target structure comprises each title text displayed in a hyperlink form and the page number of each title text in the report file, the directory structure can provide the title content of the report file for a user, and the readability of the report file is improved. Particularly, the content of the report file is more and more abundant, the directory structure can assist a user to quickly know the information of the whole report, conveniently check the details of any enterprise data dimension, and quickly jump to the corresponding text position in the report file through each title text displayed in a hyperlink form.
In one embodiment, as shown in fig. 3, prior to generating the directory structure, the method further comprises:
and S310, determining the title format of each title text according to the title grade corresponding to each title text.
Generating a directory structure of the report file in the blank directory page according to the directory placeholder and each title text, wherein the directory structure comprises:
and S320, inserting each title text into the blank directory page according to the directory placeholder and the title format of each title text to generate a directory structure of the report file.
The enterprise data dimension includes a plurality of levels of dimensions, illustratively a first level dimension and a second level dimension. The first level dimension is higher than the second level dimension. The first-level dimensionality comprises dimensionalities such as basic information, stockholder information, enterprise external investment, legal action, enterprise risk, annual report information, financial information, intellectual property, business information and the like. The basic information may include a number of second-level dimensions, such as business information, major personnel, branches, change records, contact information, and the like. The shareholder information may include two second-level dimensions, shareholder funding information and suspected actual control person information. Legal action may include second-level dimensions such as executives information, deceitlerants, referee document information, court announcements, delivery announcements, and the like. Intellectual property rights may include second-level dimensions such as patent information, trademark information, certificate qualification, software copyright information, work copyright information, website domain names, and the like. And if any data dimension comprises a second-level dimension, inserting text data corresponding to the first-level dimension into the file data stream as a first-level title text, and responding to a line feed instruction to insert the text data corresponding to the second-level dimension into a new file data stream as a second-level title text. For example, the basic information is inserted into the file data stream as the title text of the first level, and the industrial and commercial information is inserted into the file data stream as the title text of the second level in response to the line feed instruction. The title texts in different levels have different title formats, the title equal bodies can comprise a first level, a second level, a third level and the like, and can correspond to a 1-level title, a 2-level title, a 3-level title and the like, each title level can be preset through codes, the font, the size and the color of each title level are all set through the codes, and when the title in a directory structure is generated or the title is inserted into a page of a report file stream, the corresponding title text can be generated according to the title formats in different levels.
In particular, as before, the enterprise data dimension includes multiple levels of dimensions. The title text of the report file corresponds to different title grades, and different title grades correspond to different title formats. The corresponding relation between each title grade and the title format is set in advance through codes, so that the title format of each title text is determined according to the title grade corresponding to each title text. The directory placeholder is used for representing that a specified blank page in the report file is a blank directory page, so that when a directory structure is generated for the report file, each title text is inserted into the blank directory page according to the directory placeholder and the title format of each title text to generate the directory structure of the report file, each title text is inserted into the blank directory page to generate the directory structure of the report file, and a final report file data stream is obtained.
In the embodiment, the title format of each title text is determined according to the title grade corresponding to each title text, so that each title text is inserted into the blank directory page according to the directory placeholder and the title format of each title text to generate the directory structure of the report file, and the file directory with hyperlinks and page numbers can be displayed in the subsequently generated report file, so that a user can know the approximate situation of the content of the report file according to the file directory conveniently, and meanwhile, information on the data dimension of each enterprise can be visually consulted. Therefore, the user can freely view the specific information of the enterprise facing a great deal of report content, and the decision of the user is facilitated.
In one embodiment, inserting each title text into a blank directory page according to a directory placeholder and a title format of each title text to generate a directory structure of a report file, includes: and responding to a refreshing instruction of the report file directory field, and inserting each title text into the blank directory page according to the directory placeholder and the title format of each title text to generate a directory structure of the report file.
Specifically, in the process of generating the to-be-processed file data stream, the title text corresponding to each enterprise data dimension is already set, for example, the title level of each title text, and the title format (such as font, size, color, and the like) of each title level are set. After the data stream of the file to be processed is obtained, the server can trigger a refresh instruction of a directory field of the report file, respond to the refresh instruction of the directory field of the report file, insert each title text in a blank directory page according to a directory placeholder and a title format of each title text, and generate a directory structure of the report file.
In the embodiment, by responding to the refresh instruction of the report file directory domain and inserting each title text into the blank directory page, the directory structure of the report file is generated, so that a user can know the approximate situation of the content of the report file according to the file directory conveniently, and meanwhile, information on data dimensions of each enterprise can be visually consulted. Therefore, the user can freely view the specific information of the enterprise facing a great deal of report content, and the decision of the user is facilitated.
In one embodiment, as shown in fig. 4, the method further comprises:
and S410, acquiring statistical information of each enterprise data dimension, and correspondingly taking the statistical information as the statistical information corresponding to each title text.
And S420, inserting the statistical information into the corresponding position of each title text.
The statistical information may be information obtained by performing statistical processing on enterprise data of any enterprise data dimension. Illustratively, the number of principal people of any business, the number of branches, the number of change records, the number of final beneficiaries, several holdings businesses, several indirect holdings businesses, how many doubtful relationships there are. The report files in the conventional technology do not provide statistical information of the enterprise data, and much time is needed for users to browse the report files, and much effort is needed to acquire specific conditions on the data dimension of each enterprise.
Specifically, since each of the title texts is generated based on the text data corresponding to each of the enterprise data dimensions, the statistical information of each of the enterprise data dimensions can be used as the statistical information corresponding to each of the title texts, and therefore, the statistical information of each of the enterprise data dimensions is obtained and correspondingly used as the statistical information corresponding to each of the title texts. Each header text may be included in the body page of the report file or may be included in the directory page of the report file. After the statistical information of each enterprise data dimension is obtained, the statistical information may be inserted into a corresponding position of each title text, for example, the statistical information may be inserted into a position of each title text in a text page, or the statistical information may be inserted into a position of each title text in a directory page.
Illustratively, each header text is added in a body page of the report file, each header text corresponds to each enterprise data dimension, statistical information of each enterprise data dimension is obtained and correspondingly used as the statistical information corresponding to each header text, the statistical information is inserted into the position of each header text in the body page to generate a new header text, each new header text is inserted into a blank directory page according to a directory placeholder and a header format of the new header text in response to a refresh instruction of a directory field of the report file, a directory structure of the report file is generated, and therefore the generated directory page of the report file displays the new header text. It should be noted that the new header text includes text data corresponding to the enterprise data dimension and statistical information of each enterprise data dimension.
In the embodiment, by acquiring the statistical information of the data dimensions of each enterprise and correspondingly taking the statistical information as the statistical information corresponding to each title text, the statistical information is inserted into the corresponding position of each title text, so that a user can know the statistical information of the data dimensions of each enterprise quickly, report files can be consulted efficiently, and user experience is improved.
In one embodiment, as shown in fig. 5, brackets are provided at corresponding positions of each title text, and the statistics are correspondingly filled in the brackets.
Specifically, each title text is added to a body page of the report file, and a bracket is arranged at a corresponding position of each title text. And each title text corresponds to each enterprise data dimension, the statistical information of each enterprise data dimension is obtained and correspondingly used as the statistical information corresponding to each title text, the brackets of each title text are correspondingly filled with the statistical information to generate the title text, each title text is inserted into the blank directory page in response to a refreshing instruction of the directory field of the report file according to the directory placeholder and the title format of the title text to generate the directory structure of the report file, and thus the generated directory page of the report file displays the title text. It should be noted that the title text in this embodiment includes text data corresponding to the enterprise data dimension, a bracket, and statistical information of each enterprise data dimension, and the statistical information is located in the bracket.
In one embodiment, as shown in fig. 6, the generation manner of the blank directory page includes:
s610, acquiring enterprise data and an initial file data stream.
S620, filling the enterprise data corresponding to the initial blank page to obtain an intermediate file data stream, and generating a blank directory page based on the intermediate file data stream.
The initial file data stream comprises an initial blank page, and the enterprise data comprises enterprise data corresponding to the initial blank page. The initial file data stream may be a blank file stream, such as a file stream that may be a blank word, a blank TEX file stream, a blank LaTex file stream, a blank slide (such as Microsoft Office PowerPoint) file stream, a blank form (Excel) file stream, and so forth. The enterprise data may be data stored in a database that is relevant to enterprise operations. The enterprise data is used to fill in the gaps in the initial file data stream. Specifically, a request for generating a report file can be sent to the server through the terminal, and the server searches a local database according to the report request to obtain corresponding enterprise data and an initial file data stream. The enterprise data and the initial file data stream may also be obtained from a computer device connected to the server. The initial blank page may correspond to the first page in the report document, may be the cover page of the report document, or may be the facing page of the report document. And filling the enterprise data corresponding to the initial blank page, and filling the initial file data stream to obtain an intermediate file data stream. After the initial blank page is filled, a new blank page is generated based on the intermediate file data stream. The generated new blank page may be a blank back cover page, a blank report text page, a blank directory page, or a blank report summary page, and the generated new blank page is not illustrated one by one.
In some embodiments, the initial blank page comprises a cover page and the page content data corresponding to the initial blank page comprises a cover picture. The cover picture may be a picture with business logo information (such as a business logo picture), a report name. The preset range may be a partial area or a full area of the cover page. The position of the preset range in the cover page can be set according to actual conditions, and the preset range can also be determined according to the size of the cover picture and the size of the cover page. Specifically, the enterprise data includes a cover picture, the cover picture is filled into a cover page, or the cover picture is placed on an upper layer of the cover page, and the cover picture covers a partial region or a whole region of the cover page. The cover page of the report file is directly generated by utilizing the initial blank page and the cover picture in the enterprise data, so that a fixed template is not required to be used, and the workload of manufacturing the fixed template is reduced. Further, the fixed template in the conventional technology is fixed and unchangeable, and cannot be flexibly adjusted, and in this embodiment, the cover page of the report file is flexibly generated by using the initial blank page and the cover picture in the enterprise data, so as to meet the diversified requirements of the user.
In one embodiment, as shown in fig. 7, after generating the blank directory page, the method further comprises:
and S710, generating a new blank page, wherein the enterprise data further comprises enterprise data corresponding to the new blank page.
And S720, filling the enterprise data corresponding to the new blank page to obtain a file data stream to be processed.
Specifically, a request for generating a report file can be sent to the server through the terminal, and the server searches a local database according to the report request to obtain corresponding enterprise data and an initial file data stream. The enterprise data and the initial file data stream may also be obtained from a computer device connected to the server. The initial file data stream includes initial blank pages, which may correspond to the first page in the report file, may be the cover page of the report file, or may be the facing pages of the report file. And filling the page content data corresponding to the initial blank page, and filling the initial file data stream to obtain an intermediate file data stream. After the initial blank page is filled, a new blank page is generated based on the intermediate file data stream. The enterprise data also includes enterprise data corresponding to the new blank page. And if part of data in the enterprise data needs to be filled into the file data stream, the new blank page can be continuously generated, and the corresponding enterprise data is filled into the new blank page in the same way until the enterprise data is used up, so that the file data stream to be processed is obtained.
In the embodiment, the data stream of the file to be processed is obtained according to the data stream of the report file, the generation speed of the report file is accelerated, the time for a user to wait for the generation of the report file is reduced, further, a new blank page is added to the initial data stream of the file according to the actual situation of the acquired enterprise data, when the enterprise data corresponding to the report file changes, the data stream of the report file can be flexibly adjusted, the sustainable maintenance performance of the report file is improved, and the generation process of the report file is simplified.
In one embodiment, the header format includes at least one of font size, font color, and font style. As shown in fig. 8, each title in the destination page has a different title format.
In one embodiment, the present application provides a method for generating a report file, the method further comprising:
s802, obtaining enterprise data and an initial file data stream, wherein the initial file data stream comprises an initial blank page, and the enterprise data comprises enterprise data corresponding to the initial blank page.
S804, the enterprise data corresponding to the initial blank page is filled into the initial blank page to obtain an intermediate file data stream, and a blank directory page is generated based on the intermediate file data stream.
And S806, generating a new blank page, wherein the enterprise data further comprises enterprise data corresponding to the new blank page.
And S808, filling the enterprise data corresponding to the new blank page to obtain a file data stream to be processed.
The file data stream to be processed comprises a blank directory page and a plurality of title texts of the report file, each title text is generated based on the text data corresponding to each enterprise data dimension, and the blank directory page comprises directory placeholders.
And S810, determining the title format of each title text according to the title grade corresponding to each title text.
S812, responding to a refreshing instruction of the report file directory field, and inserting each title text into the blank directory page according to the directory placeholder and the title format of each title text to generate a directory structure of the report file.
The target structure comprises each title text displayed in a hyperlink form and the page number of each title text in the report file.
And S814, acquiring statistical information of each enterprise data dimension, and correspondingly taking the statistical information as the statistical information corresponding to each title text.
And S816, inserting the statistical information into the corresponding position of each title text in the directory structure to obtain the final report file data stream.
Wherein, the corresponding position of each title text is provided with a bracket, and the statistical information is correspondingly filled in the bracket.
And S818, generating a report file according to the data stream of the final report file.
It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the above-mentioned flowcharts may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or the stages is not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a part of the steps or the stages in other steps.
In one embodiment, as shown in fig. 9, there is provided a report file generating apparatus 900, including: a file data stream obtaining module 910, a directory structure generating module 920, and a report file generating module 930, where:
a file data stream obtaining module 910, configured to obtain a to-be-processed file data stream, where the to-be-processed file data stream includes a blank directory page and a plurality of header texts of the report file, each header text is generated based on text data corresponding to each enterprise data dimension, and the blank directory page includes a directory placeholder;
a directory structure generation module 920, configured to generate a directory structure of the report file in the blank directory page according to the directory placeholder and each title text, so as to obtain a final report file data stream; the target structure comprises each title text displayed in a hyperlink form and the page number of each title text in the report file;
a report file generating module 930, configured to generate the report file according to the final report file data stream.
In one embodiment, the apparatus further includes a title format determining module, configured to determine a title format of each of the title texts according to a title rank corresponding to each of the title texts;
the directory structure generating module 920 is further configured to insert each title text into the blank directory page according to the directory placeholder and the title format of each title text, so as to generate a directory structure of the report file.
In an embodiment, the directory structure generating module 920 is further configured to insert, in response to a refresh instruction of a directory field of a report file, each of the title texts into the blank directory page according to the directory placeholder and a title format of each of the title texts, so as to generate a directory structure of the report file.
In one embodiment, the device further comprises a statistical information acquisition module and a statistical information insertion module; wherein:
the statistical information acquisition module is used for acquiring statistical information of each enterprise data dimension and correspondingly serving as statistical information corresponding to each title text;
and the statistical information insertion module is used for inserting the statistical information into the corresponding position of each title text.
In one embodiment, a bracket is arranged at a corresponding position of each title text, and the statistical information is correspondingly filled in the bracket.
In one embodiment, the apparatus further includes a blank directory page generation module, configured to obtain enterprise data and an initial file data stream, where the initial file data stream includes an initial blank page, and the enterprise data includes enterprise data corresponding to the initial blank page; filling enterprise data corresponding to the initial blank page into the initial blank page to obtain an intermediate file data stream, and generating the blank directory page based on the intermediate file data stream
In one embodiment, the device further comprises a new blank page generation module and a new blank page filling module; wherein:
the new blank page generating module is used for generating a new blank page, and the enterprise data also comprises enterprise data corresponding to the new blank page;
and the new blank page filling module is used for filling the enterprise data corresponding to the new blank page to obtain the data stream of the file to be processed.
In one embodiment, the header format includes at least one of font size, font color, and font style.
For the specific limitations of the report file generation device, reference may be made to the above limitations on the report file generation method, which are not described herein again. The modules in the report file generation device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of generating a report file. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is provided, comprising a memory in which a computer program is stored and a processor, which when executing the computer program performs the method steps in the above embodiments.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the method steps of the above-mentioned embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. A method for generating a report file, the method comprising:
acquiring a data stream of a file to be processed, wherein the data stream of the file to be processed comprises a blank directory page and a plurality of title texts of the report file, each title text is generated based on text data corresponding to each enterprise data dimension, and the blank directory page comprises a directory placeholder;
generating a directory structure of the report file in the blank directory page according to the directory placeholder and each title text to obtain a final report file data stream; the target structure comprises each title text displayed in a hyperlink form and the page number of each title text in the report file;
and generating the report file according to the final report file data stream.
2. The method of claim 1, wherein prior to generating the directory structure, the method further comprises:
determining the title format of each title text according to the title grade corresponding to each title text;
generating a directory structure of the report file in the blank directory page according to the directory placeholder and each title text, including:
and inserting each title text into the blank directory page according to the directory placeholder and the title format of each title text to generate a directory structure of the report file.
3. The method of claim 2, wherein the generating the directory structure of the report file by inserting each of the title texts into the blank directory page according to the directory placeholder and a title format of each of the title texts comprises:
and responding to a refresh instruction of a report file directory field, and inserting each title text into the blank directory page according to the directory placeholder and the title format of each title text to generate a directory structure of the report file.
4. The method of claim 1, further comprising:
acquiring statistical information of each enterprise data dimension, and correspondingly taking the statistical information as the statistical information corresponding to each title text;
and inserting the statistical information into the corresponding position of each title text.
5. The method according to claim 4, wherein a bracket is provided at a corresponding position of each title text, and the statistical information is correspondingly filled in the bracket.
6. The method of claim 1, wherein the blank directory page is generated in a manner comprising:
acquiring enterprise data and an initial file data stream, wherein the initial file data stream comprises an initial blank page, and the enterprise data comprises enterprise data corresponding to the initial blank page;
and filling enterprise data corresponding to the initial blank page into the initial blank page to obtain an intermediate file data stream, and generating the blank directory page based on the intermediate file data stream.
7. The method of claim 6, wherein after generating the blank directory page, the method further comprises:
generating a new blank page, wherein the enterprise data further comprises enterprise data corresponding to the new blank page;
and filling the enterprise data corresponding to the new blank page into the new blank page to obtain the data stream of the file to be processed.
8. The method of any of claims 1 to 7, wherein the header format comprises at least one of font size, font color, and font style.
9. An apparatus for generating a report file, the apparatus comprising:
the file data stream acquisition module is used for acquiring a file data stream to be processed, wherein the file data stream to be processed comprises a blank directory page and a plurality of title texts of the report file, each title text is generated based on text data corresponding to each enterprise data dimension, and the blank directory page comprises a directory placeholder;
a directory structure generation module, configured to generate a directory structure of the report file in the blank directory page according to the directory placeholder and each title text, so as to obtain a final report file data stream; the target structure comprises each title text displayed in a hyperlink form and the page number of each title text in the report file;
and the report file generation module is used for generating the report file according to the final report file data stream.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 8.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN202110467699.2A 2021-04-28 2021-04-28 Report file generation method and device, computer equipment and storage medium Pending CN113268585A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110467699.2A CN113268585A (en) 2021-04-28 2021-04-28 Report file generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110467699.2A CN113268585A (en) 2021-04-28 2021-04-28 Report file generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113268585A true CN113268585A (en) 2021-08-17

Family

ID=77229659

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110467699.2A Pending CN113268585A (en) 2021-04-28 2021-04-28 Report file generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113268585A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070124329A1 (en) * 2004-03-04 2007-05-31 Yoo Jea Y Recording medium having a data structure for managing various data streams and recording and reproducing methods and apparatuses
CN110083805A (en) * 2018-01-25 2019-08-02 北京大学 A kind of method and system that Word file is converted to EPUB file
CN111178027A (en) * 2019-12-09 2020-05-19 北京尊冠科技有限公司 Report generation system and method based on online creation template and online specified data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070124329A1 (en) * 2004-03-04 2007-05-31 Yoo Jea Y Recording medium having a data structure for managing various data streams and recording and reproducing methods and apparatuses
CN110083805A (en) * 2018-01-25 2019-08-02 北京大学 A kind of method and system that Word file is converted to EPUB file
CN111178027A (en) * 2019-12-09 2020-05-19 北京尊冠科技有限公司 Report generation system and method based on online creation template and online specified data

Similar Documents

Publication Publication Date Title
US20190251143A1 (en) Web page rendering method and related device
JP6117452B1 (en) System and method for optimizing content layout using behavioral metric
US11687707B2 (en) Arbitrary size content item generation
CN110245069B (en) Page version testing method and device and page display method and device
US20140019441A1 (en) Custom web page themes
CN108595697B (en) Webpage integration method, device and system
CN110889076B (en) Comment information publishing method, device, client, server, system and medium
CN113076731A (en) Report file generation method and device, computer equipment and storage medium
CN107391535B (en) Method and device for searching document in document application
CN111475700A (en) Data extraction method and related equipment
CN113918738B (en) Multimedia resource recommendation method and device, electronic equipment and storage medium
CN111737443B (en) Answer text processing method and device and key text determining method
CN111597480A (en) Webpage resource preloading method and device, computer equipment and storage medium
CN113268585A (en) Report file generation method and device, computer equipment and storage medium
JP2013020462A (en) Device and method for calculating degree of association
US20160005002A1 (en) Generating Tasks
CN113704648A (en) Page data processing method, device, equipment and storage medium
CN105556514B (en) Method and device for data mining based on user search behavior
CN113743982A (en) Advertisement putting scheme recommendation method and device, computer equipment and storage medium
CN108388614B (en) News data crawling processing method and device, computer equipment and storage medium
US10630793B2 (en) Browser fingerprinting
EP3819779A1 (en) Browser management system, browser management method, browser management program, and client program
CN105701232A (en) Hypertext link list pushing system based on APP information data
JP5762480B2 (en) Information processing apparatus and method
CN113268968A (en) Report file generation method and device, computer equipment and storage medium

Legal Events

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