A water meter equipment fault self-diagnosis and maintenance management system

By triggering self-diagnosis drift monitoring and heartbeat frame encoding through pseudo-flow pulses, combined with digital twin models and dual redundant monitoring timers, the silent failure problem caused by self-diagnosis logic defects in smart water meters is solved, achieving instant repair and reliability improvement.

CN120509885BActive Publication Date: 2025-09-16SHANDONG HUAWEI INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511001663.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-09-16
Estimated Expiration
2045-07-21

AI Technical Summary

Technical Problem

Smart water meters may remain silent when there are defects in their self-checking logic, resulting in the maintenance center being unable to detect potential faults in a timely manner. Existing low-power strategies have a contradiction between energy saving and reliability.

Method used

By triggering self-diagnosis drift monitoring and minimalist heartbeat frame encoding through pseudo-flow pulses, combined with digital twin models and dual-redundant monitoring timers, health score-driven review rhythm and differential patch positioning of failure branches are achieved, ensuring that deviation judgment is sensitive and robust, and supporting remote self-repair.

Benefits of technology

It achieves instant capture and targeted repair of silent faults, significantly improves the autonomous reliability of water meters, and reduces operation and maintenance costs and the frequency of on-site intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509885B_ABST
    Figure CN120509885B_ABST
Patent Text Reader

Abstract

The present invention discloses a water meter equipment fault self-inspection and maintenance management system, which specifically relates to the field of water metering management, and is used to solve the pain point problem of risk of fault omission caused by self-inspection failure. It triggers self-diagnosis drift monitoring and heartbeat frame minimalist coding through pseudo-flow pulse, and the energy consumption increment of the uplink link is reduced to the milliwatt level. The health score drives the review rhythm, so that deep sampling occurs only when necessary; differential patches are combined with digital twin models to accurately locate the failure branch, and push and load only bear microbytes, and the downlink consumption and refresh time are greatly reduced; the shape-frequency complementary index is integrated with unsupervised boundary learning to ensure that the deviation judgment is both sensitive and robust; the dual redundant monitoring timer verifies that the patch takes effect and then uploads the summary, and the maintenance center can remotely self-repair without interrupting metering and communication; thereby realizing the real-time capture and directional repair of silent faults, significantly improving the autonomous reliability of water meters and greatly reducing operation and maintenance costs and the frequency of on-site intervention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of water metering management, and more particularly to a water meter equipment fault self-inspection and maintenance management system. Background Art

[0002] Smart water meters generally adopt a low-power strategy of "self-diagnosis first, reporting later." The meter's microcontroller integrates multiple sensors for flow, pressure, temperature, and vibration. The self-diagnosis logic runs periodically during sleep intervals and remains silent after passing self-diagnosis. Only when it detects metering drift, a stuck valve, or a power supply anomaly does the NB-IoT communication unit upload encrypted results to a cloud-based maintenance center. Recent research indicates that ultrasonic water meters have begun incorporating self-diagnosis and adaptive measurement cycle designs to correct for errors caused by installation posture, bubble disturbances, and temperature differences. These meters also rely on moving average and threshold detection algorithms to suppress false alarms. Furthermore, to reduce the frequency of battery replacement, communication power consumption is strictly controlled to the milliwatt level, resulting in very few reported events. Wireless connectivity is also affected by attenuation in underground tanks, reinforced concrete, and moist soil. Vendors often trade narrowband and low data rates for long-range coverage. While this inherent architecture offers significant energy savings, it also carries a hidden risk: if the self-diagnosis logic itself fails, the meter will remain silent, undetected by the maintenance center.

[0003] In order to solve the above problems, a technical solution is now provided. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a water meter equipment fault self-inspection and maintenance management system. By triggering self-diagnosis drift monitoring and heartbeat frame minimalist coding through pseudo-flow pulses, the incremental energy consumption of the uplink link is reduced to the milliwatt level, and the health score drives the review rhythm, so that deep sampling occurs only when necessary; the differential patch is combined with the digital twin model to accurately locate the failed branch, and the push and load only bear the amount of microbytes, and the downlink consumption and refresh time are greatly reduced; the shape-frequency complementary indicators are integrated with unsupervised boundary learning to ensure that the deviation judgment is both sensitive and robust; the dual redundant monitoring timer verifies that the patch takes effect before uploading the summary, and the maintenance center can remotely self-repair without interrupting metering and communication; the entire link is linked together, integrating real-time probes, dynamic review, model-driven repair and effect confirmation, to achieve instant capture and targeted repair of silent faults, significantly improve the autonomous reliability of water meters and greatly reduce operation and maintenance costs and the frequency of on-site intervention, so as to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] Pulse acquisition module: The meter end microcontroller generates a pseudo flow rate pulse at each wake-up moment, synchronously samples the pressure vector, temperature vector and vibration vector, and calculates the similarity difference with the reference vector of the previous cycle;

[0007] Drift reporting module: When the comprehensive similarity difference exceeds the static threshold and does not trigger the traditional fault mark, it generates a self-diagnostic drift code and embeds it into the heartbeat frame for upload. The cloud maintenance center updates the health score of the target water meter based on this code.

[0008] Review sampling module: The maintenance center dynamically determines the review cycle based on the health score and issues review instructions. According to the instructions, full-scale sampling is performed to generate extended vectors, which are uploaded after differential compression.

[0009] Feature determination module: The maintenance center first compares the expansion vector with the digital twin model prediction vector to generate a composite deviation vector. It then extracts and calculates the flip rate feature and the energy dissipation ratio feature, and uses a single-class support vector machine to output a credible surface coefficient. This coefficient is used to adjust the dynamic threshold and generate a minimum difference patch package for download.

[0010] Stability verification module: After completing differential patch sharding verification and mirror switching, the redundancy monitoring timer is started, and two self-diagnosis cycles are observed continuously. If the output is stable, the monitoring summary is uploaded for policy iteration.

[0011] In a preferred embodiment, the pulse acquisition module includes the following:

[0012] The meter-end microcontroller generates a predefined pseudo-flow rate pulse at each wake-up moment, and synchronously collects the response data of the pressure sensor, temperature sensor, and vibration sensor to form a pressure vector, a temperature vector, and a vibration vector. It compares these data with the pressure reference vector, temperature reference vector, and vibration reference vector stored in the previous cycle, calculates the similarity difference of each sensor, and then generates a comprehensive similarity difference through normalized weighted summation to evaluate the overall deviation of the self-test logic.

[0013] In a preferred embodiment, the drift reporting module includes the following contents:

[0014] The meter-end microcontroller sets a static threshold based on the calibration data and compares the comprehensive similarity difference with the static threshold; when the comprehensive similarity difference exceeds the static threshold and does not trigger the traditional fault mark, the meter-end microcontroller maps the comprehensive similarity difference to a discrete level and combines it with the self-test cycle identifier to form a composite code, and then encodes the composite code into a self-diagnostic drift code.

[0015] In a preferred embodiment, the drift reporting module further includes the following:

[0016] The meter-end microcontroller inserts the self-diagnosis drift code into the reserved field of the heartbeat frame, encrypts the heartbeat frame, adds a checksum, and then uploads it to the cloud maintenance center via the narrowband Internet of Things. After receiving the heartbeat frame, the cloud maintenance center parses the self-diagnosis drift code, extracts the discrete level value and self-test cycle identifier, calculates the attenuation factor based on the discrete level value, updates the health score by multiplying the historical health score by the attenuation factor, and stores the updated health score.

[0017] In a preferred embodiment, the sampling review module includes the following:

[0018] The cloud maintenance center dynamically calculates the review cycle based on the health score, and issues instructions by inserting the review instruction code and sampling parameters in the heartbeat frame. The water meter end microcontroller adjusts the sampling parameters based on the review instruction code and sampling parameters, performs full-scale sampling to generate extended pressure vectors, extended temperature vectors, and extended vibration vectors, and the water meter end microcontroller differentially encodes the extended pressure vector, extended temperature vector, and extended vibration vector to generate compressed data. The water meter end microcontroller uploads the compressed data to the cloud maintenance center through the narrowband Internet of Things.

