A method and system for detecting faults in an electricity meter memory
By calculating the spatial clustering, temporal tightness, and repetition intensity of error events in the meter's memory, the system can accurately distinguish between hard and soft errors, thereby improving the accuracy of fault detection and reducing the false alarm rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN FRIENDCOM TECH DEV
- Filing Date
- 2026-01-29
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies cannot effectively distinguish between hard and soft errors in the meter's memory, affecting the accuracy of fault detection.
By calculating the spatial clustering, temporal tightness, and repetition intensity of error events, a three-dimensional indicator system is used to distinguish between hard and soft errors. This includes collecting error events to construct event time series, calculating the ratio of physical address offset distance, time interval, and number of errors, and achieving accurate fault detection.
It improves the accuracy of fault detection in the meter's memory, reduces the false alarm rate, and enhances the accuracy of identifying hard errors.
Smart Images

Figure CN121597480B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault detection. More specifically, this invention relates to a fault detection method and system for an electricity meter's memory. Background Technology
[0002] The non-volatile memory of an electricity meter is used to store critical information such as electricity consumption data and parameter configurations. Its reliability is directly related to the accuracy of metering and the stable operation of the power grid. Errors may occur in the memory during long-term use. These errors may be hard errors caused by physical damage to the storage unit, or soft errors caused by electromagnetic interference, environmental noise, etc.
[0003] Existing technologies mostly monitor errors through the ECC (Error Checking and Correcting) mechanism built into the memory, and determine faults based on the cumulative number or trend of errors. However, this method cannot distinguish between hard and soft errors, affecting the fault detection accuracy of the meter's memory. Summary of the Invention
[0004] The main objective of this application is to propose a fault detection method and system for electricity meter memory, aiming to improve the fault detection accuracy of electricity meter memory.
[0005] To achieve the above objectives, an embodiment of the first aspect of this application proposes a fault detection method for an electricity meter memory. The method includes: collecting error events to construct an event time series; taking any error event in the event time series as a target event, reading the physical address where the target event occurs, calculating the spatial clustering degree of the target event based on the offset distance between the physical address and a preset address center, obtaining the time decay weight of the target event, weighting the spatial clustering degree using the time decay weight, iterating through and obtaining the weighted spatial clustering degree of each error event, normalizing the sum of all weighted spatial clustering degrees to obtain a first index of the event time series, calculating the temporal density of the target event based on the time interval between the target event and the adjacent previous error event, iterating through and obtaining the temporal density of each error event, using the mean of all temporal density as a second index of the event time series, calculating the repetition intensity of each error event in the event time series, and using the maximum value of the repetition intensity as a third index of the event time series; calculating the hard error confidence of the event time series based on the first index, the second index, and the third index; determining the existence of a hard error in response to the hard error confidence being not less than a threshold, and determining the existence of a soft error in response to the hard error confidence being less than the threshold, thus completing the fault detection.
[0006] In some embodiments, collecting error events to construct an event time series includes: in response to detecting a correctable single-bit error, storing the single-bit error in a preset error buffer; setting a collection window in the error buffer, and using the single-bit error sequence within the collection window as an event time series.
[0007] In some embodiments, the method for calculating the preset address center includes: reading the physical address where each error event occurs in the event time series, and using the average of all physical addresses as the preset address center.
[0008] In some embodiments, calculating the spatial clustering degree of a target event based on the offset distance between the physical address and the preset address center includes: using the absolute difference between the physical address and the preset address center as the offset distance; and using the exponential function value of the ratio of the offset distance to a preset spatial scale parameter as the spatial clustering degree.
[0009] In some embodiments, obtaining the time decay weight of the target event includes: reading the occurrence time of the target event, calculating the difference between the fault detection time and the occurrence time, and using the exponential function value of the ratio of the difference to a preset time decay parameter as the time decay weight of the target event.
[0010] In some embodiments, calculating the temporal closeness of a target event based on the time interval between the target event and the adjacent previous error event includes using the exponential function value of the ratio of the time interval to a preset time scale parameter as the temporal closeness of the target event.
[0011] In some embodiments, calculating the repetition intensity of each error event in the event time series includes: counting the number of times the physical address where the target event occurs appears repeatedly in the event time series, and counting the total number of times the physical address where the target event occurs is read within the corresponding time period of the event time series, and taking the ratio of the number of repeated occurrences to the total number of reads as the repetition intensity of the target event; and iterating through the event time series to obtain the repetition intensity of each error event.
[0012] In some embodiments, calculating the hard error confidence of an event time series based on the first indicator, the second indicator, and the third indicator includes: multiplying the first indicator, the difference between the second indicator and the third indicator, and then performing a geometric average on the multiplication result to obtain the hard error confidence.
[0013] In some embodiments, the fault detection method further includes: remotely reporting the error event in the event time series in response to determining that a hard error exists; and not triggering remote reporting in response to determining that a soft error exists.
[0014] An embodiment of the second aspect of this application provides a fault detection system for an electricity meter memory. The system includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-described fault detection method for an electricity meter memory is implemented.
[0015] The beneficial effects of this invention are:
[0016] This invention, based on the difference between hard and soft errors, introduces a first indicator by calculating the offset distance between the physical address where the error event occurs and a preset address center to quantify the spatial clustering of error events. Then, based on the difference between the instantaneous burstiness of soft errors and the repetitive stability of hard errors, a second indicator is introduced by calculating the time interval between adjacent error events to quantify the temporal density of error events. Finally, considering the difference between the address repetition of hard errors (hard errors occur almost every time they are read due to physical degradation of the storage unit) and the address one-off nature of soft errors (soft errors are caused by random interference), a third indicator is introduced by calculating the maximum value of the ratio of the number of times the physical address of the error event occurs to the number of reads, to quantify the repetition intensity of the error event. This invention comprehensively mines error characteristics from three dimensions—space, time, and repetition—through these three indicators to more accurately distinguish between soft and hard errors. Compared to existing technologies that only judge faults based on the cumulative number or trend of errors, this invention can improve the fault detection accuracy of meter memory. Attached Figure Description
[0017] Figure 1 This is a flowchart of steps S1-S3 in a fault detection method for an electricity meter memory according to an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0019] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0020] Reference Figure 1 A fault detection method for an electricity meter memory includes steps S1-S3, as detailed below:
[0021] Step S1: Collect error events to construct an event time series.
[0022] In some embodiments, collecting error events to construct an event time series includes: in response to detecting a correctable single-bit error, storing the single-bit error in a preset error buffer; setting a collection window in the error buffer, and using the sequence of single-bit errors within the collection window as an event time series.
[0023] It should be further clarified that a "correctable single-bit error" refers to an error that occurs in exactly one bit of binary data during data storage or transmission (e.g., a 0 becomes a 1, or a 1 becomes a 0), and this error can be automatically detected and corrected by ECC hardware. Such errors are typically caused by factors such as electromagnetic interference, environmental noise, or hardware aging.
[0024] It should be noted that when a correctable single-bit error is detected, the controller immediately triggers an interrupt or callback mechanism, initiating an error event logging process. The system efficiently collects the following two types of key metadata about the error within the interrupt context:
[0025] The first type is the timestamp of the error occurrence. Typically, the real-time clock inside the meter records the absolute system time when the error occurs, with an accuracy of at least the second level, for subsequent time-dimensional analysis.
[0026] The second category is the physical address where the error occurred. Record the precise physical address of the memory cell where the error occurred. This address directly corresponds to the row / column position inside the memory chip and is the basis for determining spatial clustering.
[0027] For each detected error event (single-bit error), its corresponding... Write to a protected error buffer to ensure that critical diagnostic information can still be recovered after an abnormal system restart. The error events in the error buffer are arranged in chronological order of detection.
[0028] The length of the data collection window corresponds to the traceability period for fault detection. The length of the data collection window can be set as needed; for example, it can be set to 7 days. Although the length of the data collection window is fixed at different times of fault detection, the number of error events within the data collection window may vary. During fault detection, the right boundary of the data collection window is on the latest error event in the error buffer.
[0029] Step S2: Take any error event in the event time series as the target event, read the physical address where the target event occurs, calculate the spatial clustering degree of the target event based on the offset distance between the physical address and the preset address center, obtain the time decay weight of the target event, weight the spatial clustering degree with the time decay weight, iterate to obtain the weighted spatial clustering degree of each error event, normalize the sum of all weighted spatial clustering degrees to obtain the first index of the event time series, calculate the temporal density of the target event based on the time interval between the target event and the adjacent previous error event, iterate to obtain the temporal density of each error event, take the mean of all temporal density as the second index of the event time series, calculate the repetition intensity of each error event in the event time series, and take the maximum value of the repetition intensity as the third index of the event time series.
[0030] In some embodiments, the method for calculating the preset address center includes: reading the physical address where each error event occurs in the event time series, and using the average of all physical addresses as the preset address center.
[0031] For example, the formula for calculating the preset address center is as follows:
[0032]
[0033] In the formula middle, The preset address center; The length of the event time series (number of elements, which is the total number of error events in the event time series). For the event time series, the first The physical address where the error event occurred.
[0034] In some embodiments, obtaining the time decay weight of the target event includes: reading the occurrence time of the target event, calculating the difference between the fault detection time and the occurrence time, and using the exponential function value of the ratio of the difference to a preset time decay parameter as the time decay weight of the target event.
[0035] For example, the formula for calculating the time decay weight is as follows:
[0036]
[0037] In the formula middle, For the event time series, the first Time decay weights for each error event; It is an exponential function; This is the moment of fault detection; For the event time series, the first The time of occurrence of each error event; For the fault detection time and the event time series, the first The difference in the occurrence time of each error event; This is the preset time decay parameter.
[0038] For the formula It should be added that, Used for control The rate of change of the monotonicity of the exponential function, This determines how quickly the weight of an error event decays over time. The larger the value, the slower the decay, and the longer the memory of historical errors lasts; The smaller the value, the faster the decay, and the more forgetful the system becomes, focusing only on recent errors. For example, It can be set to 1.
[0039] In some embodiments, calculating the spatial clustering degree of a target event based on the offset distance between the physical address and the preset address center includes: using the absolute difference between the physical address and the preset address center as the offset distance; and using the exponential function value of the ratio of the offset distance to a preset spatial scale parameter as the spatial clustering degree.
[0040] For example, the formula for calculating the first indicator is as follows:
[0041]
[0042] In the formula middle, It is the primary indicator for the event time series; The length of the event time series; For the event time series, the first Time decay weights for each error event; It is an exponential function; For the event time series, the first The physical address where the error event occurred; The preset address center; For the preset address center and the first event in the time sequence The offset distance between the physical addresses where each error event occurred; Preset spatial scale parameters.
[0043] In the formula middle, For the event time series, the first Spatial clustering of error events; For the event time series, the first Spatial clustering degree weighted by each error event.
[0044] For the formula It should be added that, through Normalize the sum of all weighted spatial clustering degrees.
[0045] For the formula It should be added that, Used to define the scope of spatial clustering. Its value depends on the type of memory (different memories have different sizes), for example... The (electrically erasable programmable read-only memory) can be set to 8~16 bytes (reflecting the range of interference between cells). In the (flash erase memory), it can be set to a page size, such as 256 bytes, to match the actual impact area of a physical fault. This parameter essentially determines how close an error address is to be considered a cluster, thus affecting the clustering metric. Sensitivity.
[0046] It should be noted that the formula Through the exponential decay function The spatial similarity between the location of an error event and a preset address center is measured to effectively capture local clustering features and suppress outlier interference; at the same time, a time decay weight is introduced. This makes recent errors have a greater impact on the assessment results, reflecting the current true state; then through Normalize the weights to make the indicators This design characterizes only the shape of the error distribution rather than its quantity, thus avoiding misjudgments. With extremely low computational overhead, it overcomes the shortcomings of traditional methods, such as address variance or clustering algorithms, which are sensitive to outliers or consume large amounts of resources. It is particularly suitable for resource-constrained embedded terminals such as electricity meters to achieve highly robust hard error identification.
[0047] It should be added that, The magnitude of the index directly reflects the concentration of the event time series in the physical address space: when error events are highly concentrated in a certain local area, the offset distance between the physical address where each error event occurs and the preset address center is small, and the spatial concentration approaches 1. The spatial clustering approaches 1; conversely, when the physical addresses of error events are randomly distributed, the spatial clustering approaches 1. ,and then It approaches 0. Therefore, The closer a value is to 1, the greater the probability of a hard error (hardware aging). The closer a value is to 0, the greater the probability of a soft error (caused by environmental interference).
[0048] In some embodiments, calculating the temporal closeness of a target event based on the time interval between the target event and the adjacent previous error event includes using the exponential function value of the ratio of the time interval to a preset time scale parameter as the temporal closeness of the target event.
[0049] For example, the formula for calculating the second indicator is as follows:
[0050]
[0051] In the formula middle, It is the second indicator of the event time series; The length of the event time series; It is an exponential function; For the event time series, the first The time interval between each error event and the previous adjacent error event; This is the preset time scale parameter.
[0052] In the formula middle, For the event time series, the first The temporal proximity of each error event.
[0053] For the formula It should be added that, Used to define a short-term physical scale, exemplarily for .
[0054] When multiple error events occur in succession within a very short period of time, that is At that time, the temporal tightness approaches 1. Increase.
[0055] When errors are uniformly distributed, i.e. At that time, the temporal tightness approaches 0. Decrease.
[0056] Compared to relying solely on the total number of errors or the time span, this method can accurately identify sudden soft error events caused by power surges, switching operations, or cosmic ray showers, significantly enhancing robustness to environmental disturbances.
[0057] It should be added that, Indicates the area within the data collection window The physical basis of the temporal burst intensity of error streams lies in the fact that soft errors are often induced by transient high-energy events, causing multiple memory cells to flip successively within a millisecond timeframe, forming a time-dense pulse. Extremely small Approaching 1; while hard errors are caused by physical unit degradation, and their timing strictly depends on read operations on that address, typically spreading over a long time span. Larger It approaches 0. Therefore, this index naturally reflects erroneous time behavior patterns. When the value approaches 1, it indicates the presence of sudden external interference and should be considered a soft error; When the value approaches 0, it indicates that the error occurs smoothly, which is consistent with the time characteristics of hard errors.
[0058] In some embodiments, calculating the repetition intensity of each error event in the event time series includes: counting the number of times the physical address where the target event occurs appears repeatedly in the event time series, and counting the total number of times the physical address where the target event occurs is read within the corresponding time period of the event time series, and taking the ratio of the number of repeated occurrences to the total number of reads as the repetition intensity of the target event; and iterating through the event time series to obtain the repetition intensity of each error event.
[0059] For example, the formula for calculating the third indicator is as follows:
[0060]
[0061] In the formula middle, It is the third indicator in the event time series; It is a function for maximizing the value; For the event time series, the first The number of times the physical address of an error event occurs is repeated in the event time series; For the event time series, the first The total number of times the physical address where the error event occurred was read within the time period corresponding to the event time series; For the event time series, the first The repetition intensity of an error event.
[0062] For the formula It should be noted that, for example, the collection window length is 7 days, and the event time series is... The physical address where the error event occurred is , physical address The number of repetitions within the acquisition window, i.e., the physical address The cumulative number of correctable errors triggered within 7 days; physical address Total number of reads within 7 days (including reading information stored at this address, triggering correctable errors at this address, and other access activities). Never less than .
[0063] For the formula It should be added that, The corresponding physical address is a potentially faulty address.
[0064] It should be added that, The value represents the probability of a single read error at the most unreliable address in memory within the acquisition window. Its physical logic is that hard errors occur almost every time a read is performed due to physical degradation of the memory cell. , Approaching 1, while soft errors are caused by external transient disturbances and occur only occasionally. , Approaching 0, this ratio naturally distinguishes between the two types of errors; taking the maximum value among all addresses makes... Focus on the most severe localized damage points. Therefore A value close to 1 indicates a persistent hardware fault, requiring an alarm. When the value approaches 0, it indicates that the error is a random soft error and false alarms should be suppressed.
[0065] It should be noted that the calculation is performed by dividing the number of errors by the number of reads and taking the maximum value of the ratios. It can focus on the most unreliable address. As long as there is a unit that fails almost every time it is read, it can be identified as a hard error. Soft errors, due to their randomness and one-off nature, have a ratio close to 0 and clear boundaries. Compared with only counting the total number of errors or the number of error addresses, it can more accurately identify physical damage points with persistent and recurring errors, thereby improving the accuracy and robustness of fault diagnosis.
[0066] In some embodiments, calculating the hard error confidence of an event time series based on a first indicator, a second indicator, and a third indicator includes: multiplying the first indicator, the difference between the second indicator and the third indicator, and then performing a geometric average on the multiplication result to obtain the hard error confidence.
[0067] For example, the formula for calculating hard error confidence is as follows:
[0068]
[0069] In the formula middle, Hard error confidence for event time series; The primary indicator; As the second indicator; It is the third indicator.
[0070] For the formula It should be added that, , Approaching 1, and Approaching 0, then The closer the value is to 1, the greater the probability of a hard error. , Approaching 0, and If it approaches 1, then The closer the value is to 0, the greater the probability of a soft error.
[0071] Step S3: Calculate the hard error confidence of the event time series based on the first, second and third indicators. If the hard error confidence is not less than the threshold, a hard error is determined to exist. If the hard error confidence is less than the threshold, a soft error is determined to exist, and the fault detection is completed.
[0072] In some embodiments, the fault detection method further includes: remotely reporting the error event in the event time series in response to determining that a hard error exists; and not triggering remote reporting in response to determining that a soft error exists.
[0073] For example, the threshold for hard error confidence can be set to... When satisfied If the error occurs, it is determined that the memory has experienced a hard error caused by physical aging; otherwise, it is determined to be a soft error (normal fluctuation).
[0074] If determined to be a hard error, a memory hardware failure event is generated, and diagnostic data (including potential error addresses, etc.) is recorded. , , , Value) encapsulated as a standard The object actively reports to the main station through the remote communication module.
[0075] If the error is not identified as a hard error, the original error event is only recorded in the local non-volatile log and no remote alarm is triggered, thus significantly reducing the false alarm rate.
[0076] The present invention also provides a fault detection system for an electricity meter memory. The system includes a processor and a memory, the memory storing computer program instructions. When the computer program instructions are executed by the processor, a fault detection method for an electricity meter memory according to the first aspect of the present invention is implemented. The system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface; their configuration and functions are known in the art and therefore will not be described further here.
[0077] It should be noted that the preferred embodiments of this application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of this application. For those skilled in the art, various modifications and improvements can be made without departing from the concept of the invention, and these all fall within the protection scope of the invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A fault detection method for an electricity meter memory, characterized in that, include: Collect error events to construct an event time series; Take any error event in the event time series as the target event, read the physical address where the target event occurs, calculate the spatial clustering degree of the target event based on the offset distance between the physical address and the preset address center, obtain the time decay weight of the target event, weight the spatial clustering degree with the time decay weight, iterate to obtain the weighted spatial clustering degree of each error event, normalize the sum of all weighted spatial clustering degrees to obtain the first index of the event time series, calculate the temporal density of the target event based on the time interval between the target event and the adjacent previous error event, iterate to obtain the temporal density of each error event, take the mean of all temporal density as the second index of the event time series, calculate the repetition intensity of each error event in the event time series, and take the maximum repetition intensity as the third index of the event time series; The hard error confidence of the event time series is calculated based on the first indicator, the second indicator and the third indicator. If the hard error confidence is not less than the threshold, a hard error is determined to exist. If the hard error confidence is less than the threshold, a soft error is determined to exist, and the fault detection is completed. The spatial clustering of target events is calculated based on the offset distance between the physical address and the preset address center, including: The absolute difference between the physical address and the preset address center is used as the offset distance; The exponential function value of the ratio of offset distance to preset spatial scale parameter is used as the spatial clustering degree; The temporal closeness of a target event is calculated based on the time interval between the target event and the preceding adjacent error event, including: The exponential function value of the ratio of the time interval to the preset time scale parameter is used as the temporal tightness of the target event; Calculating the repetition intensity of each error event in an event time series includes: The number of times the physical address of the target event occurs is counted in the event time series, and the total number of times the physical address of the target event occurs is read within the corresponding time period of the event time series is counted. The ratio of the number of occurrences to the total number of reads is taken as the repetition intensity of the target event. Iterate through the time series of events to obtain the repetition intensity of each error event.
2. The fault detection method for an electricity meter memory according to claim 1, characterized in that, Collecting error events to construct an event time series includes: In response to the detection of a correctable single-bit error, the single-bit error is stored in a preset error buffer; A sampling window is set in the error buffer, and the single-bit error sequence within the sampling window is used as an event time series.
3. The fault detection method for an electricity meter memory according to claim 1, characterized in that, The method for calculating the preset address center includes: Read the physical address of each error event in the event time series and use the average of all physical addresses as the preset address center.
4. The fault detection method for an electricity meter memory according to claim 1, characterized in that, Obtaining the time decay weight of the target event includes: Read the occurrence time of the target event, calculate the difference between the fault detection time and the occurrence time, and use the exponential function value of the ratio of the difference to the preset time decay parameter as the time decay weight of the target event.
5. The fault detection method for an electricity meter memory according to claim 1, characterized in that, The hard error confidence of the event time series is calculated based on the first indicator, the second indicator, and the third indicator, including: The hard error confidence is obtained by multiplying the first index, the difference between the second index and the third index, and then taking the geometric mean of the multiplication results.
6. A fault detection method for an electricity meter memory according to any one of claims 1-5, characterized in that, Also includes: In response to the determination of a hard error, the error event in the event time series is remotely reported; in response to the determination of a soft error, remote reporting is not triggered.
7. A fault detection system for an electricity meter memory, characterized in that, include: A processor and a memory, the memory storing computer program instructions, which, when executed by the processor, implement a fault detection method for an electricity meter memory according to any one of claims 1-6.
Citation Information
Patent Citations
Memory fault detection method, system and device, medium and server
CN117076186A
Method, and device for detecting memory fault, medium and server
US20250315330A1