Method and apparatus for automatic detection of metrology switches

By adaptively acquiring power data from electricity meters and measuring switches, dynamically segmenting the data and selecting appropriate integration methods, and combining this with electricity data consistency judgment, the problems of integration error and fault identification in power metering are solved, enabling accurate location of metering anomalies and troubleshooting.

CN122109977APending Publication Date: 2026-05-29HANGZHOU MINGTONG ELECTRIC CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU MINGTONG ELECTRIC CO LTD
Filing Date
2026-04-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies cannot adapt to the dynamic fluctuations of instantaneous power anomalies in power meters during power metering and operation and maintenance testing, resulting in distorted integral errors. Furthermore, they cannot distinguish between metering anomalies caused by measurement switch failures and normal metering errors caused by load fluctuations.

Method used

By synchronously acquiring power data from electricity meters and measuring switches, the system adaptively determines the integration time window, dynamically segments the power curve, and employs different integration methods. Combined with the consistency judgment of electricity data, it marks abnormal candidate switches and accurately distinguishes the source of metering anomalies.

Benefits of technology

It solves the integration error problem caused by fixed-period data acquisition, provides accurate power data support, can quickly locate measurement switch faults, improves fault diagnosis efficiency, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122109977A_ABST
    Figure CN122109977A_ABST
Patent Text Reader

Abstract

The application provides an automatic detection method and device for measuring switches, and relates to the technical field of electric power measurement and detection. The specific steps comprise: synchronously collecting power data of an electric energy meter and each measuring switch in real time, comparing and judging whether the power error is excessive, and marking the time when the error is excessive as a first time; taking the first time as a starting point, adaptively determining an integral time window according to the power fluctuation characteristics, dynamically segmenting the power curve, adaptively selecting an integral method, and completing electric energy calculation; and marking abnormal candidate switches through consistency judgment of the electric energy data of the measuring switches, and completing measurement condition judgment in combination with an electric energy error threshold and an allowed floating upper and lower limit. The application solves the problems of large integral error and distorted data caused by traditional fixed cycle collection, accurately distinguishes whether the error is caused by measurement abnormality of the measuring switch itself or normal measurement error caused by non-fault factors such as load fluctuation, and realizes rapid positioning of the abnormal measuring switch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power metering and testing technology, specifically to an automatic testing method and device for measuring switches. Background Technology

[0002] In the field of power metering and operation and maintenance testing, the metering accuracy of measuring switches is of great significance for electricity billing, fault location, and the safe and stable operation of the system. As the power grid load becomes increasingly complex and scenarios of abnormal instantaneous power in electricity meters occur frequently, higher requirements are placed on the detection accuracy and anomaly detection capability of measuring switches.

[0003] In the prior art, CN117538816A discloses a method and system for testing electrical energy error based on an intelligent measuring switch, comprising the following steps: acquiring electrical energy data information of a synchronization source based on a preset time period; obtaining input electrical energy based on the electrical energy data information of the synchronization source; acquiring electrical energy pulse information of the intelligent measuring switch in the corresponding preset time period based on a preset detection device; extracting basic parameter information of the intelligent measuring switch; obtaining the measured electrical energy of the corresponding intelligent measuring switch in the preset time period based on the basic parameter information and electrical energy pulse information of the intelligent measuring switch; comparing and analyzing the input electrical energy and the measured electrical energy to obtain the measurement error of the intelligent measuring switch; determining whether the measurement error of the intelligent measuring switch is greater than a preset measurement error threshold; if so, triggering a measurement error warning message; if not, displaying that the corresponding intelligent measuring switch is measuring normally. This method improves the accuracy of electrical energy error testing of intelligent measuring switches to a certain extent.

[0004] However, existing technologies still have significant shortcomings. On the one hand, they use fixed periods for power collection and integration, without considering the dynamic fluctuation characteristics of the power curve when the instantaneous power of the electricity meter is abnormal. This not only fails to adapt to the dynamic fluctuation scenario but also leads to distortion of integration errors, thus failing to provide accurate data support for judging the source of errors. On the other hand, they can only determine whether the metering error exceeds the standard, but cannot further distinguish whether the error is caused by the metering abnormality due to the fault of the measuring switch itself or by normal metering errors caused by non-fault factors such as load fluctuations.