[0019] In a preferred embodiment, the feature determination module includes the following contents:

[0020] The cloud maintenance center receives the extended vector compression package and decompresses it to restore it to the extended pressure vector, extended temperature vector and extended vibration vector. The digital twin model is used to generate the predicted pressure vector, predicted temperature vector and predicted vibration vector with the same number of sampling points as the extended vector. The difference between the extended pressure vector and the predicted pressure vector, the extended temperature vector and the predicted temperature vector, and the extended vibration vector and the predicted vibration vector is calculated element by element and a composite deviation vector is generated.

[0021] In a preferred embodiment, the feature determination module further includes the following:

[0022] The phase shift is calculated based on the signed product of the composite deviation vector and the prediction vector and the zero-crossing statistics. The energy spectrum scattering rate is calculated based on the discrete cosine transform and energy ratio of the composite deviation vector. The phase shift and the energy spectrum scattering rate are input into a single-class support vector machine to generate a credible surface coefficient. The dynamic threshold is adjusted according to the credible surface coefficient. The abnormal branches exceeding the dynamic threshold are identified and a minimum difference patch package is generated and sent down to the meter-end microcontroller.

[0023] In a preferred embodiment, the stability verification module includes the following:

[0024] The meter-end microcontroller performs fragment verification on the minimum differential patch package to ensure data integrity, verifies the check code of each fragment through cyclic redundancy check, and requests retransmission when the verification fails. After the verification passes, the fragments are reassembled into a complete minimum differential patch package. The minimum differential patch package is then applied to the backup image using mirror switching technology to generate an updated image and switch the updated image to the active image before the self-test cycle starts. At the same time, the original active image is backed up as the backup image.

[0025] In a preferred embodiment, the stability verification module further includes the following:

[0026] The redundant monitoring timer is started, two self-diagnosis cycles are performed continuously, and the output vectors are recorded. The stability is evaluated by calculating the cosine similarity of the two output vectors. When the cosine similarity is greater than the preset stability threshold, the meter-side microcontroller generates a monitoring summary containing the cosine similarity, the self-diagnosis output vector, and the patch metadata, and uploads it to the cloud maintenance center via the narrowband Internet of Things.

[0027] In a preferred embodiment, the stability verification module further includes the following:

[0028] The redundant monitoring timer is a device used to monitor the system status and does not receive a normal response within a preset time.

[0029] The technical effects and advantages of the water meter equipment fault self-diagnosis and maintenance management system of the present invention are as follows:

[0030] The present invention triggers self-diagnostic drift monitoring and minimalist encoding of heartbeat frames through pseudo-flow pulses, reducing the incremental energy consumption of the upstream link to the milliwatt level. The health score drives the review rhythm, ensuring that deep sampling occurs only when necessary. The differential patch is combined with the digital twin model to accurately locate the failed branch, and the push and load only incur microbytes, significantly reducing the downstream consumption and refresh time. The shape-frequency complementary indicator is integrated with unsupervised boundary learning to ensure that the deviation judgment is both sensitive and robust. The dual-redundant monitoring timer verifies that the patch takes effect before uploading the summary, allowing the maintenance center to remotely self-repair without interrupting metering and communication. The entire link is closely linked, integrating real-time probes, dynamic review, model-driven repair, and effect confirmation to achieve instant capture and targeted repair of silent faults, significantly improving the autonomous reliability of water meters and significantly reducing operation and maintenance costs and the frequency of on-site intervention. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 The present invention is a structural diagram of a water meter equipment fault self-diagnosis and maintenance management system.

[0032] Figure 2 The present invention is a logical diagram of the processing flow of a water meter equipment fault self-diagnosis and maintenance management system. DETAILED DESCRIPTION

[0033] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0034] Example 1: Figure 1 The present invention provides a water meter equipment fault self-diagnosis and maintenance management system, comprising:

[0035] Pulse acquisition module: The meter end microcontroller generates a pseudo flow rate pulse at each wake-up moment, synchronously samples the pressure vector, temperature vector and vibration vector, and calculates the similarity difference with the reference vector of the previous cycle.

[0036] Drift reporting module: When the comprehensive similarity difference exceeds the static threshold and does not trigger the traditional fault mark, a self-diagnostic drift code is generated and embedded in the heartbeat frame for upload. The cloud maintenance center updates the health score of the target water meter accordingly.

[0037] Review sampling module: The maintenance center dynamically determines the review cycle based on the health score and issues review instructions. According to the instructions, full-scale sampling is performed to generate an extended vector, which is uploaded after differential compression.

[0038] Feature determination module: The maintenance center first compares the expanded vector with the predicted vector of the digital twin model to generate a composite deviation vector; then extracts and calculates the flipping rate feature and the energy dissipation ratio feature, and uses a single-class support vector machine to output the credible surface coefficient. This coefficient is used to adjust the dynamic threshold and generate the minimum difference patch package for downlink.

[0039] Stability verification module: After completing differential patch sharding verification and mirror switching, the redundancy monitoring timer is started, and two self-diagnosis cycles are observed continuously. If the output is stable, the monitoring summary is uploaded for policy iteration.

[0040] like Figure 2The figure below is a logical diagram of the processing flow of the present invention. The solution of this invention revolves around "self-testing and self-verification of reliability." Upon each wakeup, the meter uses pseudo-flow pulses and synchronous sampling with multiple probes. It first calculates similarity differences and generates extremely short drift codes that are integrated into the heartbeat frame, minimizing energy consumption to milliwatts. The cloud receives the drift codes and updates the health score in real time, flexibly scheduling review cycles based on the scores. During the review phase, the meter uploads the compressed extended vector. The cloud uses complementary shape-frequency metrics—phase shift and energy spectrum scattering—to derive trusted surface coefficients using a single-class support vector machine. This adaptively adjusts the deviation threshold and constructs only micro-differential patches pointing to the failed branch, significantly reducing downlink bytes and refresh time. After the meter completes patch loading, it activates dual-redundant monitoring timers to continuously observe two rounds of self-test output. If stable, it uploads a monitoring summary for policy iteration. The entire process is progressively linked through "lightweight probes—shape-frequency dual parameters—differential patches—redundant monitoring," addressing the silent blind spots of self-test failures while maintaining ultra-low power consumption and narrowband communication characteristics.

[0041] The innovations are reflected in three aspects: First, pseudo-flow pulses are used as the trigger source for the self-check chain, solving the problem of traditional heartbeat frames lacking a health dimension; second, the use of shape-frequency complementary indicators combined with unsupervised boundary learning makes the judgment logic independent of labels and sensitive to sparse anomalies; third, micro-differential patches are used instead of full firmware upgrades, and redundant monitoring timers are used to verify the patch effect, enabling remote self-repair without on-site meter disassembly. This solution takes into account real-time performance, energy consumption, and computing power constraints.

[0042] In the use of the fault self-inspection and maintenance management system for smart water meter equipment, the traditional design adopts a low-power strategy of "self-inspection first, then reporting". The meter-end microcontroller integrates multiple sensors for periodic self-diagnosis, and only uploads data to the cloud maintenance center through NB-IoT when an obvious fault is detected. This architecture performs well in energy saving, but there are hidden risks: when the self-inspection logic itself has defects, the water meter may remain silent, resulting in the maintenance center being unable to perceive potential problems. In order to solve this silent blind spot, the present invention proposes an innovative self-inspection reliability self-certification solution, in which the pulse acquisition module serves as the starting point of the entire process. By introducing a pseudo-flow rate pulse at the moment the meter-end microcontroller wakes up and combining it with multi-sensor data analysis, a quantifiable basis for the health status of the self-inspection logic is provided. The introduction of this method aims to enhance the credibility of self-inspection, provide a reliable data basis for subsequent steps, and ensure that faults can be captured and repaired in a timely and targeted manner.

