Dynamic report file processing method

By dynamically analyzing and mapping report headers, horizontal splitting and multi-report merging methods are solved, and the problems of temporary report diversity and processing complexity are improved, and the efficiency and flexibility of report data processing are improved.

CN119647428APending Publication Date: 2025-03-18浪潮智慧城市科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411621777.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The prior art is difficult to effectively handle the diversity of temporary reports, including the multiple locations and forms of the header, as well as the complexity of splitting and merging reports.

Method used

Provide a dynamic report file processing method, which realizes flexible reporting processing by dynamically analyzing report headers, data mapping, horizontal splitting and multi-report merging.

Benefits of technology

提高了报表数据处理的效率,减轻了工作人员的复杂处理工作,能够动态分发和合并报表,适应不同应用场景的需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647428A_ABST
    Figure CN119647428A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic report file processing method, and relates to the technical field of data processing. Comprising the steps of 1, dynamically analyzing a header of a report based on a configuration mode: appointing the position and the starting range of the header of the report, analyzing header data into stored structured data and storing the structured data, and 2, performing data mapping on split key information: for different dynamic reports, performing field data mapping based on split fields, and storing the field data in the structured data. And step 3: field-based dynamic report splitting processing: configuring different fields to carry out report transverse splitting according to users of different application scenes, only distributing corresponding report field data to the corresponding users, and carrying out field-based dynamic report splitting processing on the basis of the field-based dynamic report field data. And 4, merging processing of multiple report files: based on the split reports, performing dynamic merging, performing deduplication on repeated data, determining whether to update the changed data or not by a user, and finally merging the changed data into a complete report file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a dynamic report file processing method, and relates to the technical field of data processing. Background Art

[0002] Many tasks are completed by filling in reports. Reports are not always fixed. We often need to process some temporary reports. Temporary reports come in various styles, and data storage and parsing are difficult. There are some main problems, such as: temporary report headers are various, some are on the top, some are on the left, right or bottom, and the headers may also be a combination of multiple rows or columns. There is no fixed header style;

[0003] Reports often require a report file to be split into multiple different reports according to different requirements and distributed to different people;

[0004] After the report data is submitted, the deduplication and merging processes are complicated, and merging the distributed sub-report files into the final required report files is complicated. Summary of the invention

[0005] The present invention aims at solving the problems in the prior art and provides a dynamic report file processing method, which realizes dynamic analysis, storage, splitting and merging of report files and is beneficial to improving the efficiency of processing report data.

[0006] The specific scheme proposed by the present invention is:

[0007] The present invention provides a dynamic report file processing method, comprising:

[0008] Step 1: Dynamically parse the report header based on the configuration:

[0009] Specify the location and starting range of the report header, parse the header data into structured data and store it.

[0010] Step 2: Data mapping of split key information:

[0011] For different dynamic reports, field data mapping is performed based on the split fields, non-standard data is mapped to standardized data, and data is split vertically based on the standardized data.

[0012] Step 3: Dynamic report splitting based on fields:

[0013] According to users in different application scenarios, different fields are configured to split the report horizontally, and only the corresponding report field data is distributed to the corresponding users.

[0014] Step 4: Merge multiple report files:

[0015] Based on the split reports, dynamic merging is performed to deduplicate duplicate data. For changed data, the user decides whether to update it, and finally merges it into a complete report file.

[0016] Furthermore, in step 1 of the dynamic report file processing method, when creating a report task, the location of the header file in the report is specified, including the top, left, right or bottom, and the start range of the report is specified.

[0017] In the header of the parsing report:

[0018] Parse the table header to form structured data, parse from the starting range, if it is parsed as a merged cell, record the starting row number of the cell and the number of rows and columns occupied, and use the cell content as the field name.

[0019] If the cell is not merged, record the starting position of the cell, and mark the row and column numbers as 1. When parsing to the next level, use the name of the previous level as the field prefix and add a field separation identifier. Use the above cell parsing method to parse them in sequence, and finally form structured header metadata and store them.

