Report generation method and system

By cleaning up the label set and building the original data, and automatically generating reports, the problems of low efficiency and insufficient accuracy in the existing technology are solved, and efficient and accurate report generation is achieved.

CN119918518BActive Publication Date: 2025-08-08JIANGXI HUAZHANG HANCHEN GUARANTEE GRP CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510412617.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-08-08
Estimated Expiration
2045-04-03

AI Technical Summary

Technical Problem

In the prior art, report generation efficiency is low and the accuracy is insufficient, and human errors are prone to occur by relying on manual operations.

Method used

By obtaining the original data set of tags, data cleaning is generated, department and main attribute tags corresponding to the tag are generated, and a generation module is built to automatically generate reports.

Benefits of technology

Improve the efficiency and accuracy of report generation, avoid human errors, and ensure the data accuracy of the report.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918518B_ABST
    Figure CN119918518B_ABST
Patent Text Reader

Abstract

The present invention provides a report generation method and system, comprising: obtaining a number of raw data and corresponding tag sets, the tag sets including time tags, identity tags, and attribute tags; performing data cleansing on the raw data based on the tag sets to obtain unused data; generating department tags corresponding to the identity tags, and generating primary attribute tags corresponding to the attribute tags; constructing a generation module based on the time tags, identity tags, attribute tags, department tags, and primary attribute tags; and constructing a report based on the generation module. Users only need to select corresponding tags to form an index path for unused data, and report generation can be automatically completed. Compared with manual report generation, this method effectively improves report generation efficiency and accuracy, and avoids human errors caused by manual tabulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a report generation method and system. Background Art

[0002] Reporting is a fundamental measure and approach to enterprise management and a fundamental business requirement. Reports help businesses access and format data, presenting it to users in a reliable and secure manner. They provide deep insight into business operations and are a powerful driver of enterprise growth.

[0003] Therefore, as an important support for data analysis in business management, reports play an increasingly important role in providing decision support for enterprises. For current reporting systems, they often rely on manual operations to generate reports.

[0004] Because reports contain a large amount of irregular text information, manual report generation is not only labor-intensive and inefficient, but also prone to human errors, resulting in inaccurate reports. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide a report generation method and system, aiming to solve the technical problems in the existing technology of low efficiency and insufficient accuracy of reports generated manually.

[0006] To achieve the above objectives, in a first aspect, an embodiment of the present application provides a report generation method, comprising the following steps:

[0007] Obtaining a number of raw data from different databases, obtaining a tag set corresponding to the raw data, the tag set including a time tag, an identity tag, and an attribute tag, and performing data cleaning on the raw data based on the tag set to obtain stand-by data, the tag set corresponding to the stand-by data;

[0008] Generate a department tag corresponding to the identity tag, and generate a main attribute tag corresponding to the attribute tag;

[0009] A generation module is constructed based on the time tag, the identity tag, the attribute tag, the department tag and the main attribute tag, and a report is constructed based on the generation module.

[0010] Compared with the prior art, the beneficial effects of the present invention are: by performing data cleaning on the original data to form the stand-by data, the accuracy of the subsequent reports generated based on the stand-by data can be ensured; through the time label, the identity label, the attribute label, the department label and the main attribute label corresponding to the stand-by data, the index path associated with the stand-by data is extracted, and the user only needs to select the index path to automatically complete the report generation work. Compared with the manual report preparation method, it effectively improves the efficiency of report preparation, improves the accuracy of the report, and avoids the human errors caused by manual tabulation.

[0011] Furthermore, the step of performing data cleaning on the original data based on the tag set to obtain data to be used includes:

[0012] Selecting a plurality of first intermediate data from the plurality of original data based on the identity tags, and selecting a plurality of second intermediate data from the plurality of first intermediate data based on the attribute tags;

[0013] sorting the plurality of second intermediate data based on the time tags, and determining whether the second intermediate data is abnormal data;

