Bill automatic checking and repairing system and method based on multi-rule engine

The automatic bill verification and repair system based on a multi-rule engine solves the problem of frequent errors caused by manual billing for enterprises, and achieves fast and accurate bill verification and repair, improving user experience and system adaptability.

CN121957960APending Publication Date: 2026-05-01UNICLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
UNICLOUD TECH CO LTD
Filing Date
2025-12-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In enterprise contract performance and settlement scenarios, billing errors often occur due to personalized billing rules and abnormal situations, resulting in extended reconciliation cycles, reduced user trust, and a lack of effective automated verification and repair mechanisms.

Method used

An automatic bill verification and repair system based on a multi-rule engine is adopted, including an interactive display module, a data processing module, a rule management engine, a verification analysis module, and a repair execution module. Through structured data processing and rule-based verification, automatic bill verification and repair are achieved.

Benefits of technology

It enables rapid output of automatic bill verification and repair, reduces human error, lowers the error rate, improves user experience, and adapts to different customers' billing formats and personalized billing agreements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121957960A_ABST
    Figure CN121957960A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of data processing and automatic checking, and discloses a bill automatic checking and repairing system and method based on a multi-rule engine. In order to solve the problems that multi-tab and personalized charging Excel bills are low in manual rechecking efficiency, easy to miss and error and untraceable in correction, the system comprises an interactive display module, a data processing module, a rule management engine module, a verification analysis module and a repair execution module. Reading multiple tabs of the bill, and performing merging cell splitting and filling, date / numerical value format unification and discount normalization to form a data dictionary; and executing the selected verification rule according to an abstract rule interface to generate standardized error information, and calling repair logic of the same rule to directionally correct and store errors containing correct values. According to the scheme, rapid verification, error structured tracking and one-key repair are realized, the account checking period is shortened, and the accuracy and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

An automatic bill verification and repair system and method based on a multi-rule engine Technical Field

[0001] This invention belongs to the field of enterprise billing data processing and automated verification technology, and in particular relates to an automatic billing verification and repair system and method based on a multi-rule engine. Background Technology

[0002] In enterprise contract performance and settlement scenarios, the billing center typically needs to generate bills at the beginning of each month based on users' resource usage from the previous month and send them to users for reconciliation confirmation. The confirmed bills serve as the basis for subsequent invoicing and payment. Due to the following objective reasons, bills often need to be manually generated in Excel format or manually adjusted: some users have customized unit prices, special billing periods, and other personalized billing rules, making it difficult to directly export standard bills from the platform; troubleshooting abnormal situations such as temporary resource activation or instance underlying activation failure requiring rework requires manual correction of resource usage before generating bills.

[0003] In manual billing mode, billing center staff often need to check information such as usage, unit price, discount, and total amount line by line, which is prone to errors due to human error or omissions. Billing errors lead to repeated communication and corrections during reconciliation, prolonging the reconciliation cycle and payment collection time. Frequent errors also reduce user trust and affect user experience. Due to the large differences in billing formats and requirements, there is a lack of universal products on the market. Enterprises often use cross-checking by personnel, but this is labor-intensive and still has a certain error rate.

[0004] Based on actual business operations, common error types include: inconsistencies between billing periods and billing cycles; data correlation errors such as discrepancies between total amounts and detailed cumulative amounts; errors in calculating billing days; mismatches between specifications and unit prices; calculation deviations caused by inconsistencies between usage units and unit price cycle units; logical errors in calculations of discounts, catalog prices, and actual costs; and inconsistent date / number formats. The concentrated billing at the beginning of the month leads to tight deadlines and heavy workloads, resulting in higher error rates and making it difficult to establish a standardized error tracking and correction mechanism, leading to the recurrence of similar errors. Summary of the Invention

[0005] In view of this, the present invention aims to propose an automatic bill verification and repair system and method based on a multi-rule engine, so as to at least solve one of the problems in the background art.

[0006] To achieve the above objectives, the technical solution of this invention is implemented as follows: Firstly, this solution discloses an automatic bill verification and repair system based on a multi-rule engine, including an interactive display module, a data processing module, a rule management engine, a verification analysis module, and a repair execution module. The interactive display module receives Excel bill file uploads, rule selections, and verification / repair instructions, and displays error information. The data processing module reads multi-tab data from the Excel bill, performs merged cell splitting and filling, unifies date and number formats, and normalizes discount fields to form a data dictionary with page signatures as keys and structured data tables as values. The rule management engine manages multiple verification rules based on an abstract rule interface, selects and calls the chosen rule to perform verification on the data dictionary, and outputs an error list. The verification analysis module converts the error list into a standardized set of error information containing page signatures, error locations, error types, associated rules, correct values, and repair status. The repair execution module calls the repair logic of the corresponding rule for errors with correct values ​​to perform targeted correction on the data dictionary and saves and outputs the repaired bill.