[0020] Further, step 2 of the dynamic report file processing method specifically includes:

[0021] When parsing report data, extract the row or column data where the keyword is located, and store all data with non-repeated data values. If data mapping rules already exist, they are automatically mapped and matched according to the existing data mapping rules. If no matching data mapping rules are found, only the parsed data is retained. Data mapping is performed before data splitting, and appropriate values ​​are selected from the standardized data for mapping and matching with the retained parsed data.

[0022] When all report fields are mapped and split vertically, each piece of data is divided into different categories based on the mapped standardized value to split the data.

[0023] Furthermore, in step 3 of the dynamic report file processing method, the horizontal splitting is based on the structured fields, and the data is recombined and reorganized in order. New report structured field data is formed based on the selected fields, and a new report template is generated based on the original report file, and new structured data is formed based on the selected fields and stored.

[0024] Furthermore, the dynamic report file processing method is to dynamically merge the split reports based on the unique field in step 4, retain only the first parsed valid data for duplicate data, and write all merged data into the table corresponding to the structured data stored in the original report of the same type before being issued.

[0025] Query the merged data, compare the original data of the same type before splitting with the merged data, and display the different data. The difference comparison includes field comparison and field value comparison. If there is any difference in the field comparison or field value comparison, it will be marked as different data.

[0026] The displayed difference data is marked as data that needs to be updated and adjusted based on the merged data to form merged structured data.

[0027] Merge upwards step by step according to the split level to finally form the required report file.

[0028] The present invention also provides a dynamic report file processing device, including a parsing module, a data mapping module, a splitting module and a merging module.

[0029] The parsing module dynamically parses the report header based on the configuration:

[0030] Specify the location and starting range of the report header, parse the header data into structured data and store it.

[0031] The data mapping module performs data mapping on the split key information:

[0032] For different dynamic reports, field data mapping is performed based on the split fields, non-standard data is mapped to standardized data, and data is split vertically based on the standardized data.

[0033] The split module dynamically splits reports based on fields:

[0034] According to users in different application scenarios, different fields are configured to split the report horizontally, and only the corresponding report field data is distributed to the corresponding users.

[0035] Merge module to merge multiple report files:

[0036] Based on the split reports, dynamic merging is performed to deduplicate duplicate data. For changed data, the user decides whether to update it, and finally merges it into a complete report file.

[0037] Furthermore, when creating a report task, the parsing module of the dynamic report file processing device specifies the location of the header file in the report, including the top, left, right or bottom, and specifies the starting range of the report.

[0038] In the header of the parsing report:

[0039] Parse the table header to form structured data, parse from the starting range, if it is parsed as a merged cell, record the starting row number of the cell and the number of rows and columns occupied, and use the cell content as the field name.

[0040] If the cell is not merged, record the starting position of the cell, and mark the row and column numbers as 1. When parsing to the next level, use the name of the previous level as the field prefix and add a field separation identifier. Use the above cell parsing method to parse them in sequence, and finally form structured header metadata and store them.

[0041] Furthermore, when parsing report data, the data mapping module of the dynamic report file processing device extracts the row or column data where the keyword is located, and stores all the data as non-repeating data values. If a data mapping rule already exists, the data mapping module automatically performs mapping matching according to the existing data mapping rule. If no matching data mapping rule is found, the data mapping module only retains the parsed data, performs data mapping before data splitting, and selects appropriate values ​​from the standardized data to map and match with the retained parsed data.

[0042] When all report fields are mapped and the splitting module performs vertical splitting, each piece of data is divided into different categories based on the mapped standardized value to split the data.

[0043] Furthermore, the splitting module of the dynamic report file processing device performs horizontal splitting based on structured fields, recombines, and reorganizes the order, forms new report structured field data based on selected fields, generates a new report template based on the original report file, forms new structured data based on the selected fields, and stores it.

