A prepayment meter settlement method and system
By generating and signing periodic vouchers at the meter end, the platform independently recalculates and selectively backtracks, solving the consistency problem in prepaid electricity meter settlement, improving settlement accuracy and traceability, and reducing audit costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG SONGXIA ELECTRIC METER
- Filing Date
- 2026-01-09
- Publication Date
- 2026-04-14
AI Technical Summary
Existing prepaid electricity meter settlement schemes suffer from several problems under conditions of multiple events, multiple links, and multiple versions of parameters. These problems include inconsistent statistical and recalculation standards, misclassification of timestamps and rates, lack of gap markers and chain continuity proofs when the uploaded sequence is discontinuous, and lack of data structure summary and signature protection. As a result, these schemes have low settlement accuracy, poor traceability, and high auditing costs.
At the meter end, periodic statistical results are generated according to the freezing density. The rate version, parameter fingerprint, event set and time baseline are recorded synchronously. The summary calculation is performed to form a periodic voucher and sign it. It is sent to the platform side in an incremental order. The platform side independently recalculates and reconstructs the summary root according to the rate version for consistency verification. It selectively backtracks to locate inconsistencies, generates settlement results and updates the account status.
It enables the maintenance of reliable sources and complete content in complex scenarios, reduces reconciliation disputes, significantly improves settlement accuracy, traceability and settlement efficiency, and reduces bandwidth and auditing costs.
Smart Images