[0007] Furthermore, the interactive display module includes a file upload component, a rule selection component, and a function button component. The function button component includes at least an "Analyze Bill" button for triggering the verification process and a "Repair and Save" button for triggering the repair and save process.

[0008] Furthermore, the interactive display module includes an error display area, which displays the standardized error information set in a table format. The table includes at least the page signature, error location, data ID, error type, association rule, error description, and repair status field.

[0009] Furthermore, when reading the bill file, the data processing module parses all page signatures and performs preprocessing on each page signature before writing it into the data dictionary.

[0010] Furthermore, the merged cell splitting and filling includes identifying the merged area and using the value of the first non-empty cell in the merged area to fill the other cells in the merged area.

[0011] Furthermore, the date format unification includes converting multiple representations of the same date field into a preset date format.

[0012] Furthermore, the unified number format includes converting at least one of the fields—catalog price, unit price, settlement price, and summary price—into floating-point numbers.

[0013] Furthermore, the discount field normalization includes converting percentage discounts to decimal discounts and uniformly filling empty discounts or discounts represented by placeholders with 1.0.

[0014] Furthermore, the data processing module is also used to extract at least one key piece of information from the bill file, including the bill title, billing period, and username, and to use the key information to verify the execution of rules or to locate errors.

[0015] Furthermore, the structured data table is a data structure that can be located by row and column indexes, and the error location includes at least row index, column index and / or cell coordinate information to support the targeted correction.

[0016] Furthermore, the abstract rule interface is used to constrain each verification rule to include at least a rule name acquisition method, a verification method, and a repair method, wherein the verification method is used to input the data dictionary and output an error list, and the repair method is used to input the data dictionary and the error list and output a repaired data dictionary.

[0017] Furthermore, the rule management engine includes a rule loading unit and a rule registration unit. The rule loading unit is used to load a default rule set, and the rule registration unit is used to register new rules to achieve rule expansion without changing the main system flow.

[0018] Furthermore, the default rule set includes at least one or more of the following: payment period verification rules, usage duration verification rules, unit price verification rules, catalog price verification rules, actual cost verification rules, summary price verification rules, and summary page total verification rules.

[0019] Furthermore, the rule management engine includes a rule selection unit, used to obtain a set of rule names selected by the user, and to perform verification only on the verification rules corresponding to the set of rule names.

[0020] Furthermore, the standardized error information set is composed of error objects, which at least include the following fields: sheet_name, position, id, error_type, description, rule_name, index, correct_value, and repair_status.

[0021] Furthermore, the verification analysis module marks the erroneous object as automatically repairable or requiring manual intervention based on the existence of the correct_value field, and sets the repair_status field accordingly to pending repair, repaired, or requiring manual intervention.

[0022] Furthermore, when the rule management engine performs verification on the selected rules, it summarizes and merges the error lists output by each rule and outputs them to the verification analysis module.

[0023] Furthermore, when performing targeted correction, the repair execution module locates the position of the data to be repaired based on the sheet_name and position of the erroneous object, and replaces the original value with the correct_value.

[0024] Furthermore, the repair execution module supports batch repair of all automatically repairable errors at once and generates a repair log. The repair log includes at least one or more of the following: repair rule name, repair location, pre-repair value, and post-repair value.

[0025] Furthermore, the data processing module includes a file saving unit, which is used to write back the repaired data dictionary to generate a repaired billing file and output the save path information to the interactive display module.

[0026] Secondly, this solution discloses an automatic bill verification and repair method based on a multi-rule engine, characterized by the following steps: S1: Receiving an Excel bill file and reading its multi-tab data; S2: Performing merged cell splitting and filling, date and number format unification, and discount field normalization on each tab data to generate a structured data dictionary with the page signature as the key; S3: Based on multiple verification rules managed by an abstract rule interface, performing verification on the structured data dictionary according to user selection and outputting an error list; S4: Standardizing the error list into an error information set containing page signature, error location, error type, association rule, correct value, and repair status; S5: Filtering errors with correct values ​​and calling the repair logic of the corresponding rule to perform targeted correction on the structured data dictionary; S6: Saving and outputting the repaired bill file.

[0027] Furthermore, the error objects in the error information set in step S4 include at least the fields sheet_name, position, id, error_type, description, rule_name, index, correct_value, and repair_status.

[0028] Furthermore, in step S5, batch repair is performed on errors with correct values, and a repair log containing a comparison of values ​​before and after the repair is generated.

[0029] Thirdly, this solution discloses an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the method described.

[0030] Fourthly, this solution discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.