[0043] The meter-side microcontroller is an embedded microcontroller designed specifically for metering equipment such as smart water meters. It features high integration, low power consumption, high reliability, and strong anti-interference capabilities. Its main functions include:

[0044] Data collection: Real-time data collection is achieved by integrating multiple types of sensors (such as flow, pressure, temperature and vibration sensors).

[0045] Data processing and self-diagnosis: Run self-diagnosis logic to detect equipment failures and ensure operational stability.

[0046] Communication function: Data is exchanged with the cloud maintenance center using the narrowband Internet of Things (NB-IoT) communication unit.

[0047] Device control: Supports periodic wake-up mechanism, performs self-test tasks during sleep intervals, and implements firmware updates and remote maintenance through mirror switching technology to ensure the continuity and security of device functions.

[0048] To meet the energy-saving requirements of smart water meters, the meter-side microcontroller adopts a low-power design and can operate stably in complex environments such as underground tanks, reinforced concrete, and moist soil. Its application is not limited to smart water meters but can also be expanded to smart metering devices such as gas and electricity meters, thereby enhancing the intelligence of energy management systems.

[0049] The pulse acquisition module is described as follows: the meter's microcontroller generates a pseudo-flow rate pulse each time it wakes up, synchronously samples the pressure, temperature, and vibration vectors, and calculates the difference between these vectors and the baseline vector from the previous cycle. The following is a detailed explanation of the specific processing technology logic.

[0050] 1-1. Generation of pseudo-flow pulses.

[0051] Each time the meter's microcontroller enters its wakeup state, the system's internal firmware proactively generates a predefined simulated flow rate signal, called a pseudo-flow pulse. This signal is not triggered by external water flow but rather simulated by the microcontroller according to preset rules. Its characteristics are designed to approximate those produced by actual water flow. Because the consistency of multi-sensor responses and the effectiveness of the self-test algorithm must be verified without actual flow, the amplitude of the pseudo-flow pulse is set to 10% to 20% of the meter's nominal flow rate, and its duration is determined by calibration parameters. The generation process is controlled by firmware, with the signal amplitude and duration pre-programmed into the microcontroller's memory using calibration data from the meter's design and directly recalled upon wakeup. This design effectively activates the self-test mechanism while avoiding resource waste caused by excessively high amplitudes or invalid triggering caused by excessively low amplitudes, providing controllable input conditions for subsequent data acquisition.

[0052] 1-2. Synchronous sampling of multi-sensor data.

[0053] Simultaneously with the generation of the pseudo-flow pulse, the meter's microcontroller initiates data acquisition from the outputs of the pressure, temperature, and vibration sensors, generating pressure, temperature, and vibration vectors, respectively. The pressure vector comprises the response sequence of the pressure sensor in response to the pseudo-flow pulse, the temperature vector comprises the response sequence of the temperature sensor, and the vibration vector comprises the response sequence of the vibration sensor. To ensure temporal alignment of the three data sets, the number of sampling points in each vector remains consistent. This number is calculated by multiplying the sampling frequency by the pulse duration. The sampling frequency and pulse duration are set to milliseconds to minimize power consumption, while the acquisition window covers the entire pulse period. The acquisition process is synchronized with the microcontroller's internal clock, ensuring that the response data from each sensor is recorded at the same time. This synchronized acquisition method provides time-consistent raw data for subsequent comparative analysis, ensuring accuracy during processing.

[0054] 1-3. Definition of reference vector.

[0055] The reference vectors are derived from the sensor response data saved after the system completed a self-test during the previous wakeup. These correspond to pressure, temperature, and vibration reference vectors. This data is stored in the non-volatile memory of the meter's microcontroller after each self-test and used as a reference during the current wakeup. Because the stability of the self-test logic needs to be assessed across cycles, the response data from the previous cycle is selected as a reference, reflecting changes in sensor response by comparison with the current data. This storage process is executed immediately after the previous self-test cycle completes, and the data is written to memory as a vector containing the same number of points as the current sampling. During readout, the microcontroller retrieves these vectors from memory and uses them as a comparison basis for calculations in the current cycle. This cross-cycle reference design effectively tracks the continuity of system performance and provides a stable comparison target for deviation detection.

[0056] 1-4. Calculation of similarity difference.

[0057] For the pressure, temperature, and vibration vectors, the system calculates the deviation between the current sampled data and the corresponding pressure, temperature, and vibration reference vectors, respectively, to generate pressure, temperature, and vibration similarity differences. This calculation method is based on quantifying inter-vector differences. First, the current value of each vector at each sampling point is subtracted from the reference value, resulting in a sequence of differences. Next, each difference is squared and the squared results across all sampling points are added to generate a sum. Finally, the square root of this sum is taken to determine the similarity difference for the corresponding sensor. This process is applied sequentially to the pressure, temperature, and vibration vectors, generating three independent deviation quantification results. Given the need to intuitively reflect the overall differences between the vectors and the computational complexity that fits within the resource constraints of embedded systems, this calculation method based on the square root of the sum of squares accurately captures the magnitude of response deviations, providing a reliable numerical basis for multi-sensor consistency assessment.

[0058] 1-5. Calculation of comprehensive similarity difference.

[0059] To comprehensively evaluate the deviations of the three sensors, pressure, temperature, and vibration, the system fuses the pressure, temperature, and vibration similarity differences to generate a composite similarity difference. Because the measurement units and dimensions of each sensor vary, the three similarity differences must first be unified to the same scale. This is done by dividing each similarity difference by its corresponding calibration maximum value, which is preset by the water meter's design specifications and represents the maximum possible deviation of that sensor within its normal operating range. This process converts the pressure, temperature, and vibration similarity differences into dimensionless values ​​ranging from 0 to 1. Next, the three dimensionless values ​​are weighted and summed according to preset weights to generate a composite similarity difference. The weights are determined based on the importance and reliability of each sensor. For example, the pressure sensor may be assigned a higher weight due to its core role. The weighted summation process multiplies each dimensionless value by its weight and then adds them together to generate the final composite similarity difference. This fusion approach quantifies the overall deviation of the multi-sensor responses, providing a unified basis for comprehensive evaluation of the system's self-test logic.

[0060] Through these steps, the meter's microcontroller generates a pseudo-flow pulse each time it wakes up, triggering simultaneous data collection from multiple sensors. This data is then compared with the baseline data stored in the previous cycle, and the similarity difference between each sensor is calculated separately, ultimately fusing the data into a comprehensive similarity difference. This process, from pulse generation to deviation quantification, fully implements the self-checking logic's detection capabilities, ensuring the system can promptly detect potential anomalies while maintaining low power consumption, providing accurate numerical support for subsequent processing.

[0061] The pulse acquisition module generates a pseudo-flow pulse when the meter-end microcontroller wakes up, synchronously collects multi-sensor data, and calculates the similarity difference with the previous cycle, providing a preliminary quantitative basis for the health status of the self-test logic. This step effectively captures deviation information during device operation and lays the foundation for subsequent analysis. However, relying solely on the calculation of similarity difference makes it difficult to fully determine whether the self-test logic is normal, especially in hidden situations where the deviation exceeds the normal range but does not trigger traditional fault markings. To address this problem, the drift reporting module introduces a further processing mechanism for similarity difference. By analyzing potential defects and uploading key information to the cloud maintenance center, it can achieve real-time monitoring of the health status of the water meter.

[0062] The drift reporting module is described as follows: If the similarity difference crosses a static threshold and does not trigger a traditional fault flag, the meter's microcontroller embeds a self-diagnostic drift code into a heartbeat frame and uploads it. The cloud-based maintenance center then updates the target water meter's health score based on this information. The following is a detailed explanation of its technical logic.