[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to provide an automatic detection method and apparatus for measuring switches to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: An automatic detection method for a measuring switch, comprising the following steps: S1. Synchronously acquire the power data of the electricity meter and the power data measured by each measuring switch deployed under the electricity meter in real time, compare the sum of the power data measured by the electricity meter and each measuring switch, determine whether the power error exceeds the power error threshold, and mark the current time as the first time if it exceeds the power error threshold. S2. Starting from the first moment, the integration time window is adaptively determined according to the power change characteristics. The power curves of the energy meter and each measuring switch within the integration time window are acquired synchronously. The change status of the power curves of the energy meter and each measuring switch is judged respectively. Based on this, the power curves are dynamically segmented. The appropriate integration method is adaptively selected according to the segmentation results. The power curves of the energy meter and each measuring switch are integrated respectively to obtain the energy data of the energy meter and the energy data of each measuring switch. S3. Perform a metering consistency check on the energy data of each measuring switch and mark abnormal candidate switches. Compare the energy data of the energy meter with the energy data measured by each measuring switch to determine whether the energy error exceeds the energy error threshold. If the energy error does not exceed the energy error threshold but there are abnormal candidate switches, it is determined that there is a metering abnormality. If the energy error exceeds the energy error threshold, combine the marking results of the measuring switches and the relationship between the energy data of each measuring switch and the allowable upper and lower limits of fluctuation to complete the final metering status determination.

[0008] Furthermore, when the power error threshold is exceeded, the current time is designated as the first time. The specific logic is as follows: When the power error continues to exceed the power error threshold within a preset time period, the moment when the first power error exceeds the power error threshold is marked as the first moment.

[0009] Furthermore, the integration time window is adaptively determined based on the power change characteristics, and the specific logic is as follows: When the power fluctuation amplitude is greater than the power fluctuation amplitude threshold, it indicates that the load or metering is changing abnormally fast, so the first integral time window is used. When the power fluctuation amplitude is less than or equal to the power fluctuation amplitude threshold, it indicates that the load or metering is changing abnormally slowly, and the second integral time window is used. The first integration time window is smaller than the second integration time window.

[0010] Furthermore, the power curve changes of the electricity meter and each measuring switch are judged separately, and the power curve is dynamically segmented accordingly. The specific logic is as follows: Multiple sampling points are set on the power curve, and the power curve is divided into multiple segments with the sampling points as the boundary. Each segment consists of two adjacent sampling points and the power curve between them. Calculate the power difference between adjacent sampling points within each segment, and take its absolute value as the instantaneous fluctuation amplitude of that segment; Calculate the average instantaneous fluctuation amplitude of all segments as the benchmark; Iterate through all segments and compare the instantaneous fluctuation amplitude of each segment with the average value: If the instantaneous fluctuation amplitude of a segment is greater than the average value, then the segment is determined to be a segment with drastic power changes. If the instantaneous fluctuation amplitude of a segment is less than or equal to the average value, then the segment is determined to be a segment with gradual power change.

[0011] Furthermore, based on the segmented results, an appropriate integration method is adaptively selected to perform integration calculations on the power curves of the energy meter and each measuring switch. The specific logic is as follows: For the section of the power curve where power changes drastically, the trapezoidal integral method, which is suitable for fitting power curves with straight lines, is used for integration. For the flat section of the power curve, Simpson's integral method, which is suitable for parabolic fitting of power curves, is used for integration.

[0012] Furthermore, the electrical energy data of each measuring switch is evaluated for consistency, and candidate switches for abnormality are identified. The specific logic is as follows: Calculate the average of the power data of all measuring switches, iterate through all measuring switches, and compare the power data of each measuring switch with the average of the power data. If the absolute deviation between the power data of a measuring switch and the average power data is greater than a preset deviation threshold, the measuring switch is marked as an abnormal candidate switch.

[0013] Furthermore, by combining the marking results of the measuring switches, the relationship between the electrical energy data of each measuring switch and the allowable upper and lower limits of fluctuation, the final determination of the metering status is completed. The specific logic is as follows: If a measuring switch is marked as an abnormal candidate switch, or if the power data of the measuring switch exceeds the allowable upper and lower limits of fluctuation, then the measuring switch is determined to be abnormal. If a measuring switch is not marked as an abnormal candidate switch, and the power data of the measuring switch does not exceed the allowable upper and lower limits of fluctuation, then the measuring switch is determined to have a measurement error.

[0014] To achieve the above objectives, the present invention also provides the following technical solution: An automatic detection device for a measuring switch, the device being used to execute any of the above-described automatic detection methods for a measuring switch, comprising: The abnormal early warning module is used to synchronously and in real time acquire the power data of the electricity meter and the power data measured by each measuring switch deployed under the electricity meter, compare the sum of the power data measured by the electricity meter and each measuring switch, determine whether the power error exceeds the power error threshold, and mark the current moment as the first moment when the power error threshold is exceeded. The integration module is used to adaptively determine the integration time window based on the power change characteristics, starting from the first moment. It synchronously acquires the power curves of the energy meter and each measuring switch within the integration time window, judges the change status of the power curves of the energy meter and each measuring switch, dynamically segments the power curves accordingly, and adaptively selects the appropriate integration method based on the segmentation results. It then performs integration calculations on the power curves of the energy meter and each measuring switch to obtain the energy data of the energy meter and the energy data of each measuring switch. The anomaly location module is used to determine the consistency of the energy data of each measuring switch and mark the abnormal candidate switches. It compares the energy data of the energy meter with the energy data measured by each measuring switch to determine whether the energy error exceeds the energy error threshold. If the energy error does not exceed the energy error threshold but there are abnormal candidate switches, it is determined that there is a measurement anomaly. If the energy error exceeds the energy error threshold, it combines the marking results of the measuring switches and the relationship between the energy data of each measuring switch and the allowable upper and lower limits of fluctuation to complete the final determination of the measurement status.

[0015] Compared with the prior art, the beneficial effects of the present invention are: This invention compares the sum of power data measured by the electricity meter and each measuring switch to determine whether the power error exceeds a power error threshold. If the power error threshold is exceeded, the current moment is marked as the first moment. Starting from the first moment, the integration time window is adaptively determined according to the power change characteristics, and the power curve is dynamically segmented. Based on the segmentation results, the corresponding integration method is adaptively selected to perform integration calculations on the power curves of the electricity meter and each measuring switch, respectively, to obtain the electricity data of the electricity meter and the electricity data of each measuring switch. This effectively solves the problem of excessive integration error and data distortion caused by fixed-period acquisition, and at the same time provides accurate and reliable power data support for judging the source of error. This invention makes a consistent judgment on the power data of the measuring switch, marks abnormal candidate switches, compares the power data of the power meter with the power data measured by each measuring switch, and combines the power error with the allowable upper and lower limits of fluctuation to accurately distinguish whether the error is a metering abnormality caused by the fault of the measuring switch itself or a normal metering error caused by non-fault factors such as load fluctuation. It breaks through the judgment limitations of the existing technology and makes it easier for staff to quickly locate problems and troubleshoot faults. Attached Figure Description

[0016] Figure 1This is a schematic diagram of the overall method flow of the present invention; Figure 2 This is a block diagram of the module composition of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0018] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0019] Example: Please see Figure 1 The present invention provides a technical solution: An automatic detection method for a measuring switch, comprising the following steps: S1. Synchronously acquire the power data of the electricity meter and the power data measured by each measuring switch deployed under the electricity meter in real time, compare the sum of the power data measured by the electricity meter and each measuring switch, determine whether the power error exceeds the power error threshold, and mark the current time as the first time if it exceeds the power error threshold. When the power error does not exceed the power error threshold, the power data of the energy meter and each measuring switch are continuously and synchronously collected to maintain real-time monitoring. The first moment is not calibrated. At the same time, the collected power data is preprocessed and verified in a normalized manner to ensure the continuity and effectiveness of subsequent data collection. The first moment calibration and subsequent related operations are then performed after the power error is detected to exceed the threshold.