[0014] If the second intermediate data is not abnormal data, determining it as stand-by data;

[0015] If the second intermediate data is abnormal data, replacement data is generated and the replacement data is determined as stand-by data.

[0016] Furthermore, the step of determining whether the second intermediate data is abnormal data includes:

[0017] constructing a threshold range using a plurality of the second intermediate data, and comparing the second intermediate data with the threshold range;

[0018] If the second intermediate data is not within the threshold range, determining it as abnormal data;

[0019] The step of generating replacement data comprises:

[0020] selecting two pieces of the second intermediate data adjacent to the abnormal data as reference data by using the time tag;

[0021] The replacement data is generated based on the average of the two reference data.

[0022] Furthermore, the step of generating a department tag corresponding to the identity tag and generating a main attribute tag corresponding to the attribute tag includes:

[0023] comparing the identity tag with a department information database to select a department tag from the department information database;

[0024] The attribute tag is compared with a preset word library to select a main attribute tag from the preset word library.

[0025] Furthermore, the step of constructing a generation module based on the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag includes:

[0026] Constructing candidate units corresponding to the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag respectively;

[0027] Based on the association relationship between the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag, the to-be-selected unit is divided into a fixed unit and a free unit;

[0028] A misalignment limit is set for the fixed unit, and the free unit and the fixed unit after the misalignment limit is set are combined into a generation module.

[0029] Furthermore, the step of dividing the selected units into fixed units and free units based on the association relationship among the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag includes:

[0030] Performing correlation comparison between the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag;

[0031] If there is no association between a certain label and any other label, the candidate unit corresponding to the label is selected as a free unit;

[0032] If there is an association relationship between a certain label and another label, the candidate units corresponding to the two labels are all selected as fixed units.

[0033] Furthermore, the step of setting a misalignment limit for the fixing unit is specifically as follows:

[0034] It is determined whether there is an association relationship between the tags corresponding to the two fixed units. If there is an association relationship between the tags corresponding to the two fixed units, a dislocation restriction is added to the two fixed units to restrict the two fixed units from being selected as row headers and column headers respectively.

[0035] Furthermore, after the step of setting a misalignment limit for the fixed unit and combining the free unit and the fixed unit after the misalignment limit is set into a generation module, the method further includes:

[0036] A horizontal title submodule and a vertical title submodule are set in the generating module, and the fixed unit and the free unit are associated with the horizontal title submodule and the vertical title submodule.

[0037] In a second aspect, an embodiment of the present application provides a report generation system, which is applied to the report generation method described in the first aspect above, and the system includes:

[0038] a processing module configured to obtain a plurality of raw data from different databases, obtain a tag set corresponding to the raw data, the tag set including a time tag, an identity tag, and an attribute tag, and perform data cleaning on the raw data based on the tag set to obtain standby data, the tag set corresponding to the standby data;

[0039] A query module, configured to generate a department tag corresponding to the identity tag, and generate a primary attribute tag corresponding to the attribute tag;

[0040] A generation module is used to construct a generation module based on the time tag, the identity tag, the attribute tag, the department tag and the main attribute tag, and to construct a report based on the generation module.

[0041] In a third aspect, an embodiment of the present application provides a computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the report generation method as described in the first aspect above is implemented.

[0042] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the report generation method as described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 This is a flow chart of a report generation method according to a first embodiment of the present invention;

[0044] Figure 2 This is a structural block diagram of a report generation system in a second embodiment of the present invention;

[0045] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0046] To facilitate understanding of the present invention, the present invention will be described more fully below with reference to the accompanying drawings. The drawings illustrate several embodiments of the present invention. However, the present invention may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the present invention.

[0047] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be an intermediate element. When an element is referred to as being "connected to" another element, it may be directly connected to the other element or there may be an intermediate element. The terms "vertical," "horizontal," "left," "right," and similar expressions used herein are for illustrative purposes only.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one skilled in the art to which this invention pertains. The terms used in this specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0049] See also Figure 1 The report generation method provided by the first embodiment of the present invention includes the following steps:

[0050] S10: Acquire a number of raw data from different databases, obtain a label set corresponding to the raw data, the label set including a time label, an identity label, and an attribute label, and perform data cleaning on the raw data based on the label set to obtain standby data, the label set corresponding to the standby data;

[0051] It can be understood that the original data associated with the generated reports are stored in different databases respectively. Taking the factory production of spare parts as an example, the original data may be the production volume of product A, the production volume of product B, the repair volume of product A, the repair volume of product B, working hours, performance amount, fixed salary amount, defective product penalty amount, etc. The time label refers to the time when the original data is generated, the identity label refers to the person corresponding to the original data, and the attribute label refers to the nature of the original data. For example, taking the production volume of product A and the production volume of product B as an example, its attribute label is the production capacity label, and taking the repair volume of product A and the repair volume of product B, its attribute label is the repair label. It should be noted that in some embodiments, more labels can be extracted to obtain more detailed data to be used through division of more steps.

[0052] The step S10 includes:

[0053] S110: selecting a plurality of first intermediate data from the plurality of original data based on the identity tag, and selecting a plurality of second intermediate data from the plurality of first intermediate data based on the attribute tag;

[0054] That is, in this step, the data corresponding to the same person is filtered into the same area through the identity tag, and the data is further segmented according to their different data attributes to complete the aggregation of data of the same type.

[0055] S120: Sort the plurality of second intermediate data based on the time tags, and determine whether the second intermediate data is abnormal data;

[0056] When collecting the original data from different databases, some data may be abnormal due to system errors and other reasons. To ensure the accuracy of subsequent reports, the abnormal data needs to be preprocessed. Specifically, a threshold range is constructed using a plurality of the second intermediate data, and the second intermediate data is compared with the threshold range.

[0057] In this embodiment, data sorting is performed on a number of second intermediate data to select an upper quartile and a lower quartile from the number of second intermediate data, a threshold is obtained based on the upper quartile and the lower quartile, a first endpoint is generated based on the sum of the upper quartile and the threshold, a second endpoint is generated based on the difference between the lower quartile and the threshold, and the threshold range is generated based on the first endpoint and the second endpoint.

[0058] If the second intermediate data is not within the threshold range, it is determined to be abnormal data.

[0059] S130: If the second intermediate data is not abnormal data, determine it as standby data;

[0060] S140: If the second intermediate data is abnormal data, generating replacement data, and determining the replacement data as stand-by data;

[0061] Two second intermediate data adjacent to the abnormal data are selected as reference data by using the time tag; and replacement data is generated based on the average of the two reference data.

[0062] S20: Generate a department tag corresponding to the identity tag, and generate a main attribute tag corresponding to the attribute tag;

[0063] S210: comparing the identity tag with a department information database to select a department tag from the department information database;

[0064] In this embodiment, the identity tag is the employee name. The employee name is compared with the department information database to determine the department name corresponding to the employee, and the department name is selected as the department tag. It should be noted that in some embodiments, the department tag can also be compared with the regional information database to obtain the regional tag.

[0065] S220: Compare the attribute tag with a preset vocabulary to select a main attribute tag from the preset vocabulary;

[0066] The preset vocabulary contains multiple term chains, which refer to a network of sequentially attached terms. Taking the capacity label and the return label as examples, both belong to the same primary attribute label, such as the business volume label. Taking the performance amount, fixed salary amount, and bad product penalty amount as examples, the attribute labels corresponding to the performance amount and fixed salary amount are income labels, and the attribute label corresponding to the bad product penalty amount is an expenditure label. The primary attribute labels corresponding to the income label and the expenditure label are account labels. It should be noted that in some embodiments, there are more term chains with associated relationships, so that the primary attribute labels can be summarized multiple times to form more labels to complete more detailed data segmentation.