[0044] Furthermore, the merging module of the dynamic report file processing device dynamically merges the split reports based on the unique field in the report, and for duplicate data, only the first parsed data is retained as valid data, and all merged data is written into the table corresponding to the structured data stored in the original report of the same type before being issued.

[0045] Query the merged data, compare the original data of the same type before splitting with the merged data, and display the different data. The difference comparison includes field comparison and field value comparison. If there is any difference in the field comparison or field value comparison, it will be marked as different data.

[0046] The displayed difference data is marked as data that needs to be updated and adjusted based on the merged data to form merged structured data.

[0047] Merge upwards step by step according to the split level to finally form the required report file.

[0048] The benefits of the present invention are:

[0049] It reduces the complex report processing work of the staff, dynamically parses the report header based on the configuration, performs data mapping for the split key information, splits the report, distributes it to the corresponding users, and merges reports uploaded by different users, which improves the efficiency of data splitting and merging. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a schematic flow chart of the method of the present invention. DETAILED DESCRIPTION

[0051] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.

[0052] Example 1

[0053] The present invention provides a dynamic report file processing method, comprising:

[0054] Step 1: Dynamically parse the report header based on the configuration:

[0055] Specify the location and starting range of the report header, parse the header data into structured data, and store it.

[0056] When creating a report task, specify the location of the header file in the report, including the top, left, right, or bottom, and specify the start range of the report.

[0057] In the header of the parsing report:

[0058] Parse the table header to form structured data, parse from the starting range, if parsed as a merged cell, record the starting row number of the cell and the number of rows and columns occupied, and use the cell content as the field name.

[0059] If the cell is not merged, record the starting position of the cell, and mark the row and column numbers as 1. When parsing to the next level, use the name of the previous level as the field prefix and add a field separation identifier. Use the above cell parsing method to parse them in sequence, and finally form structured header metadata and store them.

[0060] When parsing data, it is parsed according to the starting range of the data specified when the data is filled in, eliminating the problem of empty value in data parsing caused by dirty data such as error writing. For each row or column of data, the data is parsed according to the cell type and converted into a string, with the header field of the final range as the data field and the parsed data as the value, forming a structured "key: value" pair to store the data and record the index position of each data in the original file.

[0061] Step 2: Data mapping of split key information:

[0062] For different dynamic reports, field data mapping is performed based on the split fields, non-standard data is mapped to standardized data, and data is split vertically based on the standardized data.

[0063] These may further include:

[0064] When parsing report data, extract the row or column data where the keyword is located, and store all data with non-repeated data values. If data mapping rules already exist, they are automatically mapped and matched according to the existing data mapping rules. If no matching data mapping rules are found, only the parsed data is retained. Data mapping is performed before data splitting, and appropriate values ​​are selected from the standardized data for mapping and matching with the retained parsed data.

[0065] When all report fields are mapped and split vertically, each piece of data is divided into different categories based on the mapped standardized value to split the data.

[0066] Step 3: Dynamic report splitting based on fields:

[0067] According to users in different application scenarios, different fields are configured to split the report horizontally, and only the corresponding report field data is distributed to the corresponding users.

[0068] Horizontal splitting is based on structured fields, recombining and reorganizing the order, forming new report structured field data based on the selected fields, generating a new report template based on the original report file, and forming new structured data based on the selected fields and storing it.

[0069] When splitting report data, select the field to be split and the split range based on the split keyword, split the data according to the split keyword data, and fill in the data template formed based on the selected header data, form a new report record based on the split range, and send it to the designated personnel.

[0070] Step 4: Merge multiple report files:

[0071] Based on the split reports, dynamic merging is performed to deduplicate duplicate data. For changed data, the user decides whether to update it, and finally merges it into a complete report file.