[0063] 2-1. Setting and judging the static threshold.

[0064] In the pulse acquisition module, the meter's microcontroller calculates a comprehensive similarity difference value, which serves as a quantitative indicator of self-test logic deviation. To determine whether this quantitative indicator requires further processing, a static threshold is set. This static threshold, derived from calibration data during meter design, reflects the upper limit of the fluctuation of the comprehensive similarity difference value under normal operating conditions. Its value is a dimensionless number limited to 0 and 1. This range is set to ensure that it covers deviation fluctuations during normal operation while providing a clear distinction between abnormal conditions.

[0065] After each self-test is completed, the meter's microcontroller compares the currently calculated comprehensive similarity difference with the static threshold. If the comprehensive similarity difference is greater than the static threshold, it indicates that the self-test logic has deviated beyond the expected range for normal operation. At the same time, further checks are performed to determine whether traditional fault flags have been triggered. Traditional fault flags include predefined conditions such as metering drift, valve sticking, or power supply anomalies, which are typically generated by independent monitoring mechanisms within the water meter. Subsequent processing steps are activated only when the comprehensive similarity difference is greater than the static threshold and no traditional fault flags have been triggered. This dual judgment mechanism effectively distinguishes between routine faults and hidden defects in the self-test logic, focusing on abnormal conditions that require special attention and avoiding unnecessary resource consumption.

[0066] 2-2. Generation of self-diagnostic drift code.

[0067] When the combined similarity difference exceeds a static threshold and does not trigger a traditional fault flag, the meter's microcontroller generates a self-diagnostic drift code to quantify the deviation and convey key information. Because water meters use NB-IoT communication, which has limited bandwidth resources, the self-diagnostic drift code must be designed to be as concise as possible, occupying a small number of bytes while retaining sufficient information.

[0068] The generation process consists of the following specific steps: First, the comprehensive similarity difference value is mapped to a discrete level interval. Assuming the comprehensive similarity difference value ranges from 0 to 1, it can be evenly divided into 10 levels, each corresponding to an integer value. For example, 0 to 0.1 corresponds to level 1, 0.1 to 0.2 corresponds to level 2, and so on, up to 0.9 to 1 corresponding to level 10. During the mapping process, the integer corresponding to the upper limit of the comprehensive similarity difference value interval is used as the level value. Second, a composite code is generated by combining it with the identifier of the current self-test cycle. The self-test cycle identifier is typically an increasing number indicating the number of self-tests that have occurred, and the units digit is used as part of the identifier value. The composite code is calculated by multiplying the level value by 10 and adding the units digit of the self-test cycle identifier. For example, if the level value is 5 and the cycle identifier is 13, the units digit is 3, and the composite code is calculated as 5 multiplied by 10 plus 3, resulting in 53. Finally, this composite code is encoded to generate the self-diagnostic drift code, with a length within a single byte.

[0069] The drift code generated in this way can not only reflect the severity of the deviation, but also be associated with a specific self-test cycle, which is convenient for subsequent analysis. In addition, the data volume is small, making it suitable for low-bandwidth transmission environments.

[0070] 2-3. Embedding and uploading of heartbeat frames.

[0071] The meter's microcontroller needs to incorporate self-diagnostic drift codes into periodically transmitted heartbeat frames, leveraging existing communication mechanisms to transmit meter health information. Heartbeat frames, originally used to confirm device online, can be expanded to transmit self-diagnosis data without adding additional communication overhead.

[0072] The specific steps are as follows: First, a self-diagnostic drift code is inserted into the reserved field of the heartbeat frame. The reserved field is an unused portion of the heartbeat frame data structure and is long enough to accommodate the number of bytes required for the drift code. After insertion, the entire heartbeat frame is encrypted to ensure data transmission security. Next, a checksum is calculated for the heartbeat frame and appended to the end of the data packet to verify data integrity during transmission. Finally, the generated data packet is uploaded to the cloud maintenance center via the NB-IoT communication unit. This upload process relies on the periodic transmission of heartbeat frames and is typically performed at regular intervals, such as 24 hours.

[0073] This embedding method makes full use of existing communication resources, avoids additional power consumption and bandwidth overhead, and ensures real-time transmission of health information.

[0074] 2-4. The health score of the cloud maintenance center is refreshed.

[0075] After receiving the heartbeat frame, the cloud maintenance center analyzes the self-diagnostic drift code contained in it and uses this information to update the water meter's health score, dynamically reflecting the status of the self-diagnosis logic. The health score starts at 1, indicating a fully healthy device, and gradually adjusts as deviations accumulate.

[0076] The update process consists of the following steps: First, the self-diagnostic drift code is parsed to extract the level value and cycle identifier. Specifically, the drift code is divided by 10, the integer portion is taken to obtain the level value, and the remainder is taken to obtain the units digit of the cycle identifier. Next, a decay factor is calculated based on the historical health score. The decay factor is calculated by first dividing the level value by 10 to obtain a value between 0 and 1. This value is then multiplied by a preset constant (for example, 0.5). Finally, the product is subtracted from 1 to obtain the decay factor. For example, if the level value is 5, then 5 divided by 10 is 0.5, which multiplied by the preset constant 0.5 is 0.25. The decay factor is 1 minus 0.25, resulting in a value of 0.75. Then, the historical health score is multiplied by the newly calculated decay factor to obtain the new health score. For example, if the historical health score is 0.9 and the decay factor is 0.75, the new health score is 0.9 multiplied by 0.75, resulting in a value of 0.675. Finally, the new health score is stored in a cloud database for subsequent review and decision-making.

[0077] This scoring update mechanism gradually adjusts the health status through a quantified attenuation factor, which can clearly reflect the cumulative effect of deviations and provide accurate data support for the maintenance and management of water meters.

[0078] The health score is dynamically calculated by multiplying the historical health score (H_prev) by the attenuation factor (α). The attenuation factor α is calculated as α = 1-k * (G_level / 10), where k is a preset constant and G_level is the level value analyzed by the cloud maintenance center based on the self-diagnostic drift code (D_drift). For example, the specific calculation logic can be as follows: First, the comprehensive similarity difference (Δ_total) is compared with the static threshold (Δ_th) to generate a drift code and upload it to the cloud. The cloud analyzes the level value G_level; then, the attenuation factor α is calculated using G_level; finally, α is multiplied by the historical health score H_prev to obtain the new health score H_new, that is, H_new = H_prev * α.

[0079] Through the above steps, when the integrated similarity difference exceeds the static threshold and does not trigger a traditional fault flag, the meter's microcontroller generates a self-diagnostic drift code, embeds it in a heartbeat frame, and uploads it to the cloud. The cloud-based maintenance center updates the health score of the target water meter based on the received drift code. This process captures hidden issues in the self-diagnosis logic in a low-power, low-bandwidth manner, ensuring effective monitoring and improvement of water meter reliability.

[0080] The drift reporting module generates a self-diagnostic drift code based on when the similarity difference crosses the static threshold and uploads it to the cloud maintenance center to update the health score of the target water meter, thereby providing a health status basis for subsequent processing. However, relying solely on similarity differences and health scores cannot fully verify the reliability of the self-test logic under complex working conditions, especially potential defects may not be discovered in time. To this end, the review sampling module introduces a dynamic review mechanism. The cloud maintenance center adjusts the review frequency and issues instructions based on the health score. The meter-end microcontroller performs deep sampling and uploads extended data to further confirm the accuracy of the self-test logic. This mechanism aims to ensure the stable operation of the water meter's self-test function through periodic and detailed testing.

[0081] The review sampling module is described as follows: the maintenance center dynamically determines the review cycle based on the health score and issues review instructions. The meter-side microcontroller performs full-scale sampling according to the instructions, generates an extended vector, and then transmits it upstream after differential compression. The following is a detailed explanation of its technical logic.

