A report content verification method, system, computer equipment and storage medium

By analyzing the key data characteristics of the report and designing a regular expression collection, the report content is automatically verified, and the problem of changing the report content layout in the existing technology requires reconstructing the verification rules, achieving improvements in flexibility and accuracy.

CN112559817BActive Publication Date: 2024-11-29HAICHUANGHUI TECH VENTURE DEV CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011266412.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-13
Publication Date
2024-11-29
Estimated Expiration
2040-11-13

AI Technical Summary

Technical Problem

Existing report data verification methods require reconstructing verification rules when the report content layout changes, which are insufficient flexibility and difficult to ensure verification accuracy.

Method used

By analyzing key data characteristics in reports, designing and correcting regular expression collections, automatically verifying report content, highlighting error positions, providing correction suggestions, and improving verification flexibility and accuracy.

Benefits of technology

There is no need to adjust the verification rules frequently, which improves the flexibility and accuracy of report verification, reduces human errors, and improves verification efficiency.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present invention discloses a report content verification method, including determining the key focus fields in the report according to all the data obtained, designing regular expressions for each key focus field according to the type and attribute of the key focus field, and establishing a regular expression set; importing N known correct reports, extracting multiple key data features of the report, correcting the regular expression according to the extracted key data features, and outputting the corrected regular expression to establish a standardized regular expression set; importing a target report, verifying the text content of the target report, and when the target report content does not match the regular expression, displaying an error or prompting the abnormal position, and highlighting it. The present invention also discloses a report content verification system, a computer device, and a storage medium. The present invention improves the flexibility and accuracy of verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer software technology, and in particular to a report content verification method, system, computer equipment and storage medium. Background Art

[0002] Reports are used to dynamically display data in the form of tables, charts, etc. Before computers, people used paper and pen to record data. Errors usually occurred when filling in the summary table line by line, or when reviewing the report. After the advent of the computer age, data is recorded through computer software. Although the efficiency has been improved, errors still occur. In order to avoid these errors or minimize them or errors, the verification step is an important part of the report.

[0003] With the development of computer technology, the cloud era has arrived. In daily life, work and entertainment, more and more data are generated based on the Internet, and the massive data contains infinite value. Data can be counted and processed into various reference indicators from different dimensions to form data reports, so that data can be analyzed more intuitively. For example, for corporate companies, financial statements can be constructed to reflect the operating conditions of the company in order to provide effective decision-making support. However, with the increasing complexity of data reports and the growth of report volume, verification is particularly important. If such a large number of forms are only checked manually, not only will the workload be extremely large, but also a lot of manpower and material resources will be required to process, which will not only cause serious waste of resources, but also human errors or error rates are difficult to control.

[0004] In order to improve the verification efficiency and accuracy, different verification systems and platforms have emerged. For example, CN201910602951.9 discloses a report data verification method, which obtains the corresponding data verification rules according to the report data verification request, further obtains the report data corresponding to the data verification rules, and then directly verifies the report data according to the data verification rules to obtain the report data verification results. No manpower is required for processing, which improves the verification processing efficiency of report data. However, the verification rules of this method are fixed. Once the report content layout changes, the verification rules need to be rebuilt, which is not flexible and the accuracy of the verification cannot be guaranteed. Summary of the invention

[0005] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a report content verification method, which does not require multiple adjustments and corrections to the verification rules for the same type of forms, thereby improving the flexibility of verification. The method can automatically integrate and verify the content of subsequently uploaded reports, thereby improving the accuracy of verification.

[0006] To solve the above problems, the technical solution adopted by the present invention is as follows:

[0007] A report content verification method, comprising:

[0008] Step 1: Traverse users and report types to obtain all data in user reports. Based on all the obtained data, analyze the data required for a single project in the report and the data required for joint analysis of multiple projects, determine the key fields in the report, design regular expressions for each key field based on the type and attributes of the key fields, and establish a regular expression set.

