Multi-level automatic verification method for electric charge data
By constructing a multi-level rule engine and intelligent correction module, electricity bill data is fully automated and intelligently repaired, solving the problems of single dimension and manual dependence in existing technologies, and achieving efficient and reliable data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SINOPEC SALES CO LTD GUANGDONG PETROLEUM BRANCH
- Filing Date
- 2025-12-09
- Publication Date
- 2026-04-21
AI Technical Summary
Existing methods for verifying electricity bill data are limited in scope, cannot be automatically corrected, and rely heavily on manual intervention, resulting in low data processing efficiency and an inability to achieve end-to-end automation.
A hierarchical rule engine and a strategy-based correction mechanism are constructed. Through multi-level verification and intelligent correction modules, electricity bill data is fully automated and intelligently repaired, including basic logic verification, business rule verification, inter-period fluctuation analysis and policy compliance verification. A confidence assessment mechanism is adopted to ensure the reliability of the correction.
It achieves comprehensive automated verification from internal data consistency to external compliance, significantly improving the automation rate and reliability of data processing, reducing reliance on manual operations, and improving processing efficiency and data quality.
Smart Images

Figure CN121903540A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing and automated auditing technology, and in particular to a multi-level, automated verification and intelligent correction method for electricity bill data. Background Technology
[0002] In the field of electricity marketing and energy cost management, the accuracy and compliance of electricity bill data are crucial. Currently, the auditing of electricity bill data mainly relies on two methods: one is manual item-by-item verification, which is inefficient, prone to errors due to fatigue or negligence, and difficult to handle massive data processing; the other is automated scripts based on simple fixed rules, which are usually hard-coded in the program and have a single verification dimension, often limited to basic arithmetic verification (such as whether the sum of the sub-items equals the total), lacking the ability to detect deeper issues such as the rationality of business logic, historical data fluctuation trends, and compliance with current electricity price policies.
[0003] More notably, when existing technologies detect data anomalies, there is a general lack of effective automatic processing mechanisms. Systems can usually only issue error messages, then interrupt the process and wait for human intervention to judge, locate the problem, and manually correct it. This not only seriously reduces the overall efficiency and automation rate of data processing, but also makes the "last mile" of the data processing process still dependent on manual labor, making it impossible to achieve true end-to-end automation.
[0004] Therefore, there is an urgent need for a technical solution that can perform comprehensive automated verification of electricity billing data from basic to advanced levels, from internal consistency to external compliance, and can intelligently and reliably correct common and well-defined types of errors to improve data quality, processing efficiency, and system intelligence. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing electricity bill data verification methods, such as single dimension, inability to automatically correct, and high dependence on manual labor. This invention provides a multi-level automatic verification method for electricity bill data. By constructing a hierarchical rule engine and a strategy-based correction mechanism, this method achieves comprehensive automated auditing and intelligent repair of electricity bill data, significantly improving the pass-through rate and reliability of data processing.
[0006] To achieve the above objectives, the present invention provides a multi-level automatic verification method for electricity bill data. The method is executed by a data processing system, which logically includes a data interface module, a multi-level rule engine module, an intelligent correction module, and a result output module.
[0007] The method includes the following steps: S1: Receive structured electricity bill data The system receives structured electricity bill data from upstream processing processes (such as document parsing systems, databases, or external interfaces) through a data interface. The data has a clear field structure and includes key information such as user identifier, electricity consumption, electricity bill, unit price, and billing period.
[0008] S2: Multi-level rule engine sequence verification The electricity bill data is input into a multi-level rule engine and validated sequentially according to a preset hierarchy from simple to complex: 1. Basic Logic Verification Layer: Performs internal data consistency and format compliance verification.
[0009] (1) Arithmetic relationship verification: For example, verify “total electricity cost = basic electricity cost + power regulation electricity cost + surcharge”, allowing for a preset small calculation tolerance.
[0010] (2) Numerical logic verification: For example, verify that "the current period's electricity meter reading is greater than the previous period's electricity meter reading".
[0011] (3) Format compliance verification: For example, verify that key fields are not empty, numeric fields are positive, and date formats are correct.
[0012] 2. Business rule validation layer: Based on business scenario logic, validates the rationality of the data.
[0013] (1) Status correlation verification: For example, if the user account status is "closed", then the total electricity bill for the current period should be close to zero.
[0014] (2) Verification of the reasonableness of the value: For example, the unit price of residential electricity should be within the range of residential electricity prices stipulated by the state; the sign (positive / negative) of the power factor adjustment fee (power factor adjustment fee) should match the power factor assessment result.
[0015] 3. Intertemporal fluctuation analysis layer: Identifies abnormal fluctuations by comparing current data with historical data.
[0016] (1) Month-on-month / year-on-year fluctuation verification: For example, the monthly electricity consumption increases / decreases more than the preset threshold (e.g., ±50%) compared to the previous month or the same period last year.
[0017] (2) Historical range verification: For example, the monthly electricity bill exceeds the normal fluctuation range of the user's electricity bill over the past 12 months.
[0018] 4. Policy Compliance Verification Layer: Verify the compliance of the data based on the latest official electricity price policy documents.
[0019] (1) Unit price matching verification: For example, verify whether the electricity price during peak, flat and valley periods is completely consistent with the latest electricity price standard issued by the local development and reform commission.
[0020] (2) Fee item verification: For example, verify whether the names and rates of government funds and surcharges are correct.
[0021] If any verification level fails, the data is determined to be abnormal, and the subsequent correction process is triggered. The hierarchical order is designed to quickly eliminate obvious errors with the lowest computational cost and then proceed to more complex analyses step by step.
[0022] S3: Intelligent Correction Process 1. When the rule engine detects an anomaly, the intelligent correction module is activated and operates according to the following logic: Anomaly Diagnosis and Type Determination: Analyze the abnormal characteristics and classify them into predefined anomaly types, such as: (1) Character recognition error: such as misrecognition of the number “0” and the letter “O”, or the letter “I” and the number “1”.
[0023] (2) Numerical calculation deviation: such as the total value is incorrect, but the individual item values are reasonable.
[0024] (3) Decimal point misalignment: such as misidentifying “123.50” as “12.35” or “1235.0”.
[0025] (4) Mismatch of units or fields.
[0026] 2. Strategy Matching and Execution: Based on the anomaly type, match and execute the corresponding predefined correction strategy. (1) For character recognition errors: adopt the "character replacement strategy based on context and confidence" to obtain the original recognition confidence of the suspicious character. If it is lower than the threshold (e.g., 60%), replace it with the candidate character with the most similar shape according to its context (e.g., whether the preceding and following characters are numbers) and verify the overall rationality of the replacement.
[0027] (2) To address numerical calculation deviations: a “numerical overwrite strategy based on calculation relationship” is adopted. When the summary field (such as total electricity bill) is abnormal, if all its constituent sub-fields (such as basic electricity bill and power adjustment electricity bill) pass the verification, the correct summary value is calculated in reverse using a preset arithmetic formula and the original value is overwritten.
[0028] (3) For decimal point misalignment: adopt the “decimal point position trial correction strategy”, try to move the decimal point one position to the left or right for abnormal values, substitute the corrected value into the original verification formula for calculation, or compare it with the magnitude of historical values, and select the correction scheme that can pass the verification.
[0029] 3. Overall confidence level assessment For the corrected data results, the system employs a hybrid confidence assessment model for quantitative credibility evaluation. The core of this model lies in transforming qualitative judgments into quantitative confidence scores and introducing a logical gating mechanism. The final confidence score, Score_final, is calculated as follows: , in: The final composite confidence score ranges from 0.0 to 1.0. The policy reliability benchmark score is determined based on the type of correction policy. and These are the weights and scores of each evaluation factor. This is a logic gating coefficient used to handle veto or risk-based weighting.
[0030] The specific evaluation process is as follows: (1) Determine the reliability benchmark score of the strategy ( The system assigns a basic confidence level based on the type of correction strategy triggered: ① If it is a numerical overwriting strategy based on computational relationships (such as using arithmetic formulas to deduce), it belongs to strong logical computation. = 0.8; ② If it is a character replacement strategy based on confidence level, it belongs to strong rule replacement. = 0.6; ③ If it is an inferential correction such as a decimal point position correction strategy, = 0.4.
[0031] (2) Calculate the weighted factor score (Σ ( × The system comprehensively considers multiple quantitative factors and calculates their weighted contribution values. Core factors include:
[0032] ① Historical data consistency factor ( ): Measures the deviation between the corrected value and the user's historical data pattern, and calculates the correction value. Compared with the historical average for the same period relative deviation And assign based on the deviation range Values (e.g., deviation ≤ 10% = 1.0, 10% < deviation ≤ 30% = 0.8, 30% < deviation ≤ 50% = 0.5, deviation > 50% = 0).
[0033] ② Auxiliary verification factor ( ): Evaluate whether the correction result is verified by other independent data or business logic in a closed loop. If a complete logical closed loop is formed (e.g., the corrected electricity cost can be accurately recalculated using electricity consumption and unit price), then F_cross = 1.0; if there is partial corroboration, then it is 0.6; if there is no corroboration, then it is 0.
[0034] ③ Source data quality inverse factor ( In character replacement scenarios, considering the uncertainty of the original OCR recognition, the calculation method is as follows: ,in The original confidence level for identifying the suspicious character.
[0035] Factor weights It can be preset based on business experience.
[0036] (3) Apply logic gating coefficients ( Before synthesizing the total score, a final logical check is performed. If a fundamental conflict is found, the result is a veto.
[0037] ① If the correction result violates fundamental constraints (e.g., the value is negative, the format is invalid, or there is an irreconcilable contradiction with the verified correct data), then = 0, resulting in = 0.
[0038] ② If the difference pattern between the corrected result and the original value is abnormal (e.g., the edit distance is too large, which may stem from a completely incorrect identification rather than a local error), then it may be necessary to... Set to a value less than 1 (e.g., 0.5) to lower the confidence level.
[0039] ③ If there are no issues as described above, then = 1.0.
[0040] 4. Correction Decision: If the overall confidence score is not lower than the preset high threshold (e.g., 90%), the automatic correction result is deemed highly reliable. The system performs automatic correction, updates data fields, and generates detailed logs. If the confidence score is lower than the threshold, the anomaly is deemed more complex or the correction uncertainty is high. The system will not automatically modify it but will mark the data as "requires manual review" and transfer it to the manual processing queue to ensure the caution and reliability of the process.
[0041] S4: Output the final result
[0042] The system outputs electricity bill data after the above-mentioned complete verification and intelligent correction process. At the same time, it can generate a structured audit report, clearly listing all data that passed verification, data that was automatically corrected and its modification details, as well as abnormal data that was transferred to manual processing, forming a complete data quality audit track. Beneficial effects
[0043] Compared with the prior art, the present invention has the following significant advantages:
[0044] 1. Comprehensive and in-depth verification dimensions: Through four progressive levels of verification, it covers a full range of reviews from the internal consistency of data to the external policy compliance, which greatly improves the ability to detect abnormal data, especially business logic anomalies and policy inconsistencies with strong concealment.
[0045] 2. Achieve intelligent automatic correction: Effective correction strategies are preset for common and well-defined error types, and combined with a strict confidence assessment mechanism, automatic repair is achieved under the premise of ensuring high reliability, which greatly improves the automation rate and pass-through rate of data processing and reduces the reliance on manual operation.
[0046] 3. Flexible and maintainable system: The verification rules in the rule engine and the strategies in the correction module can be flexibly defined and updated through configuration files or management interface without modifying the core program code. This allows for quick response to changes in electricity pricing policies and adjustments to business rules, significantly reducing the long-term maintenance costs of the system.
[0047] 4. Balancing processing efficiency and reliability: The hierarchical verification mechanism optimizes processing efficiency, while the correction decision based on confidence assessment effectively controls the risk of automatic correction while pursuing efficiency, ensuring the overall reliability of data processing results. Attached Figure Description
[0048] Figure 1 This is a schematic diagram of the overall architecture of an embodiment of the present invention.
[0049] Figure 2 This is a detailed flowchart of the multi-level verification process in an embodiment of the present invention.
[0050] Figure 3 This is a flowchart illustrating the automatic confidence level correction decision-making process according to an embodiment of the present invention. Detailed Implementation
[0051] Flowchart Logic Description To clearly demonstrate the complete system of multi-level automated verification and intelligent correction of electricity bill data according to this invention, the following description is provided in conjunction with the accompanying drawings: I. System Overall Architecture and Data Flow (see attached document) Figure 1 ) like Figure 1As shown, the system of this invention consists of four main modules: a data input and preprocessing module that receives and standardizes electricity cost data; a multi-level rule engine module that includes four verification layers: basic logic, business rules, inter-period fluctuations, and policy compliance, which perform checks sequentially from shallow to deep; an automatic correction and anomaly handling module that evaluates the confidence level of data that fails verification and performs automatic correction or manual processing based on the evaluation results; and a result output and reporting module that outputs clean data, audit reports, and anomaly lists. Data flows between the modules according to the path shown in the diagram, forming an end-to-end automated processing chain.
[0052] II. Detailed execution flow of multi-level verification (see attached document) Figure 2 ) like Figure 2 As shown, the verification engine operates in four levels: The first level (basic logic verification) verifies the arithmetic relationships, type and format compliance, and reading continuity of the data; after passing the first level, it proceeds to the second level (business rule verification), which checks the reasonableness of zero-electricity charges, compliance with charge thresholds, and the existence of negative data; after passing the second level, it proceeds to the third level (inter-period fluctuation analysis), which compares historical data to identify abnormal fluctuations in month-on-month and year-on-year data; after passing the third level, it proceeds to the fourth level (policy compliance verification), which ensures that electricity prices and charges comply with the latest official policies. If any check item at any level fails, the data is judged as abnormal and transferred to the correction process.
[0053] III. Confidence-Based Automatic Correction Decision Process (see attached document) Figure 3 ) like Figure 3 As shown, the automatic correction module first diagnoses the anomaly type (character recognition error, numerical calculation error, or decimal point misalignment). For each type, a specific analysis process is executed: for OCR character errors, candidate characters are generated by combining the original confidence level with the contextual semantics; for calculation errors, the correctness of the sub-data is verified and the formula is reversed; for decimal point misalignment, an attempt is made to shift the decimal point and match it with the calculation relationship and historical magnitude. Each correction attempt calculates a comprehensive confidence score, which integrates multiple factors such as strategy reliability, historical consistency, and logical closed-loop verification. The system only performs automatic correction and logs the data when the confidence level is not lower than the high threshold of 95%; otherwise, the data is marked as requiring manual processing to ensure the caution and reliability of automatic correction.
[0054] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] Example: Automatic verification and correction of residential user electricity bill data Suppose the system receives a structured residential user's electricity bill data, with some key fields as follows: Account Number: R2023001 Electricity consumption category: Residential Peak-hour power consumption: 85 kWh Peak hour electricity cost: 52.70 yuan Off-peak electricity consumption: 45 kWh Off-peak electricity rate: 13.05 yuan Total electricity cost: 65.75 yuan Tier 2 surcharge for electricity: 0.00 yuan S2: Multi-level rule engine verification 1. Basic Logic Verification Layer: Implementation rules: Total electricity cost = Peak electricity cost + Off-peak electricity cost + Tiered pricing surcharge Calculate: 52.70 + 13.05 + 0.00 = 65.75 Result: The calculated value (65.75) matches the field value (65.75), and the validation at this level is successful.
[0056] 2. Business rule validation layer: Enforcement rule: If the electricity consumption category is "Residential", then the peak-hour unit price should be within the residential peak electricity price range (assuming it is 0.55-0.65 yuan / kWh). Calculation: Peak hour unit price = Peak electricity fee / Peak hour electricity consumption = 52.70 / 85 ≈ 0.620 yuan / kWh.
[0057] Result: 0.620 is within the preset range (0.55-0.65), and this layer's verification passed.
[0058] Execution rule: Verify whether the off-peak electricity price (13.05 / 45≈0.290) is within the range of residential off-peak electricity price (assuming it is 0.25-0.35 yuan / kWh), and it will pass.
[0059] 3. Intertemporal fluctuation analysis layer (assuming access to historical data): The user's total electricity bill for last month was 62.30 yuan, and the historical average electricity bill for the past three months was 60-70 yuan.
[0060] Implementation rule: Monthly electricity bill fluctuation should be less than 40%. Calculate the month-on-month fluctuation: (65.75 - 62.30) / 62.30 ≈ 5.5% Result: Volatility 5.5% < 40%, this layer of verification passed.
[0061] 4. Policy compliance verification layer: The system incorporates the latest tiered electricity pricing policy for residential users: the first tier has a peak price of 0.62 yuan and a valley price of 0.29 yuan for electricity consumption of 0-260 kWh; the second tier has a price increase of 0.05 yuan on top of the first tier for electricity consumption of 261-600 kWh.
[0062] The user's total electricity consumption is 85 + 45 = 130 kWh (<260 kWh), and the first-tier electricity price should be applied to all users.
[0063] Peak electricity cost verification: 85 * 0.62 = 52.70 yuan, which is acceptable.
[0064] Verification of off-peak electricity cost: 45 * 0.29 = 13.05 yuan, which is correct.
[0065] At the same time, the "Tier 2 surcharge electricity fee" field was verified to be 0.00 yuan, which is consistent with the fact that the total electricity consumption did not exceed the first tier.
[0066] This layer's validation passed.
[0067] At this point, all levels of verification have passed, the data is considered accurate, and it will directly proceed to step S4 to output the results.
[0068] (Hypothetical abnormal scenario) If an error occurs in the upstream processing stage, misidentifying peak-hour electricity consumption as "8S" kWh (misidentification of the letter 'S'), then the data becomes: Peak hour power consumption: 8S kWh Peak hour electricity cost: 52.70 yuan.
[0069] S2: Multi-level rule engine verification During the format compliance check at the basic logic verification layer, it was found that the "Peak Hour Electricity" field contained the non-numeric character 'S', causing the verification to fail and triggering intelligent correction.
[0070] S3: Intelligent Correction Process 1. Anomaly Diagnosis: The system determines that this anomaly belongs to "character recognition error".
[0071] 2. Strategy Matching and Execution: Matches "character replacement strategy based on context and confidence".
[0072] The system obtains the original recognition confidence of the character 'S' (assuming it is 55%, which is below the 60% threshold).
[0073] Analysis context: The "Peak Hour Electricity" field should be a numerical value, and the unit should be "kWh".
[0074] Replacing 'S' with the similarly shaped candidate number '5' yields the candidate value "85".
[0075] Preliminary verification: Using the candidate value 85 to calculate the peak-hour unit price: 52.70 / 85 ≈ 0.620, this unit price falls within the reasonable range of residential peak electricity prices.
[0076] 3. Overall confidence level assessment: The original confidence level is low (55%), so replacement is recommended.
[0077] The replaced value (85) conforms to the numerical format.
[0078] The unit price calculated after the replacement (0.620) passed the business rule verification (within a reasonable range).
[0079] The user's historical peak electricity consumption during the same period is typically between 80-100 kWh, and 85 falls within that range.
[0080] Taking all the above factors into account, the confidence level of this correction is estimated to be 0.92.
[0081] 4. Correction decision: Confidence level 0.92 > threshold 0.90, the system determines that the automatic correction is reliable, executes the correction, updates the value of the "Peak Period Electricity" field from "8S" to "85", and records the log.
[0082] 5. After correction, the data will be re-verified by the multi-level rule engine and will pass through all levels smoothly.
[0083] S4: Output the final result The system output includes final electricity bill data and an audit report containing automatically corrected records.
[0084] This embodiment demonstrates that the method of the present invention can not only comprehensively ensure data quality through multi-level verification, but also intelligently and reliably automatically repair obvious identification errors, realizing the integration and automated closed loop of verification and correction.
Claims
1. A multi-level automatic verification method for electricity bill data, characterized in that, The method includes the following steps: S1: Receive structured electricity bill data; S2: The electricity bill data is verified sequentially through multiple verification layers of a multi-level rule engine. The verification layers include at least a basic logic verification layer, a business rule verification layer, an inter-period fluctuation analysis layer, and a policy compliance verification layer. S3: When any level of verification fails and data anomalies are detected, the automatic correction process is triggered, and the following sub-steps are executed: S3.1: Determine the type of the data anomaly; S3.2: Match the corresponding predefined correction strategy according to the anomaly type; S3.3: Execute the correction strategy and conduct a comprehensive confidence assessment of the corrected results; S3.4: Make a decision based on the comprehensive confidence assessment result: if the result is greater than or equal to the preset threshold, then perform automatic correction; otherwise, mark the abnormal data as requiring manual processing. S4: Outputs the electricity bill data after verification and correction.
2. The method according to claim 1, characterized in that, The basic logic verification layer is used to verify the arithmetic relationships between the numerical fields in the electricity bill data and the compliance of the data format.
3. The method according to claim 1, characterized in that, The business rule verification layer is used to verify the business rationality of the data based on predefined business state logic.
4. The method according to claim 1, characterized in that, The inter-period fluctuation analysis layer is used to identify anomalies where numerical fluctuations exceed a preset threshold by comparing the current payment period data with historical data from the same period.
5. The method according to claim 1, characterized in that, The policy compliance verification layer is used to verify whether the unit price and charging items in the electricity bill data comply with the latest official electricity price policy documents.
6. The method according to claim 1, characterized in that, The anomaly types include at least one of the following: character recognition error, numerical calculation error, decimal point misalignment, and unit conversion error.
7. The method according to claim 6, characterized in that, The correction strategy includes: (1) A confidence-based character replacement strategy for character recognition errors; (2) Numerical overwriting strategies based on computational relationships to address numerical computation errors; (3) Strategies for correcting the position of the decimal point when it is misaligned.
8. The method according to claim 7, characterized in that, The confidence-based character replacement strategy includes: obtaining the original recognition confidence of a character; if the confidence is lower than a preset threshold, then replacing the character with a candidate character of similar shape based on the context logic of the character.
9. The method according to claim 7, characterized in that, The numerical overwrite strategy based on computational relationships includes: when the summary data field is abnormal, verifying whether all its component data fields pass the validation; if they pass, using a predefined arithmetic calculation formula to deduce the correct summary data value from the component data and overwrite it.
10. The method according to claim 7, characterized in that, The decimal point correction strategy includes: moving the decimal point of abnormal values and matching and verifying the moved values with values obtained through calculation relationships and / or historical data magnitudes.