[0067] S30: constructing a generation module based on the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag, and constructing a report based on the generation module;

[0068] The step S30 includes:

[0069] S310: Constructing candidate units corresponding to the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag respectively;

[0070] It can be understood that by selecting the unit to be selected, the data to be used can be linked to through the tag corresponding to the unit to be selected, and the data to be used can be extracted.

[0071] S320: Segmenting the to-be-selected units into fixed units and free units based on the association relationship among the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag;

[0072] When constructing a report, different labels can be set in different positions. Taking the time label, the identity label, the attribute label, the department label and the main attribute label as examples, when constructing a report, row titles and column titles are usually set, and the row titles and column titles correspond to a certain data of a certain employee in a specific period of time. Between the free unit and the fixed unit, they can appear in the row title or column title at the same time, or appear in the row title and column title respectively.

[0073] Specifically, the time tag, the identity tag, the attribute tag, the department tag, and the primary attribute tag are compared with each other; if a tag does not have an association relationship with any other tag, the candidate unit corresponding to the tag is selected as a free unit; if a tag does have an association relationship with another tag, the candidate units corresponding to both tags are selected as fixed units. It is understood that the tag mentioned is one of the time tag, the identity tag, the attribute tag, the department tag, and the primary attribute tag.

[0074] S330: Setting a dislocation limit for the fixed unit, and combining the free unit and the fixed unit after the dislocation limit is set into a generation module;

[0075] Different fixed units cannot be set arbitrarily, such as identity labels and department labels, which can only appear in the row header or the column header at the same time. When they appear in the row header and the column header respectively, they cannot index specific data. Furthermore, after obtaining the fixed units, it is necessary to further restrict the different fixed units to specify which fixed units cannot appear in the row header and the column header respectively. Specifically, it is determined whether there is an association relationship between the labels corresponding to the two fixed units. If there is an association relationship between the labels corresponding to the two fixed units, a dislocation restriction is added to the two fixed units to restrict the two fixed units from being selected as row headers and column headers respectively. It can be understood that there is an association between the identity tag and the department tag, therefore, a dislocation restriction is imposed on the two to prevent them from appearing in the row header and column header respectively. There is no association between the identity tag and the expenditure tag, so there is no need to set a dislocation restriction on the fixed units corresponding to the two. There is an association between the expenditure tag and the account tag, therefore, a dislocation restriction needs to be imposed on the two. It can be understood that the dislocation restriction is set between the two fixed units, and multiple dislocation restrictions can be set for the same fixed unit.

[0076] Preferably, the step S30 further includes:

[0077] S340: Setting a horizontal title submodule and a vertical title submodule in the generating module, and associating the fixed unit and the free unit with the horizontal title submodule and the vertical title submodule;

[0078] When a report needs to be constructed, the fixed unit and / or the free unit is clicked to the horizontal title submodule and / or the vertical title submodule, so that the stand-by data is located and indexed through the units where the horizontal title submodule and / or the vertical title submodule exist, thereby forming a report.

[0079] By performing data cleaning on the original data to form the stand-by data, the accuracy of the subsequent reports generated based on the stand-by data can be ensured; through the time label, the identity label, the attribute label, the department label and the main attribute label corresponding to the stand-by data, the index path associated with the stand-by data is extracted, and the user only needs to select the index path to automatically complete the report generation work. Compared with the manual report preparation method, it effectively improves the efficiency of report preparation, improves the accuracy of the report, and avoids the human errors caused by manual tabulation.

[0080] See also Figure 2 A second embodiment of the present invention provides a report generation system, which is applied to the report generation method described in the above embodiments. Details already described are omitted for clarity. As used below, terms such as "module," "unit," and "subunit" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0081] The system comprises:

[0082] A processing module 10 is configured to obtain a plurality of raw data from different databases, obtain a tag set corresponding to the raw data, the tag set including a time tag, an identity tag, and an attribute tag, and perform data cleansing on the raw data based on the tag set to obtain standby data, the tag set corresponding to the standby data;