[0009] Step 2: Import N known correct reports, extract multiple key data features of the reports, associate the attribute information of the multiple key data features with the regular expression, and when a key data feature does not match the regular expression, correct the regular expression according to the extracted key data feature, and output the corrected regular expression; correct each regular expression according to the same steps to establish a standardized regular expression set;

[0010] Step 3: Import the target report, extract text content from the target report, match the report content according to each regular expression, verify the text content, and when the target report content does not match the regular expression, display an error or prompt the abnormal location and highlight it.

[0011] As a further alternative, step 1 of establishing a regular expression set in the present invention specifically includes:

[0012] S11, according to the type and attribute of the focused field, combining at least one specific symbol for matching any character as a matching item of the regular expression, and sorting the matching items to form at least one regular expression;

[0013] S12 treats each type of data in the report content as a node, numbers each node to clarify the data type represented by the node, and calculates the regular expression of each node in the table content based on the connection relationship between each node and the number, and uses all regular expressions as the string code of this type of data structure to construct a regular expression set.

[0014] As a further alternative, the single item described in the present invention includes one of a row, a column, a header, and a grid position.

[0015] As a further alternative, the specific steps of verifying the text content of the present invention include:

[0016] Determining a degree of matching of the text content;

[0017] Determining a verification result of verifying the text content based on the matching degree;

[0018] Determining whether the matching degree is greater than or equal to a preset matching degree;

[0019] If yes, it is determined that the text content verification has passed;

[0020] If not, it is determined that the text content verification fails.

[0021] As a further alternative, the regular expression set described in the present invention includes regular expressions for table headers, regular expressions for column names, regular expressions for row names, regular expressions for grid attributes, and regular expressions for grid contents.

[0022] As a further alternative, the key data features described in the present invention are one or more of data format, text length, value size, decimal floating point, language, row value subtotal, and column value subtotal.

[0023] As a further option, the method described in the present invention also includes

[0024] Step 4: For the above-mentioned display errors or abnormal prompts, make correction suggestions for the report to be verified. Specifically, search the regular expression according to the location of the display error or abnormal prompt, extract the partial features corresponding to the display error or abnormal prompt features from the regular expression, and output the partial features.

[0025] The present invention also provides a report content verification method, comprising:

[0026] Step 1: import N known correct reports, extract multiple key data features of the reports, associate the attribute information of the multiple key data features with the automatically generated regular expressions, and establish a set of key data features and regular expressions;

[0027] Step 2: Import new target reports in large quantities, report errors on the form contents, select a feature to compare with the above key data features, and report an error if they do not match. Retrieve regular expressions based on the features reported for the error, and use the regular expressions with a high enough task matching degree as the regular expressions for verification;

[0028] Step 3: Import the target report to be verified, extract text content from the target report, match the report content according to each regular expression, verify the text content, and when the target report content does not match the regular expression, display an error or prompt the abnormal location and highlight it.

[0029] The present invention also provides a report content verification system, the report content verification system comprises

[0030] Report import module, used to import target reports according to user instructions;

[0031] The analysis and construction module is used to obtain the data of the target report, and analyze the data required for a single project in the report and the data composition rules required for the joint analysis of multiple projects according to the user's instructions based on all the obtained data, determine the key focus fields in the report, design regular expressions for each key focus field according to the type and attribute of the key focus field, and establish a regular expression set;

[0032] The verification rule correction module is used to obtain multiple key data features in a known correct report, and associate the attribute information of the key data features with the regular expression according to the user's instructions. When a key data feature does not match the regular expression, the regular expression is corrected according to the extracted key data feature, and the corrected regular expression is output; each regular expression is corrected according to the same steps to establish a standardized regular expression set;

[0033] The report verification processing module is used to verify the target report content according to the regular expression.

[0034] The present invention also provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the report content verification method described in the present invention when executing the computer program.

[0035] The present invention also provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the report content verification method of the present invention are implemented.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] The report content verification method of the present invention verifies the target report content through a regular expression, corrects the regular expression through key data features, introduces key data features into the regular expression, and when the layout of the report changes, as long as the key data items corresponding to the report do not change, there is no need to re-edit the regular expression, thereby improving the flexibility of the verification rules. Since the key data features are derived from known correct report content, the verification is not prone to errors, thereby improving the accuracy of the verification.