[0082] 3-1. Dynamically determine the review cycle.

[0083] The cloud maintenance center uses the health score updated in the drift reporting module to calculate the review cycle. The health score is a numerical value that reflects the health status of the self-checking logic. The value range is set between 0 and 1. The lower the value, the higher the risk of potential defects in the self-checking logic, and more frequent testing is required to detect problems in a timely manner. The review cycle is calculated based on the health score and uses a proportional adjustment method to match the detection frequency with the device status. To this end, the system pre-sets the minimum review cycle and the maximum review cycle. The minimum review cycle corresponds to intensive testing in high-risk conditions, and the maximum review cycle corresponds to relaxed testing when the health status is good. The units of both are time, such as days.

[0084] The specific process for calculating the review cycle is as follows: First, determine the numerical difference between the minimum review cycle and the maximum review cycle, that is, subtract the numerical value of the minimum review cycle from the numerical value of the maximum review cycle to obtain a time range. Then, use the health score as a proportional factor and multiply it by the above time range to calculate the adjustment time corresponding to the health score. Next, add this adjustment time to the minimum review cycle to obtain the final review cycle. In other words, when the health score is 1, the adjustment time is equal to the difference between the maximum review cycle and the minimum review cycle, and the review cycle reaches the maximum review cycle; when the health score is 0, the adjustment time is 0, and the review cycle is equal to the minimum review cycle. In this way, the review cycle can smoothly change between the minimum review cycle and the maximum review cycle according to the health score, ensuring the dynamic adaptability of the detection frequency and the equipment status, while maintaining the uniformity of the time unit to facilitate subsequent scheduling.

[0085] 3-2. Issue review instructions.

[0086] The cloud maintenance center issues a recheck instruction during the next heartbeat frame communication between the water meter and the cloud. Heartbeat frames are data packets periodically transmitted between the water meter and the cloud maintenance center to maintain the communication connection. Embedding the recheck instruction leverages the existing structure of the heartbeat frame, avoiding additional communication overhead while providing clear guidance to the water meter's microcontroller on sampling tasks.

[0087] The specific steps for issuing a review instruction are as follows: First, a review instruction code and sampling parameters are inserted into reserved fields within the heartbeat frame's data structure. The review instruction code is a unique identifier that instructs the water meter to perform a review task; the sampling parameters, including specific requirements such as sampling frequency and duration, guide the water meter's sampling operations. Next, the heartbeat frame data containing the review instruction code and sampling parameters is encrypted, generating ciphertext using an encryption algorithm to ensure data security during transmission. Next, a checksum is calculated for the heartbeat frame data. This checksum is derived through specific operations on the data content and appended to the end of the data packet to verify whether errors or data loss occurred during transmission. Finally, the generated heartbeat frame data packet is sent to the water meter's microcontroller via the narrowband Internet of Things (NB-IoT) communication unit. NB-IoT, with its low power consumption and wide coverage, ensures reliable command transmission. In this way, the review instruction can be securely and efficiently transmitted to the water meter, providing an accurate basis for subsequent sampling operations.

[0088] 3-3. Perform full-scale sampling and generate extended vectors.

[0089] After receiving the verification command from the cloud maintenance center, the water meter's microcontroller performs full-scale sampling based on the sampling parameters contained in the command. Full-scale sampling improves sampling resolution and extends acquisition time to obtain more detailed status data, generating detailed extended vectors to enhance the ability to detect potential defects in the self-test logic.

[0090] The specific implementation process of full-scale sampling is as follows: First, the microcontroller adjusts the sampling frequency and sampling duration of the pressure sensor, temperature sensor, and vibration sensor based on the sampling parameters in the review instruction to meet the instruction requirements. Then, triggered by a pseudo-flow pulse, the sampling operation of these three sensors is synchronously initiated. The pseudo-flow pulse is a signal that simulates the state of water flow and is used to unify the sampling starting point. During the sampling process, the pressure sensor generates an extended pressure vector, the temperature sensor generates an extended temperature vector, and the vibration sensor generates an extended vibration vector. The number of sampling points in each extended vector is significantly greater than the number of sampling points during normal self-test. By increasing the number of data points, subtle changes in device operation are captured. The extended pressure vector records the change in pressure over time, the extended temperature vector records the change in temperature over time, and the extended vibration vector records the change in vibration amplitude over time. Together, these vectors form an extended vector set, providing a comprehensive description of the device status, providing sufficient data support for analysis by the cloud maintenance center, and enhancing the accuracy of defect identification.

[0091] 3-4. Differentially compress and upstream expand the vector.

[0092] Due to the limited bandwidth resources of narrowband IoT, the microcontroller on the water meter performs differential compression on the extended vector before uploading it. This reduces the data volume while preserving key features and ensuring transmission efficiency. Differential compression exploits the correlation between adjacent sampling points to reduce data redundancy and adapt to communication constraints.

[0093] The specific steps of differential compression are as follows: First, differential encoding is performed on each extended vector. Taking the extended pressure vector as an example, the differences between adjacent sampling points are calculated sequentially: the value of the first sampling point is subtracted from the value of the second sampling point, the value of the second sampling point is subtracted from the value of the third sampling point, and so on, to generate a differential sequence. The differential sequence records the change between sampling points rather than the absolute value, thereby reducing data redundancy. Next, the differential sequence is quantized and encoded. The differences are mapped into a finite number of discrete codewords using a preset quantization rule. For example, smaller differences are assigned shorter codewords and larger differences are assigned longer codewords, further compressing the data. Next, the compressed data of the extended pressure vector, extended temperature vector, and extended vibration vector are merged to generate a unified extended vector compressed package. Finally, the extended vector compressed package is uploaded to the cloud maintenance center via the narrowband IoT communication unit. The compressed data maintains feature integrity while significantly reducing the transmission burden, ensuring that data can be efficiently delivered to the cloud for subsequent analysis in bandwidth-constrained environments.

[0094] Through the above steps, the cloud maintenance center dynamically calculates the review cycle based on the health score and issues a review instruction. The water meter's microcontroller performs full-scale sampling according to the instruction, generates an extended vector, and uploads it to the cloud maintenance center after differential compression. This process flexibly matches the detection frequency with the device status and leverages the efficient transmission of detailed data through narrowband IoT, providing reliable data support for deviation analysis and remediation strategies in the cloud maintenance center. The entire process strikes a balance between security, efficiency, and accuracy.

[0095] The pulse acquisition module to the review sampling module generates pseudo-flow pulses through the meter-end microcontroller, calculates similarity differences, uploads self-diagnostic drift codes, and dynamically adjusts the review cycle based on the health score. It has preliminarily identified anomalies in the self-test logic and generated extended vectors for analysis by the cloud maintenance center. These extended vectors contain multi-sensor data such as pressure, temperature, and vibration, providing a basis for subsequent defect location. However, it is difficult to accurately locate defects in the self-test logic by relying solely on extended vectors, especially under complex working conditions, where deviations may be caused by the superposition of multiple factors. To this end, the feature determination module introduces a digital twin model and feature extraction technology. By comparing the extended vector with the predicted vector, extracting time domain and frequency domain features, and combining single-class support vector machine analysis, it can achieve accurate positioning of self-test logic defects and repair preparation, thereby improving the reliability and stability of the water meter's self-test function.

[0096] The feature determination module is described as follows: The maintenance center first compares the expanded vector with the digital twin model's predicted vector to obtain a composite deviation. It then extracts and calculates the flip rate and energy dissipation ratio features, using a single-class support vector machine to output a credible surface coefficient. This coefficient is used to adjust the dynamic threshold and generate a minimum differential patch package for download. The following is a detailed explanation of the technical logic.

[0097] 4-1. Comparison of the expanded vector and the predicted vector.