[0031] Compared with the prior art, the bill automatic verification and repair system and method based on a multi-rule engine described in this invention has the following advantages: (1) This invention can automatically complete most of the verification work by performing structured preprocessing and rule-based verification of multi-tab bills, and achieve rapid output of verification results; (2) This invention transforms manual experience judgment into reusable rule verification logic, reducing missed detections, false detections and calculation deviations; (3) This invention introduces a standardized error object containing correct_value, and performs targeted replacement and repair of errors that can be deduced to correct values, reducing manual modification costs and reducing secondary introduction of errors; (4) This invention constrains the rule form through an abstract rule interface, and new rules can be added to the engine for execution by registration without changing the main process of the system, which is convenient for adapting to different customers' bill formats and personalized billing agreements. Attached Figure Description

[0032] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 is a schematic diagram of the system module architecture according to an embodiment of the invention; Figure 2 is a schematic diagram of the system execution flow according to an embodiment of the invention; Figure 3 is a schematic diagram of the interactive interface according to an embodiment of the invention; Figure 4 is a schematic diagram of the method flow according to an embodiment of the invention. Detailed Implementation

[0033] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0034] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0035] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0036] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0037] Example 1: System Overall Structure and Data Organization The bill automatic verification and repair system in this example includes: 1) Interactive display module: providing a file upload component, a rule selection component (multiple selections are supported and all / deselect all can be selected), an analyze bill button and a repair and save button, and an error display table; used to pass user instructions to the backend module and display errors and save results.

[0038] 2) Data Processing Module: Reads all tabs of the Excel bill and performs preprocessing on each tab; preprocessing includes at least: Merged cell splitting and filling: identifies merged areas and fills other cells within the area with the first non-empty value; Date format unification: converts various date formats such as "March 2025" and "2025-03" into a preset format; Number format unification: unifies fields such as catalog price, unit price, settlement price, and summary price into numeric types; Discount normalization: converts percentage discounts to decimal discounts, and fills empty / placeholder discounts with 1.0; Key information extraction: such as extracting titles, payment periods, usernames, etc. from specified rows / columns for subsequent verification and location.

[0039] After preprocessing, the structured data tables of each tab are written into the data dictionary in the form of "page signature - structured data table" for unified use by the rule engine.

[0040] 3) Rule Management Engine: The abstract rule interface requires each rule to include at least the rule_name, validate, and repair methods; and provides the ability to load default rules and register new rules, so that rules can be extended as needed.

[0041] 4) Verification and Analysis Module: The error list output by the rules is uniformly encapsulated into a standardized error object ErrorInfo; ErrorInfo shall contain at least the fields sheet_name, position, id, error_type, description, rule_name, index, correct_value, and repair_status, and the presence or absence of correct_value shall be used to determine whether automatic repair is possible.

[0042] 5) Repair Execution Module: Based on the sheet_name and position in ErrorInfo, the module locates the structured data table, replaces the original value with correct_value to complete the repair; supports batch repair, generates repair logs, and updates repair_status; after repair, the data processing module saves it as a repaired billing file and outputs the path.

[0043] Example 2: Implementation of Automatic Bill Verification and Repair Process Taking an Excel bill with two tabs, "Summary Page" and "Bill Details", as an example, the system execution process can be as follows: S201: After the system starts, the rule management engine loads the default rule set, and the interactive display module displays the rule list by default, which can be selected by the user.

[0044] S202: The user uploads an Excel bill; the data processing module reads all tabs and performs preprocessing to form a data dictionary, bill_data_dict.

[0045] S203: The user clicks "Analyze Bill"; the rule management engine obtains the set of rules selected by the user and executes the validate method of each rule in sequence, outputting an error list.

[0046] S204: The verification analysis module standardizes the error list into an ErrorInfo set, which is then used for interface display and subsequent repair.

[0047] S205: The user clicks "Repair and Save"; the repair execution module filters out error objects where correct_value is not empty, calls the corresponding rule repair logic, performs targeted replacement based on sheet_name and position, generates a repair log and updates repair_status.

[0048] S206: The data processing module will write back and save the repaired data dictionary as a repaired billing file (for example, by adding the identifier "_repaired" to the file name), and return the save path to the interactive display module for prompting.

[0049] Example 3: Billing Period Consistency Validation Rules and Repair Examples (Exemplary Description) In one implementation, the validate method of the billing period validation rule can extract the start date and end date text of the billing cycle field in the "Summary Page" and format it as a year-month-day date format; extract the billing period field in the "Bill Details" and convert it to a year-month date format, and then compare the two after formatting them into a date expression: if the start date or end date is not within the whole month of the billing period, an ErrorInfo is generated, with error_type as "Inconsistent Billing Period", rule_name as "Billing Period Validation Rule", and position pointing to the location of the inconsistent field; if the obtained billing period field is in the correct format, the 1st of the month corresponding to the billing period is used as the start date, and the last day of the month corresponding to the billing period is used as the end date, concatenating them into the required billing cycle string and writing it as correct_value into ErrorInfo.

