CN112364617A - File information processing method and device, electronic equipment and storage medium - Google Patents

File information processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112364617A
CN112364617A CN202011186893.5A CN202011186893A CN112364617A CN 112364617 A CN112364617 A CN 112364617A CN 202011186893 A CN202011186893 A CN 202011186893A CN 112364617 A CN112364617 A CN 112364617A
Authority
CN
China
Prior art keywords
processing
field
result
target file
information
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
CN202011186893.5A
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.)
Beijing Xinjincheng Technology Co ltd
Original Assignee
Beijing Xinjincheng 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 Beijing Xinjincheng Technology Co ltd filed Critical Beijing Xinjincheng Technology Co ltd
Priority to CN202011186893.5A priority Critical patent/CN112364617A/en
Publication of CN112364617A publication Critical patent/CN112364617A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

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

Abstract

The invention discloses a file information processing method and device, electronic equipment and a storage medium, and relates to the technical field of computers. One embodiment of the method comprises: acquiring file information of a target file; screening a processing model corresponding to the target file from a model library according to the file information, wherein the processing model comprises a report template and at least one processing method; respectively processing the target file according to each processing method to obtain a processing result corresponding to each processing method; and generating a result report corresponding to the target file according to the report template and the processing result corresponding to each processing method. The method and the device can solve the problems that the analysis result and the report error rate are high and the efficiency is low due to the fact that the quantity of the questionnaire files is large and the number of steps needing manual operation is large.

Description