[0083] The processing module 10 includes:

[0084] A first unit is configured to select a plurality of first intermediate data from the plurality of original data based on the identity tag, and select a plurality of second intermediate data from the plurality of first intermediate data based on the attribute tag;

[0085] a second unit, configured to sort the plurality of second intermediate data based on the time tags, and determine whether the second intermediate data is abnormal data;

[0086] The second unit is further configured to construct a threshold range using a plurality of the second intermediate data, and compare the second intermediate data with the threshold range; if the second intermediate data is not within the threshold range, determining the second intermediate data as abnormal data;

[0087] a third unit, configured to determine the second intermediate data as standby data if the second intermediate data is not abnormal data;

[0088] a fourth unit, configured to generate replacement data if the second intermediate data is abnormal data, and determine the replacement data as stand-by data;

[0089] The fourth unit is further configured to select two pieces of the second intermediate data adjacent to the abnormal data as reference data based on the time tag; and generate replacement data based on the average of the two reference data;

[0090] A query module 20 is configured to generate a department tag corresponding to the identity tag and a primary attribute tag corresponding to the attribute tag;

[0091] The query module 20 includes:

[0092] a fifth unit, configured to compare the identity tag with a department information database to select a department tag from the department information database;

[0093] The sixth unit is configured to compare the attribute label with a preset vocabulary to select a main attribute label from the preset vocabulary;

[0094] A generation module 30 is configured to construct a generation module based on the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag, and to construct a report based on the generation module;

[0095] The generating module 30 includes:

[0096] A seventh unit is used to construct candidate units corresponding to the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag respectively;

[0097] an eighth unit, configured to separate the to-be-selected units into fixed units and free units based on associations among the time tag, the identity tag, the attribute tag, the department tag, and the primary attribute tag;

[0098] The eighth unit is further configured to compare the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag in pairs; if a tag does not have an association relationship with any other tag, the candidate unit corresponding to the tag is selected as a free unit; if a tag has an association relationship with another tag, the candidate units corresponding to the two tags are both selected as fixed units;

[0099] A ninth unit is configured to set a dislocation limit for the fixed unit, and combine the free unit and the fixed unit after the dislocation limit is set into a generation module;

[0100] The ninth unit is further configured to determine whether there is an association relationship between the tags corresponding to the two fixed units, and if there is an association relationship between the tags corresponding to the two fixed units, add a stagger restriction to the two fixed units to restrict the two fixed units from being selected as row headers and column headers, respectively;

[0101] Preferably, the generating module 30 further includes:

[0102] The tenth unit is used to set a horizontal title submodule and a vertical title submodule in the generating module, and associate the fixed unit and the free unit with the horizontal title submodule and the vertical title submodule.

[0103] The present invention also provides a computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the report generation method as described in the above technical solution when executing the computer program.

[0104] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the report generation method described in the above technical solution is implemented.

[0105] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0106] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A report generation method, characterized in that: The following steps are involved: Obtaining a number of raw data from different databases, obtaining a tag set corresponding to the raw data, the tag set including a time tag, an identity tag, and an attribute tag, and performing data cleaning on the raw data based on the tag set to obtain stand-by data, the tag set corresponding to the stand-by data; Generate a department tag corresponding to the identity tag, and generate a main attribute tag corresponding to the attribute tag; Building a generation module based on the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag, and building a report based on the generation module; The step of constructing a generation module based on the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag includes: Constructing candidate units corresponding to the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag respectively; Based on the association relationship between the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag, the to-be-selected unit is divided into a fixed unit and a free unit; The step of dividing the selected units into fixed units and free units based on the association relationship among the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag comprises: Performing correlation comparison between the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag; If there is no association between a certain label and any other label, the candidate unit corresponding to the label is selected as a free unit; If there is an association relationship between a certain label and another label, the candidate units corresponding to the two labels are all selected as fixed units; Setting a dislocation limit for the fixed unit, and combining the free unit and the fixed unit after the dislocation limit is set into a generation module; The step of setting the misalignment limit for the fixing unit is specifically as follows: It is determined whether there is an association relationship between the tags corresponding to the two fixed units. If there is an association relationship between the tags corresponding to the two fixed units, a dislocation restriction is added to the two fixed units to restrict the two fixed units from being selected as row headers and column headers respectively.

