A non-real-time electric energy gap hierarchical cache order retransmission system

CN122545874APending Publication Date: 2026-08-11SHENYANG TIANYING IND CONTROL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0006]本发明的目的在于提供一种非实时电能量缺口分层缓存顺序补传系统,通过对缺失数据包所属计量周期进行识别,对延迟到达的电能量数据包进行累计电能量双边闭合准入和计量误差校验,并按照计量周期顺序执行补传重校验,以解决现有技术中难以准确恢复缺失数据包所属计量周期、难以对补传数据实施电能量物理准入和计量误差校验,以及连续缺失周期未经顺序校验即被组装或输出而造成累计电能量跳变、重复计量、周期归属错误或结算数据不完整的问题

Benefits of technology

[0019] This invention generates a metering cycle time granularity sequence and integrity description matrix by combining the sequence number, clock synchronization error, cycle boundary anchor point, and cumulative energy value through a metering cycle gap identification module, so that communication gaps correspond to actual missing metering cycles. A layered cache reconstruction and monitoring module establishes buffer partitions, reserved space, and monitoring handles to provide corresponding storage entry points for delayed data packets. A bilateral closure access module verifies the continuity of cumulative energy by combining the base values ​​before and after the gap with the range reversal characteristics. A metering error adjustment and writing module uses the metering equipment accuracy level, node loss benchmark value, and line loss tolerance for write permission control, reducing the risk of erroneous data writing. A continuity verification and sequential retransmission module intercepts the output when a gap exists and uses the pass of the previous metering cycle verification as the release condition for re-verification in the next metering cycle, thereby restoring cycle attribution and base continuity, avoiding cumulative energy jumps, duplicate metering, or incomplete settlement data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122545874A_ABST
    Figure CN122545874A_ABST
Patent Text Reader

Abstract

This invention relates to the field of electrical variable measurement and discloses a non-real-time electrical energy gap hierarchical buffer sequential retransmission system. The system determines the metering cycle time granularity sequence and integrity description matrix based on the sequence number of the electrical energy data packet, clock synchronization error, cycle boundary anchor point, and cumulative electrical energy value. It then reconstructs the buffer partition and registers a listening handle based on the matrix. A bilateral closed reference interval is constructed by combining the meter base values ​​before and after the gap and the range reversal characteristics of the smart meter. The dynamic allowable range is determined using the metering equipment accuracy level, node loss reference value, and line loss tolerance to control the writing of delayed data packets. Continuity verification is performed based on the cumulative electrical energy difference and electrical energy gradient. If a gap exists, the output is intercepted, and retransmission and reverification are completed in the metering cycle order. This invention can restore the metering cycle attribution and meter base continuity, reduce the risk of erroneous retransmission of abnormally delayed data, and form a complete and verified electrical energy metering data stream for use by the settlement terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrical variable measurement, and more specifically to a non-real-time electrical energy gap hierarchical buffer sequential compensation system. Background Technology

[0002] With the application of smart meters and energy collection systems in power distribution metering and settlement, energy data is typically generated according to a preset metering cycle and transmitted to the metering data processing terminal in data packets containing serial numbers, time information, cycle boundary anchors, and cumulative energy values. Due to communication delays or link fluctuations, data packets may be out of order, delayed, or missing, disrupting the continuity between metering cycles.

[0003] Existing technologies typically identify missing ranges based on differences in data packet sequence numbers, timestamps, or arrival order, and restore the data sequence through buffer reservation, data packet retransmission, sorting and reorganization, or numerical interpolation. Some solutions also combine historical thresholds, anomaly detection, or linear interpolation to determine whether the supplemented data is reasonable, and send the corresponding data to the settlement terminal after reorganization.

[0004] However, the above methods mainly focus on processing communication order or general data integrity, making it difficult to accurately correspond to the actual metering period to which the missing data packet belongs. They also fail to simultaneously utilize the cumulative energy meter readings before and after the gap, the range reversal characteristics of smart meters, the accuracy level of metering equipment, and the loss relationship of metering topology nodes to perform physical access and metering error verification of delayed data packets. When multiple metering periods are consecutively missing, if the retransmitted data is assembled or output without sequential re-verification, it can easily lead to jumps in cumulative energy, duplicate metering, incorrect period assignment, or incomplete settlement data.

[0005] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to provide a non-real-time energy gap hierarchical buffer sequential retransmission system. By identifying the metering period to which the missing data packet belongs, performing cumulative energy double-sided closed access and metering error verification on the delayed energy data packet, and performing retransmission reverification according to the metering period sequence, this system solves the problems in the prior art of difficulty in accurately recovering the metering period to which the missing data packet belongs, difficulty in performing energy physical access and metering error verification on the retransmitted data, and the problems of continuous missing periods being assembled or output without sequential verification, resulting in cumulative energy jumps, duplicate metering, incorrect period attribution, or incomplete settlement data.

[0007] The technical solution of this invention is as follows:

[0008] A non-real-time energy gap hierarchical buffer sequential retransmission system includes the following modules: a metering cycle gap identification module, used to acquire the sequence number, clock synchronization error, cycle boundary anchor point, and cumulative energy value of the out-of-order first energy data packet and the normally received second energy data packet, compensate for the arrival time, determine the metering cycle time granularity sequence based on the sequence number difference and boundary interval, and generate an integrity description matrix by combining the number of sampling points and the energy gradient; a hierarchical buffer reconstruction and monitoring module, used to divide the metering cycle buffer into partitions according to the integrity description matrix, perform space compression and reallocation according to the capacity gap, lock the reserved space of the missing cycle, and register and bind monitoring handles for the missing sequence number range, cycle time window, and cumulative energy connection value interval; and a bilateral closed admission module, used to acquire the delayed arrival of the third When the sequence number and compensation arrival time of the energy data packet meet the binding conditions, a bilateral closed reference interval is constructed based on the meter readings before and after the gap and the range reversal characteristics of the smart meter to determine the access status. The metering error adjustment and writing module is used to calculate the forward closure error and backward closure error of the third energy data packet and the preceding and following data packets. The dynamic allowable range is determined by the metering equipment accuracy level and line loss tolerance business rules. When both closure errors decrease and are within the dynamic allowable range, the writing permission is released and the integrity flag is updated. The continuity verification and sequential retransmission module is used to generate a continuity verification report based on the sequence number of the written data packet, the cumulative energy difference, and the periodic energy gradient. The module performs retransmission and reverification in the order of the metering cycle and outputs the energy metering data stream that has passed the complete verification to the settlement terminal.

[0009] Optionally, the metering cycle gap identification module is further configured to: compensate the arrival time of the first energy data packet by the clock synchronization error, extract its sequence number and start and end boundary anchor points based on the compensated arrival time, and determine the initial number of spans by combining the sequence number and start and end boundary anchor points of the second energy data packet; use the isolated forest algorithm to detect the abnormal state of the start and end points within the cycle segment to which the initial number of spans belongs, and lock the frozen gap segment based on the duration of the abnormal state when the abnormal state is true, and generate a verification value and determine the target number of spans based on the time difference between the start and end points of adjacent normal cycle segments when the abnormal state is false; divide the time axis according to the frozen gap segment or the target number of spans, arrange the obtained granular values ​​in chronological order, and obtain the metering cycle time granularity sequence.

[0010] Optionally, the metering cycle gap identification module is further configured to: verify the periodic energy of the missing metering cycle based on the cumulative energy value difference between the first energy data packet and the second energy data packet; perform anomaly identification on the periodic energy exceeding a preset threshold using the isolated forest algorithm to obtain the filtered periodic energy; calculate the energy gradient value per unit time based on the filtered periodic energy, and determine the integrity and confidence of the sampling points of each missing metering cycle accordingly, and generate the integrity description matrix.

[0011] Optionally, the hierarchical cache reconstruction and monitoring module is further configured to: divide the buffer area according to the metering period time window corresponding to the missing sequence number, calculate the required capacity and remaining capacity of each initial partition, and trigger a space reconstruction instruction when the required capacity exceeds the remaining capacity; determine non-target period data and unlocked nodes according to the data status of the storage nodes, perform space compression and reallocation on them, and form a layer to be added and a layer to be verified; perform integrity comparison on the two layers of data streams, and migrate the corresponding data stream to the confirmed layer when the verification value meets the threshold condition, thereby obtaining the reconstruction buffer area.