[0038] The present invention is further described in detail below in conjunction with specific implementation modes. DETAILED DESCRIPTION

[0039] The report content verification method of the present invention comprises:

[0040] Step 1: Traverse users and report types to obtain all data in user reports. Based on all the data obtained, analyze the data required for a single project in the report and the data required for joint analysis of multiple projects, determine the key fields in the report, design regular expressions for each key field based on the type and attributes of the key fields, and establish a regular expression set. Establishing a regular expression set specifically includes:

[0041] S11, according to the type and attribute of the focused field, combining at least one specific symbol for matching any character as a matching item of the regular expression, and sorting the matching items to form at least one regular expression;

[0042] S12 regards each type of data in the report content as a node, numbers each node to clarify the data type represented by the node, and calculates the regular expression of each node in the table content according to the connection relationship of each node and the number, and uses all regular expressions as the string code of the data structure of this type to construct a regular expression set;

[0043] Step 2: Import N known correct reports (where N is greater than or equal to 5), extract multiple key data features of the reports, and associate the attribute information of the multiple key data features with the regular expression. When a key data feature does not match the regular expression, correct the regular expression according to the extracted key data feature, and output the corrected regular expression; correct each regular expression according to the same steps to establish a standardized regular expression set;

[0044] Step 3: Import the target report (starting from the N+1th form), extract text content from the target report, match the report content according to each regular expression, and verify the text content. When the target report content does not match the regular expression, an error is displayed or the abnormal position is prompted and highlighted; the specific steps of verifying the text content include:

[0045] Determining a degree of matching of the text content;

[0046] Determining a verification result of verifying the text content based on the matching degree;

[0047] Determining whether the matching degree is greater than or equal to a preset matching degree;

[0048] If yes, it is determined that the text content verification has passed;

[0049] If not, it is determined that the text content verification fails.

[0050] As a further alternative, the regular expression set described in the present invention includes regular expressions for table headers, regular expressions for column names, regular expressions for row names, regular expressions for grid attributes, and regular expressions for grid contents.

[0051] As a further alternative, the key data features described in the present invention are one or more of data format, text length, value size, decimal floating point, language, row value subtotal, and column value subtotal.

[0052] As a further option, the method described in the present invention also includes

[0053] Step 4: For the above-mentioned display errors or abnormal prompts, make correction suggestions for the report to be verified. Specifically, search the regular expression according to the location of the display error or abnormal prompt, extract the partial features corresponding to the display error or abnormal prompt features from the regular expression, and output the partial features.

[0054] The present invention also provides a report content verification system, the report content verification system comprises

[0055] Report import module, used to import target reports according to user instructions;

[0056] The analysis and construction module is used to obtain the data of the target report, and analyze the data required for a single project in the report and the data composition rules required for the joint analysis of multiple projects according to the user's instructions based on all the obtained data, determine the key focus fields in the report, design regular expressions for each key focus field according to the type and attribute of the key focus field, and establish a regular expression set;

[0057] The verification rule correction module is used to obtain multiple key data features in a known correct report, and associate the attribute information of the key data features with the regular expression according to the user's instructions. When a key data feature does not match the regular expression, the regular expression is corrected according to the extracted key data feature, and the corrected regular expression is output; each regular expression is corrected according to the same steps to establish a standardized regular expression set;

[0058] The report verification processing module is used to verify the target report content according to the regular expression.

[0059] The present invention also provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the report content verification method described in the present invention when executing the computer program.

[0060] The present invention also provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the report content verification method of the present invention are implemented.

[0061] Example 1

[0062] Taking the EXCEL template report as an example, the report content verification method includes:

[0063] Step 1: Traverse users and report types to obtain all data in user reports. Based on all the data obtained, analyze the data required for a single item in the report (such as header, column, row, grid position, grid content) and the data composition rules required for joint analysis of multiple items, determine the key focus fields in the report, design regular expressions for each key focus field based on the type and attributes of the key focus field, and establish a regular expression set. Establishing a regular expression set specifically includes:

[0064] S11, according to the type and attribute of the focused field, combining at least one specific symbol for matching any character as a matching item of the regular expression, and sorting the matching items to form at least one regular expression;

[0065] S12 regards each type of data in the report content as a node, numbers each node to clarify the data type represented by the node, and calculates the regular expression of each node in the table content according to the connection relationship of each node and the number, and regards all regular expressions as the string code of the data structure of this type to construct a regular expression set; in this step, each type of data refers to a type of data according to rows, columns, table content or table position, etc., and the established regular expressions include regular expressions for table headers, regular expressions for the names of certain columns, regular expressions for the names of certain rows, regular expressions for the attributes of certain grids, and regular expressions for the values ​​of certain grids. Generally, the format of the value (for example, retaining 2 decimal places) and the range of the value (for example, 0 to 100,000) are targeted;

[0066] Step 2: Import N known correct reports, extract multiple key data features of the reports, including data format, text length, value size, decimal floating point, language, row value subtotal, column value subtotal, etc., associate the attribute information of multiple key data features with the above regular expression, when a key data feature does not match the regular expression, correct the regular expression according to the extracted key data feature, and output the corrected regular expression; correct each regular expression according to the same steps to establish a standardized regular expression set; in this step, the specific method of extraction includes:

[0067] S21 extracts the grid content. Given a grid, generally, the grid address is recorded as (r, c), i.e., the rth row and the cth column. (1) Record the data format of the grid, including date, currency, text, etc.; (2) If it is text, record the length of the longest text so far; (3) If it is a number, record the number of digits of the longest number so far; (4) If it is a number, record the largest number of decimal floating-point numbers so far; (5) Record the language used, such as Simplified Chinese, Traditional Chinese, British English, American English; the data format, text, number, and language used for recording are used as key data features;

[0068] S22 extracts the row content. Given a row r, record the subtotal of the row value, that is, if all the values ​​are numbers, record the sum of all the grid values ​​in the row, the largest value so far, and use the largest value as the key data feature;

[0069] S23 extracts the content of the column. Given a column a, record the subtotal of the column value, that is, if all the values ​​are numbers, record the sum of all the grid values ​​in the column, the largest value so far; and use the largest value as the key data feature;

[0070] Step 3: Import the target report, extract text content from the target report, match the report content according to each regular expression, and verify the text content. When the target report content does not match the regular expression, an error is displayed or the abnormal position is prompted and highlighted. The specific steps of verifying the text content include:

[0071] Determining a degree of matching of the text content;

[0072] Determining a verification result of verifying the text content based on the matching degree;

[0073] Determine whether the matching degree is greater than or equal to a preset matching degree; the preset matching pair calculation method is: matching degree = similarity coefficient - data format difference coefficient - language difference coefficient;

[0074] Wherein, similarity coefficient = text length (x, y) / text length (r, c) + value size (x, y) / value size (r, c) + decimal floating point (x, y) / decimal floating point (r, c); where (x, y) refers to the features in the target report to be verified, and (r, c) is the feature extracted from the regular expression (the same below);

[0075] The data format difference coefficient is expressed as follows: (i) if the data format (r, c) is different from the data format (x, y), the coefficient takes a value of 0.5; (ii) if the data format (r, c) is the same as the data format (x, y), the coefficient takes a value of 0.0;

[0076] The formula for calculating the language difference coefficient is expressed as follows: (i) if language (r, c) does not contain language (x, y), the coefficient takes a value of 0.5; (ii) if language (r, c) contains language (x, y), the coefficient takes a value of 0.0; (x, y) represents the content in the target report to be verified, and (r, c) represents the features extracted from the regular expression;

[0077] If the matching degree exceeds 2.0, it is considered to be greater than or equal to the preset matching degree, and the text content verification is determined to have passed;

[0078] If the matching degree is less than 2.0, it is considered that the matching degree is less than the preset one and the text content verification fails.

[0079] Example 2