[0020] Based on the above embodiments, the power data of the electricity meter and the power data measured by each measuring switch deployed under the electricity meter are acquired synchronously and in real time. The specific method is as follows: The electricity meter and all measuring switches are uniformly initialized and synchronously calibrated, with the same sampling frequency, calibration timing module, and metering accuracy set to avoid the influence of time deviation and the metering deviation of the equipment itself. Each device is equipped with an independent high-speed data acquisition channel, and a wired transmission method with wireless backup is used to ensure stable and real-time data transmission. The main control module sends a synchronous acquisition command to enable all devices to start acquisition and record timestamps simultaneously. After acquisition, each device preprocesses the power data, removes abnormal data, and transmits it to the main control module. The main control module timestamps the received data to form a synchronous data group. Finally, the synchronous data group is verified, and missing or erroneous data is retransmitted. If the retransmission fails, it is marked as invalid data, ensuring that the power data involved in the calculation is synchronous, complete, and valid.

[0021] Among them, the measuring switch is a switching device deployed under the electricity meter that has power / energy metering function. Its function is to measure the power data of its own branch and work with the electricity meter to complete the metering error detection.

[0022] When the power error threshold is exceeded, the current moment is designated as the first moment. The specific logic is as follows: Based on the above embodiments, if the power error does not recover to within the threshold within a preset time period, i.e., continues to exceed the power error threshold, then the first moment when the error exceeds the threshold will be officially marked as the first moment; if the error recovers to normal on its own within the preset time period, it will be regarded as an invalid interference, and no marking will be made, and normal monitoring will continue.