2. The report generation method according to claim 1, characterized in that: The step of performing data cleaning on the original data based on the tag set to obtain data to be used includes: Selecting a plurality of first intermediate data from the plurality of original data based on the identity tags, and selecting a plurality of second intermediate data from the plurality of first intermediate data based on the attribute tags; sorting the plurality of second intermediate data based on the time tags, and determining whether the second intermediate data is abnormal data; If the second intermediate data is not abnormal data, determining it as stand-by data; If the second intermediate data is abnormal data, replacement data is generated and the replacement data is determined as stand-by data.

3. The report generation method according to claim 2, characterized in that: The step of determining whether the second intermediate data is abnormal data includes: constructing a threshold range using a plurality of the second intermediate data, and comparing the second intermediate data with the threshold range; If the second intermediate data is not within the threshold range, determining it as abnormal data; The step of generating replacement data comprises: selecting two pieces of the second intermediate data adjacent to the abnormal data as reference data by using the time tag; The replacement data is generated based on the average of the two reference data.

4. The report generation method according to claim 1, wherein: The step of generating a department tag corresponding to the identity tag and generating a main attribute tag corresponding to the attribute tag includes: comparing the identity tag with a department information database to select a department tag from the department information database; The attribute tag is compared with a preset word library to select a main attribute tag from the preset word library.

5. The report generation method according to claim 1, wherein: After the steps of setting a misalignment limit for the fixed unit and combining the free unit and the fixed unit after the misalignment limit is set into a generation module, the method further includes: A horizontal title submodule and a vertical title submodule are set in the generating module, and the fixed unit and the free unit are associated with the horizontal title submodule and the vertical title submodule.

6. A report generation system, applied to the report generation method according to any one of claims 1 to 5, characterized in that: The system comprises: a processing module configured to obtain a plurality of raw data from different databases, obtain a tag set corresponding to the raw data, the tag set including a time tag, an identity tag, and an attribute tag, and perform data cleaning on the raw data based on the tag set to obtain standby data, the tag set corresponding to the standby data; A query module, configured to generate a department tag corresponding to the identity tag, and generate a primary attribute tag corresponding to the attribute tag; A generation module, configured to construct a generation module based on the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag, and to construct a report based on the generation module; The generation module includes: A seventh unit is used to construct candidate units corresponding to the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag respectively; an eighth unit, configured to separate the to-be-selected units into fixed units and free units based on associations among the time tag, the identity tag, the attribute tag, the department tag, and the primary attribute tag; The eighth unit is further configured to compare the time tag, the identity tag, the attribute tag, the department tag, and the main attribute tag in pairs; if a tag does not have an association relationship with any other tag, the candidate unit corresponding to the tag is selected as a free unit; if a tag has an association relationship with another tag, the candidate units corresponding to the two tags are both selected as fixed units; A ninth unit is configured to set a dislocation limit for the fixed unit, and combine the free unit and the fixed unit after the dislocation limit is set into a generation module; The ninth unit is also used to determine whether there is an association relationship between the labels corresponding to the two fixed units. If there is an association relationship between the labels corresponding to the two fixed units, a stagger restriction is added to the two fixed units to restrict the two fixed units from being selected as row headers and column headers respectively.

7. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the report generation method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Hierarchical construction method and device of data warehouse, electronic equipment and storage medium

    CN112818048A

  • Automatic report generation method and device, computer equipment and storage medium

    CN114626352A