[0072] After different users have processed the data, they upload the report files. The background merges all uploaded report files based on unique fields. For example, people can use their ID numbers, etc. For duplicate data, only the first parsed data is retained as valid data, and all merged data is written into the table corresponding to the structured data stored in the original report of the same type before it is issued.

[0073] Users can query the merged data on the front-end page and display the data with differences. The comparison of differences is based on the same type of original data before the split and the merged data. The differences include field comparison and field value comparison. As long as there is one difference, it will be marked as difference data.

[0074] The displayed difference data can be marked as data that needs to be updated, or discarded, or manually adjusted based on the merged data to ultimately form merged structured data.

[0075] Merge upwards step by step according to the split level to finally form the required report file.

[0076] Example 2

[0077] The present invention also provides a dynamic report file processing device, including a parsing module, a data mapping module, a splitting module and a merging module.

[0078] The parsing module dynamically parses the report header based on the configuration:

[0079] Specify the location and starting range of the report header, parse the header data into structured data and store it.

[0080] The data mapping module performs data mapping on the split key information:

[0081] For different dynamic reports, field data mapping is performed based on the split fields, non-standard data is mapped to standardized data, and data is split vertically based on the standardized data.

[0082] The split module dynamically splits reports based on fields:

[0083] According to users in different application scenarios, different fields are configured to split the report horizontally, and only the corresponding report field data is distributed to the corresponding users.

[0084] Merge module to merge multiple report files:

[0085] Based on the split reports, dynamic merging is performed to deduplicate duplicate data. For changed data, the user decides whether to update it, and finally merges it into a complete report file.

[0086] As the information interaction and execution process between the modules of the above-mentioned device are based on the same concept as the embodiment of the method of the present invention, the specific contents can be found in the description of the embodiment of the method of the present invention and will not be repeated here.

[0087] Similarly, the device of the present invention reduces the complex report processing work of the staff, dynamically parses the report header based on the configuration, performs data mapping on the split key information, splits the report, distributes it to the corresponding users, and merges the reports uploaded by different users, thereby improving the efficiency of data splitting and merging.

[0088] It should be noted that not all steps and modules in the above-mentioned processes and device structures are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.

[0089] The above-described embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or changes made by those skilled in the art based on the present invention are within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.

Claims

1. A dynamic report file processing method, characterized in that include: Step 1: Dynamically parse the report header based on the configuration: Specify the location and starting range of the report header, parse the header data into structured data and store it. Step 2: Data mapping of split key information: For different dynamic reports, field data mapping is performed based on the split fields, non-standard data is mapped to standardized data, and data is split vertically based on the standardized data. Step 3: Dynamic report splitting based on fields: According to users in different application scenarios, different fields are configured to split the report horizontally, and only the corresponding report field data is distributed to the corresponding users. Step 4: Merge multiple report files: Based on the split reports, dynamic merging is performed to deduplicate duplicate data. For changed data, the user decides whether to update it, and finally merges it into a complete report file.

2. A dynamic report file processing method according to claim 1, characterized in that in step 1, when creating a report task, the position of the header file in the report is specified, including the top, left, right or bottom, and the starting range of the report is specified. In the header of the parsing report: Parse the table header to form structured data, parse from the starting range, if parsed as a merged cell, record the starting row number of the cell and the number of rows and columns occupied, and use the cell content as the field name. If the cell is not merged, record the starting position of the cell, and mark the row and column numbers as 1. When parsing to the next level, use the name of the previous level as the field prefix and add a field separation identifier. Use the above cell parsing method to parse them in sequence, and finally form structured header metadata and store them.

3. A dynamic report file processing method according to claim 1, characterized in that Step 2 specifically includes: When parsing report data, extract the row or column data where the keyword is located, and store all data with non-repeated data values. If data mapping rules already exist, they are automatically mapped and matched according to the existing data mapping rules. If no matching data mapping rules are found, only the parsed data is retained. Data mapping is performed before data splitting, and appropriate values ​​are selected from the standardized data for mapping and matching with the retained parsed data. When all report fields are mapped and split vertically, each piece of data is divided into different categories based on the mapped standardized value to split the data.