Figure CN121481539B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent power monitoring technology, and in particular to a prepaid electricity meter settlement method and system. Background Technology
[0002] As a key terminal for metering and settlement in the power distribution system, the accuracy of prepaid electricity meters directly affects the rights and interests of users and the financial security of power companies. With the popularization of remote fee control and online electricity purchase, meters need to generate periodic statistical results under a predetermined freezing density and complete the settlement loop with the platform. How to maintain consistency between the terminal side and the platform side under the coexistence of multiple events, multiple links, and multiple versions of parameters has become an important issue for operation and maintenance and settlement management.
[0003] Existing settlement schemes primarily rely on electricity meters sending statistical data, with the platform recalculating and deducting fees based on the rate version. However, these schemes typically suffer from the following shortcomings: inconsistent statistical and recalculation standards (field order, units, decimal places, interpolation rules, etc.), which can easily amplify deviations at cycle boundaries; time synchronization errors and event disturbances lead to misclassification of timestamps and rates, making it difficult for the platform to restore the true standards; the lack of gap markers and chain continuity proofs when the uploaded sequence is discontinuous makes it difficult to quickly locate the issue; the lack of data summaries and signatures in the data structure results in high costs for verifying source credibility and content integrity; inconsistencies can only be resolved by requesting full details, leading to high bandwidth and auditing costs; and inconsistent settlement voucher fields result in insufficient dispute tracking.
[0004] Therefore, it is necessary to propose a prepaid electricity meter settlement method and system that has verifiable data organization and signature protection at the cycle level, supports independent recalculation and consistency verification, and has incremental upload, gap and chain continuity proof and index-based selective backtracking mechanism, so as to improve accuracy, traceability and settlement efficiency. Summary of the Invention
[0005] Embodiments of this application provide a prepaid electricity meter settlement method and system to solve the problem of inconsistency between the end and the cloud during the prepaid electricity meter settlement process.
[0006] To address the aforementioned technical problems, embodiments of this application disclose the following technical solutions: On one hand, a prepaid electricity meter settlement method is provided, comprising: performing periodic statistics on metering data based on the freezing density at the meter end, obtaining periodic statistical results, and simultaneously recording the rate version, parameter fingerprint, event set, and time baseline; performing digest calculation on the feature sequence representing the period, forming a periodic voucher, which is then digitally signed by a security unit, the periodic voucher containing a digest root, period start and end information, periodic statistical results, rate version, parameter fingerprint, event set, and time baseline; uploading the periodic voucher and the periodic statistical results to the platform side in ascending order; independently recalculating based on the rate version, reconstructing the digest root, and verifying the signature; when the deviation between the recalculation result and the periodic statistical result does not exceed a preset threshold, confirming consistency; otherwise, selectively backtracking according to the index of the periodic voucher, locating inconsistencies, and verifying based on the inconsistencies; after verification, repeatedly performing independent recalculation and digest root reconstruction until consistency is confirmed or an anomaly marker is output; generating prepaid settlement results and settlement vouchers and updating the account status.
[0007] Furthermore, the parameter fingerprint includes at least the mutual inductance ratio or transformation ratio, energy constant, amplitude calibration coefficient, phase calibration coefficient, DC bias calibration coefficient, freeze density, over-limit threshold and event threshold, time synchronization strategy parameters, and temperature compensation and aging compensation parameters.
[0008] Furthermore, when the rate version or the parameter fingerprint changes, the change only takes effect at the start of the next cycle. The cycle start and end information in the cycle certificate is used to record the effective boundary of the change. The cycle certificate also includes a version tag related to the change.
[0009] Furthermore, when the meter detects a discontinuity in the transmitted sequence, the event set in the periodic certificate includes a gap marker, and the periodic certificate also includes verification values for the predecessor pointer information and the successor pointer information used for chain continuity verification.
[0010] Furthermore, the summary calculation adopts a tree-structured summary, in which the field order, field unit, and decimal places in the periodic voucher are fixed, and a certain number of summary leaf nodes are used; when the number of summary leaf nodes is insufficient, the tree-structured summary is filled with blanks to ensure that the meter end and the platform end are constructed equally.
[0011] Furthermore, it also includes: performing time correction on the timestamps involved in the periodic statistics results based on the time baseline before independent recalculation; the preset threshold is configured according to the user type, which includes residential services and industrial and commercial services, and the preset thresholds corresponding to residential services and industrial and commercial services are different.
[0012] Furthermore, the selective backtracking includes: based on the index of the periodic voucher, preferentially obtaining index information or low-sampling-rate data segments in the data segments related to the event set to locate inconsistencies; when the inconsistency cannot be eliminated, then obtaining the original detailed data segments within the period corresponding to the inconsistency for verification.
[0013] Furthermore, the settlement voucher includes at least the settlement period, verification information of the period statistical results, information of the rate version, deduction results, balance snapshot, time deviation estimate, and reference information of the period voucher, for reconciliation and audit archiving.
[0014] On the other hand, a prepaid electricity meter settlement system is provided, including a meter terminal and a platform side. The meter terminal includes a statistics and freezing module, a summary and voucher generation module, a sequential storage and communication module, a time baseline module, and a security unit. The platform side includes an independent recalculation module, a summary reconstruction and signature verification module, a selective backtracking and verification module, a settlement engine, and a voucher archiving module. The statistics and freezing module is used to perform periodic statistics on metering data based on freezing density to generate periodic statistical results, and records the rate version, parameter fingerprint, event set, and time baseline. The summary and voucher generation module is used to analyze the characteristics of the period... The system performs a digest calculation to generate a periodic voucher containing a digest root and period start and end information, which is then digitally signed by the security unit. The sequential storage and communication module sends the periodic voucher and the periodic statistical results to the platform in an increasing order. The independent recalculation module recalculates the periodic statistical results based on the rate version. The digest reconstruction and signature verification module reconstructs the digest root and verifies the signature. The selective backtracking and verification module locates inconsistencies based on the index of the periodic voucher and completes the verification. The settlement engine and voucher archiving module generates prepaid settlement results and settlement vouchers and updates the account status.
[0015] Furthermore, the sequential storage and communication module adopts a sequential storage structure with cyclic overwrite function to achieve local storage without loss when power is off, and performs uploaded confirmation or mirror backup before overwriting the oldest physical storage unit to maintain the integrity of the incremental order; the periodic certificate includes the check value of the predecessor pointer information and the successor pointer information for chain continuity verification, as well as the gap mark for identifying the discontinuity of the uploaded sequence.
[0016] The above-mentioned technical solutions have at least the following beneficial effects: The above-mentioned technical solutions generate periodic statistical results at the meter end according to the frozen density and simultaneously record the rate version, parameter fingerprint, event set and time baseline. Then, the characteristic sequence representing the period is used to perform digest calculation to form a periodic voucher containing a digest root, which is digitally signed by the security unit. Subsequently, the periodic voucher and the periodic statistical results are sent to the platform side in an increasing order. The platform side independently recalculates, reconstructs the digest root and verifies the signature according to the rate version. When the deviation exceeds the preset threshold, selective backtracking is performed according to the index of the periodic voucher to locate the inconsistency and complete the verification until consistency is confirmed or an anomaly mark is output, thereby realizing the solidification of settlement results and settlement vouchers and the updating of account status. Because periodic vouchers have a verifiable organizational form and signature protection, and the terminal and platform sides are independently recalculated under the same caliber and consistency verification is performed by reconstructing the summary, they can maintain the credibility of the source and the integrity of the content in complex scenarios such as parameter changes, time discrepancies, and discontinuous uploads, thereby significantly reducing reconciliation disputes. Furthermore, by adopting incremental uploads and chain-like continuity proofs, and using index-based hierarchical backtracking evidence collection, bandwidth and audit costs can be reduced while ensuring the accuracy of location, thereby improving the timeliness, traceability, and engineering maintainability of the settlement loop.
[0017] Furthermore, the aforementioned technical solutions also possess the following advantages: Parameter fingerprints cover key coefficients such as mutual inductance ratio or transformer ratio, energy constant, amplitude, phase and bias calibration, freeze density, over-limit threshold and event threshold, time synchronization strategy, and temperature and aging compensation, thereby reducing the impact of parameter asynchrony on recalculation consistency and improving repeatability; Rate version or parameter fingerprint changes only take effect at the beginning of the next cycle and record the version mark, thereby avoiding cross-cycle mixing and clarifying the effective boundary; When the uploaded sequence is discontinuous, a gap mark is introduced and verification values of the predecessor pointer information and the successor pointer information are provided, thereby forming a chain-like continuity proof, facilitating rapid location and evidence collection; The tree-shaped summary structure adopts a fixed field order, unit, and decimal places, and fills blanks when the summary leaf nodes are insufficient, thereby ensuring... The endpoint and platform sides are built on an equal footing, and the summary root is consistent and verifiable. Before recalculation, time correction is performed based on the time baseline, and preset thresholds are configured according to user type, thereby reducing the risk of boundary misclassification and adapting to the differentiated requirements of residents and industrial and commercial users. Selective backtracking prioritizes the acquisition of index information or low sampling rate data fragments, and only acquires original detailed data fragments when necessary, thereby controlling bandwidth and latency while ensuring positioning accuracy. The settlement voucher includes the settlement cycle, verification information, rate version, deduction result, balance snapshot, time deviation estimate, and reference information of the cycle voucher, thereby unifying the record, facilitating auditing and dispute resolution. At the system level, a sequential storage structure with cyclic overlay function ensures that data is not lost during power outages and that only the order is updated, thereby improving engineering feasibility and data reliability. Attached Figure Description
[0018] Figure 1 A flowchart illustrating an exemplary prepaid electricity meter billing method provided in this application.
[0019] Figure 2 A block diagram of an exemplary prepaid electricity meter billing system provided for this application.
[0020] Figure 3 This is a schematic diagram of the time synchronization correction and selective backtracking process provided for this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and beneficial effects of this application clearer, the following detailed description, in conjunction with the accompanying drawings and specific embodiments, further illustrates this application. It should be understood that the specific embodiments described in this specification are merely for explaining this application and are not intended to limit it.
[0022] In the description of this application, it should be noted that the terms "first," "second," etc., used in the specification and claims are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such designations can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, meaning that a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those explicitly listed, but may also include other steps or units not explicitly listed or inherent to the process, method, system, product, or apparatus. In this document, "for" indicates having the configuration and capability to implement the function, but does not limit the specific implementation form; "and / or" is used to indicate a parallel relationship, and can mean "and", "or", or any combination of "and / or"; the order of the method steps described does not constitute a restriction on the actual execution order without affecting the technical logic; terms such as "module", "unit", and "device" can be implemented by hardware, software, or a combination of hardware and software, and can be deployed within the same device or distributed among different devices.
[0023] In the description of this application, it is also necessary to explain the terms related to prepaid electricity meter technology. "Meter side" refers to the electricity meter itself and its local functional set, including metering, freezing, event logging, time maintenance, message generation, and security-related capabilities. "Platform side" refers to the set of upper-level systems that interact with the meter, including functional modules such as data acquisition, independent recalculation, reconciliation verification, settlement and accounting, and voucher archiving. The term "freeze density" refers to the frequency at which the meter takes snapshots of metering and operational data at fixed time granularities, such as by minute, day, or month. The corresponding "periodic statistical result" refers to the standardized and aggregated statistical analysis of energy, power, or event information within a freeze period, accompanied by the start and end markers of that period and data quality indicators. "Rate version" refers to the version information of the electricity price or billing strategy used for settlement and its effective boundaries, used to ensure that the meter side and platform side perform recalculation under the same caliber. "Parameter fingerprint" is the standardized summary and abstract of key parameters related to metering and settlement, including at least mutual inductance ratio or transformer ratio, energy constant, amplitude and phase, DC bias calibration, freeze density, over-limit thresholds and event thresholds, time synchronization strategy parameters, and temperature and aging compensation, for alignment during end-to-end consistency verification. "Event set" refers to a standardized set of event entries recorded within a freeze period, typically including event type, occurrence time, and duration information, used to define key intervals during reconciliation and evidence collection. "Time baseline" refers to the reference relationship and error description between meter time and standard time, including at least the time synchronization source used, deviation estimation, and drift characteristics; before platform-side recalculation, this can be used to correct the relevant timestamps to reduce the risk of boundary misalignment. A "period certificate" is a verifiable message formed by organizing, summarizing, and signing key fields representing a specific freeze period. It includes at least a digest root, period start and end information, period statistical results, rate version, parameter fingerprint, event set, and time baseline. "Digest calculation" refers to encrypting and summarizing the aforementioned fields according to a fixed field order, unit, and decimal places, constructing a hierarchical digest structure. The "digest root" is the root-level digest value of this structure, used to quickly verify content integrity and consistency. "Digital signature" refers to signing the period certificate or its digest using the meter's built-in security unit or an equivalent security environment to prove the source is trustworthy and the content has not been tampered with. "Increment-only sequence" means that the period certificate and period statistical results are uploaded and stored in a monotonically increasing logical sequence, appending only and not overwriting. When the uploaded sequence is discontinuous, a "gap marker" can be introduced into the period certificate, along with the predecessor and successor pointer verification information required for "chain continuity verification," so that the platform can verify the sequence integrity and restore the context. "Independent recalculation" refers to the process by which the platform recalculates and reconstructs the summary root of the periodic statistics based on the rate version, parameter fingerprint, and time baseline recorded at the meter, under the same caliber, in order to complete the confirmation of consistency between the end and the cloud and establish the basis for settlement.Unless otherwise specified in the context, the terms used above shall be interpreted as those defined in this section; terms not mentioned in this section but commonly used in the field shall be interpreted as those generally accepted in the field.
[0024] In prepaid electricity scenarios, electricity meters need to periodically generate metering statistics and complete the settlement loop with the platform under a predetermined freezing density. Affected by factors such as parameter changes, time drift, event disturbances, link jitter, or offline reporting, the statistical caliber sent by the end side and the recalculation caliber on the platform side are prone to deviation. At the same time, existing messages often lack verifiable data organization and signature protection, making it difficult to verify the source and integrity of the content in a timely manner. When there is a discontinuity in the sent sequence, there is a lack of explicit gap and chain continuity proof. Inconsistency location and evidence collection often require the retrieval of a large amount of detailed data, resulting in high bandwidth and audit costs and low efficiency in handling settlement disputes.
[0025] To address this, this application proposes a prepaid electricity meter settlement method: The meter generates periodic statistical results based on freeze density, and simultaneously records the rate version, parameter fingerprint, event set, and time baseline; a digest calculation is performed on the characteristic sequence representing the period to generate a periodic voucher containing a digest root, which is then signed by a security unit. The periodic voucher and periodic statistical results are uploaded to the platform in ascending order; The platform independently recalculates and reconstructs the digest root based on the rate version for consistency verification; When the deviation exceeds a threshold, selective backtracking is performed based on the periodic voucher index to locate inconsistencies and complete the verification until consistency is confirmed or an anomaly marker is output. This method reduces the latency and cost of reconciliation and settlement while ensuring reliable sources, complete content, and traceable processes, thereby improving the engineering maintainability and settlement accuracy of prepaid services.
[0026] Figure 1 A flowchart illustrating an exemplary prepaid electricity meter billing method provided in this application. Figure 2 This is a block diagram of an exemplary prepaid electricity meter billing system provided in this application. Figure 1As shown, the exemplary prepaid electricity meter settlement method provided in this application includes: S1, performing periodic statistics on metering data based on the freezing density of the meter terminal 10, obtaining the periodic statistics result Sn, and simultaneously recording the rate version RV, parameter fingerprint PF, event set E, and time baseline TB; S2, performing digest calculation on the feature sequence representing the period, forming a periodic certificate PCn, which is then digitally signed by a security unit. The periodic certificate PCn includes the digest root MRn, period start and end information, periodic statistics result Sn, rate version RV, parameter fingerprint PF, event set E, and time baseline TB; S3, transferring the periodic certificate PCn... S4. The periodic statistical results Sn are sent to the platform side in ascending order; S5. The recalculation is performed independently according to the rate version RV, the summary root is reconstructed as MRn' and the signature is verified; S6. When the deviation between the recalculation result PCalcn and the periodic statistical result Sn does not exceed the preset threshold ε, the consistency is confirmed. Otherwise, selective backtracking is performed according to the index of the periodic voucher PCn to locate the inconsistency item, and the inconsistency item is checked according to the located inconsistency item. After the check is completed, the independent recalculation and summary root reconstruction are repeated until the consistency is confirmed or an abnormal mark is output; S7. The prepaid settlement result and settlement voucher Vchn are generated and the account status is updated.
[0027] like Figure 2 As shown, the exemplary prepaid electricity meter settlement system provided in this application includes an electricity meter terminal 10 and a platform side 20. The electricity meter terminal 10 includes a statistics and freezing module 11, a summary and voucher generation module 12, a sequential storage and communication module 13, a time baseline module 14, and a security unit 15. The platform side 20 includes an independent recalculation module 21, a summary reconstruction and signature verification module 22, a selective backtracking and verification module 23, and a settlement engine and voucher archiving module 24. The system includes the following modules: a statistics and freezing module 11, which performs periodic statistics on measurement data based on freezing density to generate a periodic statistical result Sn, and records the rate version RV, parameter fingerprint PF, event set E, and time baseline TB; a summary and voucher generation module 12, which performs summary calculation on the feature sequence representing the period to form a periodic voucher PCn containing a summary root MRn and period start and end information, and digitally signs it using a security unit 15; a sequential storage and communication module 13, which sends the periodic voucher PCn and the periodic statistical result Sn to the platform side 20 in an ascending order; a time baseline module 14, which generates a time baseline; an independent recalculation module 21, which recalculates the periodic statistical result Sn based on the rate version RV; a summary reconstruction and signature verification module 22, which reconstructs the summary root and verifies the signature; a selective backtracking and verification module 23, which locates inconsistencies based on the index of the periodic voucher PCn and completes the verification; and a settlement engine and voucher archiving module 24, which generates prepaid settlement results and settlement vouchers Vchn and updates the account status.
[0028] In the above Figure 2Based on the exemplary prepaid electricity meter settlement system shown, the sequential storage and communication module 13 adopts a sequential storage structure with cyclic overwrite function to achieve local storage without loss when power is off, and performs uploaded confirmation or mirror backup before overwriting the oldest physical storage unit to maintain the integrity of the incremental sequence; the periodic certificate PCn includes the check value of the predecessor pointer information and the successor pointer information for chain continuity verification, as well as the gap mark for identifying the discontinuity of the uploaded sequence.
[0029] Figure 3 This is a schematic diagram illustrating the time synchronization correction and selective backtracking process provided in this application. Figure 3 As shown, the method flow provided in this embodiment, based on the above-mentioned exemplary prepaid electricity meter settlement method, inserts step S7 between steps S3 and S4. Before performing independent recalculation, the timestamp of the periodic statistical result Sn is first corrected according to the time baseline. After completing step S4, the deviation verification stage of the recalculation result is entered, including the following steps: S5.1, determine whether the deviation between the recalculation result PCalcn and the periodic statistical result Sn does not exceed the preset threshold ε. If yes, proceed to step S6; if no, proceed to step S5.2; S5.2, according to the index of the periodic voucher PCn, prioritize the event... S5.3 Obtain index information or low sampling rate data segments from the data segments related to E to locate inconsistencies; S5.4 Determine whether the inconsistency can be eliminated. If yes, proceed to step S6; otherwise, proceed to step S5.5; S5.6 Obtain the original detailed data segments within the period corresponding to the inconsistency and verify them; S5.7 Determine whether the result of the recalculation after verification meets the requirement that the deviation between the result and the periodic statistical result Sn does not exceed the preset threshold ε. If yes, proceed to step S6; otherwise, proceed to step S5.6; S5.8 Output an anomaly flag, that is, confirm that there is an inconsistency between the meter end 10 and the platform side 20.
[0030] The following references Figures 1 to 3 The steps in the above embodiments will be described in detail.
[0031] In step S1 above, the meter terminal 10 first performs merging and statistical analysis on the sampled and operational data based on the freeze density to obtain the periodic statistical result Sn. Sn includes at least the period start and end information, energy and power statistics, event count information, and data quality flags. To ensure consistency between the terminal and the cloud, the meter terminal 10 writes the rate version RV, parameter fingerprint PF, event set E, and time baseline TB while generating Sn. RV indicates the billing strategy version used for settlement, PF indicates the set of key coefficients related to metering and settlement, E identifies standardized events occurring within the period, and TB describes the deviation and drift of the local clock relative to the standard time.
[0032] In step S2 above, the meter terminal 10 performs a digest calculation on the feature sequence representing the cycle, and normalizes the "cycle start and end information, Sn, RV, PF, E, TB" (or includes optional chain pointer information) according to a fixed field order, unit and decimal places, constructs a tree digest structure and obtains the digest root MRn, thereby forming the cycle certificate PCn, and the security unit 15 completes the digital signature of PCn or its digest.
[0033] In step S3 above, PCn and Sn are sent to the platform side 20 in an increasing-only order. In some embodiments, in offline scenarios, local sequential storage is performed first, and the data is supplemented in order after communication is restored. In other specific embodiments, when the meter terminal 10 detects a discontinuity in the uploaded sequence, a gap marker is added to the event set E of the periodic voucher PCn. At the same time, the PCn carries the verification values of the predecessor pointer information and the successor pointer information for the platform side 20 to perform chain-like continuity verification. In the offline supplementary reporting scenario, after the meter terminal 10 fills in the missing interval, it resumes the upload in an increasing-only order. The platform side 20 verifies the sequence integrity based on the chain-like pointer verification values and continues consistency verification.
[0034] In step S4 above, after receiving PCn and Sn, the platform 20 first verifies the signature, and then independently recalculates Sn according to RV, PF, and TB under the same caliber as the meter 10, to obtain the recalculation result PCalcn. The digest root is then reconstructed according to the same digest rule to generate MRn'. In some specific embodiments, when the rate version RV or parameter fingerprint PF changes, the change only takes effect at the start of the next freeze period, and the version marker related to the change is recorded in the period certificate PCn. The period start and end information is used to clarify the effective boundary, and the platform 20 performs independent recalculation on both sides of the boundary according to the corresponding caliber.
[0035] In step S5 above, the platform 20 compares the deviation between PCalcn and Sn using a preset threshold ε: if the deviation does not exceed ε, it confirms consistency and proceeds to settlement; otherwise, it enters a selective backtracking and verification process until consistency is confirmed or an anomaly flag is output. In some specific embodiments, the preset threshold ε is configured according to the user type, which includes at least residential business and industrial and commercial business, with different thresholds for the two to meet differentiated accuracy requirements.
[0036] In the final step S6, the platform side 20 generates a settlement voucher Vchn and updates the account status. Specifically, the settlement voucher Vchn includes at least the settlement period, verification information, rate version, deduction result, balance snapshot, time discrepancy estimate, and reference information to PCn.
[0037] In step S2 of this application, the digest calculation adopts a tree-shaped digest structure, which uses a predetermined number of leaf nodes and a fixed leaf order mapping. The leaf order preferably includes the normalized digest entry of Sn, RV digest, PF digest, E digest, TB digest, and checksums for the predecessor and successor pointers used for chain continuity verification. To ensure that the digest root is constructed equally on the meter end 10 and the platform side 20, when the actual number of available leaf nodes is less than the predetermined number, missing positions are padded before the digest is calculated. The digest algorithm and byte order are consistent on the meter end 10 and the platform side 20, thereby ensuring that MRn and MRn' are equal when the content is consistent, which is used for quickly verifying content integrity and consistency.
[0038] In step S7 above, before performing independent recalculation, the platform 20 performs time synchronization correction on the timestamps involving Sn based on the time synchronization baseline TB. TB indicates the time synchronization source used and the characteristics of deviation and drift. The platform 20 can use this information to reslice the period across the rate boundary to avoid boundary misclassification in the recalculation.
[0039] The above Figure 3 The illustrated process mainly reflects the selective backtracking step, including the following: After completing time correction and summary reconstruction, the platform side 20 determines the deviation between PCalcn and Sn: if the threshold ε is met, direct settlement is performed; if not, according to the index provided in PCn, index information or low-sampling-rate data segments related to E are requested first to locate inconsistencies; if the located inconsistencies still cannot be eliminated, the original detailed data segments of that time window are requested for verification. After verification, independent recalculation and summary root reconstruction are performed again. If the threshold is still not met, an anomaly marker is output as the basis for subsequent auditing or manual processing. Selective backtracking follows a "lightweight first, progressively deeper" strategy. First, the platform 20 retrieves index information or low-sampling-rate data fragments based on the PCn index to locate the time window and field position of inconsistencies. This index information or low-sampling-rate data fragments serve as lightweight evidence for quickly locating inconsistencies, typically containing only time indexes, event markers, low-frequency sampling statistics, or key field summaries, but not the full original details. If the inconsistency cannot be eliminated, the original detail data fragments corresponding to the time window are requested for verification as needed. After backfilling and correction, independent recalculation and summary reconstruction are performed again to bring the deviation back to within the threshold ε. If the threshold is still not met, an anomaly marker is output, and the current period's accounting is suspended.
[0040] In some specific embodiments, the parameter fingerprint (PF) is a standardized summary and abstract of key parameters related to metering and settlement, including at least the mutual inductance ratio or transformation ratio, energy constant, amplitude calibration coefficient, phase calibration coefficient, DC bias calibration coefficient, freeze density, over-limit threshold and event threshold, time synchronization strategy parameters, and temperature compensation and aging compensation parameters. The PF is used to align the settlement caliber with that of the meter end 10 during independent recalculation on the platform side 20, avoiding systematic deviations caused by parameter asynchrony.
[0041] It should be noted that the "deviation" in this application can be determined by measuring absolute error or relative error, with relative error being preferred, i.e., the ratio of the absolute value of the difference between the recalculated result and the periodic statistical result to the benchmark value is used as the comparison quantity. For the field details of Sn, the leaf width of the summary tree, the configuration of the threshold ε, the time correction, and the hierarchy of the backtracking segment, those skilled in the art can make equivalent adjustments without departing from the concept of this invention, and all such adjustments should fall within the protection scope of this invention.
[0042] In summary, this application generates a periodic statistical result Sn at the meter end based on the frozen density, and simultaneously records the rate version RV, parameter fingerprint PF, event set E, and time baseline TB. A tree-structured summary with fixed field order, unit, and decimal places is used to generate a summary root MRn, forming a periodic voucher PCn, which is signed by a security unit and then sent to the platform side in an increasing order. The platform side performs independent recalculation and reconstructs the summary root based on RV, PF, and TB. The recalculation result and the periodic statistical result are compared with a threshold. If the threshold is met, the settlement is completed. If not, selective backtracking is performed based on the PCn index. The index information or low sampling rate data fragments are retrieved first to locate inconsistencies. If necessary, the original detailed data fragments are obtained for verification. After verification, the recalculation and summary reconstruction are repeated until consistency is confirmed or an anomaly mark is output. Finally, a settlement voucher Vchn is generated and the account status is updated. To address situations such as parameter or rate changes, discontinuous uploaded sequences, and offline supplementary reporting in engineering scenarios, this application employs mechanisms such as version boundaries with "effective at the start of the next cycle," chain-like continuity proof of gap markers and predecessor / successor pointer verification values, and pre-correction of the time baseline to ensure consistency between the end-cloud and end-cloud perspectives, sequence integrity, and accurate time boundaries. Simultaneously, by configuring thresholds according to user type and employing tiered evidence collection strategies, bandwidth and auditing costs are effectively controlled, improving the accuracy, traceability, and processing efficiency of settlement. At the system level, modular collaboration is implemented through statistical freezing, summary and voucher generation, sequential storage and communication, independent recalculation of the time baseline and security unit with the platform side, summary reconstruction and signature verification, selective backtracking and verification, and settlement engine and voucher archiving. The sequential storage structure possesses cyclic overwriting and pre-overwrite confirmation or mirror backup capabilities, ensuring no data loss and the integrity of the sequence during power outages.
[0043] It should be understood that the above embodiments are used to illustrate the principles and effects of this application and do not constitute a limitation on the scope of protection. Without departing from the core concept of this application, the specific implementation of the digest algorithm, the width of the digest tree leaves and the encoding method, the form of the time source and correction function, the threshold configuration strategy, the storage medium and the message encapsulation format, etc., can all be equivalently replaced or modified; all equivalent schemes and improvements based on the above technical features should fall within the protection scope of the claims of this application.
[0044] The embodiments provided above are merely illustrative of the methods, systems, and core ideas of this application. Those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the scope of protection of the claims.
Claims
1. A prepaid electricity meter settlement method, characterized in that, include: Based on the freezing density at the meter terminal, periodic statistics are performed on the metering data to obtain the periodic statistical results, and the rate version, parameter fingerprint, event set, and time baseline are recorded simultaneously. A digest calculation is performed on the characteristic sequence representing the period, and a period certificate is formed, which is then digitally signed by a security unit. The period certificate is a verifiable message formed by organizing, summarizing, and signing the key fields representing a certain freezing period. The period certificate includes a digest root, period start and end information, period statistical results, rate version, parameter fingerprint, event set, and time baseline. The digest calculation refers to encrypting and digesting the aforementioned fields according to a fixed field order, unit, and decimal places, and constructing a hierarchical structure. The summary structure is defined, where the summary root is the root-level summary value of the structure, used to quickly verify content integrity and construction consistency; the periodic voucher and the periodic statistical results are sent to the platform side in ascending order; the summary root is reconstructed and the signature is verified independently based on the rate version; when the deviation between the reconstructed result and the periodic statistical result does not exceed a preset threshold, consistency is confirmed; otherwise, selective backtracking is performed according to the index of the periodic voucher to locate inconsistencies, and verification is performed based on the inconsistencies. After verification, the independent reconstructing and summary root reconstruction are repeated until consistency is confirmed or an anomaly flag is output; prepaid settlement results and settlement vouchers are generated and the account status is updated.
2. The prepaid electricity meter settlement method as described in claim 1, characterized in that, The parameter fingerprint includes at least the mutual inductance ratio or transformation ratio, energy constant, amplitude calibration coefficient, phase calibration coefficient, DC bias calibration coefficient, freeze density, over-limit threshold and event threshold, time synchronization strategy parameters, and temperature compensation and aging compensation parameters.
3. The prepaid electricity meter settlement method as described in claim 1, characterized in that, When the rate version or the parameter fingerprint changes, the change only takes effect at the start of the next cycle. The cycle start and end information in the cycle certificate is used to record the effective boundary of the change. The cycle certificate also includes a version tag related to the change.
4. The prepaid electricity meter settlement method as described in claim 1, characterized in that, When the meter detects a discontinuity in the transmitted sequence, the event set in the periodic certificate contains a gap marker, and the periodic certificate also includes verification values for the predecessor pointer information and the successor pointer information used for chain continuity verification.
5. The prepaid electricity meter settlement method as described in claim 1, characterized in that, The summary calculation adopts a tree summary structure. The field order, field unit, and decimal places in the periodic voucher are fixed in the tree summary structure, and a certain number of summary leaf nodes are used. When the number of summary leaf nodes is insufficient, the tree summary structure is filled with blanks to ensure that the meter end and the platform end are built equally.
6. The prepaid electricity meter settlement method as described in claim 1, characterized in that, Also includes: Before independent recalculation, the timestamps involved in the periodic statistics results are time-corrected according to the time baseline; The preset threshold is configured according to the user type, which includes residential services and industrial and commercial services. The preset thresholds for residential services and industrial and commercial services are different.
7. The prepaid electricity meter settlement method as described in claim 1, characterized in that, The selective backtracking includes: based on the index of the periodic voucher, prioritizing the acquisition of index information or low-sampling-rate data segments in the data segments related to the event set to locate inconsistencies; when the inconsistency cannot be eliminated, then acquiring the original detailed data segments within the period corresponding to the inconsistency for verification.
8. The prepaid electricity meter settlement method as described in claim 1, characterized in that, The settlement voucher includes at least the settlement period, verification information of the period statistical results, information of the rate version, deduction results, balance snapshot, time deviation estimate, and reference information of the period voucher, for reconciliation and audit archiving.
9. A prepaid electricity meter settlement system, characterized in that, The system comprises a meter-side and a platform-side. The meter-side includes a statistics and freezing module, a summary and voucher generation module, a sequential storage and communication module, a time baseline module, and a security unit. The platform-side includes an independent recalculation module, a summary reconstruction and signature verification module, a selective backtracking and verification module, a settlement engine, and a voucher archiving module. The statistics and freezing module performs periodic statistics on metering data based on freezing density to generate periodic statistical results and records the rate version, parameter fingerprint, event set, and time baseline. The summary and voucher generation module performs summary calculations on the feature sequences representing the period, forming a periodic voucher containing a summary root and period start and end information, which is then digitally signed by the security unit. The periodic voucher organizes and summarizes the key fields representing a specific freezing period. The verifiable message formed after signing; wherein, the digest calculation refers to encrypting and digesting the aforementioned fields according to a fixed field order, unit and decimal places and constructing a hierarchical digest structure, the digest root is the root-level digest value of the structure, used to quickly verify the integrity of the content and the consistency of the construction; the sequential storage and communication module is used to send the periodic voucher and the periodic statistical results to the platform side in an increasing order; the independent recalculation module is used to recalculate the periodic statistical results according to the rate version; the digest reconstruction and signature verification module is used to reconstruct the digest root and verify the signature; the selective backtracking and verification module is used to locate inconsistencies based on the index of the periodic voucher and complete the verification; the settlement engine and voucher archiving module is used to generate prepaid settlement results and settlement vouchers and update the account status.
10. The prepaid electricity meter settlement system as described in claim 9, characterized in that, The sequential storage and communication module adopts a sequential storage structure with cyclic overwrite function to achieve local storage without loss when power is off, and performs uploaded confirmation or mirror backup before overwriting the oldest physical storage unit to maintain the integrity of the incremental order; the periodic certificate includes the check value of the predecessor pointer information and the successor pointer information for chain continuity verification, as well as the gap mark for identifying the discontinuity of the uploaded sequence.
Citation Information
Patent Citations
Hybrid electricity price charging method and system based on prepayment electricity meter
CN119887310A
Three-terminal message synchronization method
CN120639312A