[0023] The logic for setting the preset duration is as follows: A base duration is set based on the power fluctuation response time during normal grid operation, combined with the actual sampling frequency of the energy meter and measuring switch. For example, under normal sampling frequency, the base duration is usually set to 3-5 seconds. During peak load periods, power fluctuations in the power grid are more frequent. To avoid missing actual metering faults, the base duration should be appropriately shortened to obtain the final preset duration.

[0024] During periods of low load, the power grid operates smoothly. To further filter out occasional signal interference, the base duration should be appropriately extended to obtain the final preset duration.

[0025] Based on the above, it should be noted that: In real-world scenarios, power grid data may experience brief errors due to instantaneous fluctuations. However, this may simply be normal data jitter and not a true metering fault. If the system is immediately calibrated as soon as the power error exceeds the power error threshold, it will cause the system to frequently initiate subsequent complex detection processes, resulting in wasted resources. Only when the power error exceeds the power error threshold and this state of exceeding the threshold persists for a period of time, indicating a stable and continuous metering fault, will subsequent steps be triggered.

[0026] This application compares the total power data measured by the electricity meter with the sum of the branch power data measured by each measuring switch to accurately determine whether the power error between the two exceeds a preset power error threshold, thus avoiding misjudgment caused by the measurement deviation of a single device. When the power error exceeds the threshold, a fault is not immediately determined. Instead, after a preset period of observation and confirmation, the first moment when the error exceeds the threshold is marked as the first moment, ensuring that the marked detection starting point is effective and eliminating interference caused by instantaneous power grid fluctuations.

[0027] S2. Starting from the first moment, the integration time window is adaptively determined according to the power change characteristics. The power curves of the energy meter and each measuring switch within the integration time window are acquired synchronously. The change status of the power curves of the energy meter and each measuring switch is judged respectively. Based on this, the power curves are dynamically segmented. The appropriate integration method is adaptively selected according to the segmentation results. The power curves of the energy meter and each measuring switch are integrated respectively to obtain the energy data of the energy meter and the energy data of each measuring switch. Based on the above embodiments, the integration time window is adaptively determined according to the power change characteristics, and the specific logic is as follows: When the power fluctuation amplitude exceeds the power fluctuation amplitude threshold, the first integral time window is used because: If the power fluctuation amplitude is greater than the power fluctuation amplitude threshold, it means that the load or metering changes abnormally rapidly. At this time, using a smaller first integration time window can capture the dynamic change details of the power curve more densely, effectively avoiding the average of curve details due to excessive integration time, and ensuring that the integration result can accurately reflect the instantaneous power change status. When the power fluctuation amplitude is less than or equal to the power fluctuation amplitude threshold, the second integral time window is used because: If the power fluctuation amplitude is less than or equal to the power fluctuation amplitude threshold, it indicates that the load or metering is changing slowly. In this case, a larger second integration time window can be used to ensure the accuracy of the integration data and reduce the frequency of integration calculations, thus balancing detection efficiency and data accuracy.

[0028] The first integration time window is smaller than the second integration time window.

[0029] The power fluctuation amplitude threshold setting logic is as follows: Collect normal power fluctuation data of the electricity meter and each measuring switch for one month, calculate the average power fluctuation amplitude within this period as the benchmark value, and increase the benchmark value by 20% to obtain the final power fluctuation amplitude threshold.

[0030] Based on the above embodiments, the power curves of the energy meter and each measuring switch within the integration time window are acquired simultaneously. The specific logic is as follows: Starting from the first moment, an integration time window is opened. Within this window, the power data of the energy meter and all measuring switches are collected simultaneously. The power data collected by the energy meter and each measuring switch are then combined according to the timestamp to obtain the power curves of the energy meter and each measuring switch.

[0031] Based on the above embodiments, the power curve changes of the electricity meter and each measuring switch are determined respectively, and the power curve is dynamically segmented accordingly. The specific logic is as follows: Multiple sampling points are set on the power curve, and the power curve is divided into multiple segments with the sampling points as the boundary. Each segment consists of two adjacent sampling points and the power curve between them. Calculate the power difference between adjacent sampling points within each segment, and take its absolute value as the instantaneous fluctuation amplitude of that segment; Calculate the average instantaneous fluctuation amplitude of all segments as the benchmark; Iterate through all segments and compare the instantaneous fluctuation amplitude of each segment with the average value: If the instantaneous fluctuation amplitude of a segment is greater than the average value, then the segment is determined to be a segment with drastic power changes. If the instantaneous fluctuation amplitude of a segment is less than or equal to the average value, then the segment is determined to be a segment with gradual power change.