[0050] Its repair method can locate the billing cycle cell on the summary page based on the position in ErrorInfo and write the correct_value, thereby completing the targeted repair and updating repair_status to repaired.

[0051] Example 4: Consistency Validation Rules and Repair Examples for Summary Amount and Detailed Cumulative Amount (Exemplary Description) In one implementation, the validate method of the summary validation rule can accumulate the actual cost field of the detail page by node and product, and compare it with the actual cost summary amount of the corresponding node and product on the summary page: if the difference exceeds the preset tolerance, ErrorInfo is output and the difference is marked; if the correct value of the summary page can be derived from the detailed cumulative value, correct_value is set to the cumulative value, and the repair method replaces the amount field of the summary page with correct_value to achieve automatic repair.

[0052] When a unique correct value cannot be derived, `correct_value` is empty and `repair_status` is marked as requiring manual intervention to prevent automatic error correction from introducing new biases.

[0053] Note: The implementation of the above rules is an exemplary description used to illustrate the technical concept of "the same rule simultaneously possessing verification and repair logic, and achieving targeted repair through standardized error objects"; the specific field positions, comparison granularity, and tolerance thresholds can be adjusted according to the billing format. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An automatic bill verification and repair system based on a multi-rule engine, characterized in that, The system includes an interactive display module, a data processing module, a rule management engine, a verification and analysis module, and a repair execution module. The interactive display module receives uploaded Excel bill files, selects rules, and sends verification / repair instructions, then displays error information. The data processing module reads multi-tab data from the Excel bill, performs splitting and filling of merged cells, standardizes date and number formats, and normalizes discount fields, forming a data dictionary with page signatures as keys and structured data tables as values. The rule management engine manages multiple verification rules based on an abstract rule interface, selects and calls the chosen rule to perform verification on the data dictionary, and outputs an error list. The verification and analysis module is used to convert the error list into a standardized set of error information containing page signature, error location, error type, association rules, correct value and repair status; The repair execution module is used to perform targeted correction of the data dictionary by calling the repair logic of the corresponding rule for errors with correct values, and saves and outputs the repaired bill.

2. The system according to claim 1, characterized in that: The abstract rule interface is used to constrain each verification rule to include at least a rule name acquisition method, a verification method, and a repair method, wherein the verification method is used to input the data dictionary and output an error list, and the repair method is used to input the data dictionary and the error list and output a repaired data dictionary.

3. The system according to claim 1, characterized in that: The rule management engine includes a rule loading unit and a rule registration unit. The rule loading unit is used to load a default rule set, and the rule registration unit is used to register new rules to achieve rule expansion without changing the main system flow.

4. The system according to claim 1, characterized in that: The standardized error information set consists of error objects, which include at least the following fields: sheet_name, position, id, error_type, description, rule_name, index, correct_value, and repair_status.

5. The system according to claim 4, characterized in that: The verification analysis module marks the erroneous object as either automatically repairable or requiring manual intervention based on the existence of the correct_value field, and sets the repair_status field accordingly to pending repair, repaired, or requiring manual intervention.

6. The system according to claim 1, characterized in that: When performing targeted correction, the repair execution module locates the data to be repaired based on the sheet_name and position of the erroneous object, and replaces the original value with the correct_value.

7. The system according to claim 1, characterized in that: The repair execution module supports batch repair of all automatically repairable errors at once and generates a repair log. The repair log includes at least one or more of the following: repair rule name, repair location, pre-repair value, and post-repair value.

8. The system according to claim 1, characterized in that: The data processing module includes a file saving unit, which is used to write back the repaired data dictionary to generate a repaired billing file and output the save path information to the interactive display module.

9. A method for automatic bill verification and repair based on a multi-rule engine, characterized in that, include: S1: Receive an Excel billing file and read its multi-tab data; S2: Perform merged cell splitting and filling, date and number format unification, and discount field normalization on the data of each tab, generating a structured data dictionary with the tab signature as the key; S3: Based on multiple validation rules managed by the abstract rule interface, perform validation on the structured data dictionary according to user selection and output an error list; S4: Standardize the error list into a set of error information that includes page signature, error location, error type, association rules, correct value, and repair status; S5: Filter out errors with correct values ​​and call the corresponding rule's repair logic to perform targeted correction on the structured data dictionary; S6: Save the output of the repaired bill file.

10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of any one of claims 1-8.