[0012] Optionally, the bilateral closed admission module is further configured to: determine the target metering cycle partition based on the sequence number of the third energy data packet; when the sequence number is within the range of the listening handle binding, adjust its arrival time according to the clock synchronization error of the third energy data packet, and determine the data packets falling into the target metering cycle time window as candidate delayed packets; perform anomaly detection on the arrival time of the candidate delayed packets, obtain the preceding and following packets corresponding to the normal delayed packets, and form a closed area with the cumulative energy base value of the two; determine the final admission packet when the cumulative energy value of the normal delayed packet is within the closed area, and perform interception when it exceeds the endpoint of the closed area, and determine the closed area as the bilateral closed reference interval.

[0013] Optionally, the bilateral closed admission module is further configured to: compare the pre-gap meter base value and the post-gap meter base value, and determine that a range reversal has occurred when the post-gap meter base value is less than the pre-gap meter base value; calculate the reversal compensation power based on the range reversal threshold of the smart meter and the pre-gap meter base value, and form a cross-reversal bilateral closed reference interval in combination with the post-gap meter base value; and determine the cumulative energy value of the normal delay packet as the final admission packet when it meets the cross-reversal bilateral closed reference interval.

[0014] Optionally, the metering error adjustment and writing module is further configured to: obtain the preceding and following packets based on the timestamp of the third energy data packet, and calculate the simulated energy at the corresponding time node using a linear interpolation algorithm; calculate the forward closure error and the backward closure error based on the simulated energy and the actual cumulative energy value of the third energy data packet, respectively; determine the metering allowable error based on the accuracy level of the target metering device, and evaluate the two closure errors in conjunction with the line loss tolerance business rules; generate a write right when both closure errors decrease and are within the dynamic allowable range, trigger the listening handle to perform a storage operation and update the data packet integrity flag for the corresponding metering period.

[0015] Optionally, the metering error adjustment and writing module is further configured to: obtain the metering topology node information corresponding to the third energy data packet; determine the node loss benchmark value according to the metering topology node information and the line loss tolerance business rules; determine the dynamic allowable range of forward closure error and backward closure error based on the node loss benchmark value and the metering allowable difference; generate reserved space write permission when both closure errors are within the dynamic allowable range, and trigger the space allocation operation of the corresponding storage node.

[0016] Optionally, the continuity verification and sequential retransmission module is further configured to: extract delayed data packets from the reserved space and arrange them in ascending order of sequence number; establish adjacent data packet combinations based on the corresponding metering cycle boundary anchor points; and determine the sequence relationship of the adjacent data packet combinations as having the same sequence number, consecutive sequence numbers, or skipped sequence numbers; for adjacent data packet combinations with consecutive sequence numbers and corresponding time intervals greater than zero, calculate the cumulative energy difference and normalize it according to the corresponding time interval to obtain the energy gradient value; generate a dynamic threshold range based on the historical energy gradient values ​​of adjacent normal metering cycles; determine energy gradient values ​​below the lower limit of the dynamic threshold range or above the upper limit of the dynamic threshold range as gradient anomalies; determine adjacent data packet combinations with skipped sequence numbers as missing states; determine adjacent data packet combinations with consecutive sequence numbers, cumulative energy differences greater than zero, and corresponding energy gradient values ​​as gradient anomalies as abrupt states; determine adjacent data packet combinations with the same sequence number as repeated states; and generate a continuity verification report.

[0017] Optionally, the continuity verification and sequential retransmission module is further configured to: remove abnormal data packets according to the continuity verification report and generate gap bits at the corresponding positions; assemble the data into an energy metering data stream according to the time sequence corresponding to the metering cycle boundary anchor point; scan the gap bits of the energy metering data stream, intercept and output when gap bits exist, and generate a retransmission index sequence according to the metering cycle corresponding to the gap bits; re-verify the retransmission data packets of the previous metering cycle according to the retransmission index sequence, and release the re-verification of the retransmission data packets of the next metering cycle after the verification is passed, until a complete and verified target energy metering data stream is formed and output to the settlement terminal.

[0018] The beneficial effects of this invention are as follows:

[0019] This invention generates a metering cycle time granularity sequence and integrity description matrix by combining the sequence number, clock synchronization error, cycle boundary anchor point, and cumulative energy value through a metering cycle gap identification module, so that communication gaps correspond to actual missing metering cycles. A layered cache reconstruction and monitoring module establishes buffer partitions, reserved space, and monitoring handles to provide corresponding storage entry points for delayed data packets. A bilateral closure access module verifies the continuity of cumulative energy by combining the base values ​​before and after the gap with the range reversal characteristics. A metering error adjustment and writing module uses the metering equipment accuracy level, node loss benchmark value, and line loss tolerance for write permission control, reducing the risk of erroneous data writing. A continuity verification and sequential retransmission module intercepts the output when a gap exists and uses the pass of the previous metering cycle verification as the release condition for re-verification in the next metering cycle, thereby restoring cycle attribution and base continuity, avoiding cumulative energy jumps, duplicate metering, or incomplete settlement data. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the logical architecture of a non-real-time power gap hierarchical buffer sequential retransmission system provided in one embodiment of the present invention; Figure 2 This is a schematic diagram of metering cycle gap identification, time granularity division, and integrity description matrix generation provided in one embodiment of the present invention; Figure 3 This is a schematic diagram of hierarchical cache reconstruction and listening handle binding provided in one embodiment of the present invention; Figure 4 This is a schematic diagram of general bilateral closure and cross-range flip bilateral closure access provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the simulated power, bidirectional closure error, and dynamic allowable range writing control provided in one embodiment of the present invention. Detailed Implementation

[0021] 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 embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention; that is, the described embodiments are merely some embodiments of the invention, and not all embodiments. The components of the embodiments of the invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0022] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0023] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0024] As mentioned earlier, when the cumulative energy data packets generated by smart meters or energy metering devices experience delays, out-of-order delivery, or missing data during transmission, existing technologies typically identify the missing range based on the data packet sequence number, timestamp, or arrival order, and recover the data sequence through buffering, retransmission, sorting and reassembly, numerical interpolation, or anomaly detection. However, the above processing is difficult to accurately restore the actual metering cycle boundary relationship to which the data packets belong, and it is also difficult to simultaneously determine whether the delayed data packets meet the constraints of the continuity of the cumulative energy meter reading before and after the gap, the range reversal characteristics of the smart meter, the accuracy of the metering equipment, and the loss constraints of the metering topology nodes. When multiple metering cycles are missing consecutively, the retransmitted data is assembled or output without sequential re-verification, which may also cause jumps in cumulative energy, duplicate metering, incorrect cycle assignment, or incomplete settlement data.

[0025] To address this, the present invention provides a non-real-time energy gap hierarchical buffer sequential retransmission system. The system uses a metering cycle gap identification module to determine the metering cycle time granularity sequence and integrity description matrix. A hierarchical buffer reconstruction and monitoring module establishes buffer partitions, reserved space, and monitoring handles for missing metering cycles. A bilateral closed access module determines the physical access status of the third energy data packet based on the cumulative energy meter readings before and after the gap and the range reversal characteristics. A metering error adjustment and writing module controls writing permissions based on the metering equipment accuracy level and line loss tolerance business rules. Finally, a continuity verification and sequential retransmission module intercepts output when a gap exists and completes retransmission and reverification according to the metering cycle sequence.

[0026] The following is combined Figures 1 to 5 This invention is described in detail.

[0027] Example 1:

[0028] like Figure 1 As shown, this embodiment of the invention provides a non-real-time energy gap hierarchical buffer sequential data transmission system. The system operates in a metering data processing environment capable of receiving, buffering, verifying, and outputting settlement data for energy data. It processes energy data packets generated by smart meters or energy metering devices according to the metering cycle. Each energy data packet includes at least a sequence number, clock synchronization error, cycle boundary anchor point, and cumulative energy value, allowing the system to recover data gaps based on timing relationships and energy metering relationships.

[0029] The present invention provides a non-real-time energy gap hierarchical buffer sequential transmission system, comprising the following modules: a metering cycle gap identification module, a hierarchical buffer reconstruction and monitoring module, a bilateral closure admission module, a metering error adjustment and writing module, and a continuity verification and sequential transmission module.

[0030] The metering cycle gap identification module is used to obtain the sequence number, clock synchronization error, cycle boundary anchor point, and cumulative energy value of the out-of-order first energy data packet and the normally received second energy data packet, compensate for the arrival time, determine the metering cycle time granularity sequence based on the sequence number difference and boundary interval, and generate an integrity description matrix by combining the number of sampling points and the energy gradient.