[0080] On the basis of the above-mentioned embodiment 1, further, it also includes

[0081] Step 4: For the above display errors or abnormal prompts, make correction suggestions for the report to be verified. Specifically, search for regular expressions based on the location of the display errors or abnormal prompts, extract partial features corresponding to the display errors or abnormal prompts from the regular expressions, and output the partial features. The user makes corrections to the table content based on the features of the output parts.

[0082] Example 3

[0083] Taking the EXCEL template report as an example, the report content verification method includes:

[0084] Step 1: Import N known correct reports, extract multiple key data features of the reports, associate the attribute information of the multiple key data features with the automatically generated regular expressions, and establish a set of key data features and regular expressions; in this step, the specific method of extraction includes:

[0085] S11 extracts the grid content. Given a grid, generally, the grid address is recorded as (r, c), i.e., the rth row and the cth column. (1) Record the data format of the grid, including date, currency, text, etc.; (2) If it is text, record the length of the longest text so far; (3) If it is a number, record the number of digits of the longest number so far; (4) If it is a number, record the largest number of decimal floating-point numbers so far; (5) Record the language used, such as simplified Chinese, traditional Chinese, British English, American English; the data format, text, number, and language used for recording are used as key data features;

[0086] S12 extracts the row content. Given a row r, record the subtotal of the row value, that is, if all the values ​​are numbers, record the sum of all the grid values ​​in the row, the largest value so far, and use the largest value as the key data feature;

[0087] S13 extracts the content of the column. Given a column a, record the subtotal of the column value, that is, if all the values ​​are numbers, record the sum of all the grid values ​​in the column, the largest value so far; and use the largest value as the key data feature;

[0088] Step 2: Import new target reports in large quantities, report errors on the form content, select a certain feature to compare with the above key data feature, if they do not match, report an error, retrieve a regular expression based on the feature reported for error, and use a regular expression with a sufficiently high task matching degree (when the matching degree is greater than or equal to 2, it is considered that the matching degree is sufficiently high, and the calculation formula for the matching degree is the same as that in Example 1) as the regular expression for verification; the specific steps of reporting errors on the form content include:

[0089] S21 Given a grid in a form, (a) compare it with the data format feature extracted above, if it does not match, report "data format, wrong"; (b) compare it with the text length feature extracted above, if the feature is less than 50% of the text length of this grid, report "text length is too long, suspected to be wrong"; (c) compare it with the numerical size feature extracted above, if the feature is less than 50% of the numerical value of this grid, report "numerical value is too large, suspected to be wrong"; (d) compare it with the decimal floating point feature extracted above, if the feature is more than 1 decimal floating point of this grid, report "too many decimal floating point digits, suspected to be wrong"; (e) compare it with the language feature extracted above, if the feature does not contain the language of this grid, report "unseen language, suspected to be wrong";

[0090] S22 Given a row in a form, (a) determine whether all cells in the row are numbers; (b) compare with the subtotal feature of the row value extracted above. If the feature is less than 50% of the value of this row, report "row value is too large, suspected to be wrong";

[0091] S23 Given a column in a form, (a) determine whether all cells in the column are numbers; (b) compare with the subtotal feature of the column value extracted above. If the feature is less than 50% of the value of this column, report "the column value is too large, suspected to be wrong";

[0092] Step 3: Import the target report to be verified, extract text content from the target report, match the report content according to each regular expression, verify the text content, and when the target report content does not match the regular expression, display an error or prompt the abnormal location and highlight it.

[0093] Further, on the basis of the above-mentioned embodiment 3, in case of an error, modification suggestions are made to the new form based on the regular expression described in the above steps.

[0094] The above-mentioned embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and substitutions made by technicians in this field on the basis of the present invention shall fall within the scope of protection required by the present invention.

Claims