[0032] Based on the above, it should be noted that: The density of the sampling points is adapted to the size of the aforementioned integration time window. That is, when the first integration time window is used, the sampling frequency is increased and the number of sampling points is increased to ensure accurate capture of drastic power changes; when the second integration time window is used, the sampling density is appropriately reduced.

[0033] Based on the above embodiments, an appropriate integration method is adaptively selected according to the segmentation results, and integration calculations are performed on the power curves of the energy meter and each measuring switch. The specific logic is as follows: For the section of the power curve where power changes drastically, the trapezoidal integral method, which is suitable for fitting power curves with straight lines, is used for integration. For the flat section of the power curve, Simpson's integral method, which is suitable for parabolic fitting of power curves, is used for integration.

[0034] Based on the above, it should be noted that: The trapezoidal integral method approximates a segment (the drastic section) of the power curve as a straight line and then estimates the corresponding electrical energy using the area under the trapezoid. Electrical energy is the integral of power over time; essentially, it calculates the area under the power curve. Its advantages include fast calculation speed and the ability to quickly capture instantaneous changes in the curve. It is suitable for sections with large power fluctuations and drastic curve changes—because the curve changes rapidly in drastic segments, approximating it as a straight line accurately matches its rapid fluctuations and avoids errors caused by computational complexity.

[0035] Simpson's integral method approximates a segment (a flat section) of the power curve as a smooth parabola, then estimates the electrical energy using the area formula corresponding to the parabola. Its advantages include higher calculation accuracy and suitability for segments with gradual power changes—because the curve in a flat section has small fluctuations and a stable trend, approximating it as a parabola more closely reflects the actual trend of the curve, resulting in more accurate calculations than the trapezoidal integral method, without compromising efficiency due to higher calculation accuracy.

[0036] Based on the above, it should be noted that: This application uses the first instant as the detection starting point and no longer employs the traditional fixed integration period. Instead, it adaptively determines the integration time window based on the power change characteristics—a smaller integration time window is used when power fluctuations are severe to accurately capture instantaneous change details; a larger integration time window is used when power fluctuations are gentle, balancing detection accuracy and computational efficiency. This fundamentally solves the pain points of fixed-period acquisition being unable to adapt to dynamic power changes, leading to excessive deviations in integration results and data distortion. Furthermore, the power curve is dynamically segmented, and by quantitatively analyzing the fluctuation amplitude of each segment, it distinguishes between segments with severe power changes and segments with gentle changes, and adaptively selects the corresponding integration method for different segments. Through the aforementioned series of adaptive logic, this application can perform accurate integral calculations on the power curves of the electricity meter and each measuring switch, ultimately obtaining reliable electricity meter data and electricity data of each measuring switch. This not only effectively avoids the drawbacks of fixed-period data collection and ensures the authenticity and accuracy of the metering data, but also provides solid data support for the subsequent location and judgment of error sources.

[0037] S3. Perform a metering consistency check on the energy data of each measuring switch and mark abnormal candidate switches. Compare the energy data of the energy meter with the energy data measured by each measuring switch to determine whether the energy error exceeds the energy error threshold. If the energy error does not exceed the energy error threshold but there are abnormal candidate switches, it is determined that there is a metering abnormality. If the energy error exceeds the energy error threshold, combine the marking results of the measuring switches and the relationship between the energy data of each measuring switch and the allowable upper and lower limits of fluctuation to complete the final metering status determination.

[0038] Based on the above embodiments, the electrical energy data of each measuring switch is judged for consistency and abnormal candidate switches are marked. The specific logic is as follows: Calculate the average of the electrical energy data of all measuring switches. The average of the electrical energy data of all measuring switches represents the normal reference benchmark for the measurement results of each measuring switch under the current operating conditions. Iterate through all the measuring switches and compare the power data of each measuring switch with the average power data. If the absolute deviation between the power data of a measuring switch and the average power data is greater than a preset deviation threshold, it indicates that the measurement result of the measuring switch has exceeded the deviation range of all switches during normal operation, and there is a high probability of measurement abnormality. Therefore, the measuring switch is marked as an abnormal candidate switch. If the absolute deviation between the power data of a measuring switch and the average power data is less than or equal to a preset deviation threshold, the measuring switch is determined to be normal and is not marked as an abnormal candidate switch.