[0098] After receiving the compressed extended vector package uploaded by the verification sampling module, the cloud maintenance center first decompresses it and converts it into extended pressure, temperature, and vibration vectors. These vectors respectively record the actual response data of the water meter's pressure, temperature, and vibration sensors under full-scale sampling. To analyze the discrepancies between these actual sampled data and the ideal state, the cloud maintenance center uses a digital twin model to generate corresponding prediction vectors. The digital twin model is constructed based on the ideal response of the water meter under pseudo-flow pulses and simulates the output data of the sensors in a flawless state. By comparing the actual sampled data with the predicted data, anomalies in the self-test logic can be quantified.

[0099] The specific comparison process is as follows: The cloud maintenance center uses the digital twin model to generate a predicted pressure vector, a predicted temperature vector, and a predicted vibration vector with the same number of sampling points as the extended vector. Next, a composite deviation vector is calculated to comprehensively reflect the deviation of multiple sensors at each sampling point. The calculation method is to compare the actual vector and the predicted vector element by element. First, for the pressure value, temperature value, and vibration value of each sampling point, the difference between the actual value and the predicted value is calculated respectively. Then, the squares of these differences are added to obtain a sum. The square root of this sum is taken to generate the comprehensive deviation value of the sampling point. The comprehensive deviation values ​​of all sampling points form a composite deviation vector, which reflects the overall deviation of the self-test logic in timing. This comparison method ensures that the deviation quantification covers the three sensor dimensions of pressure, temperature, and vibration through the comprehensive calculation of multi-dimensional deviations. It has physical meaning and provides reliable data support for subsequent feature extraction.

[0100] The construction of the digital twin model is achieved through accurate simulation of the physical characteristics and operating environment of the water meter equipment. The specific process includes the following steps: First, based on the structure and sensor configuration of the water meter, historical data from multiple sensors (such as pressure, temperature and vibration sensors) are collected to form a basic data set; second, these data are trained using physical modeling and machine learning techniques (such as neural networks or regression models) to generate a model that can simulate the sensor response of the water meter under different working conditions; during the construction process, the coupling relationship between sensors and the impact of environmental factors (such as temperature and humidity) on the sensors need to be accurately calibrated to ensure that the model can accurately predict the ideal response under the action of pseudo-flow pulses; finally, the digital twin model outputs the predicted pressure, temperature and vibration data in the form of multidimensional vectors, and compares them with the actual sampling data to generate a composite deviation vector, thereby completing the model construction.

[0101] 4-2. Calculation of the turning rate characteristic (phase shift).

[0102] After generating the composite deviation vector, the cloud maintenance center further analyzes its directional variations in time series and calculates a feature called phase shift. Phase shift is used to detect directional consistency between the composite deviation vector and the predicted vector, capturing any anomalies in the self-test logic's response trends. Because amplitude noise can interfere with analysis, the calculation focuses on sign changes and ignores amplitude, thereby more accurately reflecting directional anomalies.

[0103] The process for calculating the phase shift is as follows: First, a sign product sequence is generated by comparing the sign of the composite deviation vector with the combined sign of the predicted vector element by element. The combined sign of the predicted vector is determined by the sign of the element-wise sum of the predicted pressure, temperature, and vibration vectors at each sampling point. Each element of the composite deviation vector is multiplied by the combined sign of the predicted vector at the corresponding sampling point, resulting in a sequence where each element is positive one, negative one, or zero, reflecting the directional consistency between the actual deviation and the ideal response. Next, the number of sign flips between adjacent elements in this sequence—that is, the number of changes from positive one to negative one or from negative one to positive one—is counted as the number of zero crossings. The number of zero crossings is then divided by the total number of adjacent element pairs (i.e., the number of sampling points minus one) to obtain the phase shift. The phase shift is a dimensionless proportional value ranging from zero to one. Larger values ​​indicate more frequent directional flips, reflecting the degree of abnormality in the self-test logic's response trend. This calculation method, through directional analysis, suppresses the influence of amplitude noise and provides precise time-domain features for anomaly determination.

[0104] 4-3. Calculation of energy scattering ratio characteristics (energy spectrum scattering rate).

[0105] To analyze the characteristics of the composite deviation vector in the frequency domain, the cloud maintenance center calculates a feature called the energy spectrum scattering rate. This spectral scattering rate examines the degree of imbalance in the energy distribution in the frequency domain, revealing abnormal responses of the self-test logic at different frequency bands. Because abnormalities can manifest as rapid fluctuations or slow-moving deviations, analyzing the ratio of high- and low-frequency energy helps fully capture these characteristics.

[0106] The process for calculating the energy spectrum scattering rate is as follows: First, a discrete cosine transform is performed on the composite deviation vector to generate an energy spectrum vector. The discrete cosine transform converts time series data into frequency domain data. Each element of the energy spectrum vector represents the amplitude of a different frequency component. Next, the energy spectrum vector is divided into low-frequency and high-frequency bands, using a boundary of one-quarter the number of sampling points as the boundary. The first quarter of the elements belong to the low-frequency band, and the last three-quarters belong to the high-frequency band. The energy of the low-frequency and high-frequency bands is then calculated separately. The low-frequency energy is obtained by summing the squares of the elements in the low-frequency band, and the high-frequency energy is obtained by summing the squares of the elements in the high-frequency band. The ratio of the high-frequency energy to the low-frequency energy is then calculated. The base-10 logarithm of this ratio is then taken and multiplied by 10 to obtain the energy spectrum scattering rate in decibels. The energy spectrum scattering rate is a dimensionless value. Larger values ​​indicate stronger high-frequency components, reflecting the degree of abnormality in the self-test logic with respect to rapid fluctuations. This calculation method enhances the comprehensiveness of feature analysis by comparing frequency-domain energy distributions, providing important frequency-domain information for anomaly detection.

[0107] 4-4. Single-class support vector machine and dynamic threshold adjustment.

[0108] After extracting the phase shift and energy spectrum scattering rate, the cloud maintenance center uses a one-class support vector machine to combine these two features to generate a credible surface coefficient. This coefficient is then used to adjust the dynamic threshold and ultimately generate a minimum differential patch package. The one-class support vector machine is an unsupervised learning method suitable for learning the boundaries of normal samples in unlabeled data, thereby identifying abnormal samples.

[0109] The processing process is as follows: First, the phase shift and energy spectrum scattering rate are combined to form a two-dimensional feature vector, which is then input into a pre-trained single-class support vector machine model. The model outputs a credible surface coefficient, ranging from -1 to +1. Positive values ​​indicate that the feature vector is within the normal range, while negative values ​​indicate an anomaly. Next, the dynamic threshold is adjusted based on the credible surface coefficient. This is done by presetting a base threshold and adjusting it based on the degree of negativity of the credible surface coefficient. The dynamic threshold is calculated by subtracting one from the credible surface coefficient, taking the negative value, dividing it by two, and finally multiplying it by the base threshold. When the credible surface coefficient is +1, the dynamic threshold is minimum; when it is -1, the dynamic threshold is half the base threshold. Next, based on the dynamic threshold and the composite deviation vector, abnormal branches exceeding the threshold are identified, and minimum differential patches for these branches are generated and transmitted to the meter's microcontroller. This processing approach, through flexible adjustment of the dynamic threshold, ensures accurate anomaly detection while generating efficient patches, providing targeted support for repairing the self-test logic.

[0110] The one-class support vector machine (One-Class SVM) model identifies anomalies by learning the characteristic boundaries of normal samples. Its pre-training and optimization process is as follows: First, a large amount of phase shift and energy spectrum scattering rate data under normal operating conditions is collected as a training set; then, during model training, a kernel function (such as the radial basis function (RBF)) is used to map the feature vectors to a high-dimensional space, and hyperparameters (such as the kernel parameter γ and the slack variable ν) are optimized to maximize the distance between normal samples and the hyperplane while controlling the misclassification rate; after training, the model can output a credible surface coefficient to determine whether new samples are within the normal range; during the optimization process, parameters are adjusted through cross-validation to ensure a balance between the model's coverage of normal samples and its sensitivity to abnormal samples, ultimately achieving accurate identification of self-check logic defects.