1. A report content verification method, characterized in that: include: Step 1: Traverse users and report types to obtain all data in user reports. Based on all the obtained data, analyze the data required for a single project in the report and the data required for joint analysis of multiple projects, determine the key fields in the report, design regular expressions for each key field based on the type and attributes of the key fields, and establish a regular expression set. Step 2: Import N known correct reports, extract multiple key data features of the reports, associate the attribute information of the multiple key data features with the regular expression, and when a key data feature does not match the regular expression, correct the regular expression according to the extracted key data feature, and output the corrected regular expression; correct each regular expression according to the same steps to establish a standardized regular expression set; Step 3: Import the target report to be verified, extract the text content from the target report, match the report content according to each regular expression, verify the text content, determine the matching degree of the text content during verification, determine the verification result of the text content based on the matching degree, and judge whether the matching degree is greater than or equal to the preset matching degree. If so, it is determined that the text content verification has passed, and if not, it is determined that the text content verification has failed. When the target report content does not match the regular expression, an error is displayed or the abnormal position is prompted and highlighted. The preset matching degree calculation method is: matching degree = similarity coefficient - data format difference coefficient - language difference coefficient; wherein, similarity coefficient = text length (x, y) / text length (r, c)+value size (x, y) / value size (r, c) +decimal floating point (x, y) / decimal floating point (r, c); wherein (x, y) refers to the feature in the target report to be verified, and (r, c) is the feature extracted from the regular expression; the data format difference coefficient is expressed as follows: (i) if the data format (r, c) is different from the data format (x, y), the coefficient takes a value of 0.5; (ii) if the data format (r, c) is the same as the data format (x, y), the coefficient takes a value of 0.0; the language difference coefficient is expressed as follows: (i) if the language (r, c) does not contain the language (x, y), the coefficient takes a value of 0.5; (ii) if the language (r, c) contains the language (x, y), the coefficient takes a value of 0.0; (x, y) represents the content in the target report to be verified, and (r, c) represents the feature extracted from the regular expression; Step 4: For the above-mentioned display errors or abnormal prompts, make correction suggestions for the report to be verified. Specifically, search the regular expression according to the location of the display error or abnormal prompt, extract the partial features corresponding to the display error or abnormal prompt features from the regular expression, and output the partial features.

2. The report content verification method according to claim 1, characterized in that: The step 1 of establishing a regular expression set specifically includes: S11, according to the type and attribute of the focused field, combining at least one specific symbol for matching any character as a matching item of the regular expression, and sorting the matching items to form at least one regular expression; S12 treats each type of data in the report content as a node, numbers each node to clarify the data type represented by the node, and calculates the regular expression of each node in the table content based on the connection relationship between each node and the number, and uses all regular expressions as the string code of this type of data structure to construct a regular expression set.

3. The report content verification method according to claim 1 or 2, characterized in that: The regular expression set includes regular expressions for table headers, regular expressions for column names, regular expressions for row names, regular expressions for grid attributes, and regular expressions for grid content.

4. The report content verification method according to claim 1 or 2, characterized in that: In step 2, the key data features are one or more of data format, text length, value size, decimal floating point, language, row value subtotal, and column value subtotal.

5. A report content verification system for implementing the report content verification method according to any one of claims 1 to 4, characterized in that: include Report import module, used to import target reports according to user instructions; The analysis and construction module is used to obtain the data of the target report, and analyze the data required for a single project in the report and the data composition rules required for the joint analysis of multiple projects according to the user's instructions based on all the obtained data, determine the key focus fields in the report, design regular expressions for each key focus field according to the type and attribute of the key focus field, and establish a regular expression set; The verification rule correction module is used to obtain multiple key data features in a known correct report, and associate the attribute information of the key data features with the regular expression according to the user's instructions. When a key data feature does not match the regular expression, the regular expression is corrected according to the extracted key data feature, and the corrected regular expression is output; each regular expression is corrected according to the same steps to establish a standardized regular expression set; The report verification processing module is used to verify the target report content according to the regular expression.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Report data verification method and device, computer equipment and storage medium

    CN110502531A

  • Patent information analysis method and device

    CN102682109A

  • Checking method and device of text contents in video, equipment and storage medium

    CN107862258A

  • A regular expression-based public security traffic management service data processing and inputting method

    CN109767177A