[0039] Based on the above, it should be noted that: The logic for setting the preset deviation threshold is as follows: Based on the power data of all measuring switches under normal operating conditions, collect at least one month of normal power data, calculate the average deviation value of the power data of all measuring switches within this period, and use this as the benchmark value for the preset deviation threshold. The final preset deviation threshold is then set up by increasing the benchmark value by 20%.

[0040] Based on the above embodiments, if the power error does not exceed the power error threshold but there are abnormal candidate switches, then it is determined that there is a metering abnormality. The specific logic is as follows: Power error reflects whether the overall metering is balanced, while abnormal candidate switches reflect whether the metering of a single measuring switch deviates from the normal level of the group. The fact that the energy error does not exceed the energy error threshold indicates that the sum of the energy data of all measuring switches is basically matched with the total energy data of the energy meter, and the overall metering is in a state of surface balance. However, this balance may be the result of abnormal cancellation and cannot indicate that the metering of each measuring switch is normal. Abnormal candidate switches are selected by comparing their electrical energy with the average of all measured switches and filtering them if the deviation exceeds a preset deviation threshold. The preset deviation threshold is set based on long-term normal operation data and also allows for the possibility of grid fluctuations and slight equipment errors. Therefore, switches that can be marked as abnormal candidate switches have a measurement deviation that exceeds the normal range and are likely to have measurement abnormalities. The essence of surface balance is abnormal cancellation, not true normality. It is caused by the metering deviation of the abnormal candidate switch being canceled out by the reverse deviation of one or more other measuring switches. Not all switches are normal. For example, if one measuring switch is too high and another is too low, the two deviations will cancel each other out, so that the overall power error does not exceed the standard. However, both measuring switches themselves have metering abnormalities. If this situation is not identified as a measurement anomaly, the measurement problem of a single measuring switch will be overlooked. Long-term operation will lead to the continuous accumulation of measurement deviations, which may subsequently cause overall measurement inaccuracies, expansion of equipment failures, and other hidden dangers, which is inconsistent with the purpose of this application to accurately detect and avoid hidden dangers.

[0041] Therefore, as long as there is an abnormal candidate switch, even if the overall power error does not exceed the standard, it is still necessary to determine that there is a metering abnormality.

[0042] The logic for setting the power error threshold is as follows: Based on the energy data of the energy meter and all measuring switches during normal operation, at least one month of normal operation data is collected. The average deviation between the energy of the energy meter and the sum of the energy of all measuring switches during this period is calculated as the benchmark value for the energy error threshold. The final energy error threshold is obtained by increasing the benchmark value by 20%.

[0043] Based on the above embodiments, the final metering status is determined by combining the marking results of the measuring switches, the electrical energy data of each measuring switch, and the relationship between the allowable upper and lower limits of fluctuation. The specific logic is as follows: If a measuring switch is marked as an abnormal candidate switch, or if the power data of the measuring switch exceeds the allowable upper and lower limits of fluctuation, then the measuring switch is determined to be abnormal. If a measuring switch is not marked as an abnormal candidate switch, and the power data of the measuring switch does not exceed the allowable upper and lower limits of fluctuation, then the measuring switch is determined to have a measurement error.

[0044] The logic for setting the allowable upper and lower limits for fluctuations in electrical energy data is as follows: Based on the power data of all measuring switches under normal operating conditions, at least one month of normal operating data is collected, and the average value of the power data of all measuring switches during this period is calculated. This average value is used as the benchmark value for the upper and lower limits of allowable fluctuation, and the normal range of power data of measuring switches under normal operating conditions is defined. Based on the above benchmark, the upper and lower fluctuation ratios are set respectively, and the upper and lower limits of allowable fluctuation are finally determined—the upper limit is 1.2 times the benchmark value, and the lower limit is 0.8 times the benchmark value.