[0031] Specifically, the metering cycle gap identification module corrects the arrival time of the first energy data packet to a unified metering time reference based on the clock synchronization error, determines the missing metering cycle based on the time span between the missing sequence number and the cycle boundary anchor point, and describes the sampling point coverage status and metering reliability status of each missing metering cycle based on the change relationship between the first cumulative energy value and the second cumulative energy value, forming an integrity description matrix for the hierarchical cache reconstruction and monitoring module to determine the buffer partition and monitoring relationship.

[0032] The hierarchical cache reconstruction and monitoring module is used to divide the metering cycle buffer partition according to the integrity description matrix, perform space compression and reallocation according to the capacity gap, lock the reserved space of the missing cycle, and register and bind monitoring handles for the missing sequence number range, cycle time window and cumulative energy connection value range.

[0033] Specifically, the hierarchical cache reconstruction and monitoring module determines the buffer partition capacity requirement based on the number of missing data packets to be added in each missing metering period. When the remaining capacity is insufficient, it performs space compression and reallocation on storage nodes that are not in the target period and are not locked. After reconstruction, it locks the reserved space in the corresponding metering period partition and writes the missing sequence number range, period time window, and cumulative energy connection value range into the monitoring handle to locate the subsequent third energy data packet. The admission judgment of the cumulative energy value is executed by the bilateral closed admission module.

[0034] The bilateral closed access module is used to acquire the delayed third electrical energy data packet. When its sequence number and compensation arrival time meet the binding conditions, it constructs a bilateral closed reference interval based on the meter bottom value before and after the gap and the range reversal characteristics of the smart meter to determine the access status.

[0035] Specifically, the bilateral closure access module determines the target metering cycle based on the third sequence number and the compensation arrival time, and extracts the cumulative energy meter readings of the pre-gap and post-gap packets. When the pre- and post-gap meter readings maintain a normal cumulative relationship, they form a general bilateral closure reference interval. When the post-gap meter reading is less than the pre-gap meter reading, the pre- and post-gap meter readings are converted to a unified cumulative increment coordinate based on the range reversal threshold, forming a cross-reversal bilateral closure reference interval. Access is granted when the third cumulative energy value is within the corresponding interval; otherwise, interception is performed and the gap is maintained.

[0036] The metering error adjustment and writing module is used to calculate the forward closure error and backward closure error of the third energy data packet and the preceding and following data packets. The dynamic allowable range is determined by the metering equipment accuracy level and line loss tolerance business rules. When both closure errors decrease and are within the dynamic allowable range, the writing permission is released and the integrity flag is updated.

[0037] Specifically, the metering error adjustment and writing module uses the simulated cumulative energy value calculated based on the preceding and following packets as a continuity reference to evaluate the degree of closure of the third cumulative energy value relative to the preceding and following sides of the gap. It then determines the dynamic allowable range based on the metering allowable error corresponding to the metering equipment's accuracy level, the node loss benchmark value of the metering topology node, and the line loss tolerance business rules. When both the error reduction condition and the dynamic allowable range condition are met, the listening handle is triggered to write the third energy data packet into the reserved space, and the corresponding storage node is updated from a state to a state to be verified.

[0038] The continuity verification and sequential retransmission module is used to generate a continuity verification report based on the sequence number of the data packet already written, the cumulative energy difference, and the periodic energy gradient, perform retransmission and reverification in the order of the metering cycle, and output the fully verified energy metering data stream to the settlement terminal.

[0039] Specifically, the continuity verification and sequential retransmission module restores the metering order of data packets according to the sequence number and metering cycle boundary anchor point. It identifies missing, abrupt, or repetitive states based on the cumulative energy difference and time interval, and generates a continuity verification report, gap bits, and retransmission index sequence. When a gap bit exists, data stream output is blocked, and processing follows a gating relationship where the next metering cycle's reverification is only released after the previous metering cycle's reverification is successful, until a complete and verified target energy metering data stream is formed.

[0040] The system comprises several key components: a metering cycle time granularity sequence representing the start and end boundaries and arrangement of missing metering cycles on a unified metering time axis; an integrity description matrix recording time information, missing sequence number, sampling point integrity, confidence level, and data status; a bilateral closed reference interval verifying the physical continuity of the third cumulative energy value between the base values ​​before and after the gap; and a continuity verification report generating gap positions and controlling re-verification. The system uses metering cycle boundaries, cumulative energy base values, range reversal characteristics, metering equipment accuracy level, metering topology node loss relationships, and cycle energy gradients for delayed data packet identification, buffering, admission, writing, and output. Only data streams meeting the requirements of metering cycle attribution, base continuity, metering error, and sequence re-verification are output to the settlement terminal.

[0041] Based on the above system, this invention integrates the cumulative energy meter reading, metering cycle boundary, smart meter range reversal characteristics, metering equipment accuracy level, metering topology node loss relationship, and periodic energy gradient into the identification, buffering, admission, writing, and output processes of delayed data packets. This ensures that the third energy data packet is added in the order of the metering cycle after meeting the requirements of metering cycle attribution, meter reading continuity, and metering error. Only the fully verified energy metering data stream is output to the settlement terminal.

[0042] Example 2:

[0043] To provide a clearer and more complete explanation of the above embodiments, the present invention also provides Embodiment Two. In Embodiment Two, the specific implementation methods of each module are described according to the actual flow sequence of electrical energy metering data, from gap identification, buffer monitoring, bilateral closure access, metering error writing to continuity verification and sequential retransmission.

[0044] like Figure 2 As shown, preferably, the metering cycle gap identification module is further used for:

[0045] The arrival time of the first power data packet is compensated by the clock synchronization error. The sequence number and start and end boundary anchor points are extracted based on the compensated arrival time. The initial number of traversals is determined by combining the sequence number and start and end boundary anchor points of the second power data packet.

[0046] The isolated forest algorithm is used to detect the abnormal state of the start and end points within the period segment to which the initial number of spans belongs. When the abnormal state is true, the frozen gap segment is locked according to the duration of the abnormal state. When the abnormal state is false, a check value is generated and the target number of spans is determined according to the time difference between the start and end points of the adjacent normal period segment.

[0047] The time granularity sequence of the measurement cycle is obtained by dividing the time axis according to the frozen gap segment or the number of target spans and arranging the obtained granular values ​​in chronological order.

[0048] The initial span number represents the number of metering cycle spans initially determined based on the missing sequence range between the first and second sequence numbers and the time span between the corresponding start and end boundary anchor points. The metering cycle gap identification module compensates for the device-side time based on the clock synchronization status field carried by the first energy data packet or the timing correction record of the target metering device, obtains the reference cycle duration based on the metering cycle configuration of the target metering device, converts the time span between the gap boundaries into the number of complete metering cycles, and determines the initial span number together with the data packet number distribution corresponding to the sequence number difference. For example, when the original arrival time is 10:45:05 and the clock synchronization error is +5s, the compensated arrival time is 10:45:00; when the sequence number of the second energy data packet is 121 and the cycle end boundary is 10:15, the sequence number of the first energy data packet is 123 and the cycle end boundary is 10:45, and the reference cycle duration is 15min, the initial span number is 2, and the missing metering cycle time window corresponding to the missing sequence number 122 is from 10:15 to 10:30.

[0049] Both the original arrival time and the compensated arrival time are device-side time fields carried in the energy data packet. The compensated arrival time is the logical time after conversion to a unified metering time base, used to determine the metering cycle time window corresponding to the data packet. The network physical reception time recorded by the metering data processing terminal is the actual reception time, used to calculate the delay of the data packet relative to the end boundary of the target metering cycle. Clock synchronization error compensation does not change the actual reception time of the data packet in the communication link.

[0050] The input features of the isolated forest algorithm include at least the initial number of spans, the starting boundary anchor point of the cycle segment, the ending boundary anchor point, and the time interval between adjacent starting and ending points. Each time feature is normalized according to the baseline cycle length, and the output is a start-end point anomaly score. The anomaly judgment threshold is determined by the boundary anchor point samples of the same target metering device's historical normal metering cycles and the model configuration. For example, the start-end point anomaly scores of the most recent 100 complete and successfully verified metering cycles can be read, and their 95th percentile value of 0.65 can be used as the judgment threshold; an anomaly score of 0.42 corresponds to a false anomaly, and an anomaly score of 0.71 corresponds to a true anomaly. The number of historical samples, the percentile value, and the judgment threshold are all example configurations. The isolated forest processing only identifies metering cycle boundary anomalies and does not change the cumulative energy value.

[0051] When the abnormal state is true, the frozen gap segment is determined by the starting boundary of the first abnormal metering cycle and the ending boundary of the last abnormal metering cycle in the continuous abnormal sequence. The metering cycles that overlap with it are kept in the frozen gap state until the supplementary data packet completes the admission and re-verification. For example, when the continuous abnormal metering cycles are 10:15 to 10:30 and 10:30 to 10:45, the frozen gap segment is 10:15 to 10:45.