File information processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing file information, an electronic device, and a storage medium.
Background
In some fields, such as consulting fields, it is often necessary to perform questionnaire investigation on related contents, then perform statistical analysis on the questionnaire to obtain analysis results, and summarize the analysis results to generate reports. The statistical analysis process for the questionnaire is typically: and generating a plurality of excel files according to the requirement of questionnaire analysis for the questionnaire files, manually analyzing and counting the excel files to obtain an analysis result, and manually writing to generate a report based on the analysis result.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in the above processing of the questionnaire files, because the number of questionnaire files is large and the number of steps requiring manual operation is large, errors are easily caused in the processing of the questionnaire files, and a large amount of time is required, thereby resulting in high error rate and low efficiency of analysis and reporting.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a system and a storage medium for processing file information, which can solve the problems of high analysis result and report error rate and low efficiency due to a large number of questionnaire files and many steps requiring manual operation.
To achieve the above object, according to an aspect of an embodiment of the present invention, a method for processing file information is provided.
The file information processing method of the embodiment of the invention comprises the following steps: acquiring file information of a target file; screening a processing model corresponding to the target file from a model library according to the file information, wherein the processing model comprises a report template and at least one processing method; respectively processing the target file according to the processing methods to obtain processing results corresponding to the processing methods; and generating a result report corresponding to the target file according to the report template and the processing result corresponding to each processing method.
In one embodiment, before the obtaining the file information of the target file, the method further includes:
acquiring a report template corresponding to the target file; determining each processing method required for processing the target file according to the template information included in the report template; and establishing a processing model corresponding to the target file according to each processing method required for processing the target file.
In yet another embodiment, the report template includes template information corresponding to each of the processing methods, the template information including placeholders and fields corresponding to each of the placeholders; the processing result comprises at least one result field and result data corresponding to each result field;
generating a result report corresponding to the target file according to the report template and the processing result corresponding to each processing method, wherein the generating of the result report corresponding to the target file comprises the following steps: determining a processing result corresponding to each template information according to the corresponding relation between the template information and the processing method; for each placeholder in the template information, screening a first field identical to a field corresponding to each placeholder from result fields included in a processing result corresponding to the template information, and replacing each placeholder in the template information with result data corresponding to the first field.
In yet another embodiment, the target file includes fields and data corresponding to each of the fields; the processing method comprises a field to be processed and processing information corresponding to the field to be processed;
processing the target file according to each processing method to obtain a processing result corresponding to each processing method, wherein the processing result comprises the following steps: for each processing method, screening a second field which is the same as the field to be processed from the field of the target file, and processing the second field and/or data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain a processing result corresponding to the processing method.
In another embodiment, the processing information corresponding to the field to be processed includes a corresponding relationship between the field to be processed and the replacement field;
the processing the second field and/or the data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain the processing result corresponding to the processing method includes: and replacing the second field in the target file with the replacement field according to the corresponding relation between the field to be processed and the replacement field to obtain a processing result corresponding to the processing method.
In another embodiment, the processing information corresponding to the field to be processed includes a screening condition for the data corresponding to the field to be processed;
the processing the second field and/or the data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain the processing result corresponding to the processing method includes: and screening the data corresponding to the second field according to the screening condition to obtain a screening result, and determining the screening result as a processing result corresponding to the processing method.
In another embodiment, the processing information corresponding to the field to be processed includes a statistical condition and a newly added statistical field;
the processing the second field and/or the data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain the processing result corresponding to the processing method includes: and according to the statistical conditions, sequentially determining the statistical results of the data corresponding to the second field, and adding the newly added statistical field and the data corresponding to the newly added statistical field into the target file, wherein the data corresponding to the newly added statistical field is the statistical results of the data corresponding to the second field.
In another embodiment, the processing information corresponding to the field to be processed includes a deletion condition;
the processing the second field and/or the data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain the processing result corresponding to the processing method includes: and determining data to be deleted in the data corresponding to the second field according to the deletion condition, and deleting the data to be deleted to obtain a processing result corresponding to the processing method.
In yet another embodiment, the processing method includes a first method, a second method, and a third method; the processing result comprises a result field and result data corresponding to the result field;
the third method comprises a field to be processed of a processing result corresponding to the first method, a field to be processed of a processing result corresponding to the second method and processing information of the third method;
processing the target file according to each processing method to obtain a processing result corresponding to each processing method, wherein the processing result comprises the following steps: processing the target file according to the first processing method to obtain a first processing result corresponding to the first processing method, and processing the target file according to the first processing method to obtain a second processing result corresponding to the second processing method; screening a third field which is the same as a field to be processed of the processing result corresponding to the first method from the first processing result, and screening a fourth field which is the same as the field to be processed of the processing result corresponding to the second method from the second processing result; and processing result data corresponding to the third field in the first processing result and result data corresponding to the third field in the first processing result according to the processing information of the third method to obtain a processing result corresponding to the processing method.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a file information processing apparatus.
The file information processing device of the embodiment of the invention comprises: an acquisition unit configured to acquire file information of a target file; the screening unit is used for screening a processing model corresponding to the target file from a model library according to the file information, and the processing model comprises a report template and at least one processing method; the processing unit is used for respectively processing the target file according to each processing method to obtain a processing result corresponding to each processing method; and the generating unit is used for generating a result report corresponding to the target file according to the report template and the processing result corresponding to each processing method.
In one embodiment, the obtaining unit is further configured to obtain a target report template corresponding to the target file; the device further comprises:
a determining unit configured to determine each processing method required for processing the target document, based on template information included in the report template;
and the establishing unit is used for establishing a processing model corresponding to the target file according to each processing method required by the processing of the target file.
In one embodiment, the report template includes template information corresponding to each of the processing methods, the template information including placeholders and fields corresponding to each of the placeholders; the processing result comprises at least one result field and result data corresponding to each result field;
the generating unit is specifically configured to:
determining a processing result corresponding to each template information according to the corresponding relation between the template information and the processing method; for each placeholder in the template information, screening a first field identical to a field corresponding to each placeholder from result fields included in a processing result corresponding to the template information, and replacing each placeholder in the template information with result data corresponding to the first field.
In one embodiment, the target file includes fields and data corresponding to each of the fields; the processing method comprises a field to be processed and processing information corresponding to the field to be processed; the processing unit is specifically configured to:
for each processing method, screening a second field which is the same as the field to be processed from the field of the target file, and processing the second field and/or data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain a processing result corresponding to the processing method.
In one embodiment, the processing information corresponding to the field to be processed includes a corresponding relationship between the field to be processed and the replacement field;
the processing unit is specifically configured to: and replacing the second field in the target file with the replacement field according to the corresponding relation between the field to be processed and the replacement field to obtain a processing result corresponding to the processing method.
In one embodiment, the processing information corresponding to the field to be processed includes a screening condition for the data corresponding to the field to be processed;
the processing unit is specifically configured to: and screening the data corresponding to the second field according to the screening condition to obtain a screening result, and determining the screening result as a processing result corresponding to the processing method.
In one embodiment, the processing information corresponding to the field to be processed includes a statistical condition and a newly added statistical field;
the processing unit is specifically configured to: and according to the statistical conditions, sequentially determining the statistical results of the data corresponding to the second field, and adding the newly added statistical field and the data corresponding to the newly added statistical field into the target file, wherein the data corresponding to the newly added statistical field is the statistical results of the data corresponding to the second field.
In one embodiment, the processing information corresponding to the field to be processed includes a deletion condition;
the processing unit is specifically configured to: and determining data to be deleted in the data corresponding to the second field according to the deletion condition, and deleting the data to be deleted to obtain a processing result corresponding to the processing method.
In one embodiment, the processing method includes a first method, a second method, and a third method; the processing result comprises a result field and result data corresponding to the result field;
the third method comprises a field to be processed of a processing result corresponding to the first method, a field to be processed of a processing result corresponding to the second method and processing information of the third method;
the processing unit is specifically configured to:
processing the target file according to the first processing method to obtain a first processing result corresponding to the first processing method, and processing the target file according to the first processing method to obtain a second processing result corresponding to the second processing method; screening a third field which is the same as a field to be processed of the processing result corresponding to the first method from the first processing result, and screening a fourth field which is the same as the field to be processed of the processing result corresponding to the second method from the second processing result; and processing result data corresponding to the third field in the first processing result and result data corresponding to the third field in the first processing result according to the processing information of the third method to obtain a processing result corresponding to the processing method.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used 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 realize the file information processing method provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, which, when executed by a processor, implements a processing method of file information provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the invention, for the target file, the corresponding processing model can be screened out from the model library through the file information, the target file is processed according to the processing method included by the processing model to obtain the processing result, and then the result report is directly generated according to the report template and the processing result. Therefore, in the embodiment of the invention, the corresponding result report of the target file can be obtained through the processing model without manual participation, thereby reducing errors caused by manual operation and improving the processing efficiency of the target file.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of one main flow of a processing method of document information according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a system architecture of a model library according to an embodiment of the invention;
FIG. 3 is a schematic illustration of a result report according to an embodiment of the present invention;
FIG. 4 is a diagram of a syntax tree according to an embodiment of the present invention;
FIG. 5 is yet another diagram of a syntax tree according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of one principal flow of a method of creating a model and document information handling in accordance with an embodiment of the present invention;
FIG. 7 is a schematic diagram of the main units of a file information processing apparatus according to an embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 9 is a schematic block diagram of a computer system suitable for use in implementing embodiments of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The embodiment of the invention provides a file information processing system which can be used for processing a target file. The specific target file may be a data table, or a two-dimensional table formed by a header and data, for example, a file in an excel format, which may include one or more fields and data corresponding to each field.
An embodiment of the present invention provides a method for processing file information, which may be executed by a system for processing file information, as shown in fig. 1, and includes the following steps.
S101: and acquiring file information of the target file.
The target file is a file to be processed, and specifically may be a questionnaire. The file information of the target file can be obtained from a database or input by a user. The target file may be one file or a plurality of files. The file information of the target file may include the target file, file name, identification, content, date, and the like.
S102: and screening a processing model corresponding to the target file from the model library according to the file information.
Wherein the process model includes a report template and at least one process recipe.
The model library is pre-built and may include one or more process models, each of which may process a different object file. Corresponding relations can be established between the processing models in the model base and the file information of the target file, and thus the processing models corresponding to the target file can be screened out from the model base through the file information and the corresponding relations. Each process model may include a report template and at least one process recipe. The report template is a template which needs to output a result report after the target file is processed, the processing method is a method for processing the target file, each processing method can correspond to a final processing result, and the corresponding relation between the processing method and the processing result can be established through information such as identification and the like.
Specifically, the structure of the model library may be as shown in fig. 2.
In fig. 2, the model structure represents a model library, which may include a plurality of analysis schemes (3 shown in fig. 2), and the analysis schemes represent processing models, so the model library in fig. 2 includes three processing models, each of which may include a plurality of analysis methods (3 shown in fig. 2), which is equivalent to one container of the analysis methods, and which may be used for model multiplexing, generation of results and reports, and the like. The analysis methods are expressed processing methods, each analysis method is a basic unit for processing a target file, each analysis method can correspond to a data source and a method tree, the data source represents a data section and can be used for cutting the scale of original data and reducing a data set, and the method tree is obtained according to the processing method and expresses the specific processing mode of the processing method. In the embodiment of the invention, the data source can be a target file, and can also be a file with the same format and type as the target file, structure, type, value range and meaning of the content.
Taking the processing of the questionnaire as an example with reference to the model library shown in fig. 2, each processing model in the model library may correspond to one questionnaire for processing the questionnaire, so as shown in fig. 2, the model library may be stored in an ROS (Report Operating System) questionnaire library. The processing model, the questionnaire and the questionnaire can be identified by names and the like, and a corresponding relationship between the processing model, the questionnaire and the questionnaire is established, so that the target file is the questionnaire in step S101, the file information can include the identification, and in this step, the processing model for processing the questionnaire, namely the processing model corresponding to the target file, can be obtained by inquiring the corresponding relationship between the processing model and the questionnaire according to the identification.
Because the analysis result after the target file is processed can be output through the result report, the report template can be preset in the embodiment of the invention. The report template may include template information, and data required for generating the result report may be determined according to the template information, and further, data required for the result report may be obtained by determining which processing methods are used to process the target file, so that the processing methods required for processing the target file may be determined, that is, the processing methods required to be included in the processing model may be determined. Therefore, in the embodiment of the present invention, before performing this step, the method may further include: acquiring a report template corresponding to a target file; determining each processing method required for processing the target file according to the template information included in the report template; and establishing a processing model corresponding to the target file according to each processing method required for processing the target file.
Specifically, the result report may include one or more result data, so the report template may include one or more template information corresponding to the result data, and since the result data is obtained by processing the target document by the processing method, the report template may include template information corresponding to each processing method.
The template information may include placeholders that represent particular values of the result data, each placeholder corresponding to one or more fields to represent a location of the placeholder in the processing result.
It should be noted that, in the embodiment of the present invention, the processing model in the model library may also be constructed according to an instruction input by a user, and the user instruction may include a processing method and a report template for processing the target file.
S103: and respectively processing the target file according to each processing method to obtain a processing result corresponding to each processing method.
After the processing model is determined, the target file can be processed according to each processing method included in the processing model, and then the processing result corresponding to each processing method is obtained. In the embodiment of the present invention, the processing method may be set as required, and the processing result corresponding to the target file is obtained after the target file is processed by each processing method. When the processing method includes a plurality of methods, each method may be performed in a preset logical order, and the latter method may process a processing result of the former method.
In the embodiment of the present invention, the target file may include a plurality of fields and data corresponding to the fields, and the data corresponding to the fields are also generally associated with each other. Specifically, as shown in table 1, the content may be the content of one target file. In table 1, the first row is a field, the column corresponding to each field is data corresponding to the field, and the data corresponding to different fields in the same row are related to each other.
TABLE 1
Figure BDA0002751668110000091
Figure BDA0002751668110000101
When the target file is processed, the field can be used as an index for processing, so the processing method can comprise the field to be processed and the processing information corresponding to the field to be processed. The field to be processed represents the field to be processed in the processing method or the field corresponding to the data to be processed, and the processing information represents the specific processing mode of the field to be processed and/or the data corresponding to the field to be processed. That is, the processing method may process the field, process the data corresponding to the field, or process the field and the data corresponding to the field simultaneously. After the processing method obtains the processing result, the processing result may include at least one result field and result data corresponding to the result field.
Specifically, this step may be performed as: for each processing method, screening a second field which is the same as the field to be processed from the field of the target file, and processing the second field and/or data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain a processing result corresponding to the processing method.
Each processing method can process the target file, and the field to be processed in the processing method is a field needing to be processed in the target file, so that a second field which is the same as the field to be processed is screened from the field of the target file, and the second field is the field needing to be processed in the target file. And then, processing the second field and/or the data corresponding to the second field in the target file according to the processing information to obtain a processing result corresponding to the processing method.
In the embodiment of the present invention, the processing method includes multiple types, and each processing method may include a field to be processed and processing information of the field to be processed. Various processing methods will be described below.
In a processing method, processing information corresponding to a field to be processed includes a correspondence between the field to be processed and a replacement field. Because the names of some fields in the target file are too long and bring great inconvenience to the processing, the fields with longer names can be replaced by shorter names, namely, a replacement field is set, and the fields to be processed in the target file are replaced by the replacement field. In this step, after the second field is determined, the second field in the target file may be replaced by the replacement field according to the correspondence between the field to be processed and the replacement field, so as to obtain a processing result corresponding to the processing method.
In another processing method, the processing information corresponding to the field to be processed includes a filtering condition of the data corresponding to the field to be processed. For the data corresponding to some fields in the target file, some unqualified data such as spaces, messy codes and the like may exist, or some data which has no meaning to the processing result exists, and at this time, a screening condition may be set to screen out the required data. In this step, after the second field is determined, the data corresponding to the second field may be screened according to the screening condition to obtain a screening result, and the screening result is determined as the processing result corresponding to the processing method.
It should be noted that, after the filtering process, data that does not meet the filtering condition in the target file may be directly deleted, and if the target file includes a plurality of fields and data corresponding to each field are associated with each other, data that does not meet the filtering condition and data associated with these data may also be deleted.
In another processing method, the processing information corresponding to the field to be processed includes a statistical condition and a newly added statistical field. Statistical processing may be performed on the data in the target file, for example, determining intervals, calculating occupation ratios, summing, and the like, and the result after the statistical processing may be added to the target file through the newly added statistical field. After the second field is determined, the statistical results of the data corresponding to the second field may be sequentially determined according to the statistical conditions, and a newly added statistical field and data corresponding to the newly added statistical field are added to the target file, where the data corresponding to the newly added statistical field is the statistical results of the data corresponding to the second field.
It should be noted that, in the processing method, the processing information corresponding to the field to be processed may not include the newly added statistical field, that is, the result after the statistical processing may be used as the data of the existing field to replace the original data of the field, so that the newly added statistical field is not needed.
In another processing method, the processing information corresponding to the field to be processed includes a deletion condition. The data of some fields in the target file does not need to be analyzed and processed, and the data can be directly deleted. Therefore, in this step, after the second field is determined, the data to be deleted in the data corresponding to the second field can be determined according to the deletion condition, and the data to be deleted is deleted, so as to obtain the processing result corresponding to the processing method.
It should be noted that the processing method in the embodiment of the present invention may also include multiple types, and the specific manner may be set according to requirements, which is not described herein, for example, as shown in fig. 2, the processing method in the method tree may include newly adding columns, grouping and aggregating (statistical processing), screening, transposing, deleting, TopN, and the like. The processing method may be combined with other methods as one method into one processing method, where the processing method includes multiple methods, the execution logic sequence of each method needs to be preset, and when executing, the processing result of the method whose logic sequence is located before may be used as the target file of the method whose logic sequence is located after, that is, the target file processed by each method may be the processing result of the previous method.
Specifically, taking the example that the processing method includes the first method, the second method, and the third method, each method corresponds to a processing result, and the processing result includes a result field and result data corresponding to the result field. In the embodiment of the present invention, a first method and a second method are used for processing a target file, and a third method is used for processing results corresponding to the first method and the second method.
This step can be specifically performed as: processing the target file according to the first processing method to obtain a first processing result corresponding to the first processing method, and processing the target file according to the first processing method to obtain a second processing result corresponding to the second processing method; screening a third field which is the same as the field to be processed of the processing result corresponding to the first method from the first processing result, and screening a fourth field which is the same as the field to be processed of the processing result corresponding to the second method from the second processing result; and processing result data corresponding to the third field in the first processing result and result data corresponding to the third field in the first processing result according to the processing information of the third method to obtain a processing result corresponding to the processing method.
In the process, the target file is processed by the first method and the second method respectively to obtain a first processing result and a second processing result. The third method is to process the first processing result and the second processing result, so the fields to be processed included in the third method include the fields to be processed corresponding to the processing result of the first method and the fields to be processed corresponding to the processing result of the second method, after the first processing result and the second processing result are obtained, the third fields which are the same as the fields to be processed of the processing result corresponding to the first method can be respectively screened from the first processing result, and the fourth fields which are the same as the fields to be processed of the processing result corresponding to the second method can be screened from the second processing result. The processing method of the third method is a processing mode for the third method including the field to be processed, and the processing result corresponding to the processing method can be obtained by processing the result data corresponding to the third field in the first processing result and the result data corresponding to the third field in the first processing result according to the processing information of the third method.
S104: and generating a result report corresponding to the target file according to the report template and the processing result corresponding to each processing method.
After each processing result is obtained, the processing result can be brought into a report template to generate a result report.
Specifically, this step may be performed as: determining a processing result corresponding to each template information according to the corresponding relation between the template information and the processing method; and for each placeholder in the template information, screening a first field identical to a field corresponding to each placeholder from a result field included in a processing result corresponding to the template information, and replacing each placeholder in the template information with result data corresponding to the first field.
The report template includes template information, each of which corresponds to a processing method, so that a processing result corresponding to each of the template information can be determined based on a correspondence relationship between the template information and the processing method. The template information comprises placeholders and fields corresponding to the placeholders, and the processing result comprises result fields and result data corresponding to the result fields. In this step, the placeholder in the template information needs to be replaced by result data to obtain a result report of the target file. The placeholder represents the position of the data replacing the placeholder in the processing result through the corresponding field, and the field corresponding to the data obtaining the replacing placeholder in the processing result, namely the first field, can be obtained according to the corresponding field, so that the result data corresponding to the first field is the data needing replacing the placeholder, and each placeholder in the template information is replaced by the result data corresponding to the first field.
It should be noted that the result report may be a file in a document format, such as a word document, which may include text, a diagram, and the like, because a part of the content in the result report may be determined, the part of the content may be directly fixed in the report template, and the result report further includes a part that embodies the result data, and the part is embodied in the report template through the template information, and a complete result report may be obtained after the step is performed.
Specifically, the result report is exemplified by a graph showing the result data, and a part showing the result data after the result report is generated may be as shown in fig. 3. The result report shown in fig. 3 includes two rows of graphs labeled 6 and 7, so that the report template includes two rows of template information labeled 6 and 7, taking the graph labeled 6 as an example, the report template includes a data table and a graph corresponding to the data table, where the data table may be a processing result, such as a ratio of salaries in each salary interval to a total salary, where a placeholder may be directly set, the label is replaced with a processing result of the processing method corresponding to the template information, a horizontal coordinate in the graph corresponding to the data table represents the salary interval and a vertical coordinate represents the ratio, the graph in the template information may be displayed by a preset placeholder, and after the processing result is obtained, a field corresponding to the placeholder is the salary interval and the ratio, so that the processing result in the data table may be embodied in the graph by this step, thereby obtaining the result report shown in fig. 3.
In the embodiment of the invention, for the target file, the corresponding processing model can be screened out from the model library through the file information, the target file is processed according to the processing method included by the processing model to obtain the processing result, and then the result report is directly generated according to the report template and the processing result. Therefore, in the embodiment of the invention, the corresponding result report of the target file can be obtained through the processing model without manual participation, thereby reducing errors caused by manual operation and improving the processing efficiency of the target file.
The process of step S103 will be specifically described with reference to the embodiment shown in fig. 1, taking the target file shown in table 1 as an example. In the embodiment of the present invention, the processing result is set as the ratio of salaries to the sum of salaries in each salary interval in the subject's calendar, wherein the salaries are the average monthly income. The processing method for obtaining the processing result is preset in the processing model, and since the processing needs to be performed for a plurality of times to obtain the processing result, the processing method includes a plurality of methods, and the logic order of execution of each method is preset. Specifically, the processing method includes the following eight methods, and the processing procedure can be described as follows.
The field "average monthly income of i'm work (before tax), approximately _____ yuan/month" included in table 1 may be replaced with "salary" because this field is too long and inconvenient to handle, so the first method includes fields to be processed as "average monthly income of i'm work (before tax), approximately _____ yuan/month", "salary" as replacement fields, and handling information as a correspondence between fields to be processed and "salary". After the target file is processed in this way, it can be obtained that the first processing result corresponding to the first method is to replace "average monthly income (before tax) of me work, approximately _____ yuan/month" with "compensation", which may be specifically shown in table 2.
TABLE 2
Student number Name of study calendar Emolument
20130198 This section 3000
20130199 This section 2700
20130201 This section 3800
20130202 This section 4400
20130203 This section 4900
20130204 This section 5000
20130205 This section 6100
20130206 This section 4500
20130207 Special section 3200
20130208 Special section
20130209 Special section 4000
20130210 Special section 4500
20130211 Special section 2700
20130212 Special section 3800
After the first processing result is obtained, since the final processing result of the embodiment of the present invention relates to the intrinsic compensation, a filtering condition may be set, and the data for obtaining the processing result may be filtered by the filtering condition. Meanwhile, in order to avoid the image processing result of the non-qualified data, the screening condition may further include screening of the non-qualified data. Taking the unqualified data as a space, the second method includes that the fields to be processed are all fields in table 2, the processing information includes a screening condition, and the screening condition may specifically be that the data of the name field of the subject is the subject and each field is not empty. The second processing result can be obtained by processing the first processing result by the second method, and specifically, the second processing result can be shown in table 3.
TABLE 3
Student number Name of study calendar Emolument
20130198 This section 3000
20130199 This section 2700
20130201 This section 3800
20130202 This section 4400
20130203 This section 4900
20130204 This section 5000
20130205 This section 6100
20130206 This section 4500
After the second processing result is obtained, determining a compensation interval corresponding to data corresponding to a compensation field in the second result, where the compensation interval is preset and may specifically be: 3000 yuan and below, 3001 to 4000 yuan, 4001 to 5000 yuan and above. Meanwhile, on the basis of the second processing result, a new statistical field and data corresponding to the new statistical field can be added. The third method is to perform statistical processing on the second processing result, and the third method includes that the field to be processed is compensation, the processing information is to determine a compensation interval to which data corresponding to the compensation field belongs, and to add an interval field, the data corresponding to the interval field is an interval to which data corresponding to each compensation field belongs, wherein a code for determining the compensation interval to which data corresponding to the compensation field belongs may be: "if [ remuneration ] <3000then '3000 yuan and below' elif [ remuneration ] <4000then '3001 to 4000 yuan' elif [ remuneration ] <5000then '4001 to 5000 yuan' else '5000 yuan and above' end". After the second processing result is processed by the third method, a third processing result can be obtained, which can be specifically shown in table 4.
TABLE 4
Figure BDA0002751668110000151
Figure BDA0002751668110000161
After the third processing result is obtained, the statistical sum of the compensation between each compensation interval in the third processing result, that is, the information belonging to the same compensation interval is combined into the compensation sum of the interval, and the student label field is useless for obtaining the processing result and can be deleted directly. Therefore, the fourth method includes that the fields to be processed are the student numbers and the salaries, the processing information includes deleting the student number fields and the data, and summing the data belonging to the same salaries interval in the salaries fields. After the third processing result is processed by the fourth method, a fourth processing result can be obtained, which can be specifically shown in table 5.
TABLE 5
Name of study calendar Interval(s) Emolument
This section 3000 yuan and below 5700
This section 3001 to 4000 yuan 3800
This section 4001 to 5000 yuan 13800
This section 5000 yuan or more 11100
After the fourth processing result is obtained, in order to calculate the ratio of each compensation interval to the compensation sum, the compensation sum needs to be calculated first, so for the fourth processing result, each data in the compensation field can be directly summed, then the compensation sum field is added, the sum of each data in the compensation field is used as the data corresponding to the compensation sum field, and the interval field and the compensation field are deleted. Therefore, the field to be processed in the fifth method includes the interval and the compensation, and the processing information includes deleting the interval field and the compensation field, summing the data in the compensation field, and adding the compensation total field. After the fourth processing result is processed by the fifth method, a fifth processing result can be obtained, which can be specifically shown in table 6.
TABLE 6
Name of study calendar Sum of emolument
This section 34400
Since the final processing result is the ratio of the compensation in each compensation interval to the compensation sum, the fourth processing result and the fifth processing result can be merged for the convenience of the subsequent processing, that is, the compensation sum in the fifth processing result is merged to the fourth processing result by using the academic name field as the link field. Therefore, the fields to be processed in the sixth method include the name field of the academic record in the fourth processing result and the name and the total amount of compensation fields of the academic record in the fifth processing result, and the processing information is that the name field of the academic record is used as the connection field, and the total amount of compensation in the fifth processing result is combined with the fourth processing result. After the fourth processing result and the fifth processing result are processed by the sixth method, a sixth processing result can be obtained, which can be specifically shown in table 7.
TABLE 7
Figure BDA0002751668110000171
After the sixth processing result is obtained, the ratio of the salary to the salary sum in each salary period can be directly calculated according to the salary field and the salary sum in the sixth processing result, and the proportion field is newly added, and the data corresponding to the proportion field is the ratio of the salary to the salary sum in each salary period. Therefore, the field to be processed in the seventh method includes a compensation field and a compensation total field, the processing information includes a statistical condition and a newly added field, the statistical condition is a ratio of data corresponding to the compensation field to the compensation total, and the execution code may be: "round ([ compensation ]/[ sum of compensation ], 3)". After the sixth processing result is processed by the seventh method, a seventh processing result can be obtained, which can be specifically shown in table 8.
TABLE 8
Figure BDA0002751668110000172
Figure BDA0002751668110000181
After the seventh processing result is obtained, the final processing result can be obtained, but in order to make the final result simpler, the seventh processing result may be processed, i.e. the calendar name, the salary and the sum of salary fields and the corresponding data in the seventh result are deleted. Therefore, in the eighth method, the field to be processed is the name of the academic calendar, the salary and the total salary field, and the processing information is the deleting condition, that is, the data corresponding to the field to be processed is deleted. The eighth processing result can be obtained by the eighth processing method, and the specific results can be shown in table 9.
TABLE 9
Interval(s) Ratio of occupation of
3000 or less 0.25
3001-4000 Yuan 0.125
4001-5000 yuan 0.5
5000 yuan or more 0.125
By the processing method, the final processing result can be obtained after the target file is processed. The processing method comprises eight methods, and each method is executed according to a logic sequence to obtain a final processing result. Each method can be represented by one operation class, the input and output of each operation class are respectively a Table object, the Table object is processed after being input into the operation class, and then the operated Table object is output, the output Table object is the processing result of the operation class, and the processing result can be the input Table object of other operation classes and can also be the output result of the processing method.
Taking the example of deleting the data corresponding to the field in the eighth method, the executing pseudo code may be:
class DeleteColumnAnalysis{
private string m _ columnName; // column name to delete
public Table proc (Table input) {// both input and output are tables,
return input.remove(m_columnName);
}
}。
for some methods with complex processing procedures, a syntax tree is usually required to be constructed, and the syntax tree forms a tree structure for a self-defined formula or syntax parsing. For example, in the seventh method, the operation of adding a field and corresponding data needs to construct a syntax tree, which may be as shown in fig. 4, and defines syntax rules, such as if-else rules specifically may be:
// if statement
ifStatement
:'if'logicexpr'then'expr elseifStatement*'else'expr'end'
|'if'logicexpr'then'expr elseifStatement*'end'
elseifStatement
:'elif'logicexpr'then'expr
It should be noted that, the eight methods can construct a syntax tree, and then a method tree corresponding to a processing method can be constructed by using each syntax tree according to the logical order of method execution.
After the final processing result is obtained in the above process, a result report can be generated by combining the template information in the report template, wherein the field corresponding to the placeholder in the template information can be embodied by the syntax tree.
For example, the text portions included in the report template are as follows: the income of 2019 of this department of the university is 4300 yuan per month; among them, the 4001-. Where, <% B ═ val ({ row: num ═ 3}, { out: format ([ proportion ], "%") })% > is a placeholder, B in the placeholder is an identifier of a processing method, val ({ row: num ═ 3}, { out: format ([ proportion ], "%") represents a syntax tree of the processing method, and a specific syntax tree can be shown in fig. 5, where this syntax tree represents that, in a processing result corresponding to the processing method identified as B, the third row of data corresponding to the proportion field is data replacing the placeholder. Therefore, in step S104, when analyzing the included content of <% > for the report template, it may be determined that the placeholder needs to be replaced, and then analyze the left identifier B in <% >, and determine the processing result of the processing method that the placeholder corresponds to the identifier B, specifically, it may be a Table object, and then analyze the right content in <% >, and determine a syntax tree, and then search for the third row data of the Table object based on the syntax tree, and locate the data corresponding to the "duty ratio" field in the third row according to the out tag, and replace the placeholder with the result obtained after formatting the data into the "%" form.
As another example, a graph portion may be included in the report template, and the template information may be expressed as { { c-number: B } }. Wherein c represents the identifier of the graph, B represents the identifier of the processing method, and the number represents the graph type.
Therefore, in step S104, the report template is analyzed to determine that B can determine that the graph identified by c corresponds to the processing result of the processing method B, where the processing result may specifically be a Table object, and then the Table object is inserted into the graph identified by c-number to serve as a data source, and then a placeholder in the graph is located. The specific results obtained can be seen in fig. 3.
In the embodiment of the invention, after the model base is established in advance, the result report can be generated without manual parameters, different processing models can be established in the model base aiming at different target files, and the problem that the newly established model can be solved in a mode of multiplexing and slightly modifying the original model can be solved, so that the service flexibility is improved.
In the embodiment of the present invention, the processing system of the document information may specifically include an ROS system, an analysis engine, a composition engine, and a database. The ROS system can be used for interacting with the user side, processing data sent by the user side and returning a processing result to the user side; the analysis engine can be used for analyzing the target file through the created model to obtain an analysis result (processing result); the composition engine may be used to generate a results report in conjunction with the report template and the analysis results; various data may be stored in the database, such as created models, report templates, result reports, and so forth. The user side can comprise a user terminal, a modeling user can perform data interaction with the ROS system through the user terminal, and the modeling user represents a user needing to establish a model and process a target file. Specifically, the overall flow of the file information processing system executing the embodiment of the present invention may be as shown in fig. 6.
In FIG. 6, the modeling user sends information to the ROS system to create a model M, which may be as shown in FIG. 2, which the ROS system may store in a database after the model is created. After the model creation is completed, the modeling user may analyze the target file using the created model, that is, the analysis model M process in fig. 6, the modeling user may send the target file in the analysis model M step, the ROS system transmits the data sent by the modeling user to the analysis engine, the analysis engine may process the target file through the created model M (the analysis engine may obtain the created model M from the database) and obtain an analysis result (which is equivalent to the processing result in step S103), and then transmit the analysis result to the ROS system, the ROS system may return the analysis result to the modeling user, and the analysis result may be a two-dimensional table, such as an excel format file. The modeling user can also upload a report template T corresponding to the model M to the ROS through the user terminal, the report template can include placeholders for identifying that the position needs to be filled with data in the analysis result, the ROS can store the report template T into the database after receiving the report template T, the database can establish a corresponding relation with the model M or store the report template T into the model M when storing the template T, and the process of uploading and storing the report template T can be executed before the process of analyzing the model M. After obtaining the analysis result and uploading the report model T, the modeling user can request to generate a result report, the ROS system transmits the result report generation request to the writing engine, the writing engine can obtain the analysis result from the analysis engine, and takes out the placeholder by analyzing the template information (template formula) in the report template T, and adapts the data in the analysis result to fill in the generated result report (the result report can be in a document format), so as to form a new document object, and then the result report is returned to the ROS system, and the ROS system can return the result report to the modeling user.
It should be noted that the report template may be a word document, which uses fixed text to form a basic structure and is filled with placeholders at positions needing to be changed. The embodiment of the invention automatically generates the final result report in a report template and custom grammar mode, and can improve the production efficiency of the report.
The analysis engine may use a combination of python and pandas to implement the corresponding functionality, the data analysis class library of pandas, which may provide a large number of functions for data manipulation and analysis.
In order to solve the problems in the prior art, an embodiment of the present invention provides an apparatus 700 for processing file information, as shown in fig. 7, the apparatus 700 includes:
an acquisition unit 701 configured to acquire file information of a target file;
a screening unit 702, configured to screen a processing model corresponding to the target file from a model library according to the file information, where the processing model includes a report template and at least one processing method;
a processing unit 703, configured to process the target file according to each processing method, respectively, to obtain a processing result corresponding to each processing method;
a generating unit 704, configured to generate a result report corresponding to the target file according to the report template and the processing result corresponding to each processing method.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 1, and the description thereof is omitted.
In an implementation manner of the embodiment of the present invention, the obtaining unit 701 is further configured to obtain a target report template corresponding to the target file;
the apparatus 700 further comprises:
a determining unit configured to determine each processing method required for processing the target document, based on template information included in the report template;
and the establishing unit is used for establishing a processing model corresponding to the target file according to each processing method required by the processing of the target file.
In yet another implementation manner of the embodiment of the present invention, the report template includes template information corresponding to each processing method, where the template information includes placeholders and fields corresponding to each placeholder; the processing result comprises at least one result field and result data corresponding to each result field;
the generating unit 704 is specifically configured to: determining a processing result corresponding to each template information according to the corresponding relation between the template information and the processing method; for each placeholder in the template information, screening a first field identical to a field corresponding to each placeholder from result fields included in a processing result corresponding to the template information, and replacing each placeholder in the template information with result data corresponding to the first field.
In another implementation manner of the embodiment of the present invention, the target file includes fields and data corresponding to each of the fields;
the processing method comprises a field to be processed and processing information corresponding to the field to be processed;
the processing unit 703 is specifically configured to: for each processing method, screening a second field which is the same as the field to be processed from the field of the target file, and processing the second field and/or data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain a processing result corresponding to the processing method.
In another implementation manner of the embodiment of the present invention, the processing information corresponding to the field to be processed includes a corresponding relationship between the field to be processed and the replacement field;
the processing unit 703 is specifically configured to: and replacing the second field in the target file with the replacement field according to the corresponding relation between the field to be processed and the replacement field to obtain a processing result corresponding to the processing method.
In another implementation manner of the embodiment of the present invention, the processing information corresponding to the field to be processed includes a screening condition for the data corresponding to the field to be processed;
the processing unit 703 is specifically configured to:
and screening the data corresponding to the second field according to the screening condition to obtain a screening result, and determining the screening result as a processing result corresponding to the processing method.
In another implementation manner of the embodiment of the present invention, the processing information corresponding to the field to be processed includes a statistical condition and a newly added statistical field;
the processing unit 703 is specifically configured to:
and according to the statistical conditions, sequentially determining the statistical results of the data corresponding to the second field, and adding the newly added statistical field and the data corresponding to the newly added statistical field into the target file, wherein the data corresponding to the newly added statistical field is the statistical results of the data corresponding to the second field.
In another implementation manner of the embodiment of the present invention, the processing information corresponding to the field to be processed includes a deletion condition; the processing unit 703 is specifically configured to: and determining data to be deleted in the data corresponding to the second field according to the deletion condition, and deleting the data to be deleted to obtain a processing result corresponding to the processing method.
In another implementation manner of the embodiment of the present invention, the processing unit 703 is specifically configured to:
the processing method comprises a first method, a second method and a third method; the processing result comprises a result field and result data corresponding to the result field; the third method comprises a field to be processed of a processing result corresponding to the first method, a field to be processed of a processing result corresponding to the second method and processing information of the third method;
the processing unit is specifically configured to: processing the target file according to the first processing method to obtain a first processing result corresponding to the first processing method, and processing the target file according to the first processing method to obtain a second processing result corresponding to the second processing method; screening a third field which is the same as a field to be processed of the processing result corresponding to the first method from the first processing result, and screening a fourth field which is the same as the field to be processed of the processing result corresponding to the second method from the second processing result; and processing result data corresponding to the third field in the first processing result and result data corresponding to the third field in the first processing result according to the processing information of the third method to obtain a processing result corresponding to the processing method.
It should be understood that the embodiment of the present invention is implemented in the same manner as the embodiment shown in fig. 1 and 6, and is not repeated herein.
In the embodiment of the invention, for the target file, the corresponding processing model can be screened out from the model library through the file information, the target file is processed according to the processing method included by the processing model to obtain the processing result, and then the result report is directly generated according to the report template and the processing result. Therefore, in the embodiment of the invention, the corresponding result report of the target file can be obtained through the processing model without manual participation, thereby reducing errors caused by manual operation and improving the processing efficiency of the target file.
The invention also provides an electronic device and a readable storage medium according to the embodiment of the invention.
The electronic device of the present invention includes: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute the file information processing method provided by the embodiment of the invention.
Fig. 8 shows an exemplary system architecture 800 of a file information processing method or a file information processing apparatus to which an embodiment of the present invention can be applied.
As shown in fig. 8, the system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. Network 804 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 801, 802, 803 to interact with a server 805 over a network 804 to receive or send messages, such as to create a process model. Various client applications may be installed on the terminal devices 801, 802, 803, and the target file may be sent to the server 805.
The terminal devices 801, 802, 803 may be, but are not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
Server 805, which may be a server providing various services, may generate a result report for a received target document and feed the result report back to the terminal device.
It should be noted that the processing method of the file information provided by the embodiment of the present invention is generally executed by the server 805, and accordingly, the processing device of the file information is generally disposed in the server 805.
It should be understood that the number of terminal devices, networks, and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, a block diagram of a computer system 900 suitable for implementing embodiments of the present invention is shown. The computer system illustrated in FIG. 9 is only an example and should not impose any limitations on the scope of use or functionality of embodiments of the invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a screening determination unit, a processing unit, and a generation unit. Where the names of these units do not in some cases constitute a limitation of the unit itself, for example, an acquisition unit may also be described as a "unit of the function of the acquisition unit".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the file information processing method provided by the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for processing file information is characterized by comprising the following steps:
acquiring file information of a target file;
screening a processing model corresponding to the target file from a model library according to the file information, wherein the processing model comprises a report template and at least one processing method;
respectively processing the target file according to the processing methods to obtain processing results corresponding to the processing methods;
and generating a result report corresponding to the target file according to the report template and the processing result corresponding to each processing method.
2. The method according to claim 1, further comprising, before the obtaining the file information of the target file:
acquiring a report template corresponding to the target file;
determining each processing method required for processing the target file according to the template information included in the report template;
and establishing a processing model corresponding to the target file according to each processing method required for processing the target file.
3. The method of claim 1 or 2, wherein the report template includes template information corresponding to each of the processing methods, the template information including placeholders and fields corresponding to each of the placeholders;
the processing result comprises at least one result field and result data corresponding to each result field;
generating a result report corresponding to the target file according to the report template and the processing result corresponding to each processing method, wherein the generating of the result report corresponding to the target file comprises the following steps:
determining a processing result corresponding to each template information according to the corresponding relation between the template information and the processing method;
for each placeholder in the template information, screening a first field identical to a field corresponding to each placeholder from result fields included in a processing result corresponding to the template information, and replacing each placeholder in the template information with result data corresponding to the first field.
4. The method of claim 1, wherein the target file includes fields and data corresponding to each of the fields;
the processing method comprises a field to be processed and processing information corresponding to the field to be processed;
processing the target file according to each processing method to obtain a processing result corresponding to each processing method, wherein the processing result comprises the following steps:
for each processing method, screening a second field which is the same as the field to be processed from the field of the target file, and processing the second field and/or data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain a processing result corresponding to the processing method.
5. The method according to claim 4, wherein the processing information corresponding to the field to be processed comprises a correspondence between the field to be processed and the replacement field;
the processing the second field and/or the data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain the processing result corresponding to the processing method includes:
and replacing the second field in the target file with the replacement field according to the corresponding relation between the field to be processed and the replacement field to obtain a processing result corresponding to the processing method.
6. The method according to claim 4, wherein the processing information corresponding to the field to be processed comprises a statistical condition and a newly added statistical field;
the processing the second field and/or the data corresponding to the second field according to the processing information corresponding to the field to be processed to obtain the processing result corresponding to the processing method includes:
and according to the statistical conditions, sequentially determining the statistical results of the data corresponding to the second field, and adding the newly added statistical field and the data corresponding to the newly added statistical field into the target file, wherein the data corresponding to the newly added statistical field is the statistical results of the data corresponding to the second field.
7. The method of claim 1, wherein the processing method comprises a first method, a second method, and a third method; the processing result comprises a result field and result data corresponding to the result field;
the third method comprises a field to be processed of a processing result corresponding to the first method, a field to be processed of a processing result corresponding to the second method and processing information of the third method;
processing the target file according to each processing method to obtain a processing result corresponding to each processing method, wherein the processing result comprises the following steps:
processing the target file according to the first processing method to obtain a first processing result corresponding to the first processing method, and processing the target file according to the first processing method to obtain a second processing result corresponding to the second processing method;
screening a third field which is the same as a field to be processed of the processing result corresponding to the first method from the first processing result, and screening a fourth field which is the same as the field to be processed of the processing result corresponding to the second method from the second processing result;
and processing result data corresponding to the third field in the first processing result and result data corresponding to the third field in the first processing result according to the processing information of the third method to obtain a processing result corresponding to the processing method.
8. An apparatus for processing file information, comprising:
an acquisition unit configured to acquire file information of a target file;
the screening unit is used for screening a processing model corresponding to the target file from a model library according to the file information, and the processing model comprises a report template and at least one processing method;
the processing unit is used for respectively processing the target file according to each processing method to obtain a processing result corresponding to each processing method;
and the generating unit is used for generating a result report corresponding to the target file according to the report template and the processing result corresponding to each processing method.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202011186893.5A 2020-10-29 2020-10-29 File information processing method and device, electronic equipment and storage medium Pending CN112364617A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011186893.5A CN112364617A (en) 2020-10-29 2020-10-29 File information processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011186893.5A CN112364617A (en) 2020-10-29 2020-10-29 File information processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112364617A true CN112364617A (en) 2021-02-12

Family

ID=74513765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011186893.5A Pending CN112364617A (en) 2020-10-29 2020-10-29 File information processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112364617A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094331A (en) * 2021-03-30 2021-07-09 联想(北京)有限公司 Processing method and device
CN115270748A (en) * 2022-07-25 2022-11-01 中化现代农业有限公司 File generation method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160092656A1 (en) * 2014-09-30 2016-03-31 Karlheinz Glaser-Seidnitzer Method, apparatus, and computer program product for preparing a medical report
CN107590115A (en) * 2017-09-13 2018-01-16 北京勤哲软件技术有限责任公司 A kind of Word report automatic generation methods and device
CN109165378A (en) * 2018-08-15 2019-01-08 北京天安智慧信息技术有限公司 Sophisticated functions Report Customization method and system
CN109471890A (en) * 2018-10-16 2019-03-15 深圳壹账通智能科技有限公司 Generation method, terminal device and the medium of report file
CN109657225A (en) * 2018-09-27 2019-04-19 深圳壹账通智能科技有限公司 Data integration method, device, terminal and storage medium
CN111178027A (en) * 2019-12-09 2020-05-19 北京尊冠科技有限公司 Report generation system and method based on online creation template and online specified data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160092656A1 (en) * 2014-09-30 2016-03-31 Karlheinz Glaser-Seidnitzer Method, apparatus, and computer program product for preparing a medical report
CN107590115A (en) * 2017-09-13 2018-01-16 北京勤哲软件技术有限责任公司 A kind of Word report automatic generation methods and device
CN109165378A (en) * 2018-08-15 2019-01-08 北京天安智慧信息技术有限公司 Sophisticated functions Report Customization method and system
CN109657225A (en) * 2018-09-27 2019-04-19 深圳壹账通智能科技有限公司 Data integration method, device, terminal and storage medium
CN109471890A (en) * 2018-10-16 2019-03-15 深圳壹账通智能科技有限公司 Generation method, terminal device and the medium of report file
CN111178027A (en) * 2019-12-09 2020-05-19 北京尊冠科技有限公司 Report generation system and method based on online creation template and online specified data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张静靖 等: "传染病监测分析报告的WORD文档自动生成", 预防医学情报杂志, vol. 26, no. 05, pages 393 - 396 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094331A (en) * 2021-03-30 2021-07-09 联想(北京)有限公司 Processing method and device
CN115270748A (en) * 2022-07-25 2022-11-01 中化现代农业有限公司 File generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105144080B (en) System for metadata management
CN109871311B (en) Method and device for recommending test cases
CN108897874B (en) Method and apparatus for processing data
US9928288B2 (en) Automatic modeling of column and pivot table layout tabular data
CN110689268B (en) Method and device for extracting indexes
CN110019367B (en) Method and device for counting data characteristics
CN112364617A (en) File information processing method and device, electronic equipment and storage medium
CN113485781A (en) Report generation method and device, electronic equipment and computer readable medium
CN110738038A (en) Contract text generation method, device, equipment and computer readable storage medium
CN111143577A (en) Data annotation method, device and system
CN113434527B (en) Data processing method, device, electronic equipment and storage medium
CN113190517B (en) Data integration method and device, electronic equipment and computer readable medium
CN114282129A (en) Information system page generation method, system, electronic equipment and storage medium
US20210124752A1 (en) System for Data Collection, Aggregation, Storage, Verification and Analytics with User Interface
CN113536748A (en) Method and device for generating chart data
CN116244387A (en) Entity relationship construction method, device, electronic equipment and storage medium
CN114817297A (en) Method and device for processing data
CN110889013B (en) Data association method, device, server and storage medium based on XML
US9489438B2 (en) Systems and methods for visualizing master data services information
CN117076515B (en) Metadata tracing method and device in medical management system, server and storage medium
US11443108B2 (en) System and method for document management using branching
CN111832304B (en) Weight checking method and device for building names, electronic equipment and storage medium
CN109062903B (en) Method and apparatus for correcting wrongly written words
CN113110873A (en) Method and apparatus for unifying system coding specifications
CN116127930A (en) Report generation method and device, and data statistics method and device

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