[0045] Based on the above, it should be noted that: In existing technologies, most methods rely solely on a single error comparison to determine whether a measurement is abnormal. This approach fails to effectively distinguish the source of the error. It cannot determine whether the error is a genuine measurement anomaly caused by a fault in the measuring switch itself, nor can it differentiate between normal measurement deviations caused by non-fault factors such as power grid load fluctuations and environmental interference. This can easily lead to misjudgments or omissions of faults, resulting in blind spots and low efficiency during troubleshooting by staff, and even ineffective repairs and the expansion of faults. This application effectively addresses this limitation through a multi-dimensional, progressively layered judgment logic: First, by analyzing the consistency of energy data from all measured switches, abnormal candidate switches deviating from the normal level of the group are marked, initially identifying equipment that may have its own faults; then, by comparing the sum of the energy from the energy meter and the energy from the measured switches, it is determined whether the overall energy error exceeds the standard, clarifying the overall metering status; finally, by combining the marking results of the measured switches and the comparison of energy data with the allowable upper and lower limits of fluctuation, further precise identification is achieved—if a measured switch is marked as an abnormal candidate switch, or its energy data exceeds the allowable upper and lower limits of fluctuation, it indicates that the error is not caused by non-fault factors such as load fluctuations, but rather by a fault in the switch itself, and is judged as a metering anomaly; if a measured switch is not marked as an abnormal candidate switch, and the energy data does not exceed the allowable upper and lower limits of fluctuation, it indicates that the error is caused by non-fault factors such as grid load fluctuations and slight inherent deviations of the equipment, which is a normal metering error and does not require fault investigation. This multi-dimensional judgment logic not only breaks through the limitations of the single error judgment of existing technologies, but also achieves accurate differentiation between abnormal and normal errors. This allows staff to quickly locate the measurement switches that are actually faulty, avoid ineffective troubleshooting, greatly improve the efficiency of fault diagnosis, reduce maintenance costs, and reduce problems such as equipment downtime and inaccurate measurement caused by misjudgment.

[0046] Please see Figure 2 The present invention also provides a technical solution: An automatic detection device for a measuring switch, the device being used to execute any of the above-described automatic detection methods for a measuring switch, comprising: The abnormal early warning module is used to synchronously and in real time acquire the power data of the electricity meter and the power data measured by each measuring switch deployed under the electricity meter, compare the sum of the power data measured by the electricity meter and each measuring switch, determine whether the power error exceeds the power error threshold, and mark the current moment as the first moment when the power error threshold is exceeded. The integration module is used to adaptively determine the integration time window based on the power change characteristics, starting from the first moment. It synchronously acquires the power curves of the energy meter and each measuring switch within the integration time window, judges the change status of the power curves of the energy meter and each measuring switch, dynamically segments the power curves accordingly, and adaptively selects the appropriate integration method based on the segmentation results. It then performs integration calculations on the power curves of the energy meter and each measuring switch to obtain the energy data of the energy meter and the energy data of each measuring switch. The anomaly location module is used to determine the consistency of the energy data of each measuring switch and mark the abnormal candidate switches. It compares the energy data of the energy meter with the energy data measured by each measuring switch to determine whether the energy error exceeds the energy error threshold. If the energy error does not exceed the energy error threshold but there are abnormal candidate switches, it is determined that there is a measurement anomaly. If the energy error exceeds the energy error threshold, it combines the marking results of the measuring switches and the relationship between the energy data of each measuring switch and the allowable upper and lower limits of fluctuation to complete the final determination of the measurement status.

[0047] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0048] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by software, electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0049] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0050] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. An automatic detection method for a measuring switch, characterized in that, The specific steps include: S1. Synchronously acquire the power data of the electricity meter and the power data measured by each measuring switch deployed under the electricity meter in real time, compare the sum of the power data measured by the electricity meter and each measuring switch, determine whether the power error exceeds the power error threshold, and mark the current time as the first time if it exceeds the power error threshold. S2. Starting from the first moment, the integration time window is adaptively determined according to the power change characteristics. The power curves of the energy meter and each measuring switch within the integration time window are acquired synchronously. The change status of the power curves of the energy meter and each measuring switch is judged respectively. Based on this, the power curves are dynamically segmented. The appropriate integration method is adaptively selected according to the segmentation results. The power curves of the energy meter and each measuring switch are integrated respectively to obtain the energy data of the energy meter and the energy data of each measuring switch. S3. Perform a metering consistency check on the energy data of each measuring switch and mark abnormal candidate switches. Compare the energy data of the energy meter with the energy data measured by each measuring switch to determine whether the energy error exceeds the energy error threshold. If the energy error does not exceed the energy error threshold but there are abnormal candidate switches, it is determined that there is a metering abnormality. If the energy error exceeds the energy error threshold, combine the marking results of the measuring switches and the relationship between the energy data of each measuring switch and the allowable upper and lower limits of fluctuation to complete the final metering status determination.

2. The automatic detection method for the measuring switch according to claim 1, characterized in that, When the power error threshold is exceeded, the current moment is designated as the first moment. The specific logic is as follows: When the power error continues to exceed the power error threshold within a preset time period, the moment when the first power error exceeds the power error threshold is marked as the first moment.