4. A dynamic report file processing method according to claim 1, characterized in that In step 3, the horizontal split is based on the structured fields, recombined, and reorganized in order, and new report structured field data is formed based on the selected fields. A new report template is generated based on the original report file, and new structured data is formed based on the selected fields and stored.

5. A method for processing dynamic report files according to claim 1, characterized in that In step 4, the split reports are dynamically merged based on the unique field. For duplicate data, only the first parsed data is retained as valid data, and all merged data is written into the table corresponding to the structured data stored in the original report of the same type before it is issued. Query the merged data, compare the original data of the same type before splitting with the merged data, and display the different data. The difference comparison includes field comparison and field value comparison. If there is any difference in the field comparison or field value comparison, it will be marked as different data. The displayed difference data is marked as data that needs to be updated and adjusted based on the merged data to form merged structured data. Merge upwards step by step according to the split level to finally form the required report file.

6. A dynamic report file processing device, characterized in that Including parsing module, data mapping module, splitting module and merging module, The parsing module dynamically parses the report header based on the configuration: Specify the location and starting range of the report header, parse the header data into structured data and store it. The data mapping module performs data mapping on the split key information: For different dynamic reports, field data mapping is performed based on the split fields, non-standard data is mapped to standardized data, and data is split vertically based on the standardized data. The split module dynamically splits reports based on fields: According to users in different application scenarios, different fields are configured to split the report horizontally, and only the corresponding report field data is distributed to the corresponding users. Merge module to merge multiple report files: Based on the split reports, dynamic merging is performed to deduplicate duplicate data. For changed data, the user decides whether to update it, and finally merges it into a complete report file.

7. A dynamic report file processing device according to claim 6, characterized in that When creating a report task, the parsing module specifies the location of the header file in the report, including the top, left, right, or bottom, and also specifies the start range of the report. In the header of the parsing report: Parse the table header to form structured data, parse from the starting range, if parsed as a merged cell, record the starting row number of the cell and the number of rows and columns occupied, and use the cell content as the field name. If the cell is not merged, record the starting position of the cell, and mark the row and column numbers as 1. When parsing to the next level, use the name of the previous level as the field prefix and add a field separation identifier. Use the above cell parsing method to parse them in sequence, and finally form structured header metadata and store them.

8. A dynamic report file processing device according to claim 6, characterized in that When parsing report data, the data mapping module extracts the row or column data where the keyword is located, and stores all the data as non-repeated data values. If data mapping rules already exist, the data mapping module automatically maps and matches according to the existing data mapping rules. If no matching data mapping rules are found, the data mapping module only retains the parsed data, performs data mapping before data splitting, and selects appropriate values ​​from the standardized data to map and match with the retained parsed data. When all report fields are mapped and the splitting module performs vertical splitting, each piece of data is divided into different categories based on the mapped standardized value to split the data.

9. A dynamic report file processing device according to claim 6, characterized in that The splitting module performs horizontal splitting based on structured fields, recombines, and reorganizes the order, forms new report structured field data based on the selected fields, generates a new report template based on the original report file, forms new structured data based on the selected fields, and stores it.

10. A dynamic report file processing device according to claim 6, characterized in that The merge module dynamically merges the split reports based on the unique fields in the report. For duplicate data, only the first parsed one is retained as valid data, and all merged data is written into the table corresponding to the structured data stored in the original report of the same type before it is issued. Query the merged data, compare the original data of the same type before splitting with the merged data, and display the different data. The difference comparison includes field comparison and field value comparison. If there is any difference in the field comparison or field value comparison, it will be marked as different data. The displayed difference data is marked as data that needs to be updated and adjusted based on the merged data to form merged structured data. Merge upwards step by step according to the split level to finally form the required report file.