New report automatic generation method and system based on data feature learning
By introducing an automatic report generation method based on data feature learning in the report generation system, the problems of low report generation efficiency and difficult identification in the existing technology are solved, and more efficient and accurate report generation is achieved.
Patent Information
- Application Number
- CN202411804831.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-12-10
AI Technical Summary
In the prior art, report generation depends on preset templates or requires manual definition of report format, which makes it difficult to identify and low generation efficiency.
By receiving new report requests uploaded by the user, the report layout feature extraction network uses the report layout feature extraction network to analyze PDF attachments, extract layout features, and match materials through the report template library to generate new report templates.
It improves the efficiency and accuracy of report generation, reduces human intervention and errors, and enhances the flexibility and adaptability of the system.
Smart Images

Figure CN119294379B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for automatically generating new reports based on data feature learning. Background Art
[0002] With the continuous growth of data volume and the increase of business complexity, the traditional manual report making method is not only inefficient but also prone to human errors. At present, some report generation technologies have adopted template-based automated design methods. These methods realize the automatic generation of predefined format reports by setting fixed template styles and data formats. At the same time, there are also some report generation systems based on natural language processing and machine learning that can automatically generate simple reports according to user needs.
[0003] Most existing technologies rely on preset templates, or require manual definition of report formats, lack flexibility and adaptability, and have technical problems such as difficulty in identification and low generation efficiency. Summary of the invention
[0004] The present invention provides a method and system for automatically generating new reports based on data feature learning, so as to solve the technical problems of high recognition difficulty and low generation efficiency in the prior art, and achieve the technical effect of improving generation efficiency and accuracy.
[0005] In a first aspect, the present invention provides a method for automatically generating a new report based on data feature learning, wherein the method comprises:
[0006] A new report request uploaded by a user is received, wherein the new report request has a new report PDF attachment.
[0007] The report layout feature extraction network is used to perform report layout analysis on the newly added report PDF attachment to obtain the newly added report layout features.
[0008] Through the report template library, material matching is performed on the newly added report layout feature to obtain a report material matching result, wherein the report material matching result has a layout position tag.
[0009] According to the layout position tag, the report material matching results are spliced to obtain a new report template, and the report template library is added and generated.
[0010] In a second aspect, the present invention further provides a new report automatic generation system based on data feature learning, wherein the system comprises:
[0011] The request acquisition module is used to receive a new report request uploaded by a user, wherein the new report request has a new report PDF attachment.
[0012] The report layout analysis module is used to perform report layout analysis on the newly added report PDF attachment through a report layout feature extraction network to obtain the newly added report layout features.
[0013] A report material matching module is used to perform material matching on the newly added report layout feature through a report template library to obtain a report material matching result, wherein the report material matching result has a layout position tag.
[0014] A report template generation module is used to splice the report material matching results according to the layout position label, obtain a new report template, and add and generate the report template library.
[0015] The present invention discloses a method and system for automatically generating new reports based on data feature learning, comprising: receiving a new report request uploaded by a user end, the request containing a new report PDF attachment. Performing layout analysis on the new report PDF attachment through a report layout feature extraction network, and extracting layout features of the new report. Using a report template library, performing material matching according to the layout features of the new report, obtaining a report material matching result, the result containing a layout position tag. According to the layout position tag, splicing the report material matching results, generating a new report template, and adding the template to the report template library. The method and system for automatically generating new reports based on data feature learning disclosed by the present invention solve the technical problems of high recognition difficulty and low generation efficiency, and achieve the technical effect of improving generation efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flow chart of the method for automatically generating a new report based on data feature learning of the present invention;
[0017] Figure 2 It is a structural diagram of the new report automatic generation system based on data feature learning of the present invention.
[0018] Description of the accompanying drawings: request acquisition module 11, report layout analysis module 12, report material matching module 13, report template generation module 14. DETAILED DESCRIPTION
[0019] The technical solution provided in the embodiments of the present invention is to solve the technical problems of high recognition difficulty and low generation efficiency in the prior art. The overall idea adopted is as follows:
[0020] First, a new report request uploaded by a user is received, wherein the new report request has a new report PDF attachment; then, a report layout analysis is performed on the new report PDF attachment through a report layout feature extraction network to obtain a new report layout feature; then, a material matching is performed on the new report layout feature through a report template library to obtain a report material matching result, wherein the report material matching result has a layout position tag; then, according to the layout position tag, the report material matching results are spliced to obtain a new report template, and the report template library is added to generate the report template library.
[0021] The above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods of the specification to better understand the above technical solution. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments of the present invention. It should be understood that the present invention is not limited to the example embodiments used only to explain the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In addition, it should be noted that, for the convenience of description, only the parts related to the present invention are shown in the drawings, rather than all of them.
[0022] Embodiment 1:
[0023] Figure 1 The figure is a flow chart of a method for automatically generating a new report based on data feature learning according to the present invention, wherein the method comprises:
[0024] A new report request uploaded by a user is received, wherein the new report request has a new report PDF attachment.
[0025] Specifically, first, a new report request containing new report information is obtained through the user end, and the new report request includes a PDF attachment of the new report. Optionally, the new report request includes necessary fields of the request, such as report name, report type, time range, additional remarks, etc., and the PDF attachment is an additional file of the new report request, which contains detailed report data or content.
[0026] Specifically, after receiving a new report request, the request information and the storage path or ID of the PDF attachment are saved in the database, and a unique identifier (ID) should be created for each report request to facilitate subsequent tracking, querying and operation of the report.
[0027] Optionally, after successfully receiving the new report request, a confirmation message is sent to the user to notify the user that the request has been successfully submitted, such as returning a status code or message to inform the user that the report request has been received and processing has begun.
[0028] The report layout feature extraction network is used to perform report layout analysis on the newly added report PDF attachment to obtain the newly added report layout features.
[0029] Specifically, the report layout feature extraction network is a neural network based on deep learning, which is used to parse the newly added report PDF attachment and obtain the newly added report layout features in the newly added report PDF attachment. Optionally, the newly added report layout features include text area layout features, table layout features, image or chart area, report structure identifier, etc., and the newly added report layout features are represented as structured data (such as JSON or XML format), so as to provide clear and accurate layout information for subsequent report construction.
[0030] In some embodiments, a report layout feature extraction network is used to perform report layout analysis on the newly added report PDF attachment to obtain the newly added report layout features, including:
[0031] The report layout feature extraction network includes a row connection point identification layer and a connection line fitting layer; the newly added report PDF attachment is converted into a newly added report digital image; according to the connection point identification layer, the connection points of the newly added report digital image are identified to obtain a connection point identification image, wherein the connection points represent the points where straight lines intersect; according to the connection line fitting layer, the connection point identification image and the image pixel coordinate identification are fitted with connection lines to obtain the newly added report layout features.
[0032] Specifically, the row connection point identification layer is mainly responsible for identifying and marking the connection points between each row in the report. The connection point identification corresponds to the separation or connection area between rows in the table, which helps to distinguish different rows and columns in the report, as well as the connection between these rows and columns.
[0033] Specifically, the connection line fitting layer is used to accurately fit the extracted layout features such as row connection points and column connection points. That is, according to the extracted connection points, table boundaries and other layout features, connection lines are fitted to accurately identify the structure of various layout relationships in the report.
[0034] Specifically, first, the newly added report PDF attachment is converted into a new report digital image. The new report digital image obtained after conversion contains all graphic elements and text content of the report, laying the foundation for the subsequent layout analysis. This is because the report layout feature extraction network based on neural network is more suitable for processing image data rather than directly operating PDF files.
[0035] Specifically, connection points of the newly added report digital image are identified in the connection point identification layer, wherein connection points are usually formed by the intersection of graphic elements (such as lines, table separators, etc.). In particular, connection points usually appear between rows, between columns or on the boundaries of tables. By marking the connection points, the structure of the table can be clearly identified; the connection point identification image is an image that marks all connection points. Optionally, the connection point identification image marks each connection point with different colors or marks. Each connection point represents a row, column separator or boundary point, which serves as the basis for subsequent layout fitting.
[0036] Specifically, according to the connection line fitting layer, connection line fitting is performed on the connection point identification image and the image pixel coordinate identification to obtain the newly added report layout feature.
[0037] The connection line fitting layer further analyzes the connection point identification image and the pixel coordinate identification of the image, and fits the connection lines to help understand the relationship between the connection points in the image, determine the position and boundaries of tables, text boxes and other layout elements, and the layout features obtained by connection line fitting include the geometric information of all recognized tables, titles, paragraphs, row and column separators, etc. These layout features can help the system understand the structure of the report and divide the data area and non-data area.
[0038] Through the row connection point identification layer and the connection line fitting layer, the report layout feature extraction network can efficiently identify and extract the layout features in the newly added report PDF attachments, providing structured information for subsequent data extraction and analysis. It is suitable for both standardized reports and reports in complex formats, and helps to improve the automation and intelligence level of report generation.
[0039] In some implementations, it is characterized in that, according to the connection point identification layer, the connection point identification is performed on the newly added report digital image to obtain the connection point identification image, including:
[0040] Collect a report digital image dataset; annotate the connection points of the report digital image dataset to obtain a connection point supervision image dataset; and construct a connection point identification loss function:
[0041] ;
[0042] in, Characterizes the connection point identification loss value, Characterize the connection point identification position, Characterize the location of the connection point supervision, The number of intersection points that represent the connection point identification position and the connection point supervision position, The number of points representing the union of connection point identification positions and connection point supervision positions; using the connection point supervision image dataset as supervision and the report digital image dataset as input, a convolutional neural network is trained based on the connection point identification loss function to obtain the connection point identification layer.
[0043] Specifically, first, the interactive report construction record is used for data collection to obtain a report digital image dataset containing multiple sample report digital image data, which is the original sample dataset; then, the connection points of the report digital image dataset are annotated to generate a connection point supervision image dataset, which represents the expected correct connection point identification results.
[0044] Specifically, a connection point identification loss function is defined, which is used to measure the difference between the connection point positions predicted by the model and the connection point positions in the connection point supervision image dataset (the true value of the connection point position).
[0045] Furthermore, a convolutional neural network (CNN) is used as a basic model, and the learning rate, optimizer, etc. of the basic model are set. In particular, the loss function of the basic model is the connection point identification loss function defined above; then, a connection point supervision image dataset is used as supervision (i.e., the desired output) and a report digital image dataset is used as input to train the convolutional neural network so that the basic model learns how to predict the location of the connection point based on the input report image; the above-mentioned basic model is iteratively trained, and when the model performance of the basic model meets the preset performance target, the basic model is output as a connection point identification layer that can identify connection points.
[0046] The above steps, by using CNN and a specific loss function, can effectively learn and identify connection points in report images, thereby improving the accuracy and efficiency of connection point recognition while reducing the possibility of manual intervention and manual errors.
[0047] In some implementations, performing connection line fitting on the connection point identification image and the image pixel coordinate identification according to the connection line fitting layer to obtain the newly added report layout feature includes:
[0048] According to the connection point identification image, extract the first connection line segment with the first connection point and the second connection point at both ends; based on the first connection point, extract the second connection line segment with the first connection point and the third connection point at both ends; based on the second connection point, extract the third connection line segment with the second connection point and the fourth connection point at both ends; when the first connection line segment and the second connection line segment are in the same straight line, merge the first connection line segment and the second connection line segment into a fourth connection line segment with the second connection point and the third connection point at both ends; when the third connection line segment and the second connection line segment are in the same straight line, merge the third connection line segment and the second connection line segment into a fifth connection line segment with the first connection point and the third connection point at both ends; continue fitting based on the fourth connection line segment and the fifth connection line segment until any connection line segment has no adjacent line segment in the same straight line, and output the connection line identification result; according to the image pixel coordinate identification, perform layout coordinate calibration on the connection line identification result to generate the newly added report layout feature.
[0049] Specifically, first, all the connecting line segments are extracted according to the connecting point identification image. Each connecting line segment has two connecting points at both ends. Exemplarily, a first connecting line segment with a first connecting point and a second connecting point at both ends is extracted, and based on the first connecting point, a second connecting line segment with a first connecting point and a third connecting point at both ends is extracted, and based on the second connecting point, a third connecting line segment with a second connecting point and a fourth connecting point at both ends is extracted. In other words, the second connecting line segment, the first connecting line segment, and the third connecting line segment are three line segments connected end to end in sequence, and the first connecting point and the second connecting point are common connecting points.
[0050] Specifically, if any two connecting line segments are on the same straight line, the two connecting line segments are merged into a new connecting line segment. For example, if the first connecting line segment and the second connecting line segment are on the same straight line, they are merged into a fourth connecting line segment with the second connecting point and the third connecting point at both ends; if the third connecting line segment and the second connecting line segment are on the same straight line, they are merged into a fifth connecting line segment with the first connecting point and the third connecting point at both ends.
[0051] Furthermore, the above merging operation is continued based on the newly generated connecting line segments (such as the fourth connecting line segment and the fifth connecting line segment) until any connecting line segment has no adjacent line segments on the same straight line, and the merged connecting line segments are output as the connecting line identification result.
[0052] Specifically, according to the image pixel coordinate identification, the connection line identification result is calibrated for layout coordinates, the connection line identification result is converted into actual layout coordinates, and new report layout features are generated, thereby ensuring that the identified features can be used in the actual report layout.
[0053] Through the report template library, material matching is performed on the newly added report layout feature to obtain a report material matching result, wherein the report material matching result has a layout position tag.
[0054] Specifically, access the report template library to match materials, extract available materials with high matching degree from existing report templates as report material matching results, and then achieve efficient extraction and reuse of existing materials, which helps to improve the efficiency of material acquisition and improve the quality consistency of subsequent generated reports with existing reports.
[0055] In some embodiments, material matching is performed on the newly added report layout feature through a report template library to obtain a report material matching result, wherein the report material matching result has a layout position tag, including:
[0056] According to the report template library, a first report template is extracted, wherein the first report template has a first report layout feature; the first report layout feature is compared with the newly added report layout feature to obtain an overlapping layout area, wherein the overlapping layout area has the layout position tag in the newly added report layout feature; the first report template is segmented according to the overlapping layout area to obtain an overlapping layout area template; the overlapping layout area template is added to the report material matching result, and the layout position tag is associated with the report material matching result and stored.
[0057] Specifically, first, a first report template is randomly extracted from an existing report template library. The template has predefined first report layout features, including information such as report structure elements, layout arrangement, data area, etc. In other words, the first report template represents a standard or common report format for subsequent matching and adjustment.
[0058] Specifically, the layout features of the newly added report extracted from the newly added report PDF file are compared with the layout features of the first report template, and similar parts between the two are identified by comparing the size, position, structure and other features of each element. Optionally, this process is performed through deep learning or pattern recognition technology to determine which areas have similar layouts and structures. Among them, the overlapping layout area has a layout position label in the newly added report layout features, which is used to indicate the position of the area in the newly added report and the corresponding data type.
[0059] Specifically, based on the overlapping layout area, the first report template is segmented to obtain the overlapping layout area template. The segmentation process extracts the part related to the overlapping layout area in the first report template to form a new template segment suitable for similar layout areas in the newly added report.
[0060] Specifically, the overlapping layout area template obtained by segmentation is added to the report material matching result, and stored in association with the corresponding layout position label. The final matching result (including the overlapping layout area template and layout position label) is stored in the report template library to provide support for the subsequent generation of new reports.
[0061] Through the above method, it is possible to automatically generate matching results based on the similarity between the layout characteristics of the newly added report and the first report template, and accurately locate the position and content of each area in the newly added report, which can not only accelerate the automatic generation of subsequent reports, but also gradually enrich the diversity and adaptability of the template library.
[0062] According to the layout position tag, the report material matching results are spliced to obtain a new report template, and the report template library is added and generated.
[0063] Specifically, with the layout position label as the target position, multiple overlapping layout area templates in the report material matching result are located and spliced to obtain a new report template, wherein the splicing process involves translation, rotation and scaling of multiple overlapping layout area templates.
[0064] In some embodiments, according to the layout position tag, the report material matching results are spliced to obtain a new report template, and the report template library is added and generated, further comprising:
[0065] Determine whether the layout position tag covers the newly added report layout features; when the layout position tag does not cover the newly added report layout features, obtain the vacant area report layout features; process the vacant area report layout features through a vector diagram conversion model to generate a vacant area report vector diagram; according to the layout position tag, splice the report material matching result and the vacant area report vector diagram to obtain the newly added report template, and add and generate the report template library.
[0066] Specifically, the missing area report layout feature is the area of the newly added report layout feature that has not been matched to the corresponding overlapping layout area template in the report template library; if the existence of the missing area report layout feature is confirmed through coverage judgment, the missing area report layout feature is processed through the vector map conversion model to generate the corresponding missing area report vector map, and according to the layout position label, the report material matching result and the missing area report vector map are spliced to obtain the newly added report template.
[0067] Through the above steps, combined with vector diagram conversion, it is possible to process layout features not covered by layout position labels, and complete report layout features in the missing areas of existing templates, thereby making the generated new report template more complete and accurate.
[0068] In some implementations, the layout features of the missing area report are processed by a vector graphics conversion model to generate a missing area report vector graphics, including:
[0069] Configure a report layout feature training data set and a report layout vector graph record data set to construct a vector graph conversion model training data set; divide the vector graph conversion model training data set into three equal parts to obtain a first vector graph conversion model training data set, a second vector graph conversion model training data set and a third vector graph conversion model training data set; according to the first vector graph conversion model training data set, input the report layout feature training data set into a deep convolutional neural network, supervise through the report layout vector graph record data set, and construct a first pre-vector graph conversion model; according to the second vector graph conversion model training data set, input the report layout feature training data set into a Transformer model, supervise through the report layout vector graph record data set, and construct a second pre-vector graph conversion model; use the first output of the first pre-vector graph conversion model and the second output of the second pre-vector graph conversion model as inputs of a deep convolutional neural network, supervise with the report layout vector graph record data set, and construct a post-vector graph conversion model; merge the first pre-vector graph conversion model, the second pre-vector graph conversion model and the post-vector graph conversion model to generate the vector graph conversion model.
[0070] Specifically, the report layout feature training dataset contains feature data after abstracting the layout information of the report, such as the layout information (position coordinates, size, color, font type) of elements such as tables, graphics, titles, fields, and text in the report; the table layout vector diagram record dataset converts the report layout features into vector diagram form, that is, the vector diagram representation of each element of the report.
[0071] Specifically, by using K-fold cross validation or direct division, the vector graph conversion model training data set is equally divided into three parts to obtain a first vector graph conversion model training data set, a second vector graph conversion model training data set, and a third vector graph conversion model training data set.
[0072] Specifically, a similar supervised learning method as mentioned above is adopted to construct a first front vector map conversion model through a convolutional neural network structure (such as ResNet, VGG), and the first front vector map conversion model training data set is used to train the first front vector map conversion model; then, based on the Transformer model, the second front vector map conversion model training data set is used as input to construct and train the second front vector map conversion model. The second front vector map conversion model based on the Transformer model can learn to obtain long-distance dependencies in report layout features, especially the positional relationship between different elements.
[0073] Specifically, the post-vector map conversion model is constructed based on a deep convolutional neural network and is used to integrate the output of the pre-model to improve the overall performance of the model. The post-vector map conversion model takes the output results of the first pre-vector map conversion model and the second pre-vector map conversion model as input to further refine the output. Optionally, the first output of the first pre-vector map conversion model and the second output of the second pre-vector map conversion model are combined through a fusion technology (such as splicing, weighted averaging, etc.).
[0074] Furthermore, by merging the first front vector map conversion model, the second front vector map conversion model and the post vector map conversion model, a multi-model joint vector map conversion model is constructed. The model can generate accurate vector map format output from the layout features of the missing area report, and has good scalability and efficient performance.
[0075] Optionally, the outputs of multiple models are combined into the final prediction result through ensemble learning merging methods (such as weighted averaging, voting mechanism, model fusion, etc.).
[0076] In summary, the method for automatically generating new reports based on data feature learning provided by the present invention has the following technical effects:
[0077] By receiving a new report request uploaded by the user, the request includes a new report PDF attachment. The layout of the new report PDF attachment is analyzed through the report layout feature extraction network, and the layout features of the new report are extracted from it. Using the report template library, the material is matched according to the layout features of the new report to obtain the report material matching result, which includes the layout position tag. According to the layout position tag, the report material matching results are spliced to generate a new report template, and the template is added to the report template library. Thereby achieving the technical effect of improving generation efficiency and accuracy.
[0078] Embodiment 2:
[0079] Figure 2 Schematic diagram of the structure of the new report automatic generation system based on data feature learning of the present invention. Figure 1 The flowchart of the method for automatically generating a new report based on data feature learning in the present invention can be shown as follows: Figure 2 The structure shown is implemented.
[0080] Based on the same concept as the method for automatically generating a new report based on data feature learning in the above embodiment, the present invention also provides a system for automatically generating a new report based on data feature learning, including:
[0081] The request acquisition module 11 is used to receive a new report request uploaded by a user, wherein the new report request has a new report PDF attachment.
[0082] The report layout analysis module 12 is used to perform report layout analysis on the newly added report PDF attachment through a report layout feature extraction network to obtain the newly added report layout features.
[0083] The report material matching module 13 is used to perform material matching on the newly added report layout feature through the report template library to obtain a report material matching result, wherein the report material matching result has a layout position tag.
[0084] The report template generation module 14 is used to splice the report material matching results according to the layout position tags, obtain a new report template, and add it to generate the report template library.
[0085] The report layout analysis module 12 includes:
[0086] The report image conversion unit is used to convert the newly added report PDF attachment into a newly added report digital image.
[0087] A connection point identification unit is used to identify the connection points of the newly added report digital image according to the connection point identification layer to obtain a connection point identification image, wherein the connection points represent the points where straight lines intersect.
[0088] A connection line fitting unit is used to perform connection line fitting on the connection point identification image and the image pixel coordinate identification according to the connection line fitting layer to obtain the newly added report layout feature.
[0089] In some implementations, the connection point identification unit in the report layout analysis module 12 includes:
[0090] The image acquisition unit is used to acquire the report digital image data set.
[0091] The connection point marking unit is used to mark the connection points of the report digital image data set to obtain a connection point supervision image data set.
[0092] Loss relation quantization unit, used to construct the connection point identification loss function:
[0093] ;
[0094] in, Characterizes the connection point identification loss value, Characterize the connection point identification position, Characterize the location of the connection point supervision, The number of intersection points that represent the connection point identification position and the connection point supervision position, The number of points that represent the union of the join point identification position and the join point supervision position.
[0095] An identification training unit is used to use the connection point supervision image dataset as supervision and the report digital image dataset as input, train a convolutional neural network based on the connection point identification loss function, and obtain the connection point identification layer.
[0096] In some implementations, the connection line fitting unit in the report layout analysis module 12 includes:
[0097] The connection line extraction unit is used to extract a first connection line segment with a first connection point and a second connection point at both ends according to the connection point identification image.
[0098] The second connection line extraction unit is used to extract a second connection line segment whose two ends are the first connection point and the third connection point based on the first connection point.
[0099] The third connection line extraction unit is used to extract a third connection line segment whose two ends are the second connection point and the fourth connection point based on the second connection point.
[0100] A connection line merging unit is used to merge the first connection line segment and the second connection line segment into a fourth connection line segment with the second connection point and the third connection point at both ends when the first connection line segment and the second connection line segment are on the same straight line.
[0101] A connection line merging unit is used to merge the third connection line segment and the second connection line segment into a fifth connection line segment with the first connection point and the third connection point at both ends when the third connection line segment and the second connection line segment are on the same straight line.
[0102] The connecting line fitting unit is used to continue fitting based on the fourth connecting line segment and the fifth connecting line segment until any connecting line segment has no adjacent line segment on the same straight line, and output a connecting line identification result.
[0103] A coordinate calibration unit is used to perform layout coordinate calibration on the connection line identification result according to the image pixel coordinate identification to generate the newly added report layout feature.
[0104] In some embodiments, the report material matching module 13 includes:
[0105] The report template extraction unit is used to extract a first report template according to the report template library, wherein the first report template has a first report layout feature.
[0106] The layout feature comparison unit is used to compare the first report layout feature with the newly added report layout feature to obtain an overlapping layout area, wherein the overlapping layout area has the layout position tag in the newly added report layout feature.
[0107] The report template segmentation unit is used to segment the first report template according to the overlapping layout area to obtain the overlapping layout area template.
[0108] The material matching result updating unit is used to add the overlapping layout area template into the report material matching result, and store the layout position tag in association with the report material matching result.
[0109] In some embodiments, the report template generation module 14 includes:
[0110] The layout position label coverage judgment unit is used to judge whether the layout position label covers the newly added report layout feature.
[0111] The missing area extraction unit is used to obtain the missing area report layout feature when the layout position label does not cover the newly added report layout feature.
[0112] The vector diagram generating unit is used to process the layout features of the vacant area report through a vector diagram conversion model to generate a vacant area report vector diagram.
[0113] The report template splicing unit is used to splice the report material matching result and the vacant area report vector diagram according to the layout position label, obtain the newly added report template, and add and generate the report template library.
[0114] In some implementations, the report template generation module 14 includes:
[0115] The training data set configuration unit is used to configure the report layout feature training data set and the report layout vector diagram record data set, and build the vector diagram conversion model training data set.
[0116] The training data set segmentation unit is used to divide the vector graph conversion model training data set into three equal parts to obtain a first vector graph conversion model training data set, a second vector graph conversion model training data set and a third vector graph conversion model training data set.
[0117] The first front-end vector graph conversion model construction unit is used to input the report layout feature training data set into a deep convolutional neural network according to the first vector graph conversion model training data set, supervise through the report layout vector graph record data set, and construct the first front-end vector graph conversion model.
[0118] The second front vector map conversion model construction unit is used to input the report layout feature training data set into the Transformer model according to the second vector map conversion model training data set, supervise through the report layout vector map record data set, and construct the second front vector map conversion model.
[0119] A post-vector map conversion model construction unit is used to use the first output of the first pre-vector map conversion model and the second output of the second pre-vector map conversion model as inputs of a deep convolutional neural network, supervised by the report layout vector map record data set, and construct a post-vector map conversion model.
[0120] The vector graphics conversion model merging unit is used to merge the first front vector graphics conversion model, the second front vector graphics conversion model and the rear vector graphics conversion model to generate the vector graphics conversion model.
[0121] It should be understood that the embodiments mentioned in this specification focus on their differences from other embodiments. The specific embodiments in the aforementioned embodiment one are also applicable to the new report automatic generation system based on data feature learning described in embodiment two. For the sake of brevity of the specification, they will not be further expanded here.
[0122] It should be understood that the embodiments disclosed in the present invention and the above description can enable those skilled in the art to use the present invention to implement the present invention. At the same time, the present invention is not limited to the above-mentioned embodiments. It should be understood that those skilled in the art can still modify the technical solutions recorded in the above-mentioned embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A new report automatic generation method based on data feature learning, characterized in that: include: Receiving a new report request uploaded by a user, wherein the new report request has a new report PDF attachment; Through the report layout feature extraction network, the report layout analysis is performed on the newly added report PDF attachment to obtain the newly added report layout features; Through the report template library, material matching is performed on the newly added report layout feature to obtain a report material matching result, wherein the report material matching result has a layout position tag; According to the layout position tag, the report material matching results are spliced to obtain a new report template, and the report template library is added and generated; The report layout feature extraction network is used to perform report layout analysis on the newly added report PDF attachment to obtain the newly added report layout features, including: The report layout feature extraction network includes a row connection point identification layer and a connection line fitting layer; Convert the newly added report PDF attachment into a digital image of the newly added report; According to the connection point identification layer, the connection points of the newly added report digital image are identified to obtain a connection point identification image, wherein the connection points represent the points where straight lines intersect; According to the connection line fitting layer, connection line fitting is performed on the connection point identification image and the image pixel coordinate identification to obtain the newly added report layout feature; Wherein, the newly added report layout feature is matched with materials through the report template library to obtain a report material matching result, wherein the report material matching result has a layout position tag, including: Extracting a first report template according to the report template library, wherein the first report template has a first report layout feature; Comparing the first report layout feature with the newly added report layout feature to obtain an overlapping layout area, wherein the overlapping layout area has the layout position tag in the newly added report layout feature; Segment the first report template according to the overlapping layout area to obtain an overlapping layout area template; Adding the overlapping layout area template to the report material matching result, and associating the layout position tag with the report material matching result for storage; The method is characterized in that, according to the layout position tag, the report material matching results are spliced to obtain a new report template, and the report template library is added and generated, and further includes: Determining whether the layout position label covers the newly added report layout feature; When the layout position tag does not cover the newly added report layout feature, obtaining the report layout feature of the vacant area; Processing the layout features of the vacant area report through a vector graph conversion model to generate a vacant area report vector graph; According to the layout position label, the report material matching result and the vacant area report vector diagram are spliced to obtain the newly added report template, and the report template library is added and generated.
2. The method according to claim 1, characterized in that According to the connection point identification layer, the connection point identification is performed on the newly added report digital image to obtain a connection point identification image, including: Collect report digital image data sets; Annotating the connection points of the report digital image dataset to obtain a connection point supervision image dataset; Construct the connection point identification loss function: ; in, Characterizes the connection point identification loss value, Characterize the connection point identification position, Characterize the location of the connection point supervision, The number of intersection points that represent the connection point identification position and the connection point supervision position, The number of points representing the union of the connection point identification position and the connection point supervision position; The connection point supervision image dataset is used as supervision, the report digital image dataset is used as input, and a convolutional neural network is trained based on the connection point identification loss function to obtain the connection point identification layer.
3. The method according to claim 1, characterized in that According to the connection line fitting layer, connection line fitting is performed on the connection point identification image and the image pixel coordinate identification to obtain the newly added report layout feature, including: Extracting a first connecting line segment having a first connecting point and a second connecting point at both ends according to the connecting point identification image; Based on the first connection point, extracting a second connection line segment with the first connection point and the third connection point at both ends; Based on the second connection point, extracting a third connection line segment whose two ends are the second connection point and the fourth connection point; When the first connecting line segment and the second connecting line segment are on the same straight line, merging the first connecting line segment and the second connecting line segment into a fourth connecting line segment with the second connecting point and the third connecting point at both ends; When the third connecting line segment and the second connecting line segment are on the same straight line, merging the third connecting line segment and the second connecting line segment into a fifth connecting line segment with the first connecting point and the third connecting point at both ends; Continue fitting based on the fourth connecting line segment and the fifth connecting line segment until any connecting line segment has no adjacent line segment on the same straight line, and output a connecting line identification result; According to the image pixel coordinate identification, the connection line identification result is calibrated with layout coordinates to generate the newly added report layout feature.
4. The method according to claim 1, characterized in that The layout features of the vacant area report are processed by a vector diagram conversion model to generate a vacant area report vector diagram, including: Configure the report layout feature training dataset and the report layout vector graph record dataset, and build the vector graph conversion model training dataset; Dividing the vector graph conversion model training data set into three equal parts to obtain a first vector graph conversion model training data set, a second vector graph conversion model training data set, and a third vector graph conversion model training data set; According to the first vector graph conversion model training data set, the report layout feature training data set is input into a deep convolutional neural network, supervised by the report layout vector graph record data set, and a first front vector graph conversion model is constructed; According to the second vector graph conversion model training data set, the report layout feature training data set is input into the Transformer model, and supervised by the report layout vector graph record data set to construct a second front vector graph conversion model; Using the first output of the first pre-vector map conversion model and the second output of the second pre-vector map conversion model as inputs of a deep convolutional neural network, using the report layout vector map record data set for supervision, and constructing a post-vector map conversion model; The first pre-vector graphics conversion model, the second pre-vector graphics conversion model and the post-vector graphics conversion model are combined to generate the vector graphics conversion model.
5. A new report automatic generation system based on data feature learning, characterized by: The system is used to execute the method for automatically generating a new report based on data feature learning according to any one of claims 1 to 4, and the system includes: A request acquisition module, the request acquisition module is used to receive a new report request uploaded by a user, wherein the new report request has a new report PDF attachment; A report layout analysis module, the report layout analysis module is used to perform report layout analysis on the newly added report PDF attachment through a report layout feature extraction network to obtain the newly added report layout features; A report material matching module, the report material matching module is used to perform material matching on the newly added report layout feature through a report template library to obtain a report material matching result, wherein the report material matching result has a layout position tag; A report template generation module is used to splice the report material matching results according to the layout position label, obtain a new report template, and add and generate the report template library.
Citation Information
Patent Citations
Report generation method and device, computer equipment and storage medium
CN115061721A
Report processing method and device, electronic equipment and storage medium
CN116738949A