[0052] When the abnormal state is false, a verification value is generated by the ratio of the start and end time difference of adjacent normal period segments to the length of the reference period, and compared with the initial number of spans. If they match, the initial number of spans is determined as the target number of spans. If they do not match, the coverage relationship of the candidate number of spans to the range of missing sequences and the residual deviation of the time span of the period boundary are checked respectively, and the number of spans that simultaneously meet the sequence coverage and the residual deviation is within the allowable range of timing accuracy is determined as the target number of spans. If the above conditions are not met, the frozen gap segment is maintained. After dividing the time axis according to the frozen gap segment or the target number of spans, a time granularity sequence of the measurement period is formed that records at least the measurement period identifier, the period start boundary, the period end boundary, the range of missing sequences, and the frozen state.

[0053] When dividing the time axis based on the frozen gap segment, each granularity value is formed by the start and end boundaries of the continuous measurement cycle within the frozen gap segment; when dividing the time axis based on the target span, corresponding granularity values ​​are formed sequentially between the first and second start and end boundary anchor points according to the base cycle duration. The resulting measurement cycle time granularity sequence at least records the measurement cycle identifier, cycle start boundary, cycle end boundary, missing sequence range, and frozen state for use in subsequent integrity description matrix generation and buffer region partitioning.

[0054] More preferably, the metering cycle gap identification module is further used for:

[0055] The periodic energy of missing metering periods is checked based on the difference in cumulative energy values ​​between the first energy data packet and the second energy data packet. For periodic energy exceeding a preset threshold, the isolated forest algorithm is used for anomaly identification to obtain filtered periodic energy.

[0056] The energy gradient value per unit time is calculated based on the filtered periodic energy, and the integrity and confidence of the sampling points for each missing metering period are determined accordingly, generating the integrity description matrix.

[0057] Specifically, when no range reversal occurs before or after the gap, the calculation direction of the cumulative energy value difference between the first and second energy data packets is not determined according to the data packet name or actual reception order. Instead, it is determined according to the metering time sequence corresponding to the period boundary anchor point, subtracting the cumulative energy value of the data packet with the earlier time sequence from the cumulative energy value of the data packet with the later time sequence. The periodic energy between adjacent metering times can be expressed by the following formula:

[0058] (1)

[0059] in, This represents the cumulative electrical energy value of the data packets that appear earlier in the time sequence. The cumulative electrical energy value is for the data packets that appear later in the time sequence, and the unit is kilowatt-hours. The periodic electrical energy is the energy within the time interval between the two data packets, expressed in kilowatt-hours. When a range reversal occurs, the periodic electrical energy is determined according to the unified cumulative increment coordinates described later.

[0060] The preset threshold is derived from the metering range and sampling configuration of the target metering equipment, the distribution of cyclical energy during historical normal metering cycles of the same metering topology node, and on-site metering rules. It is used to determine whether cyclical energy enters the anomaly identification process. When the first energy data packet and the second energy data packet span multiple missing metering cycles and no actual replacement data packet has been received, the cumulative energy difference between the two is evenly divided according to the number of metering cycles spanned, yielding the average cyclical energy to be verified. This average cyclical energy to be verified is only used for anomaly identification, integrity evaluation, energy gradient calculation, and integrity description matrix generation; it is not used as the final settlement energy. For example, if the cumulative energy difference is 100 kWh and spans two 15-minute metering cycles, the average cyclical energy to be verified is 50 kWh; when the 95th percentile of historical normal cyclical energy is 60 kWh, 50 kWh does not trigger anomaly identification.

[0061] Cyclic energy values ​​within a preset threshold are retained; those exceeding the threshold are identified using an isolated forest model independent of start and end point anomaly detection. This model takes the cyclic energy to be identified, the metering cycle duration, the energy gradient, and the deviation relative to neighboring normal metering cycles as input, outputting an anomaly score for the cyclic energy, and determining a judgment threshold based on historical normal cyclic energy samples. Cyclic energy values ​​with anomaly scores reaching the judgment threshold are marked and excluded, and are not included in the calculation of sampling point integrity and confidence. For example, a cyclic energy value of 72 kWh has an anomaly score of 0.74, and with a judgment threshold of 0.70, it is marked as an abnormal cyclic energy value.

[0062] The input for periodic energy anomaly identification includes the periodic energy to be identified, its corresponding metering cycle duration, energy gradient, and deviation relative to neighboring normal metering cycle energy. The Isolation Forest algorithm outputs a periodic energy anomaly score, the threshold for which is determined by historical normal periodic energy samples and model configuration. Periodic energy with anomaly scores below the threshold is retained; periodic energy with anomaly scores reaching the threshold is marked as anomalous periodic energy and is not considered valid periodic energy in subsequent sampling point integrity and confidence calculations. This Isolation Forest processing is performed separately from the aforementioned start-end point anomaly detection, and its input objects, output results, and subsequent uses differ.

[0063] The electrical energy gradient value per unit time can be expressed by the following formula:

[0064] (2)

