Report data verification method and device and readable storage medium
By providing a report data verification method, using the reception of verification instructions and automated verification process, the problem of low verification efficiency in the existing technology is solved, and the rapid automatic verification of report data is realized.
Patent Information
- Application Number
- CN202411715697.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
AI Technical Summary
After the existing report system discovers abnormal data problems, the report developers need to troubleshoot and locate it, resulting in low efficiency in reporting data verification.
Provide a report data verification method, which realizes automated verification by receiving verification instructions, determining target reports and rules to be checked, and verifying the verification formula based on the error allowable range.
Improve the verification efficiency of report data. Users only need to enter a verification instruction carrying target report identification information to achieve automatic verification of the target report's target verification rules, and quickly realize automatic verification of report data.
Smart Images

Figure CN119645981A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and more specifically, to a report data verification method, device and readable storage medium. Background Art
[0002] With the continuous expansion of financial market business and the development of computer technology, more and more business data are produced based on the network, and the value behind the data is increasingly valued by industry personnel. The reporting system is currently the most common product for obtaining and displaying data information. By obtaining data from different data sources, the data is summarized, counted, and processed into various reference indicators according to different dimensions to form report data, which can be used to analyze the data more intuitively in order to provide effective decision support. Therefore, higher requirements are placed on the accuracy of the report data, and it is particularly important to fully verify the report data.
[0003] However, in most current reporting systems, users first discover data anomalies during use and then report the problems to report developers, who then troubleshoot and locate the problems. This results in low verification efficiency for report data. Summary of the invention
[0004] The embodiments of the present application provide a report data verification method, device and readable storage medium, which can improve the verification efficiency of report data.
[0005] In view of this, an embodiment of the present application provides a report data verification method, the method comprising:
[0006] receiving a verification instruction, wherein the verification instruction includes target report identification information;
[0007] Determine a target report and a target rule to be verified of the target report from a database according to the target report identification information, wherein the target rule to be verified includes a target formula to be verified and a target error allowable range;
[0008] The target formula to be verified is verified according to the target report and the target error allowable range to obtain a verification result.
[0009] Optionally, the target formula to be verified includes a target left expression, a target right expression and a target symbol to be verified.
[0010] Optionally, verifying the target formula to be verified according to the target report and the target error allowable range to obtain a verification result includes:
[0011] Respectively obtain the first input data of the target left expression and the second input data of the target right expression from the target report;
[0012] Obtain a first calculation result according to the first input data and the target left expression;
[0013] Obtain a second calculation result according to the second input data and the target right expression;
[0014] A check is performed based on the first calculation result, the second calculation result, the target symbol to be checked and the target error allowable range to obtain a check result.
[0015] Optionally, the method further comprises:
[0016] receiving a rule to be verified, wherein the rule to be verified includes report identification information, a formula to be verified, and an error tolerance range;
[0017] Verifying whether the rule to be verified complies with the lexical rule and the grammatical rule according to the lexical analyzer and the grammatical analyzer;
[0018] If the rule to be checked conforms to the lexical rule and the grammatical rule, the rule to be checked is stored in the database.
[0019] Optionally, storing the to-be-verified rule in a database includes:
[0020] Generate an abstract syntax tree of the formula to be verified based on the syntax analyzer;
[0021] Converting the formula to be verified into a structured query language statement based on the abstract syntax tree, wherein the structured query language statement includes a number retrieval statement and a function calculation statement;
[0022] Establishing a correspondence between the structured query language statement and the report identification information;
[0023] The corresponding relationship, the structured query language statement, the report identification information and the error tolerance range are stored in a database.
[0024] Optionally, the method further comprises:
[0025] If the rule to be checked does not comply with the lexical rule or the grammatical rule, a first prompt information is displayed, where the first prompt information is used to indicate that the rule to be checked has a lexical problem or a grammatical problem.
[0026] Optionally, the method further comprises:
[0027] A configuration rule file, wherein the rule file includes lexical rules and grammatical rules;
[0028] The lexical analyzer and the syntax analyzer are obtained according to the rule file and the generator.
[0029] Optionally, the method further comprises:
[0030] If the verification result is that the verification failed, a second prompt message and a third prompt message are displayed, the second prompt message is used to indicate that the verification of the target rule to be verified failed, and the third prompt message includes at least one of the target report identification information, the target formula to be verified, the report cell coordinates corresponding to the first input data, the report cell coordinates corresponding to the second input data, the first calculation result, and the second calculation result.
[0031] The present application also provides a report data verification device, the device comprising:
[0032] A receiving unit, configured to receive a verification instruction, wherein the verification instruction includes target report identification information;
[0033] A determination unit, configured to determine a target report and a target rule to be verified of the target report from a database according to the target report identification information, wherein the target rule to be verified includes a target formula to be verified and a target error allowable range;
[0034] The verification unit is used to verify the target formula to be verified according to the target report and the target error allowable range to obtain a verification result.
[0035] The embodiment of the present application also provides a computer device, including: a memory, a processor, and a bus system;
[0036] Wherein, the memory is used to store programs;
[0037] The processor is used to execute the program in the memory to implement any one of the report data verification methods described above;
[0038] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0039] The embodiment of the present application also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enables the computer to execute any one of the report data verification methods described above.
[0040] The embodiment of the present application provides a report data verification method, including: receiving a verification instruction, the verification instruction including target report identification information; determining a target report and a target rule to be verified of the target report from a database according to the target report identification information, the target rule to be verified including a target formula to be verified and a target error allowable range; verifying the target formula to be verified according to the target report and the target error allowable range to obtain a verification result. It can be seen that in the present application, the user only needs to input a verification instruction carrying the target report identification information to realize automatic verification of the target rule to be verified of the target report that needs to be verified, and obtain a verification result, thereby being able to quickly realize automatic verification of report data and improve the verification efficiency of report data. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0042] Figure 1 A flow chart of a report data verification method provided in an embodiment of the present application;
[0043] Figure 2 A flowchart of another report data verification method provided in an embodiment of the present application;
[0044] Figure 3 A structural schematic diagram of a report data verification device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0047] First, some of the terms that may be involved in this application are explained:
[0048] Lexical rules: legal sequences of characters in a language.
[0049] Grammatical rules: The different grammatical structures in a language.
[0050] Abstract Syntax Tree (AST): It is an abstract representation of the source code structure, which represents the grammatical structure of the programming language in a tree form. Each node in the tree represents a structure in the source code.
[0051] Lexical analysis: Decompose the input character sequence into subsequences called Tokens according to the defined lexical rules.
[0052] Syntax analysis: According to the defined grammar rules, the token stream generated by lexical analysis is converted into an abstract syntax tree.
[0053] With the continuous expansion of financial market business and the development of computer technology, more and more business data based on network production is generated, and the value behind the data is increasingly valued by industry personnel. Reporting system is currently the most common product for acquiring and displaying data information. By acquiring data from different data sources, the data is summarized, counted, and processed into various reference indicators according to different dimensions to form report data, which can be used to analyze the data more intuitively in order to provide effective decision support. Therefore, higher requirements are placed on the accuracy of report data, and how to fully verify the report data is particularly important. From different data sources to the display of report data, the process goes through the acquisition of source data, the processing of data by batch processing programs at each data layer, the storage of processed data in the database or file system, and the transmission of data from the back end to the front end for display. Errors in any of the above links will result in inaccurate report data that users ultimately see.
[0054] However, in most current reporting systems, users first discover data anomalies during use and then report the problems to report developers, who then troubleshoot and locate the problems. This results in low verification efficiency for report data.
[0055] Therefore, in order to solve the above problems, the embodiments of the present application provide a report data verification method, device and readable storage medium, which can improve the verification efficiency of report data.
[0056] See also Figure 1 A report data verification method provided in an embodiment of the present application includes the following steps.
[0057] S101, receiving a verification instruction.
[0058] The verification instruction includes target report identification information.
[0059] In this embodiment, a verification instruction input by a user can be received through a human-computer interaction interface. It is understandable that when the data of a target report needs to be verified, the verification of the data of the target report can be initiated by inputting a verification instruction carrying the target report identification information. Among them, the target report identification information can be the report number of the target report, or it can be a unique identifier that can identify the target report, and the embodiment of the present application is not limited here. It should be noted that the target report identification information can be one or more, that is, a verification instruction can be used to initiate the verification of the data of a target report, and a verification instruction can also be used to initiate the verification of the data of multiple target reports.
[0060] S102: Determine a target report and target rules to be verified of the target report from a database according to the target report identification information.
[0061] The target verification rules include the target verification formula and the target error allowable range.
[0062] In the embodiment of the present application, the database may pre-store the data of multiple reports and the rules to be verified corresponding to each report, and the database may also store the identification information of each report and the corresponding relationship between the identification information of each report and the rules to be verified corresponding to each report. Among them, the rules to be verified may be parameters or data for measuring the accuracy of the report data, and the rules to be verified may include the formula to be verified and the error tolerance range, and may also include the identification information of the report, etc. The formula to be verified may be the formula or function data used in the report to automatically calculate the calculation result according to the input data, and may be defined and set by the report developer according to the requirements. The error tolerance range may be the error range in which the calculation result is allowed to exist when verifying the accuracy of the report data, that is, as long as the difference between the calculation result and the correct result is within the error tolerance range, the verification result may be determined to be a verification pass. It is understandable that after receiving the verification instruction, the target report and the rules to be verified of the target report may be obtained from the database based on the target report identification information carried in the verification instruction, so as to realize the automatic verification of the target rules to be verified of the target report to be verified, and obtain the verification result, so as to quickly realize the automatic verification of the report data and improve the verification efficiency of the report data. Among them, the target rules to be verified corresponding to the target report may be one or more.
[0063] Specifically, the target to be verified rule of the target report can include the target to be verified formula and the target error allowable range. The target to be verified formula can include the target left expression, the target right expression and the target to be verified symbol. Wherein the target left expression and the target right expression can be a numerical value, a report cell coordinate, a formula or function containing the report cell coordinate, etc., wherein the formula can include four arithmetic operations, and the function can include the SUM summation function, the AVG average function, the MAX maximum value function, the MIN minimum value function, the ABS function and the IF function, etc. The target to be verified symbol can include a greater than sign, a less than sign, an equal sign, a greater than or equal sign and a less than or equal sign, etc. In the embodiment of the present application, not only can the verification between the report cell numerical value and the function be supported, but also the verification between the report cell function and the function can be supported, so that the verification function can be made more comprehensive.
[0064] In addition, it should be noted that the target formula to be verified can be stored in the database in the form of a structured query language (SQL) statement, so that the target formula to be verified corresponding to the target report can be quickly found from the database. When obtaining the target report to be verified rules from the database based on the target report identification information carried in the verification instruction, it can be determined from the data based on the target report identification information.
[0065] S103, verifying the target formula to be verified according to the target report and the target error allowable range, and obtaining a verification result.
[0066] In an embodiment of the present application, after determining the target report and the target rule to be verified of the target report from the database according to the target report identification information, the target formula to be verified in the target rule to be verified can be verified according to the target error allowable range in the target report and the target rule to be verified to obtain a verification result, wherein the verification result can include verification pass and verification fail. Specifically, the input data of the target formula to be verified can be obtained from the target report, and the calculation result can be obtained based on the input data of the target formula to be verified and the target formula to be verified. Finally, it can be determined whether the calculation result is correct according to the calculation result and the target symbol to be verified to obtain the verification result, thereby being able to quickly realize automatic verification of report data and improve the verification efficiency of report data.
[0067] In one possible implementation method of the embodiment of the present application, the target formula to be verified is verified according to the target report and the target error allowable range to obtain a verification result, including: obtaining the first input data of the target left expression and the second input data of the target right expression from the target report respectively; calculating the first calculation result according to the first input data and the target left expression; calculating the second calculation result according to the second input data and the target right expression; verifying according to the first calculation result, the second calculation result, the target symbol to be verified and the target error allowable range to obtain a verification result.
[0068] In the embodiment of the present application, when the target formula to be verified is verified, the first input data of the target left expression and the second input data of the target right expression can be found out from the target report first, the first input data can be the specific value of the cell specified as the input data in the target left expression, and the second input data can be the specific value of the cell specified as the input data by the target right expression. After finding out the first input data from the target report, the first input data can be substituted into the target left expression, and the first calculation result of the target left expression can be calculated. After finding out the second input data from the target report, the second data can be substituted into the target right expression, and the second calculation result of the target right expression can be calculated. Then, it can be determined whether the relationship between the first calculation result and the second calculation result is the same as the relationship indicated by the symbol to be verified by the target according to the target error allowable range, the first calculation result and the second calculation result. If the same, the verification result can be determined to be verified through, and if different, the verification result can be determined to be verified through.
[0069] It can be seen from this that the embodiment of the present application provides a report data verification method. The user only needs to input a verification instruction carrying the target report identification information to automatically verify the target verification rules of the target report that needs to be verified and obtain the verification result, thereby being able to quickly realize automatic verification of report data and improve the verification efficiency of report data.
[0070] See also Figure 2 Another report data verification method provided in an embodiment of the present application includes the following steps.
[0071] 201. Configure rule files.
[0072] The rule file includes lexical rules and grammatical rules.
[0073] In the embodiment of the present application, the rule file can be configured in advance, and the lexical rules and grammatical rules can be defined in the rule file. The lexical rule can be represented by key1:value, where key1 can be the name of a legal character sequence, and value can be a string or a string list, and a regular expression or a regular expression list. The grammatical rule can be represented by key2:expression, where key2 can be a grammatical name, and expression can be a combination of a lexical name and a grammatical name.
[0074] 202. Obtain a lexical analyzer and a syntax analyzer according to the rule file and the generator.
[0075] In an embodiment of the present application, after configuring the rule file, the rule file can be input into the generator so that the generator can generate a corresponding lexical analyzer and a syntax analyzer based on the rule file. The generator can generate a java program by reading the rule file, wherein the java program may include a lexical analyzer and a syntax analyzer. The lexical analyzer can be used to perform lexical analysis on the input rules to be checked, and the syntax analyzer can be used to perform syntax analysis on the input rules to be checked.
[0076] 203. Receive the rules to be verified.
[0077] The rules to be verified include report identification information, formulas to be verified, and error tolerance range.
[0078] In an embodiment of the present application, one or more rules to be checked may be received that are input by a user or imported in batches. Each rule to be checked may include report identification information, a formula to be checked, and an error tolerance range, and the rule to be checked may also include a formula number, etc. It is understandable that the formula to be checked may include a left expression, a right expression, and a symbol to be checked. The left expression and the right expression may be a numerical value, a report cell coordinate, a formula or function containing the report cell coordinates, etc., wherein the formula may include four arithmetic operations, and the function may include a SUM function, an AVG function for averaging, a MAX function for maximum value, a MIN function for minimum value, an ABS function, and an IF function, etc. The symbol to be checked may include a greater than sign, a less than sign, an equal sign, a greater than or equal to sign, and a less than or equal to sign, etc.
[0079] 204. Verify whether the rule to be verified complies with the lexical rule and the grammatical rule according to the lexical analyzer and the grammatical analyzer.
[0080] In an embodiment of the present application, after receiving the rules to be checked, the rules to be checked can be input into the lexical analyzer and the grammatical analyzer respectively, and the lexical analyzer and the grammatical analyzer respectively check whether the rules to be checked comply with the lexical rules and the grammatical rules, thereby completing the preliminary verification of the rules to be checked. Specifically, the formulas to be checked in the rules to be checked can be input into the lexical analyzer and the grammatical analyzer respectively to verify the lexical rules and the grammatical rules.
[0081] In one possible implementation of an embodiment of the present application, if the rule to be checked does not conform to the lexical rule or the grammatical rule, a first prompt message is displayed, and the first prompt message is used to indicate that the rule to be checked has a lexical problem or a grammatical problem. In an embodiment of the present application, if the rule to be checked does not conform to the lexical rule or the grammatical rule, a first prompt message may be displayed so that the user can determine the rule to be checked that has a lexical problem or a grammatical problem based on the first prompt message, so that the user can check and modify the rule to be checked based on the problem.
[0082] 205. If the rule to be checked conforms to the lexical rule and the grammatical rule, the rule to be checked is stored in the database.
[0083] In an embodiment of the present application, if the rules to be checked conform to the lexical rules and grammatical rules, the rules to be checked can be stored in a database so that when the user needs to verify the report data, the rules to be checked corresponding to the report data can be quickly obtained from the database for verification, thereby improving the verification efficiency of the report data.
[0084] In a possible implementation method of the embodiment of the present application, the rules to be checked are stored in a database, including: generating an abstract syntax tree of the formula to be checked based on a syntax analyzer; converting the formula to be checked into a structured query language statement based on the abstract syntax tree, the structured query language statement including a data retrieval statement and a function calculation statement; establishing a correspondence between the structured query language statement and the report identification information; storing the correspondence, the structured query language statement, the report identification information and the allowable error range in the database.
[0085] In an embodiment of the present application, an abstract syntax tree of the formula to be verified can be first generated based on a syntax analyzer; then the abstract syntax tree can be traversed to convert the left expression and the right expression in the formula to be verified into structured query language statements, respectively, wherein the structured query language statements can include data retrieval statements and function calculation statements; then a correspondence between the structured query language statements and the report identification information can be established, and the correspondence, the structured query language statements, the report identification information and the allowable error range can be stored in a database, so that when a user needs to verify the report data, the to-be-verified rules corresponding to the report data can be quickly obtained from the database for verification, thereby improving the verification efficiency of the report data.
[0086] 206. Receive verification instructions.
[0087] 207. Determine the target report and the target verification rule of the target report from the database according to the target report identification information.
[0088] 208. Verify the target formula to be verified according to the target report and the target error allowable range to obtain the verification result.
[0089] The specific contents of step 206 to step 208 are similar to the contents of step 101 to step 103 in the above embodiment, and will not be repeated herein in the embodiment of the present application.
[0090] 209. If the verification result is that the verification fails, the second prompt message and the third prompt message are displayed.
[0091] Among them, the second prompt information is used to indicate that the target to be verified rule verification has not passed, and the third prompt information includes at least one of the target report identification information, the target to be verified formula, the report cell coordinates corresponding to the first input data, the report cell coordinates corresponding to the second input data, the first calculation result, and the second calculation result.
[0092] In an embodiment of the present application, if the verification result of the target formula to be verified is that the verification failed, the second prompt information and the third prompt information can be displayed so that the user can determine the target formula to be verified that may affect the accuracy of the report data, as well as the target report identification information corresponding to the target formula to be verified, the content of the target formula to be verified, the report cell coordinates corresponding to the first input data, the report cell coordinates corresponding to the second input data, the first calculation result and the second calculation result, etc., so that the user can check and modify the target formula to be verified that failed the verification.
[0093] It should be noted that for target reports that fail the target verification formula, subsequent operations cannot be performed. For example, the target report can be submitted to the regulatory agency, etc., until the user verifies the data of the target report by issuing the next verification instruction, and all the target verification formulas corresponding to the target report pass.
[0094] It can be seen from this that the embodiment of the present application provides a report data verification method, which allows users to input or batch import the rules to be verified, and prompts the formulas to be verified with lexical and grammatical errors, so that the configuration of the formula to be verified is more flexible. And it can not only support the verification between the report cell value and the function, but also support the verification between the report cell function and the function, so that the verification function can be made more comprehensive. By defining and supplementing the lexical rules and grammatical rules, the configuration of the formula to be verified can be made more scalable. By traversing the abstract syntax tree generated based on the syntax analyzer, the formula to be verified is converted into an SQL statement for obtaining data and an SQL statement for function calculation and stored in the database, and the implementation method from custom formula to obtaining report data and functions stored in the database is clearly given. Provide sufficient warning information for the target formula to be verified that fails the verification, so that users and developers can quickly locate and troubleshoot problems. The subsequent operation of the target report that fails the verification can be blocked to prevent the continuation of erroneous data.
[0095] See also Figure 3 The present application also provides a report data verification device, the device comprising:
[0096] A receiving unit 301 is used to receive a verification instruction, wherein the verification instruction includes target report identification information;
[0097] A determination unit 302, configured to determine a target report and a target rule to be verified of the target report from a database according to the target report identification information, wherein the target rule to be verified includes a target formula to be verified and a target error allowable range;
[0098] The verification unit 303 is used to verify the target formula to be verified according to the target report and the target error allowable range to obtain a verification result.
[0099] Optionally, the target formula to be verified includes a target left expression, a target right expression and a target symbol to be verified.
[0100] Optionally, the verification unit 303 is specifically configured to:
[0101] Respectively obtain the first input data of the target left expression and the second input data of the target right expression from the target report;
[0102] Obtain a first calculation result according to the first input data and the target left expression;
[0103] Obtain a second calculation result according to the second input data and the target right expression;
[0104] A check is performed based on the first calculation result, the second calculation result, the target symbol to be checked and the target error allowable range to obtain a check result.
[0105] Optionally, the device further comprises:
[0106] The receiving unit 301 is further used to receive a rule to be verified, wherein the rule to be verified includes report identification information, a formula to be verified and an error tolerance range;
[0107] The verification unit 303 is further used to verify whether the rule to be verified complies with the lexical rule and the grammatical rule according to the lexical analyzer and the grammatical analyzer;
[0108] The storage unit is used to store the rule to be checked in a database if the rule to be checked conforms to the lexical rule and the grammatical rule.
[0109] Optionally, the storage unit is specifically used to:
[0110] Generate an abstract syntax tree of the formula to be verified based on the syntax analyzer;
[0111] Converting the formula to be verified into a structured query language statement based on the abstract syntax tree, wherein the structured query language statement includes a number retrieval statement and a function calculation statement;
[0112] Establishing a correspondence between the structured query language statement and the report identification information;
[0113] The corresponding relationship, the structured query language statement, the report identification information and the error tolerance range are stored in a database.
[0114] Optionally, the device further comprises:
[0115] The display unit is used to display first prompt information if the rule to be checked does not comply with the lexical rule or the grammatical rule, wherein the first prompt information is used to indicate that the rule to be checked has a lexical problem or a grammatical problem.
[0116] Optionally, the device further comprises:
[0117] A configuration unit, used for configuring a rule file, wherein the rule file includes lexical rules and grammatical rules;
[0118] A generating unit is used to obtain the lexical analyzer and the syntax analyzer according to the rule file and the generator.
[0119] It can be seen from this that the embodiment of the present application provides a report data verification device, and the user only needs to input a verification instruction carrying the target report identification information to realize automatic verification of the target report to be verified and obtain the verification result, thereby being able to quickly realize automatic verification of the report data and improve the verification efficiency of the report data.
[0120] The embodiment of the present application also provides a computer device, including: a memory, a processor, and a bus system;
[0121] Wherein, the memory is used to store programs;
[0122] The processor is used to execute the program in the memory to implement any one of the report data verification methods described above;
[0123] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0124] The embodiment of the present application also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enables the computer to execute any one of the report data verification methods described above.
[0125] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0126] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A report data verification method, characterized in that: The method comprises: receiving a verification instruction, wherein the verification instruction includes target report identification information; Determine a target report and a target rule to be verified of the target report from a database according to the target report identification information, wherein the target rule to be verified includes a target formula to be verified and a target error allowable range; The target formula to be verified is verified according to the target report and the target error allowable range to obtain a verification result.
2. The method according to claim 1, characterized in that The target formula to be verified includes a target left expression, a target right expression and a target symbol to be verified.
3. The method according to claim 2, characterized in that The step of verifying the target formula to be verified according to the target report and the target error allowable range to obtain a verification result includes: Respectively obtain the first input data of the target left expression and the second input data of the target right expression from the target report; Obtain a first calculation result according to the first input data and the target left expression; Obtain a second calculation result according to the second input data and the target right expression; A check is performed based on the first calculation result, the second calculation result, the target symbol to be checked and the target error allowable range to obtain a check result.
4. The method according to claim 1, characterized in that: The method further comprises: receiving a rule to be verified, wherein the rule to be verified includes report identification information, a formula to be verified, and an error tolerance range; Verifying whether the rule to be verified complies with the lexical rule and the grammatical rule according to the lexical analyzer and the grammatical analyzer; If the rule to be checked conforms to the lexical rule and the grammatical rule, the rule to be checked is stored in the database.
5. The method according to claim 4, characterized in that The storing the to-be-verified rules in a database comprises: Generate an abstract syntax tree of the formula to be verified based on the syntax analyzer; Converting the formula to be verified into a structured query language statement based on the abstract syntax tree, wherein the structured query language statement includes a number retrieval statement and a function calculation statement; Establishing a correspondence between the structured query language statement and the report identification information; The corresponding relationship, the structured query language statement, the report identification information and the error tolerance range are stored in a database.
6. The method according to claim 4, characterized in that The method further comprises: If the rule to be checked does not comply with the lexical rule or the grammatical rule, a first prompt information is displayed, where the first prompt information is used to indicate that the rule to be checked has a lexical problem or a grammatical problem.
7. The method according to claim 4, characterized in that The method further comprises: A configuration rule file, wherein the rule file includes lexical rules and grammatical rules; The lexical analyzer and the syntax analyzer are obtained according to the rule file and the generator.
8. The method according to any one of claims 3 to 7, characterized in that: The method further comprises: If the verification result is that the verification failed, a second prompt message and a third prompt message are displayed, the second prompt message is used to indicate that the verification of the target rule to be verified failed, and the third prompt message includes at least one of the target report identification information, the target formula to be verified, the report cell coordinates corresponding to the first input data, the report cell coordinates corresponding to the second input data, the first calculation result, and the second calculation result.
9. A report data verification device, characterized in that: The device comprises: A receiving unit, configured to receive a verification instruction, wherein the verification instruction includes target report identification information; A determination unit, configured to determine a target report and a target rule to be verified of the target report from a database according to the target report identification information, wherein the target rule to be verified includes a target formula to be verified and a target error allowable range; The verification unit is used to verify the target formula to be verified according to the target report and the target error allowable range to obtain a verification result.
10. A computer-readable storage medium, characterized in that: The device stores instructions which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 8.