[0111] Through the above steps, the cloud maintenance center first compares the expanded vector with the predicted vector from the digital twin model to generate a composite deviation vector. Next, it calculates the phase shift and energy spectrum scattering rate, extracting time and frequency domain features. A single-class support vector machine is then used to generate credible surface coefficients and adjust dynamic thresholds. Finally, a minimum difference patch package is generated and transmitted to the meter's microcontroller. This process comprehensively analyzes time and frequency domain characteristics and, combined with unsupervised learning techniques, enables precise location of self-test logic defects and preparation for repair, ensuring the stable operation of the meter's self-test function and demonstrating the rigor and efficiency of the processing logic.

[0112] The pulse acquisition module to the feature determination module has generated pseudo-flow pulses, calculated similarity differences, uploaded self-diagnostic drift codes, dynamically adjusted the review period, generated extended vectors, and used the cloud maintenance center for deviation analysis and feature extraction through the meter-end microcontroller, completing the identification and repair preparation of self-check logic defects. The cloud maintenance center generated a minimum difference patch package based on the digital twin model and single-class support vector machine technology, and downloaded it to the meter-end microcontroller. However, the loading and application of the patch package must ensure the stability of the self-check logic to avoid introducing new faults or inconsistencies during the repair process. To this end, the stability verification module focuses on the integrity verification, safe loading and effect confirmation of the patch. Through sharding verification, mirror switching and redundant monitoring timer mechanisms, it verifies the validity of the patch and ensures the reliability of the repair, completing the entire self-check and maintenance process.

[0113] The stability verification module is described as follows: After the meter's microcontroller completes differential patch segmentation verification and mirror switching, it starts a redundant monitoring timer and continuously observes for two self-diagnostic cycles. If the output is stable, it uploads a monitoring summary for policy iteration. The following is a detailed explanation of its technical logic.

[0114] 5-1. Shard verification and patch package reorganization.

[0115] When the meter-side microcontroller receives the minimum differential patch package from the cloud maintenance center, it is split into multiple fragments for transmission due to the limited bandwidth resources of narrowband IoT communication used by water meters. Each fragment is accompanied by a unique sequence number and a checksum to identify and verify data integrity. The meter-side microcontroller first stores the received fragments in a cache and then performs a cyclic redundancy check on each fragment.

[0116] The cyclic redundancy check process is to treat the data bytes of the fragment as a polynomial, divide it with a predefined polynomial, and compare the remainder obtained with the check code attached to the fragment. If the remainder is consistent with the check code, it is confirmed that the fragment data has not been damaged during transmission; if it is inconsistent, it indicates that there is an error in the fragment data. The meter-end microcontroller sends a request to the cloud maintenance center through narrowband IoT communication, requesting the retransmission of the fragment with the corresponding sequence number. After all fragments have passed the verification, the meter-end microcontroller will splice the data of these fragments in order from small to large in the fragment sequence number to generate a complete minimum differential patch package. By verifying and reassembling the fragments one by one, the integrity of the minimum differential patch package is ensured, providing reliable data support for subsequent patch loading, while adapting to the characteristics of narrowband communication and reducing the interference of transmission errors.

[0117] 5-2. Image switching and patch application.

[0118] After obtaining the complete minimum differential patch package, the meter-side microcontroller needs to apply it to its firmware while ensuring the continuous operation of the water meter. To this end, the meter-side microcontroller maintains two firmware images: one active image for current operation and the other a backup image for updates.

[0119] The active image is responsible for daily meter operations, while the backup image serves as the target for patch loading. The meter-side microcontroller merges the contents of the minimum differential patch package with the data in the backup image. This operation involves comparing the differences indicated in the patch package byte by byte and writing the difference data to the corresponding location in the backup image, generating an updated image. After the merge is complete, before the water meter enters its next self-test cycle, the meter-side microcontroller performs a switch operation, setting the updated image as the new active image and saving the original active image as the new backup image.

[0120] During the switchover process, the water meter remains operational. Once the switchover is complete, the new active image immediately takes over the meter's operational tasks. This image switchover approach, through a dual-image design, enables seamless patch loading, avoiding potential functional interruptions during the loading process. It also retains the original image as a backup, facilitating recovery in the event of an anomaly.

[0121] 5-3. Redundant monitoring timer and output stability evaluation.

[0122] After the mirror image switch is complete, the meter-side microcontroller needs to verify whether the minimum differential patch package has effectively fixed the self-test logic defect. To do this, the meter-side microcontroller starts a redundant monitoring timer to continuously monitor the operation of two self-diagnostic cycles.

[0123] The redundant watchdog timer is set to run for two complete self-diagnostic cycles. During this period, the meter's microcontroller performs two self-tests, recording the outputs of the first and second self-tests. Each self-test output is a multidimensional vector containing the self-test logic's test results on multiple aspects. To assess the stability of these two outputs, the meter's microcontroller calculates the cosine similarity between the two vectors. This calculation first multiplies the corresponding elements of the two vectors and sums them to produce a single value. Next, the norm of each vector is calculated by squaring the elements of each vector, summing the results, and taking the square root of the result. Finally, the sum of the multiplications is divided by the product of the two norms to obtain the cosine similarity value. The cosine similarity value ranges from -1 to +1. Values ​​closer to +1 indicate more consistent directions between the two vectors, indicating a higher stability of the two self-test outputs. This evaluation method quantifies the performance of the self-test logic after patch application by comparing the vector directions, ensuring that the stability assessment is not affected by fluctuations in the output values, thereby accurately reflecting the effectiveness of the patch.

[0124] A watchdog timer is a timing device designed for system monitoring and fault detection, widely used in mission-critical and high-reliability systems. Its primary function is to regularly check the system's operating status to ensure proper operation and trigger appropriate alarms or recovery mechanisms when an anomaly is detected, thereby improving system reliability and fault tolerance. Based on timing and status monitoring, this device monitors key system parameters (such as processor status, memory usage, or communication link status) at preset intervals. If the system fails to respond within the specified time or exhibits an anomaly, it executes a predefined action, such as a system reboot, failover to a backup system, or issue an alarm. This mechanism effectively prevents system unavailability caused by software errors, hardware failures, or other anomalies, and is suitable for applications in aerospace, nuclear power plants, medical equipment, and industrial automation. The watchdog timer must be designed with high accuracy and reliability, and tightly integrated with the monitored system to ensure timely and accurate anomaly detection and the implementation of appropriate measures. Its application is not limited to hardware monitoring but can also be extended to software and distributed systems, such as monitoring the status of virtual machines in cloud computing environments, to ensure overall system stability and performance.

[0125] 5-4. Generate and upload monitoring summary.

[0126] When the output stability of two self-diagnostic cycles meets the requirements, the meter microcontroller generates a monitoring summary and uploads it to the cloud maintenance center. The stability criterion is a preset stability threshold, such as a value close to positive 1. If the calculated cosine similarity exceeds this threshold, the self-test output is considered to have met the expected stability. The monitoring summary includes the calculated cosine similarity value, the output vectors of the two self-diagnostic cycles, and metadata about the minimum difference patch package application, such as the patch version number and application time. After generating the monitoring summary, the meter microcontroller packages this data and sends it to the cloud maintenance center via the narrowband IoT communication unit. The uploaded monitoring summary provides the cloud maintenance center with detailed feedback on the patch's effectiveness, enabling it to analyze the repair results and optimize future patching strategies. This feedback mechanism ensures traceability of the repair process through the complete recording and transmission of data, while also supporting long-term reliability improvements of the water meter's self-diagnostic logic.