3. The automatic detection method for the measuring switch according to claim 1, characterized in that, The integration time window is adaptively determined based on the power change characteristics, and the specific logic is as follows: When the power fluctuation amplitude is greater than the power fluctuation amplitude threshold, it indicates that the load or metering is changing abnormally fast, so the first integral time window is used. When the power fluctuation amplitude is less than or equal to the power fluctuation amplitude threshold, it indicates that the load or metering is changing abnormally slowly, and the second integral time window is used. The first integration time window is smaller than the second integration time window.

4. The automatic detection method for the measuring switch according to claim 1, characterized in that, The power curves of the electricity meter and each measuring switch are judged separately, and the power curves are dynamically segmented accordingly. The specific logic is as follows: Multiple sampling points are set on the power curve, and the power curve is divided into multiple segments with the sampling points as the boundary. Each segment consists of two adjacent sampling points and the power curve between them. Calculate the power difference between adjacent sampling points within each segment, and take its absolute value as the instantaneous fluctuation amplitude of that segment; Calculate the average instantaneous fluctuation amplitude of all segments as the benchmark; Iterate through all segments and compare the instantaneous fluctuation amplitude of each segment with the average value: If the instantaneous fluctuation amplitude of a segment is greater than the average value, then the segment is determined to be a segment with drastic power changes. If the instantaneous fluctuation amplitude of a segment is less than or equal to the average value, then the segment is determined to be a segment with gradual power change.

5. The automatic detection method for the measuring switch according to claim 4, characterized in that, Based on the segmented results, an appropriate integration method is adaptively selected to perform integration calculations on the power curves of the energy meter and each measuring switch. The specific logic is as follows: For the section of the power curve where power changes drastically, the trapezoidal integral method, which is suitable for fitting power curves with straight lines, is used for integration. For the flat section of the power curve, Simpson's integral method, which is suitable for parabolic fitting of power curves, is used for integration.

6. The automatic detection method for the measuring switch according to claim 1, characterized in that, The electrical energy data of each measuring switch is checked for consistency, and candidate switches with abnormalities are marked. The specific logic is as follows: Calculate the average of the power data of all measuring switches, iterate through all measuring switches, and compare the power data of each measuring switch with the average of the power data. If the absolute deviation between the power data of a measuring switch and the average power data is greater than a preset deviation threshold, the measuring switch is marked as an abnormal candidate switch.

7. The automatic detection method for the measuring switch according to claim 6, characterized in that, By combining the marking results of the measuring switches, the relationship between the electrical energy data of each measuring switch and the allowable upper and lower limits of fluctuation, the final determination of the metering status is completed. The specific logic is as follows: If a measuring switch is marked as an abnormal candidate switch, or if the power data of the measuring switch exceeds the allowable upper and lower limits of fluctuation, then the measuring switch is determined to be abnormal. If a measuring switch is not marked as an abnormal candidate switch, and the power data of the measuring switch does not exceed the allowable upper and lower limits of fluctuation, then the measuring switch is determined to have a measurement error.

8. An automatic detection device for a measuring switch, the device being used to execute the automatic detection method for a measuring switch according to any one of claims 1-7, characterized in that, include: The abnormal early warning module is used to synchronously and in real time acquire the power data of the electricity meter and the power data measured by each measuring switch deployed under the electricity meter, compare the sum of the power data measured by the electricity meter and each measuring switch, determine whether the power error exceeds the power error threshold, and mark the current moment as the first moment when the power error threshold is exceeded. The integration module is used to adaptively determine the integration time window based on the power change characteristics, starting from the first moment. It synchronously acquires the power curves of the energy meter and each measuring switch within the integration time window, judges the change status of the power curves of the energy meter and each measuring switch, dynamically segments the power curves accordingly, and adaptively selects the appropriate integration method based on the segmentation results. It then performs integration calculations on the power curves of the energy meter and each measuring switch to obtain the energy data of the energy meter and the energy data of each measuring switch. The anomaly location module is used to determine the consistency of the energy data of each measuring switch and mark the abnormal candidate switches. It compares the energy data of the energy meter with the energy data measured by each measuring switch to determine whether the energy error exceeds the energy error threshold. If the energy error does not exceed the energy error threshold but there are abnormal candidate switches, it is determined that there is a measurement anomaly. If the energy error exceeds the energy error threshold, it combines the marking results of the measuring switches and the relationship between the energy data of each measuring switch and the allowable upper and lower limits of fluctuation to complete the final determination of the measurement status.