[0065] in, For the first The electrical energy gradient for each corresponding time interval, in kilowatt-hours per hour; The filtered periodic electrical energy is expressed in kilowatt-hours. The corresponding time interval is in hours (for example, if the filtered periodic electrical energy is 49 kWh, the corresponding time interval is 15 min, or 0.25 h, then the electrical energy gradient is (49 / 0.25 = 196). The periodic electrical energy is derived from the cumulative electrical energy difference verification result, and the time interval is derived from the start and end boundary anchor points of the corresponding metering cycle. The electrical energy gradient is used to evaluate the consistency between the electrical energy change within the missing metering cycle and the adjacent normal metering cycle.

[0066] The sampling point integrity is the ratio of the number of valid sampling points received and identified by sequence number, time window, and periodic energy anomaly within the missing metering cycle to the expected number of sampling points. The expected number of sampling points is determined based on the sampling configuration of the target metering device and the metering cycle duration. For example, if one sampling point is formed every 1 minute and the metering cycle duration is 15 minutes, the expected number of sampling points is 15; if 12 valid sampling points have been obtained, the sampling point integrity is 0.80, and it is updated to 1.00 after all 15 valid sampling points are obtained.

[0067] The confidence level is jointly determined by the integrity of the sampling points and the consistency of the energy gradient. The system invokes a judgment rule formed by historical normal metering cycle statistics and metering rule configuration based on the interval of sampling point integrity and the deviation of the current energy gradient from the gradient range of adjacent normal metering cycles. For example, if the historical normal energy gradient range is 190 kWh / h to 215 kWh / h, and the current sampling point integrity is 0.80 with an energy gradient of 196 kWh / h, the confidence level can be determined to be 0.85 according to a preset rule. The integrity description matrix, with the metering cycle as the row, records at least the cycle start boundary, cycle end boundary, missing sequence number range, expected number of sampling points, effective number of sampling points, sampling point integrity, filtered cycle energy, energy gradient, confidence level, frozen gap segment marker, and current data status, and outputs it to the hierarchical cache reconstruction and monitoring module.

[0068] The integrity description matrix, organized by metering period, includes at least the period start boundary, period end boundary, range of missing sequence numbers, expected number of sampling points, number of valid sampling points, sampling point integrity, filtered periodic electrical energy, electrical energy gradient per unit time, confidence level, frozen gap segment marker, and current data status. Thus, the integrity description matrix can convert the range of missing sequences at the communication layer into structured data corresponding to the metering period, cumulative electrical energy changes, and sampling point coverage relationships, and output it to the hierarchical cache reconstruction and monitoring module.

[0069] like Figure 3As shown, preferably, the hierarchical cache reconstruction and monitoring module is further used for:

[0070] The buffer area is divided according to the metering cycle time window corresponding to the missing sequence number. The required capacity and remaining capacity of each initial partition are calculated. When the required capacity exceeds the remaining capacity, a space reconstruction command is triggered.

[0071] Based on the data status of the storage nodes, non-target periodic data and unlocked nodes are identified, and space compression and reallocation are performed on them to form layers to be added and layers to be verified.

[0072] Integrity comparison is performed on the two data streams. When the verification value meets the threshold condition, the corresponding data stream is migrated to the confirmed layer to obtain the reconstruction buffer area.

[0073] The required capacity of each initial partition is determined based on the number of missing data packets and the actual data packet storage length in the corresponding metering period of the integrity description matrix (for example, missing sequence number 122 corresponds to a data packet to be added, and the actual storage length of this data packet is 500B, so the required capacity of the corresponding initial partition is 500B; the actual storage length comes from the data packet storage length field). The remaining capacity is determined based on the storage nodes that are not currently occupied and are not effectively locked in the partition (for example, if the total capacity of the storage nodes that are not currently occupied and are not effectively locked in the initial partition is 300B, then the remaining capacity is 300B). When the required capacity exceeds the remaining capacity, the space reconstruction instruction is used to reorganize the storage space that can be released or migrated within the partition (for example, when the required capacity of 500B is greater than the remaining capacity of 300B, space reconstruction is triggered; after space compression and reallocation to release 800B, the available capacity of the partition becomes 1100B, which can accommodate the 500B data packets to be added), without changing the content of the data packets that have already passed the metering verification.

[0074] The non-target cycle data refers to data that does not belong to the current supplementary transmission index sequence and the set of metering cycles to be supplemented, and is no longer used as a pre-gap packet, post-gap packet, or historical normal metering cycle sample. The unlocked node refers to a storage node that is not bound to a valid listening handle, has not obtained write permission, and is not in a continuous verification read state. The supplementary layer is used to store reserved space for data packets that have established a mapping between missing sequence numbers and metering cycle time windows but have not yet been written to the third energy data packet. The verification layer is used to store data packets that have obtained write permission but have not yet completed continuous verification. The confirmed layer is used to store data streams that meet the integrity comparison conditions of the current metering cycle.

[0075] The integrity comparison includes at least the missing sequence number coverage relationship, the expected sampling point coverage relationship, and the consistency of the storage node state. The system generates a satisfied or unsatisfied state for each comparison item, and considers all comparison items in the satisfied state as the verification value meeting the threshold condition. The verification value reflects the integrity state result of whether all comparison items are satisfied, without requiring numerical weighting for each comparison item. The verification value is determined to meet the threshold condition only when all missing sequence numbers are covered by valid data packets, the number of valid sampling points reaches the expected number, and the storage node state is consistent with the data packet state. The corresponding data stream is then migrated from the layer to be verified to the confirmed layer. If any condition is not met, the verification value is determined not to meet the threshold condition, and the system remains in the state to be verified or the gap state. This migration only indicates the completion of integrity verification within the buffer area and does not indicate that the data stream is ready for output.

[0076] After spatial reconstruction is completed, the hierarchical cache reconstruction and monitoring module locks the reserved space for the missing metering cycle, registers a monitoring handle, and writes the missing sequence number range, metering cycle time window, cumulative energy connection value range, and reserved space address into the monitoring relationship. The sequence number range and cycle time window are derived from the metering cycle time granularity sequence, and the cumulative energy connection value range is derived from the confirmed cumulative energy base value and range reversal status before and after the gap. For example, when the monitoring handle is bound to missing sequence number 122, metering cycle time window 10:15 to 10:30, and cumulative energy connection value range 5100kWh to 5200kWh, the third energy data packet with sequence number 122 and compensation arrival time of 10:22 is sent to the bilateral closed admission module, but is not directly confirmed and written by the monitoring handle.

[0077] like Figure 4 As shown, the selected bilateral closed access module is further used for:

[0078] The target metering cycle partition is determined based on the sequence number of the third energy data packet. When the sequence number is within the range of the listening handle binding, the arrival time of the third energy data packet is adjusted according to the clock synchronization error of the third energy data packet, and the data packets that fall into the target metering cycle time window are determined as candidate delayed packets.

[0079] Anomaly detection is performed on the arrival time of candidate delayed packets, and the preceding and following packets corresponding to the normal delayed packets are obtained. The cumulative energy values ​​of the two packets form a closed region.

[0080] When the cumulative energy value of the normal delayed packet is within the closed region, the final admission packet is determined; when it exceeds the endpoint of the closed region, interception is performed, and the closed region is determined as a bilateral closed reference interval.

[0081] Specifically, the arrival time anomaly detection takes the compensated arrival time of the candidate delayed packet, the start and end boundaries of the target metering cycle, the delay duration relative to the end boundary of the target metering cycle, and the delay duration distribution of historical normal delayed packets of the same target metering device as input. It uses the isolated forest algorithm to output an arrival time anomaly score, and determines the judgment threshold based on historical normal delayed packet samples and the system anomaly detection configuration. For example, the anomaly scores of the most recent 100 normal delayed packets can be read, and their 95th percentile value of 0.65 can be used as the judgment threshold; an anomaly score of 0.40 indicates a normal delayed packet, and an anomaly score of 0.72 indicates interception while maintaining the corresponding gap. The compensated arrival time is obtained by correcting the device-side time carried by the candidate delayed packet for clock synchronization errors, and is used to determine whether the candidate delayed packet falls within the target metering cycle time window; the delay duration is calculated based on the actual reception time of the data packet and the end boundary of the target metering cycle, and is used to evaluate the actual delay level of the data packet in the communication link. These two are used for metering cycle attribution verification and communication delay anomaly detection, respectively, and are not interchangeable.

[0082] The preceding and following packets are data packets located before and after the normal delay packet on the time axis of the target metering cycle, respectively, and have passed metering verification. When no range reversal occurs, the general bilateral closure condition is satisfied when the cumulative energy meter reading of the preceding packet is the lower boundary of the closed area, the cumulative energy meter reading of the following packet is the upper boundary of the closed area, and the third cumulative energy value is between the two.

[0083] More preferably, the bilateral closed access module is further used for:

[0084] Compare the pre-gap table base value and the post-gap table base value. If the post-gap table base value is less than the pre-gap table base value, it is determined that a range reversal has occurred.

[0085] The overturn compensation amount is calculated based on the range reversal threshold of the smart meter and the meter bottom value before the gap, and the overturn bilateral closed reference interval is formed by combining the meter bottom value after the gap.

[0086] When the cumulative energy value of a normal delayed packet satisfies the cross-flip double-sided closed reference interval, it is determined as the final admission packet.

[0087] In this embodiment, when the value of the meter reading after the gap is less than the value of the meter reading before the gap, this numerical relationship is first determined as a candidate state for range reversal. The system then checks whether the target metering device has undergone meter replacement, accumulated energy clearing, or metering parameter reset within the corresponding time intervals of the packet before and after the gap. If the aforementioned state does not exist, and the accumulated energy connection relationship after the reversal can be uniquely determined based on the range reversal modulus of the target smart meter, the candidate state for range reversal is determined as a range reversal state. If the aforementioned state exists, or if the influence of the aforementioned state on the change in the accumulated energy meter reading cannot be ruled out, a cross-reversal bilateral closed reference interval is not directly generated based on the meter readings before and after the gap. Instead, the gap state of the corresponding metering cycle is maintained, and subsequent energy data packets are monitored.

[0088] The range reversal threshold is derived from the range configuration or metering parameters of the target smart meter and uniformly represents the reversal modulus corresponding to one reversal of the cumulative energy counter. When only the maximum display value is given in the device parameters, the reversal modulus is calculated based on the maximum display value and the minimum display resolution. For example, when the maximum display value is 9999kWh and the minimum display resolution is 1kWh, the reversal modulus is 10000kWh. When the pre-shortage meter base value is 9800kWh and the post-shortage meter base value is 100kWh, the cumulative increment across reversals is 300kWh. When the third cumulative energy value after reversal is 20kWh, its unified coordinate increment relative to the pre-shortage meter base value is 220kWh, located within the cross-reversal double-sided closed reference interval from 0 to 300kWh.

[0089] The cumulative increment of the cross-flip between the gap and the opening can be expressed by the following formula:

[0090] (3)

[0091] in, The range switching modulus of the target smart meter, in kilowatt-hours; The value at the bottom of the table preceding the gap is in kilowatt-hours. The value is the bottom value of the table after the flipped gap, in kilowatt-hours; The cumulative increment across the flipping from the bottom value of the table before the gap to the bottom value of the table after the gap is expressed in kilowatt-hours.

[0092] Formula (3) applies to the case where a range reversal occurs between the pre-gap packet and the post-gap packet, and the cumulative increment across the reversal can be uniquely determined based on the range reversal modulus, the pre-gap table base value, and the post-gap table base value. If the number of range reversals cannot be uniquely determined, the final access state is not generated according to Formula (3), but the gap state of the corresponding metering cycle is maintained and subsequent electrical energy data packets are monitored.

[0093] When judging normal delay packets, the third cumulative energy value is converted to the same relative increment coordinate: if the third cumulative energy value is not less than the previous table bottom value, the difference between the two is used as the relative increment; if the third cumulative energy value is less than the previous table bottom value, the sum of the reversal compensation amount from the previous table bottom value to the range reversal position and the third cumulative energy value is used as the relative increment. The relative increment is satisfied when it is between zero and the cross-reversal cumulative increment; otherwise, interception is performed. Normal delay packets that satisfy the general double-sided closure or cross-reversal double-sided closure conditions are determined as the final admission packets, and the preceding packet, following packet, range reversal status, and double-sided closure reference interval are output to the measurement error adjustment and writing module.

[0094] When a normal delay packet satisfies a general bilateral closed reference interval or crosses a reversed bilateral closed reference interval, the bilateral closed admission module determines it as the final admission packet and outputs the preceding packet, the following packet, the range reversal status, and the bilateral closed reference interval to the measurement error adjustment and writing module.

[0095] like Figure 5 As shown, preferably, the measurement error adjustment and writing module is further used for:

[0096] Based on the timestamp of the third electrical energy data packet, the preceding and following packets are obtained, and the simulated electricity at the corresponding time node is calculated using a linear interpolation algorithm;

[0097] Calculate the forward closure error and the backward closure error based on the simulated electrical charge and the actual cumulative electrical energy value of the third electrical energy data packet, respectively.

[0098] The allowable measurement error is determined based on the accuracy level of the target metering equipment, and the two closure errors are evaluated in conjunction with the line loss tolerance business rules. When both closure errors decrease and are within the dynamic allowable range, a write right is generated, triggering the listening handle to perform a storage operation and update the data packet integrity flag for the corresponding metering period.

[0099] Specifically, when no range reversal occurs, the preceding packet, the third energy data packet, and the following packet directly use their respective cumulative energy meter readings. When a range reversal occurs, the three are first converted according to the aforementioned unified relative increment coordinates, and then the simulated energy and closure error calculations are performed. This avoids mixing the absolute meter reading before the reversal and the local increment after the reversal in the same formula.

[0100] The simulated cumulative electrical energy at the corresponding time point of the third electrical energy data packet can be expressed by the following formula:

[0101] (4)

[0102] in, This represents the simulated cumulative electrical energy value at the time point corresponding to the third electrical energy data packet, in kilowatt-hours. and These are the cumulative electrical energy values ​​of the preceding and following packets under the same coordinate system, in kilowatt-hours. , and The timestamps are those of the preceding packet, the third energy data packet, and the following packet, respectively, and are uniformly converted to the same time unit. Formula (4) is only used when... The calculation is performed when the timestamp of the third energy data packet is between the timestamp of the preceding packet and the timestamp of the following packet; if the time relationship is not satisfied, the simulated cumulative energy value is not generated according to formula (4), and the corresponding data packet remains in a state of pending verification.

[0103] For example, when no range reversal occurs, the timestamp of the preceding packet is 10:15 and the cumulative energy value is 5100kWh, the timestamp of the third energy data packet is 10:30, the timestamp of the following packet is 10:45 and the cumulative energy value is 5200kWh; the third energy data packet is located at the midpoint of the time interval between the preceding and following packets, and the simulated cumulative energy value at the third time node is 5150kWh obtained by linear interpolation.

[0104] To reflect the degree of closure of the third cumulative energy value relative to the pre-gap and post-gap sides respectively, the forward closure error and the backward closure error can be expressed by the following formulas:

[0105] (5)

[0106] in, Forward closure error, Both are dimensionless non-negative numbers and represent backward closure errors. To unify the actual cumulative electrical energy value of the third electrical energy data packet under the coordinate system, the unit is kilowatt-hour; The minimum energy resolution of the target metering device, expressed in kilowatt-hours (e.g., the minimum energy resolution recorded in the metering parameters of the target metering device is 0.1). ,but =0.1 This is used to prevent the denominator from being zero. For example, the aforementioned simulated cumulative electrical energy value is 5150. The actual cumulative energy value of the third energy data packet is 5149. The corresponding cumulative electrical energy span for both the preceding and following sides is 50. At that time, both the forward closure error and the backward closure error are (1 / 50=0.02), which is 2.0%.

[0107] The forward closure error comparison benchmark and the backward closure error comparison benchmark are generated based on historical normal data that has been fully verified and belongs to the same target metering device, the same metering topology node, and the same metering cycle type. These benchmarks correspond to the relative time position of the third energy data packet within the target metering cycle. For example, if the upper limit of the forward closure error formed from historical normal data is 3.0% and the upper limit of the backward closure error is 2.5%, and both the current forward and backward closure errors are 2.0%, then both are less than their respective comparison benchmarks, thus satisfying the condition that both closure errors decrease. The decrease in both closure errors means that the forward closure error is less than its corresponding forward closure error comparison benchmark, and the backward closure error is less than its corresponding backward closure error comparison benchmark; this statement does not imply that the same closure error shows a decreasing trend over multiple consecutive moments, nor does it imply a numerical comparison between the forward and backward closure errors. The system saves the source cycle, generation time, and applicable metering topology node for each comparison benchmark.

[0108] The allowable measurement error is obtained from the measurement parameters or the system's pre-stored accuracy level mapping relationship based on the accuracy level of the target measurement equipment, and converted into a dimensionless relative error identical to the forward and backward closure errors. For example, if the accuracy level field is 1.0 and the mapping relationship gives an allowable measurement error of 1.0%, it is converted into a dimensionless number of 0.01. This value is only used to illustrate the relationship between accuracy level and allowable measurement error and does not constitute a unique value limitation.

[0109] More preferably, the measurement error adjustment and writing module is further used for:

[0110] Obtain the metering topology node information corresponding to the third electrical energy data packet, and determine the node loss benchmark value based on the metering topology node information and the line loss tolerance business rules;

[0111] The dynamic allowable ranges of forward closure error and backward closure error are determined based on the node loss reference value and the metering allowable difference.

[0112] When both closure errors are within the dynamic allowable range, a reserved space write permission is generated, and the space allocation operation of the corresponding storage node is triggered.

[0113] The metering topology node information includes at least the metering node corresponding to the third energy data packet, the upstream input metering relationship, the downstream output metering relationship, and the metering interval. The node loss benchmark value is determined based on the energy balance difference between the upstream input cycle energy and the downstream output cycle energy in a historically verified metering cycle within the same metering interval, and converted into a dimensionless loss ratio relative to the upstream input cycle energy. For example, when the upstream input cycle energy is 1000 kWh and the sum of the downstream output cycle energy is 970 kWh, the node loss benchmark value is 3.0%.

[0114] The line loss tolerance business rules are derived from the system's pre-stored metering topology configurations, historical normal metering cycle statistics, and field line loss management rules. These rules are used to limit the allowable fluctuation range of the node loss benchmark value within the corresponding metering topology node and metering interval. For example, when the node loss benchmark value is 3.0% and the line loss tolerance is ±0.5 percentage points, the normal loss ratio range is 2.5% to 3.5%. Different metering topology nodes use their respective node loss benchmark values ​​and line loss tolerances.

[0115] The dynamic allowable range is determined by a preset node-level mapping relationship based on the metering allowable difference, metering topology nodes, metering intervals, node loss benchmark values, and line loss tolerance business rules. The mapping relationship records at least the applicable metering equipment accuracy level, metering topology nodes or metering intervals, node loss benchmark range, line loss tolerance range, and the corresponding upper limits of forward and backward closure errors. The output dimensions are consistent with the two closure errors. For example, when the metering allowable difference is 1.0%, the node loss benchmark value is 3.0%, and the line loss tolerance is ±0.5 percentage points, the mapping record can output that both the upper limit of the forward closure error and the upper limit of the backward closure error are 2.5%. This output is determined by the node-level mapping record and is not obtained by directly adding the input values.

[0116] When each third energy data packet enters the write judgment stage, the system reads the accuracy level and allowable metering error based on the target metering device identifier, reads the metering node, metering interval, and node loss baseline value based on the metering topology node information, and calls the corresponding line loss tolerance business rules. It then reads the upper limit of forward closure error and the upper limit of backward closure error from the mapping records that match all query conditions. The term "dynamic" indicates that different devices, nodes, loss states, and line loss tolerance configurations correspond to different allowable ranges; it does not imply that online training or real-time modification of mapping relationships is mandatory. If no matching record is found, no reserved space write permission is generated, and the gap state for the corresponding metering cycle is maintained.

[0117] When the forward closure error is less than the forward comparison reference and the backward closure error is less than the backward comparison reference, and both are within their respective dynamic allowable ranges, the metering error adjustment and writing module generates reserved space write permissions and triggers the space allocation operation and listening handle storage operation of the corresponding storage node. If any condition is not met, the third electrical energy data packet does not enter the verification layer, the corresponding metering cycle remains in a gap state, and it continues to listen for subsequent data packets.

[0118] After the third energy data packet is successfully written, the metering error adjustment and writing module updates the missing sequence number range, valid sampling point number, sampling point integrity, and current data status in the integrity description matrix according to the third sequence number. It then updates the corresponding storage node from the layer to be added to the layer to be verified, and outputs the updated data packet integrity flag to the continuity verification and sequential transmission module. This data packet integrity flag only indicates that the third energy data packet has passed the admission and writing verification; it does not indicate that the corresponding metering cycle can be output to the settlement terminal.

[0119] Preferably, the continuity verification and sequential retransmission module is further used for:

[0120] Delayed data packets are extracted from the reserved space and arranged in ascending order of sequence number. Adjacent data packet combinations are established by combining the corresponding metering cycle boundary anchor points. The sequence relationship of the adjacent data packet combinations is determined as having the same sequence number, consecutive sequence numbers, or skipped sequence numbers. For adjacent data packet combinations with consecutive sequence numbers and corresponding time intervals greater than zero, the cumulative energy difference is calculated and normalized according to the corresponding time interval to obtain the energy gradient value.

[0121] A dynamic threshold range is generated based on the historical energy gradient values ​​of adjacent normal metering cycles. Energy gradient values ​​that are lower than the lower limit of the dynamic threshold range or higher than the upper limit of the dynamic threshold range are identified as gradient anomalies.

[0122] The combination of adjacent data packets with skipped sequence numbers is identified as the missing state; the combination of adjacent data packets with consecutive sequence numbers, cumulative energy difference greater than zero and corresponding energy gradient value as gradient outlier is identified as the mutation state; the combination of adjacent data packets with the same sequence number is identified as the repetition state, and a continuity verification report is generated.

[0123] Specifically, the continuity verification and sequential retransmission module establishes a time sequence and adjacent data packet combinations based on the sequence number and metering cycle boundary anchor point, using the delayed data packets in the reserved space and the confirmed preceding and following packets within the corresponding metering cycle. When sequence numbers are the same, it is directly identified as a repeating state, and the energy gradient is not calculated. When there are unused sequence numbers between sequence numbers, it is identified as a skipped number and marked as missing. When sequence numbers are consecutive, the time interval between adjacent data packets is first verified. If the time interval is less than or equal to zero, the corresponding adjacent data packet combination is identified as a time sequence anomaly, and the cumulative energy difference and energy gradient are not calculated. The time sequence anomaly is recorded in the continuity verification report. If the time interval is greater than zero, the cumulative energy difference and energy gradient are calculated. When a range reversal occurs, the cumulative energy value is first converted to a unified relative incremental coordinate. When no range reversal occurs, the cumulative energy value in the later time sequence is subtracted from the cumulative energy value in the earlier time sequence. When no range reversal occurs and the cumulative energy difference is less than zero, the corresponding adjacent data packet combination is identified as a cumulative energy reverse anomaly, and the cumulative energy reverse anomaly is recorded in the continuity verification report. When the cumulative energy difference is equal to zero, the energy gradient is determined to be zero, and it is compared with the dynamic threshold range. If the zero value is within the dynamic threshold range, the corresponding data packet combination is retained; if the zero value is below the lower limit of the dynamic threshold range, the corresponding data packet combination is identified as a zero increment anomaly. The time sequence anomaly, cumulative energy reverse anomaly, and zero increment anomaly are all recorded as continuity anomalies for subsequent abnormal data packet rejection and gap bit generation.

[0124] The historical energy gradient values ​​are derived from adjacent normal metering cycles that have passed complete verification and are from the same target metering device and the same metering topology node. The length of the historical window is determined based on the device data stability requirements and system statistical configuration. The system can use the isolated forest algorithm to identify historical gradient outliers and determine the minimum and maximum values ​​in the filtered historical energy gradients as the lower and upper limits of the dynamic threshold range, respectively. For example, if the effective gradients of the most recent 10 fully verified metering cycles are distributed between 190 kWh / h and 215 kWh / h and are not identified as outliers, this range is taken as the dynamic threshold range; 196 kWh / h and 204 kWh / h are normal values, and 230 kWh / h is an outlier.

[0125] The dynamic threshold range is updated with each new complete calibration cycle. Only the electrical energy gradient values ​​that pass the bilateral closure calibration, calibration error calibration, continuity calibration, and sequential recalibration in sequence are included in the historical window; gradient values ​​that fail the calibration are not considered as historical samples.

[0126] For adjacent data packet combinations, when the sequence number jumps, regardless of whether the cumulative energy difference is zero, it is determined to be a missing state, and the cumulative energy difference and time span are used as additional verification information; when the sequence numbers are consecutive, the cumulative energy difference is greater than zero, and the energy gradient exceeds the dynamic threshold range, it is determined to be a sudden change state; when the sequence numbers are the same, the later-appearing data packet is determined to be a duplicate data packet, and the corresponding combination is determined to be a duplicate state. For example, when sequence number 131 is missing between sequence numbers 130 and 132, it is determined to be a missing state; when the cumulative energy difference between sequence numbers 133 and 134 within 15 minutes is 80 kWh, the corresponding gradient is 320 kWh / h, and it is higher than the upper limit of the dynamic threshold of 215 kWh / h, it is determined to be a sudden change state; when sequence number 134 appears repeatedly, it is directly determined to be a duplicate state.

[0127] The continuity verification report records at least the data packet sequence number, metering cycle boundary anchor point, sequence relationship of adjacent data packet combinations, cumulative energy difference, energy gradient, dynamic threshold range comparison result, abnormal status and corresponding storage node, so as to provide a gap bit generation and a supplementary transmission index sequence establishment.

[0128] More preferably, the continuity verification and sequential retransmission module is further used for:

[0129] Abnormal data packets are removed from the continuity verification report and gap bits are generated at the corresponding positions. The data are then assembled into an electrical energy metering data stream according to the time sequence corresponding to the metering cycle boundary anchor points.

[0130] Scan the gap bits in the electrical energy metering data stream, intercept the output when a gap bit exists, and generate a supplementary transmission index sequence based on the metering cycle corresponding to the gap bit;

[0131] Based on the supplementary transmission index sequence, the supplementary transmission data packets of the previous metering period are first re-verified. After the verification is passed, the re-verification of the supplementary transmission data packets of the next metering period is released until a complete and verified target energy metering data stream is formed and output to the settlement terminal.

[0132] The gap bit is used to identify the location of a missing valid energy data packet in the data stream assembled according to the metering cycle boundary anchor point, and does not carry the settlement energy value. The gap bit is directly retained at the sequence position determined to be missing in the continuity verification report; after data packets determined to be abrupt, have abnormal time order, have abnormal cumulative energy, or have zero increment abnormality are removed, a gap bit is generated at the original corresponding position of the data packet. For multiple data packets with the same sequence number determined to be duplicated, data packets that have passed the bilateral closure access and metering error verification and are consistent with the target metering cycle time window are retained first, and the remaining duplicate data packets are removed; when multiple data packets meet the above conditions, the data packet that passed the verification first is retained according to the actual reception time order. After retaining a valid data packet, a gap bit is not generated at that sequence position; a gap bit is generated at that sequence position only when all data packets with the same sequence number fail the corresponding verification. This prevents duplicate or abnormal data packets from participating in the settlement data assembly as multiple normal cumulative energy meter bases, and avoids non-existent data gaps caused by simply removing duplicate copies.

[0133] The continuity verification and sequential retransmission module scans the assembled electrical energy metering data stream. If any missing bit exists, an output interception state is generated, and a retransmission index sequence is generated according to the time order of the metering cycle corresponding to the missing bit; if there are no missing bits and all metering cycles have completed the corresponding verification, the final complete verification is initiated.

[0134] For each metering cycle in the retransmission index sequence, the metering cycle with the earlier time sequence is re-verified first. This involves re-checking the sequence number attribution of the retransmission data packet, the compensation arrival time, the bilateral closure relationship of the accumulated electrical energy, the forward closure error, the backward closure error, the dynamic allowable range, and the continuity of the electrical energy gradient. Only after the reverification of the previous metering cycle passes is the reverification status of the next metering cycle updated to executable; if the previous metering cycle fails, the next metering cycle remains in an unreleased state.

[0135] The continuity verification and sequential retransmission module processes the retransmission index sequence in the above order until all missing bits are replaced by retransmission data packets that have passed reverification, and each metering cycle satisfies the continuity of the cumulative energy meter reading and the continuity of the energy gradient. The target energy metering data stream is only output to the settlement terminal when there are no missing bits, abnormal data packets, or metering cycles that have not completed reverification; before that, the output is always blocked.

[0136] Accordingly, this invention generates a metering cycle time granularity sequence and integrity description matrix based on the sequence number of out-of-order data packets, clock synchronization error, cycle boundary anchor point, and cumulative energy value, and establishes reserved space and monitoring relationship for missing metering cycles; performs bilateral closed access based on range reversal characteristics and the base values ​​before and after the gap, controls write permissions based on the metering equipment accuracy level, node loss benchmark, and line loss tolerance business rules, and intercepts output when a gap exists, and completes the retransmission in the order of re-verification of the previous metering cycle before releasing the next metering cycle, forming a complete energy metering data stream for use by the settlement terminal.

[0137] The above description is merely a preferred embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A non-real-time energy gap hierarchical buffer sequential retransmission system, characterized in that, Includes the following modules: The metering cycle gap identification module is used to obtain the sequence number, clock synchronization error, cycle boundary anchor point and cumulative energy value of the first energy data packet that arrives out of order and the second energy data packet that is received normally, compensate for the arrival time, determine the metering cycle time granularity sequence based on the sequence number difference and boundary interval, and generate an integrity description matrix by combining the number of sampling points and the energy gradient. The layered cache reconstruction and monitoring module is used to divide the metering cycle buffer partition according to the integrity description matrix, perform space compression and reallocation according to the capacity gap, lock the reserved space of the missing cycle, and register and bind the monitoring handles of the missing sequence number range, cycle time window and cumulative energy connection value range. The bilateral closed access module is used to acquire the delayed third energy data packet. When its sequence number and compensation arrival time meet the binding conditions, it constructs a bilateral closed reference interval based on the meter bottom value before and after the gap and the range reversal characteristics of the smart meter to determine the access status. The metering error adjustment and writing module is used to calculate the forward closure error and backward closure error of the third energy data packet and the preceding and following data packets. The dynamic allowable range is determined by the metering equipment accuracy level and line loss tolerance business rules. When both closure errors decrease and are within the dynamic allowable range, the writing permission is released and the integrity flag is updated. The continuity verification and sequential retransmission module is used to generate a continuity verification report based on the sequence number of the data packet, the cumulative energy difference, and the periodic energy gradient, perform retransmission and reverification in the order of the metering cycle, and output the fully verified energy metering data stream to the settlement terminal.

2. The system according to claim 1, characterized in that, The metering cycle gap identification module is further used for: The arrival time of the first power data packet is compensated by the clock synchronization error. The sequence number and start and end boundary anchor points are extracted based on the compensated arrival time. The initial number of traversals is determined by combining the sequence number and start and end boundary anchor points of the second power data packet. The isolated forest algorithm is used to detect the abnormal state of the start and end points within the period segment to which the initial number of spans belongs. When the abnormal state is true, the frozen gap segment is locked according to the duration of the abnormal state. When the abnormal state is false, a check value is generated and the target number of spans is determined according to the time difference between the start and end points of the adjacent normal period segment. The time granularity sequence of the measurement cycle is obtained by dividing the time axis according to the frozen gap segment or the number of target spans and arranging the obtained granular values ​​in chronological order.

3. The system according to claim 1, characterized in that, The metering cycle gap identification module is further used for: The periodic energy of missing metering periods is checked based on the difference in cumulative energy values ​​between the first energy data packet and the second energy data packet. For periodic energy exceeding a preset threshold, the isolated forest algorithm is used for anomaly identification to obtain filtered periodic energy. The energy gradient value per unit time is calculated based on the filtered periodic energy, and the integrity and confidence of the sampling points for each missing metering period are determined accordingly, generating the integrity description matrix.

4. The system according to claim 1, characterized in that, The hierarchical cache reconstruction and monitoring module is further used for: The buffer area is divided according to the metering cycle time window corresponding to the missing sequence number. The required capacity and remaining capacity of each initial partition are calculated. When the required capacity exceeds the remaining capacity, a space reconstruction command is triggered. Based on the data status of the storage nodes, non-target periodic data and unlocked nodes are identified, and space compression and reallocation are performed on them to form layers to be added and layers to be verified. Integrity comparison is performed on the two data streams. When the verification value meets the threshold condition, the corresponding data stream is migrated to the confirmed layer to obtain the reconstruction buffer area.

5. The system according to claim 1, characterized in that, The bilateral closed access module is further used for: The target metering cycle partition is determined based on the sequence number of the third energy data packet. When the sequence number is within the range of the listening handle binding, the arrival time of the third energy data packet is adjusted according to the clock synchronization error of the third energy data packet, and the data packets that fall into the target metering cycle time window are determined as candidate delayed packets. Anomaly detection is performed on the arrival time of candidate delayed packets, and the preceding and following packets corresponding to the normal delayed packets are obtained. The cumulative energy values ​​of the two packets form a closed region. When the cumulative energy value of the normal delayed packet is within the closed region, the final admission packet is determined; when it exceeds the endpoint of the closed region, interception is performed, and the closed region is determined as a bilateral closed reference interval.

6. The system according to claim 5, characterized in that, The bilateral closed access module is further used for: Compare the pre-gap table base value and the post-gap table base value. If the post-gap table base value is less than the pre-gap table base value, it is determined that a range reversal has occurred. The overturn compensation amount is calculated based on the range reversal threshold of the smart meter and the meter bottom value before the gap, and the overturn bilateral closed reference interval is formed by combining the meter bottom value after the gap. When the cumulative energy value of a normal delayed packet satisfies the cross-flip double-sided closed reference interval, it is determined as the final admission packet.

7. The system according to claim 1, characterized in that, The measurement error adjustment and writing module is further used for: Based on the timestamp of the third electrical energy data packet, the preceding and following packets are obtained, and the simulated electricity at the corresponding time node is calculated using a linear interpolation algorithm; Calculate the forward closure error and the backward closure error based on the simulated electrical charge and the actual cumulative electrical energy value of the third electrical energy data packet, respectively. The allowable measurement error is determined based on the accuracy level of the target metering equipment, and the two closure errors are evaluated in conjunction with the line loss tolerance business rules. When both closure errors decrease and are within the dynamic allowable range, a write right is generated, triggering the listening handle to perform a storage operation and update the data packet integrity flag for the corresponding metering period.

8. The system according to claim 7, characterized in that, The measurement error adjustment and writing module is further used for: Obtain the metering topology node information corresponding to the third electrical energy data packet, and determine the node loss benchmark value based on the metering topology node information and the line loss tolerance business rules; The dynamic allowable ranges of forward closure error and backward closure error are determined based on the node loss reference value and the metering allowable difference. When both closure errors are within the dynamic allowable range, a reserved space write permission is generated, and the space allocation operation of the corresponding storage node is triggered.

9. The system according to claim 1, characterized in that, The continuity verification and sequential retransmission module is further used for: Delayed data packets are extracted from the reserved space and arranged in ascending order of sequence number. Adjacent data packet combinations are established by combining the corresponding metering cycle boundary anchor points. The sequence relationship of the adjacent data packet combinations is determined as having the same sequence number, consecutive sequence numbers, or skipped sequence numbers. For adjacent data packet combinations with consecutive sequence numbers and corresponding time intervals greater than zero, the cumulative energy difference is calculated and normalized according to the corresponding time interval to obtain the energy gradient value. A dynamic threshold range is generated based on the historical energy gradient values ​​of adjacent normal metering cycles. Energy gradient values ​​that are lower than the lower limit of the dynamic threshold range or higher than the upper limit of the dynamic threshold range are identified as gradient anomalies. The combination of adjacent data packets with skipped sequence numbers is identified as the missing state; the combination of adjacent data packets with consecutive sequence numbers, cumulative energy difference greater than zero and corresponding energy gradient value as gradient outlier is identified as the mutation state; the combination of adjacent data packets with the same sequence number is identified as the repetition state, and a continuity verification report is generated.

10. The system according to claim 1, characterized in that, The continuity verification and sequential retransmission module is further used for: Abnormal data packets are removed from the continuity verification report and gap bits are generated at the corresponding positions. The data are then assembled into an electrical energy metering data stream according to the time sequence corresponding to the metering cycle boundary anchor points. Scan the gap bits in the electrical energy metering data stream, intercept the output when a gap bit exists, and generate a supplementary transmission index sequence based on the metering cycle corresponding to the gap bit; Based on the supplementary transmission index sequence, the supplementary transmission data packets of the previous metering period are first re-verified. After the verification is passed, the re-verification of the supplementary transmission data packets of the next metering period is released until a complete and verified target energy metering data stream is formed and output to the settlement terminal.