[0127] The meter-side microcontroller's processing of the minimum differential patch package includes the following complete steps: First, it verifies and generates a complete minimum differential patch package through shard verification and reassembly. Next, it applies the patch to the backup image using image switching technology and switches to the active image. Then, it starts a redundant monitoring timer, continuously observes the output of two self-diagnostic cycles, and calculates cosine similarity to assess stability. Finally, when stability meets requirements, it generates a monitoring summary and uploads it to the cloud maintenance center. This process ensures data integrity through shard verification, enables seamless loading through image switching, quantifies stability through cosine similarity, and provides feedback through the monitoring summary. This fully implements the safe and efficient repair of self-detection logic defects while ensuring the continued stable operation of water meter functions.

[0128] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters in the formulas are set by technicians in this field according to actual conditions.

[0129] It should be noted that the system of the present invention can be deployed on the device itself to realize embedded applications, and can also be run on a PC or other terminal with a user interface, thereby meeting a variety of hardware environments and usage requirements.

[0130] The above description is merely illustrative of certain exemplary embodiments of the present invention. It goes without saying that those skilled in the art will be able to modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and description are illustrative in nature and should not be construed as limiting the scope of protection of the claims.

[0131] It should be noted that, in this document, if there are relational terms such as first and second, etc., they are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article or device. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.

[0132] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A water meter equipment fault self-diagnosis and maintenance management system, characterized in that: include: Pulse acquisition module: The meter end microcontroller generates a pseudo flow rate pulse at each wake-up moment, synchronously samples the pressure vector, temperature vector and vibration vector, and calculates the similarity difference with the reference vector of the previous cycle; Drift reporting module: When the comprehensive similarity difference exceeds the static threshold and does not trigger the traditional fault mark, it generates a self-diagnostic drift code and embeds it into the heartbeat frame for upload. The cloud maintenance center updates the health score of the target water meter based on this code. Review sampling module: The maintenance center dynamically determines the review cycle based on the health score and issues review instructions. According to the instructions, full-scale sampling is performed to generate extended vectors, which are uploaded after differential compression. Feature determination module: The maintenance center first compares the expansion vector with the digital twin model prediction vector to generate a composite deviation vector. It then extracts and calculates the flip rate feature and the energy dissipation ratio feature, and uses a single-class support vector machine to output a credible surface coefficient. This coefficient is used to adjust the dynamic threshold and generate a minimum difference patch package for download. Stability verification module: After completing differential patch sharding verification and mirror switching, the redundancy monitoring timer is started, and two self-diagnosis cycles are observed continuously. If the output is stable, the monitoring summary is uploaded for policy iteration.

2. A water meter equipment fault self-diagnosis and maintenance management system according to claim 1, characterized in that: Pulse acquisition module Includes the following: The meter-end microcontroller generates a predefined pseudo-flow rate pulse at each wake-up moment, and synchronously collects the response data of the pressure sensor, temperature sensor, and vibration sensor to form a pressure vector, a temperature vector, and a vibration vector. It compares these data with the pressure reference vector, temperature reference vector, and vibration reference vector stored in the previous cycle, calculates the similarity difference of each sensor, and then generates a comprehensive similarity difference through normalized weighted summation to evaluate the overall deviation of the self-test logic.

3. A water meter equipment fault self-diagnosis and maintenance management system according to claim 2, characterized in that: The drift reporting module includes the following: The meter-end microcontroller sets a static threshold based on the calibration data and compares the comprehensive similarity difference with the static threshold; when the comprehensive similarity difference exceeds the static threshold and does not trigger the traditional fault mark, the meter-end microcontroller maps the comprehensive similarity difference to a discrete level and combines it with the self-test cycle identifier to form a composite code, and then encodes the composite code into a self-diagnostic drift code.

4. A water meter equipment fault self-diagnosis and maintenance management system according to claim 3, characterized in that: The drift reporting module also includes the following: The meter-end microcontroller inserts the self-diagnosis drift code into the reserved field of the heartbeat frame, encrypts the heartbeat frame, adds a checksum, and then uploads it to the cloud maintenance center via the narrowband Internet of Things. After receiving the heartbeat frame, the cloud maintenance center parses the self-diagnosis drift code, extracts the discrete level value and self-test cycle identifier, calculates the attenuation factor based on the discrete level value, updates the health score by multiplying the historical health score by the attenuation factor, and stores the updated health score.

5. A water meter equipment fault self-diagnosis and maintenance management system according to claim 4, characterized in that: The review sampling module includes the following: The cloud maintenance center dynamically calculates the review cycle based on the health score, and issues instructions by inserting the review instruction code and sampling parameters in the heartbeat frame. The water meter end microcontroller adjusts the sampling parameters based on the review instruction code and sampling parameters, performs full-scale sampling to generate extended pressure vectors, extended temperature vectors, and extended vibration vectors, and the water meter end microcontroller differentially encodes the extended pressure vector, extended temperature vector, and extended vibration vector to generate compressed data. The water meter end microcontroller uploads the compressed data to the cloud maintenance center through the narrowband Internet of Things.

6. A water meter equipment fault self-diagnosis and maintenance management system according to claim 5, characterized in that: Feature determination module Includes the following: The cloud maintenance center receives the extended vector compression package and decompresses it to restore it to the extended pressure vector, extended temperature vector and extended vibration vector. The digital twin model is used to generate the predicted pressure vector, predicted temperature vector and predicted vibration vector with the same number of sampling points as the extended vector. The difference between the extended pressure vector and the predicted pressure vector, the extended temperature vector and the predicted temperature vector, and the extended vibration vector and the predicted vibration vector is calculated element by element and a composite deviation vector is generated.

7. A water meter equipment fault self-diagnosis and maintenance management system according to claim 6, characterized in that: The feature determination module also includes the following: The phase shift is calculated based on the signed product of the composite deviation vector and the prediction vector and the zero-crossing statistics. The energy spectrum scattering rate is calculated based on the discrete cosine transform and energy ratio of the composite deviation vector. The phase shift and the energy spectrum scattering rate are input into a single-class support vector machine to generate a credible surface coefficient. The dynamic threshold is adjusted according to the credible surface coefficient. The abnormal branches exceeding the dynamic threshold are identified and a minimum difference patch package is generated and sent down to the meter-end microcontroller.

8. A water meter equipment fault self-diagnosis and maintenance management system according to claim 7, characterized in that: Stable verification module Includes the following: The meter-end microcontroller performs fragment verification on the minimum differential patch package to ensure data integrity, verifies the check code of each fragment through cyclic redundancy check, and requests retransmission when the verification fails. After the verification passes, the fragments are reassembled into a complete minimum differential patch package. The minimum differential patch package is then applied to the backup image using mirror switching technology to generate an updated image and switch the updated image to the active image before the self-test cycle starts. At the same time, the original active image is backed up as the backup image.

9. A water meter equipment fault self-diagnosis and maintenance management system according to claim 8, characterized in that: The stability verification module also includes the following: The redundant monitoring timer is started, two self-diagnosis cycles are performed continuously, and the output vectors are recorded. The stability is evaluated by calculating the cosine similarity of the two output vectors. When the cosine similarity is greater than the preset stability threshold, the meter-side microcontroller generates a monitoring summary containing the cosine similarity, the self-diagnosis output vector, and the patch metadata, and uploads it to the cloud maintenance center via the narrowband Internet of Things.

10. A water meter equipment fault self-diagnosis and maintenance management system according to claim 9, characterized in that: The stability verification module also includes the following: The redundant monitoring timer is a device used to monitor the system status and does not receive a normal response within a preset time.

Citation Information

Patent Citations

  • Anomaly monitoring method and device for time series data, electronic equipment and storage medium

    CN113723734A

  • System and method for diagnosing at least one component requiring maintenance in an appliance and / or installation

    US20170169342A1