A collaborative management method and system for water meter terminal data based on IoT edge computing
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-18
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]然而,现有的水表数据采集系统多采用终端主动上报模式,由于各终端内部硬件时钟存在物理温漂且通信链路存在不可控的随机时延,导致边缘侧获取的数据在时间维度上存在显著的相位偏差
1.本申请通过构建异步初检与同步校核的两级甄别机制,在异步监测发现流量偏差超限时,不以固定规则直接判定漏损,而是由边缘节点主动下发同步采样指令,强制拉齐全部相关终端的采样时刻,基于同步数据矩阵重新执行流量平衡运算,从而有效区分因终端时钟异步导致的误报与管网真实物理漏损,提升漏损判定的准确度,解决传统方法中计算伪偏差与物理漏损难以区分的技术难题。
Smart Images

Figure CN122578640A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of Internet of Things and data processing technology, specifically relating to a collaborative management method and system for water meter terminal data based on Internet of Things edge computing. Background Technology
[0002] With the rapid development of IoT technology, its deep application in smart water management has become a key support for improving water resource utilization efficiency and ensuring the safe operation of pipe networks. By deploying a massive number of smart water meter terminals, water systems can achieve comprehensive perception and digital monitoring of pipe network flow data. In the refined management of modern urban pipe networks, utilizing multi-source data collaborative analysis to achieve leakage prevention and flow scheduling plays a crucial role in building an efficient and intelligent water infrastructure network.
[0003] Among these technologies, cascaded pipeline flow balancing based on IoT edge computing is a core technical means for identifying regional leakage. This process relies on the edge nodes to integrate and process data from the main meter and several sub-meter terminals within their jurisdiction, determining the pipeline network's operational status by comparing the readings of each level of meter in real time. In complex urban water distribution environments, the edge side needs to perform precise logical mapping and topological association of flow information collected from multiple points, which places extremely high demands on the time alignment accuracy of data collected by each terminal and the real-time performance of data flow.
[0004] However, existing water meter data acquisition systems mostly adopt a terminal-driven reporting mode. Due to physical temperature drift of the internal hardware clocks of each terminal and uncontrollable random delays in the communication link, the data acquired at the edge side exhibits significant phase deviations in the time dimension. Furthermore, it is difficult to achieve complete synchronization of reporting cycles between different terminals, meaning that the dataset used for flow balancing calculations is not based on readings at the same physical moment. This easily leads to calculation spurious biases when the pipeline flow fluctuates drastically. In addition, traditional management methods lack real-time feedback and reverse verification mechanisms for abnormal flow states, failing to effectively distinguish between calculation errors caused by physical leakage and data asynchrony. This results in frequent false leakage reports, severely impacting the accuracy of determining the pipeline network's operational status. Summary of the Invention
[0005] The purpose of this invention is to provide a collaborative management method and system for water meter terminal data based on Internet of Things edge computing, which can effectively solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: Firstly, a collaborative management method for water meter terminal data based on IoT edge computing includes: In asynchronous monitoring mode, the edge node acquires the traffic data reported by the master table terminal and the sub-table terminal, and performs a traffic balancing operation on the traffic data to generate an instantaneous deviation value. When the instantaneous deviation value exceeds the dynamically generated physical leakage judgment threshold, the edge node actively sends a synchronization sampling instruction to the main table terminal and sub-table terminal within the topology range; wherein, the synchronization sampling instruction encapsulates a globally unique task sequence number and a high-precision time reference generated based on the local time source of the edge node; The edge node receives synchronous traffic snapshots collected and reported by each terminal in response to the synchronous sampling command, and constructs a synchronous data matrix based on the synchronous traffic snapshots associated with the same task sequence number. The edge node re-executes the traffic balancing operation on the traffic values in the synchronization data matrix to generate a verification deviation value; The verification deviation value is compared with the preset deviation threshold. If the verification deviation value is less than or equal to the preset deviation threshold, the previous deviation alarm is determined to be a false alarm caused by time asynchrony. If the verification deviation value is greater than the physical leakage determination threshold, the existence of physical leakage in the pipeline network is determined, and the leakage location and alarm process is triggered.
[0007] Preferably, the edge node actively sends a synchronization sampling command to the master table terminal and sub-table terminals within the topology range, further comprising: The edge node calculates the timestamp patch field and embeds the synchronization sampling instruction. The timestamp patch field is the difference between the time when the edge node obtains the high-precision time base and the time when the instruction is encapsulated and submitted to the underlying communication stack, which is used by each terminal to compensate for the random delay introduced by instruction encapsulation and link transmission.
[0008] Preferably, after determining that the previous deviation alarm was a false alarm caused by time asynchrony, the method further includes: The edge node extracts the timestamp of the most recent actively reported data from each sub-table terminal in asynchronous mode, and calculates the difference between it and the current synchronous sampling time to obtain the phase difference. The edge node combines the phase difference sequence recorded by each sub-table terminal in each synchronization verification to calculate the statistical mean of the time offset, and uses the statistical mean as a weighting factor bound to the hardware identifier of the corresponding sub-table terminal. In the subsequent asynchronous traffic initial detection operation, the edge node calls the weight factor to interpolate or shift the cumulative traffic values reported by each sub-table terminal to achieve virtual time alignment of asynchronous data.
[0009] Preferred options also include: The edge nodes continuously track and calculate the slope of the clock offset of each sub-table terminal over time using the phase difference sequence recorded in each synchronization check. When the slope of change of any sub-terminal exceeds the preset drift threshold, the edge node automatically increases the synchronization frequency for that sub-terminal, and adjusts the synchronization command that was originally triggered only when the deviation exceeds the limit to actively push the time reference signal to the sub-terminal every preset time until the slope of change falls back below the drift threshold.
[0010] Preferably, the edge node comprises a first processing unit, a second processing unit, a first storage unit, and a second storage unit, forming a primary / standby working mode; the method further includes: When the first processing unit confirms that the core temperature exceeds the preset threshold based on the internal chip junction temperature sensor or confirms that an uncorrectable memory error has occurred based on the memory error verification circuit, it sends a trigger level signal to the second processing unit through the fault notification signal line. In response to the trigger level signal, the second processing unit reads the latest topology maintenance task context and traffic verification intermediate variables from the dual-port shared storage area, switches its own working clock source to the master system clock, and completes the handover of computing control within the preset takeover time to ensure uninterrupted operation of the monitoring task.
[0011] Preferably, the triggering leakage location and alarm process includes: The edge node initiates a data request to the pressure sensor deployed near the pipeline network to obtain the current pressure monitoring value. The edge node extracts the traffic deviation of the corresponding region from the synchronization data matrix; The flow deviation and the pressure monitoring value are used as inputs and substituted into a preset hydraulic model inversion algorithm. The hydraulic model inversion algorithm uses the pipe section length, pipe diameter and roughness coefficient to construct a set of hydraulic balance equations to deduce the physical coordinates of the leak point in the pipe network.
[0012] Preferably, the triggering leakage location and alarm process further includes: The edge node extracts the verification deviation value of the current period and several consecutive synchronization cycles, and calculates the time change slope of the flow difference; If the slope of the change remains positive and the fluctuation amplitude is less than a preset threshold, it is determined to be a continuous leakage; if the flow difference fluctuates in a pulse manner, it is determined to be a transient leakage. The edge node packages the identified leakage type with the physical coordinates of the leakage point and then pushes a warning message to the cloud management platform through an encrypted channel.
[0013] Preferably, in the process of constructing and maintaining the pipeline cascade topology model, the method further includes: The edge node starts an independent topology maintenance thread, which automatically starts a full topology self-check every preset self-check cycle. If, within a self-inspection cycle, a status query for a certain sub-table terminal fails continuously and a cumulative number of consecutively missing heartbeat packets or traffic service data is missed, then the sub-table terminal is determined to be in a disconnected state, and the logical status of the corresponding terminal is changed to disconnected. In the subsequent topology link traversal of all traffic balancing operations, the edge node skips directly once it finds a node marked as disconnected, excluding the data of the corresponding terminal from the calculation scope; at the same time, it continuously listens for the signals of terminals marked as disconnected, and if it receives valid data again, it immediately restores the status of the corresponding terminal to online and reintegrates it into the calculation link.
[0014] Preferably, the process of each terminal collecting and reporting a synchronous traffic snapshot in response to the synchronous sampling command includes: After the microcontroller inside the water meter terminal fully receives the synchronous sampling instruction packet at the physical layer, the nested interrupt vector controller immediately triggers the highest priority hardware interrupt, forcibly interrupting the terminal's current low-power mode or non-urgent task being executed. The interrupt service routine directly sends a set of high-speed serial instructions to the flow sensing front end, instantly driving the non-magnetic sensor array to perform a forced sampling. The non-magnetic sensor front end hardware circuit has built-in protection against strong magnetic attack interference. When the intensity of the externally applied static magnetic field exceeds the set threshold, the sensing channel automatically switches to differential compensation mode to ensure that the output value is valid.
[0015] Secondly, a water meter terminal data collaborative management system based on Internet of Things edge computing is provided for executing the above method, including edge nodes and multiple water meter terminals; the edge nodes are equipped with a construction and maintenance module, an instruction generation module and a verification module. The construction and maintenance module is used to construct and dynamically maintain the pipeline cascade topology model to establish the hierarchical parent-child relationship between the master meter terminal and the sub-meter terminals. The edge node is used to acquire traffic data reported by each terminal and perform traffic balancing calculation in asynchronous monitoring mode. When the instantaneous deviation value obtained by the calculation exceeds the dynamic threshold, the instruction generation module generates and broadcasts a synchronous sampling instruction encapsulated with a globally unique task sequence number and a high-precision time base. The water meter terminal is used to respond to the synchronous sampling command with a hardware interrupt, perform instantaneous flow snapshot acquisition, and transmit the snapshot data carrying the flow value back. The edge node is also used to construct a synchronization data matrix from snapshot data of the same task sequence number; The verification module is used to re-execute the flow balancing operation on the synchronous data matrix and, based on the comparison between the operation result and the preset deviation threshold, distinguish between false alarms caused by time asynchrony and actual physical leakage. When it is determined to be a false alarm, it automatically extracts the phase difference of each terminal to update the communication compensation coefficient. When it is determined to be an actual leakage, it links the pressure sensor data and calls the hydraulic model inversion algorithm to locate the leak point and triggers an alarm.
[0016] In summary, this application includes at least one of the following beneficial technical effects: 1. This application constructs a two-level screening mechanism of asynchronous initial detection and synchronous verification. When asynchronous monitoring detects that the flow deviation exceeds the limit, it does not directly determine leakage based on fixed rules. Instead, the edge node actively issues a synchronous sampling command to force the sampling time of all relevant terminals to be aligned. Based on the synchronous data matrix, the flow balancing calculation is re-executed, thereby effectively distinguishing between false alarms caused by asynchronous terminal clocks and actual physical leakage in the pipeline network, improving the accuracy of leakage judgment, and solving the technical problem of difficulty in distinguishing between calculated false deviations and physical leakage in traditional methods.
[0017] 2. After the synchronous verification determines that it is a false alarm, this application automatically extracts the phase difference of each sub-terminal and calculates the statistical mean of the time offset. This statistical mean is used as a weighting factor bound to the hardware identifier of the sub-terminal. In the subsequent asynchronous traffic initial detection calculation, this weighting factor is called to interpolate or shift the cumulative traffic value reported by the sub-terminal, so as to realize the virtual time alignment of asynchronous data. At the same time, by continuously tracking the slope of the clock offset change of each sub-terminal, the synchronization time synchronization frequency of the terminal with the drift speed exceeding the limit is automatically increased, forming a closed-loop self-repairing loop, which continuously improves the asynchronous monitoring accuracy without increasing the synchronization command frequency.
[0018] 3. After synchronously verifying and confirming the actual physical leakage, this application uses pressure sensor data deployed near the pipeline network as input. The flow deviation and pressure monitoring value of the corresponding area in the synchronous data matrix are used as input and substituted into the hydraulic model inversion algorithm constructed using the pipeline segment length, pipe diameter and roughness coefficient. By solving the hydraulic balance equations, the physical coordinates of the leakage point are deduced, realizing an integrated closed loop from leakage detection to precise location, providing reliable support for maintenance personnel to quickly reach the site. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall scheme of the water meter terminal data collaborative management method based on IoT edge computing in this application; Figure 2 This is a schematic diagram illustrating the core principle of asynchronous-synchronous traffic collaborative verification based on reverse synchronization triggering in this application; Figure 3 This is a logical flowchart of the pipeline cascade topology model construction and dynamic maintenance in this application; Figure 4 This is a flowchart of the collaborative verification and physical leakage determination based on synchronous traffic snapshots in this application. Detailed Implementation
[0020] To further illustrate the technical means and effects adopted by the present invention to achieve the intended purpose, the following detailed description of specific embodiments based on the present invention is provided in conjunction with the accompanying drawings and preferred embodiments.
[0021] Example 1
[0022] Reference Figures 1 to 4 As shown, the collaborative management method for water meter terminal data based on IoT edge computing includes the following steps: Step S1: Build and maintain the pipeline cascade topology model.
[0023] Step S101: Edge nodes initiate network scanning and terminal discovery.
[0024] The edge node starts its built-in network scanning subsystem, which broadcasts a discovery request within a preset physical area through the underlying communication protocol stack. After receiving the discovery request, the main meter terminal and the sub-meter terminal distributed in each node of the pipeline generate a response data packet and send it back. The response data packet contains at least the globally unique hardware identifier of the terminal, the device type and the installation point. The hardware identifier can be an IMEI or MAC address or other encoding that can uniquely identify the terminal.
[0025] When each terminal is first installed or reset, a role preset value is pre-configured internally. The role preset value is only a preliminary identifier of the "master table" or "sub-table" to indicate the terminal's expected role in the network. As initial hierarchical information, it is reported to the edge node along with the response data packet to provide the original input for the establishment of subsequent topology relationships.
[0026] Step S102: Analyze the response and construct the initial physical cascade relationship.
[0027] The edge nodes parse the response data packets from each terminal one by one, extracting the hardware identifier, device type, installation point, and role preset value representing the initial level. Then, the edge nodes match the extracted information with the pipeline wiring logic diagram pre-stored in the local memory.
[0028] The pipeline cabling logic diagram records the physical pipeline connections and flow directions between each installation point. Edge nodes are constructed using a directed acyclic graph (DAG) algorithm. The processing logic is as follows: each terminal is abstracted as a node in the graph, with the extracted hardware identifier serving as the unique node name; each pipeline connection record in the cabling logic diagram is traversed, and if the pipeline connects to the installation point… Installation point And the fluid direction is fixed as from Flow direction Then create a slave node in the graph. Pointing to node The directed edge.
[0029] Through this process, each terminal node is linked together based on its physical connection and flow direction in the real pipeline network, establishing the physical cascading relationship and data subordination logic between the main meter terminal and each sub-meter terminal.
[0030] Step S103: Perform spatial mapping to establish parent-child node relationships.
[0031] In order to transform the physical connection graph generated in step S102 into a logical model for system computation, the edge nodes further call the spatial mapping algorithm, which transforms the physical directed connection relationship into a clear hierarchical parent-child relationship.
[0032] The algorithm traverses every node in the directed acyclic graph: if a node does not have any incoming edges pointing to itself, then the node is marked as a "master table node"; starting from any master table node, all subsequent nodes that can be reached along the directed edges are recursively marked as subordinate "sub-table nodes" of the master table node, and subordinate records are established.
[0033] In this process, the edge node assigns a unique logical index to each identified smart water meter terminal. The logical index implicitly contains the node's hierarchical depth and subordinate path information, thereby completing the transformation from physical distribution to logical parent-child node relationships.
[0034] Step S104: Store and organize the topology data structure in the cache.
[0035] After the model is built, the edge nodes store the entire pipeline cascade topology model in their local cache in a composite form, with a tree-like data structure as the main component and a hash table as a supplement.
[0036] A multi-branch tree is generated with each master table node as the root, and the subordinate sub-table nodes are mounted as sub-tree nodes. At the same time, a hash table is constructed with the terminal's logical index or hardware identifier as the key and the pointer to the corresponding node in the tree as the value. Thus, when performing high-frequency traffic balancing operations, it is possible to quickly look up any terminal through the hash table, and also to quickly traverse all sub-table nodes under the specified master table along the tree.
[0037] Step S105: Start the topology maintenance thread to perform periodic full self-checks.
[0038] To ensure that the pipeline cascade topology model can reflect the physical operating status of the pipeline in real time, an independent topology maintenance thread is deployed inside the edge node. The topology maintenance thread automatically starts a full topology self-check every preset self-check cycle, such as 24 hours. During the self-check, the edge node uses the maintained connection channel to send status query commands to each node recorded in the topology table that is in an "online" state, and sets a response timeout timer for each query.
[0039] Step S106: Execute the disconnection determination and logical isolation mechanism.
[0040] If a status query for a certain sub-table terminal fails continuously within a self-inspection cycle, and heartbeat packets or traffic service data for three consecutive preset reporting cycles are missing, then the sub-table terminal is determined to be in a "disconnected" state. The topology maintenance thread then changes the logical status flag of the corresponding terminal in the database from "online" to "disconnected" and triggers the logical isolation mechanism.
[0041] The core operation of the logical isolation mechanism is: when performing topology link traversal in all subsequent traffic balancing operations, once a node marked as "disconnected" is found, it is skipped directly, and its data is excluded from the calculation scope.
[0042] Meanwhile, the edge nodes continuously monitor the signals of terminals that have been marked as "disconnected". If valid data is received from the disconnected terminal again in the subsequent self-inspection cycle, the disconnected terminal status is immediately restored to "online" and it is reintegrated into the subsequent traffic balancing operation link. The whole process does not require manual intervention.
[0043] Through step S1, this method establishes a pipeline cascade topology model that can dynamically sense and adaptively adjust. This not only solves the problem of accurate logical positioning and hierarchical management of a large number of water meter terminals in complex urban pipeline networks, but also ensures the data integrity and operational reliability of the model under various abnormal conditions such as terminal communication jitter, disconnection and subsequent recovery through built-in topology maintenance threads, logical isolation and automatic recovery mechanisms.
[0044] Step S2: Perform asynchronous traffic initial detection and balancing operations.
[0045] Step S201: Monitor the asynchronous data stream reported by each water meter terminal in real time.
[0046] As the core of data aggregation, the edge node continuously listens to the reported message stream from each water meter terminal through its built-in communication module. In normal working mode, each water meter terminal relies on its own internal timer to actively push the current cumulative flow value to the edge node according to the preset asynchronous reporting cycle. The asynchronous reporting cycle is usually configured to report once every 300 seconds.
[0047] Step S202: Identify and accept time-disaligned data due to physical differences.
[0048] The quartz crystal oscillators of each terminal have slight physical temperature drift, which makes it impossible to absolutely synchronize their timing references. At the same time, the line communication link inevitably introduces random access delay and retransmission queuing. The table data received by the edge node in the same time period is actually collected at different physical times, and these data are in a non-aligned state on the time axis. If the flow balancing calculation directly uses these raw data, it is very easy to produce calculation spurious deviations when the pipeline flow fluctuates drastically.
[0049] Step S203: Call the sliding window algorithm to smooth the data stream of each node.
[0050] To suppress data spikes and short-term noise caused by asynchronous reporting, the edge nodes initiate a sliding window smoothing process before each balancing operation. The preset time length of the sliding window is set according to the average fluctuation period of the traffic in the managed network. A typical configuration is a window length of 15 minutes and a window sliding step of 60 seconds.
[0051] During processing, edge nodes perform a weighted moving average operation on consecutive data points falling within the window. The weights of each data point are linearly distributed in chronological order, with the weight of the most recent data point set as the window length. The weight of the earliest data point is set to 1, and the weights of the intermediate points decrease linearly in sequence, with the sum of all weights normalized to 1.
[0052] This processing filters out isolated transient signals caused by wireless signal interruptions or instantaneous water usage spikes, allowing the flow curves used in subsequent calculations to more accurately reflect the physical changes within the pipe network.
[0053] Step S204: Calculate the instantaneous deviation value using the flow balance operator.
[0054] After data smoothing is complete, the edge nodes extract the smoothed cumulative traffic values from the master table and all online sub-tables, and substitute them into the traffic balancing operator to calculate the instantaneous deviation. The operator's operation logic follows the formula below: In the formula, Indicates the instantaneous deviation value, in units of ; This represents the cumulative traffic volume reported by the terminal in the current computation slice and after smoothing, in units of... ; Indicates the first The cumulative traffic value reported by each subordinate sub-table terminal and smoothed out, in units of... ; This represents the total number of sub-table terminals under this master table that are currently online.
[0055] The internal calculation precision of the flow balancing operator is uniformly set to... It is sufficient to detect minute leaks, ensuring the sensitivity of leak detection numerically.
[0056] Step S205: Dynamically generate physical leakage judgment threshold.
[0057] Instead of using a fixed threshold to judge deviation, edge nodes dynamically generate physical leakage judgment thresholds for each metering area. The basis of the dynamic thresholds comes from pipe segment attributes; that is, the edge nodes read the nominal diameter of the corresponding meter from a pre-stored pipe diameter parameter table, such as DN50 or DN100, and look up the corresponding basic leakage reference value, in units of... .
[0058] Based on this, edge nodes statistically analyze historical deviation data confirmed to be in a normal state over a period of time, calculate the standard deviation of background fluctuations, and add a preset multiple, such as 3 times the standard deviation, to the baseline reference value to form a dynamic threshold that adaptively adjusts according to the operating conditions of the pipeline network. For areas with relatively stable background flow fluctuations, such as the ends of urban pipeline networks, the dynamic threshold under normal conditions is usually stable at... The left and right sides are used as the boundary to distinguish between normal measurement fluctuations and potential leakage events.
[0059] Step S206: Maintain asynchronous monitoring based on the relationship between deviation and threshold.
[0060] When the instantaneous deviation value obtained by the flow balance operator When the current network flow is within the dynamic threshold range, the edge node determines that the current network flow is in a balanced state. The observed difference is a normal metering fluctuation or a tolerable asynchronous error. At this time, the edge node does not intervene and continues to maintain the asynchronous monitoring mode, continuously collecting the flow data subsequently reported by each terminal, and repeating the above smoothing and initial inspection process to ensure efficient operation under normal conditions.
[0061] Through step S2 above, this method completes the initial asynchronous flow detection and balancing calculation under normal conditions. Utilizing a combination of sliding window smoothing and dynamic threshold determination, it effectively suppresses data misalignment interference caused by terminal clock temperature drift and random communication delays. When the instantaneous deviation value remains stable within the threshold, this method maintains silent asynchronous monitoring. However, once the deviation exceeds the dynamic threshold, it indicates that the flow difference in the pipeline network cannot be reasonably explained by conventional asynchronous errors, and is highly likely to be a real physical leak or a serious timestamp misalignment.
[0062] Step S3: Trigger the reverse synchronization command.
[0063] Step S301: Wake up the instruction generation module and make a synchronization decision.
[0064] The instantaneous deviation value calculated by the flow balance operator in step S2 The moment the dynamically generated physical leakage threshold is exceeded, the instruction generation module built into the edge node immediately wakes up from a dormant or low-priority task.
[0065] After the instruction generation module is awakened, it does not directly determine that a physical loss has occurred. Instead, it initiates a logical screening. The core decision is: instead of waiting for the terminals to report the next frame of data according to their respective asynchronous cycles, the edge node actively forces a synchronization sampling instruction to all relevant terminals within the current topology range. The reason for taking this action is that at this moment, the edge node cannot distinguish whether the deviation comes from a real physical loss or a misalignment of the sampling timestamps of each meter, and forced synchronization is the most direct way to eliminate time-dimensional interference.
[0066] Step S302: Enable high-priority broadcast protocol for command transmission.
[0067] To ensure that the instructions cover all target terminals in a very short time, the synchronous sampling instructions are sent to the entire cascaded topology via a high-priority broadcast protocol. The edge nodes prioritize the transmission of the synchronous sampling instructions in the communication stack, giving them priority in occupying channel resources and bypassing the regular data queue. This satisfies the performance requirement that the instruction response latency is strictly controlled within 50ms. The response latency refers to the end-to-end communication latency from the moment the edge node's instruction generation module completes instruction encapsulation and submits it to the communication stack until the terminal's physical layer fully receives the instruction packet.
[0068] From the decision-making process at the edge node to the physical layer of each terminal receiving the command, the entire process time is compressed to the extreme, and the command arrives almost instantaneously, ensuring that all controlled terminals can act synchronously under the same command framework.
[0069] Step S303: Encapsulate a globally unique task sequence number and a high-precision time base.
[0070] When constructing the instruction package, the instruction generation module first loads a globally unique task sequence number. All subsequent response data and log records carry this task sequence number, thereby associating all interactions of this round of synchronization sampling and avoiding confusion with other historical or future synchronization tasks.
[0071] Next, the instruction generation module acquires a high-precision time reference signal based on the edge node's own time source, such as the local hardware clock after GPS or NTP synchronization, and embeds it into the instruction packet. This high-precision time reference signal serves as the main time reference axis for this task and becomes the absolute benchmark for the subsequent clock calibration of all terminals.
[0072] Step S304: Calculate and embed timestamp patches to compensate for link transmission delays.
[0073] To further address the random latency caused by retransmissions and scheduling queuing at the communication link layer, the instruction generation module specifically calculates a timestamp patch field. The calculation method is as follows: read the current system clock value of the edge node, subtract the time when the instruction encapsulation is completed and ready to be submitted to the underlying communication stack, and the difference is the time consumed during processing and encapsulation.
[0074] After receiving the instruction packet, the terminal uses the high-precision time base and timestamp patch value carried in the instruction, combined with the message reception time it perceives, to reverse-calculate the actual flight time of the instruction in the link. Based on this actual flight time, the terminal corrects its understanding of the base time, thereby offsetting the uncontrollable random jitter on the communication link and achieving accurate alignment of the logical time of the entire network.
[0075] Through step S3 above, after the asynchronous initial detection finds that the deviation exceeds the limit, this method immediately triggers a reverse synchronization instruction process with the edge node as the absolute time source. This process does not directly make a final judgment on the leakage, but first uses fast broadcast and built-in timestamp patching mechanism to force the sampling time of all relevant terminals to be aligned with the clock reference, so as to eliminate the pseudo deviation interference caused by terminal crystal oscillator temperature drift and communication random delay to the greatest extent.
[0076] Step S4: Obtain a synchronous sampling snapshot.
[0077] Step S401: The terminal responds to the synchronization sampling command with a hardware interrupt.
[0078] After the microcontroller inside the water meter terminal fully receives the synchronization sampling instruction packet sent in step S3 at the physical layer, the nested interrupt vector controller immediately triggers the highest priority hardware interrupt. This interrupt forcibly interrupts the terminal's current low-power sleep mode or routine non-urgent tasks such as periodic self-tests and display refreshes that are being executed.
[0079] At the interrupt service routine entry point, all processor computing power, bus bandwidth, and peripheral interface resources are allocated to the synchronous instruction handler to avoid additional delays caused by resource contention during the response process.
[0080] Step S402: Avoid the normal cycle and start instantaneous sampling with the non-magnetic sensor.
[0081] After the synchronous instruction processing program is executed, the water meter terminal intentionally avoids its own preset asynchronous reporting sampling period and does not wait for the next timed wake-up point. The processing program directly sends a set of high-speed serial instructions to the flow sensing front end, instantly driving the non-magnetic sensor array to perform a forced sampling.
[0082] The non-magnetic sensor array contains multiple LC oscillation sensing units, which measure flow rate by detecting changes in inductance caused by the rotation of the metal impeller, with a single sampling resolution of 0.1L. The front-end hardware circuit of the non-magnetic sensor has built-in protection against strong magnetic attack interference: when the intensity of the external static magnetic field exceeds the set threshold, the sensing channel automatically switches to differential compensation mode to ensure that it can still output effective values rather than saturation error values under strong magnetic environment.
[0083] Step S403: Encapsulate a synchronous traffic snapshot containing multi-dimensional parameters.
[0084] After the non-magnetic sensor completes instantaneous sampling, the microcontroller immediately reads the flow count value at that moment and encapsulates it as a core data field into a response data packet of a specific format. The response data packet also carries multiple auxiliary diagnostic parameters, including the current battery voltage of the terminal acquired by the internal ADC, the signal strength RSRQ and RSRP values read by the wireless communication module, and the ambient temperature value obtained from the onboard temperature sensor. The battery voltage is used to assess the terminal's power supply health, the signal strength is used to determine whether the link quality has triggered a retransmission, and the ambient temperature helps correct the temperature drift of the non-magnetic sensor.
[0085] Step S404: Import the snapshot data into the edge node and build a synchronization data matrix.
[0086] Each terminal transmits the aforementioned response data packets back to the edge nodes via the uplink. The edge nodes receive and unpack the packets one by one. Based on the Task_ID carried in the packets, the edge nodes determine that these snapshots are all the result of the same round of synchronization instructions and logically correspond to the same physical moment.
[0087] Edge nodes write snapshot data to a temporary memory buffer. Within the temporary memory buffer, a synchronization data matrix is organized with the terminal index number as the row and auxiliary parameters such as traffic value, battery voltage, signal strength, and temperature as the column, forming a matrix uniquely associated with the Task_ID. This matrix stores only the valid data of the current synchronization task and is overwritten or released after verification, without persistently occupying storage space.
[0088] Through step S4 above, after the edge node issues a synchronization command, this method completes an instantaneous traffic snapshot collection from the terminal side, avoiding the asynchronous cycle and driven by the highest hardware priority, and uploads the traffic value along with multi-dimensional operating condition parameters such as battery, signal, and temperature. The edge node then aggregates all snapshots generated by each terminal under the same command framework into a well-structured synchronization data matrix through the task sequence number.
[0089] Step S5: Perform collaborative verification and leakage determination.
[0090] Step S501: Extract the synchronization data matrix and re-execute the balancing operation.
[0091] The verification module reads the synchronization data matrix, which is uniquely associated with the current task sequence number Task_ID and is constructed in step S4, from the temporary memory buffer of the edge node. All traffic readings in the synchronization data matrix come from the same synchronization instruction trigger and logically correspond to the same physical moment. The verification module does not need to perform time alignment processing after reading it.
[0092] The verification module directly calls the same flow balancing operator as in step S2, substitutes the total cumulative flow value in the synchronization data matrix with the cumulative flow values of all online sub-tables, and re-executes the deviation calculation. At this time, the calculated deviation value has eliminated the time dimension misalignment caused by asynchronous reporting and reflects the real physical state of the pipeline network at the instant of synchronization.
[0093] Step S502: Compare the verification deviation value with the preset deviation threshold and determine the false alarm.
[0094] The verification module compares the recalculated deviation value with the preset deviation threshold. The preset deviation threshold represents the upper limit of normal difference caused by inherent factors such as metering accuracy and noise of non-magnetic sensors under the condition of perfect time alignment. The preset deviation threshold is pre-calibrated based on the nominal accuracy level of the non-magnetic sensor and the flow fluctuation range under normal pipeline conditions, and stored in the local storage of the edge node.
[0095] If the deviation value after verification is less than or equal to the preset deviation threshold, it indicates that the difference between the readings of the main meter and the sub-meters has returned to the normal range after the time misalignment is eliminated. Based on this, the verification module determines that the deviation alarm triggered in step S2 is a false deviation caused by the misalignment of the sampling timestamps of each meter, which is a false alarm. At this time, the edge node does not generate a loss alarm and instead enters the communication compensation coefficient update and optimization process.
[0096] Step S503: Calculate the phase difference and update the communication compensation coefficient.
[0097] After a false alarm is determined, the verification module automatically starts the compensation coefficient calculation process. For each sub-table terminal, the edge node extracts the timestamp carried when it last actively reported data in asynchronous mode, calculates the difference between it and the current synchronous sampling time, and the difference is the phase difference of the sub-table terminal.
[0098] Meanwhile, the edge node combines the expected arrival time and the actual synchronization time recorded by the sub-table terminal in multiple historical synchronization checks to calculate the statistical mean of the time offset. The time offset is used as a weighting factor and is bound to the hardware identifier of the sub-table terminal and stored in the alignment parameter table of the topology database.
[0099] In the subsequent asynchronous traffic initial detection calculation in step S2, the edge node calls the weight factor to interpolate or shift the cumulative traffic value reported by the sub-table terminal on the time coordinate system, so that the sub-table readings are logically closer to the sampling time of the main table terminal, thereby realizing the virtual time alignment of asynchronous data and continuously improving the accuracy of the initial detection without increasing the frequency of synchronization instructions.
[0100] Step S504: Monitor clock bias drift rate and perform closed-loop self-repair.
[0101] In addition to single compensation, the edge node also uses the phase difference sequence recorded in each synchronization check to continuously track the clock bias drift speed of each sub-terminal. The edge node periodically calculates the slope of the phase difference change of each sub-terminal over time. The slope of the change directly reflects the actual aging or temperature drift speed of the crystal oscillator inside the terminal.
[0102] A preset drift threshold is set within the edge node. When the crystal oscillator drift speed of a certain sub-terminal exceeds the drift threshold, it indicates that the local clock of the sub-terminal has entered the unstable range. At this time, the edge node automatically increases the synchronization frequency for the sub-terminal, and adjusts the synchronization command that was originally triggered only when the deviation exceeds the limit to actively push a time reference signal to the sub-terminal every few hours until the drift speed falls back below the drift threshold.
[0103] Through this adaptive time synchronization frequency adjustment, this method forms a closed-loop self-healing circuit on the edge side, which can suppress the clock deterioration trend of individual terminals without manual intervention.
[0104] Step S505: Confirm physical leakage and initiate in-depth diagnostics.
[0105] If the recalculated deviation value in step S501 is still greater than the physical leakage judgment threshold, the verification module determines that there is physical leakage in the pipeline network, excluding the time misalignment.
[0106] The verification module immediately starts the in-depth diagnostic program to classify the leakage characteristics. The diagnostic program first extracts the verification deviation values of the current and the two previous consecutive synchronization cycles, for a total of three synchronization cycles, and calculates the time change slope of the flow difference.
[0107] If the flow difference over three cycles shows a continuous and approximately linear increasing trend, with the slope remaining positive and the fluctuation amplitude less than the preset fluctuation threshold, it is determined to be a continuous leakage, corresponding to stable leakage events such as water pipe rupture or loose joints; if the flow difference does not show a constant increasing trend over these three cycles, but instead exhibits large jumps and irregular pulse-like fluctuations, it is determined to be a transient leakage, corresponding to illegal water theft by users or metering interruption caused by a faulty meter.
[0108] Step S506: Call the pressure sensor data and perform inversion positioning through the hydraulic model.
[0109] After the leakage classification is completed, the verification module automatically initiates a data call request to the pressure sensor deployed near the pipeline network. The pressure sensor returns the current pressure monitoring value to the edge node, and the edge node simultaneously extracts the flow deviation of that area from the synchronous data matrix.
[0110] The verification module takes the flow deviation and pressure drop characteristics as inputs and substitutes them into the preset hydraulic model inversion algorithm. The hydraulic model inversion algorithm uses prior parameters such as pipe section length, pipe diameter, and roughness coefficient to construct a set of hydraulic balance equations. By solving the set of equations, the physical coordinates of the leak point in the pipe network are deduced. The inversion positioning error is controlled within 5m, which is sufficient to support maintenance personnel to quickly reach the site.
[0111] Once the location is established, the edge node packages the leakage type, deviation, location coordinates, timestamp, and pressure and traffic snapshot data, and pushes the complete early warning message to the cloud management platform through an encrypted channel. The cloud then assigns work orders based on this information.
[0112] Step S507: Execute the uplink strategy that prioritizes localization decisions.
[0113] Throughout the entire collaborative verification and leakage determination process, the edge node always adheres to the principle of prioritizing localized decision-making. Only when the verification module generates a clear leakage determination conclusion, performs topology changes in step S1, or generates daily historical statistical summaries according to a preset cycle, will the edge node trigger uplink communication with the cloud management platform.
[0114] During normal operation, massive amounts of process data, such as sliding window smoothing calculations, asynchronous initial detection calculations, and routine heartbeat monitoring, are all processed locally in the processors and memory of edge nodes without consuming backbone network bandwidth. This strategy reduces reliance on centralized computing and network transmission resources in the cloud while ensuring timely acquisition of critical events in the cloud.
[0115] Through step S5 above, this method completes a full logical closed loop from synchronous verification to leakage judgment and then to compensation optimization. After obtaining the synchronous data matrix that eliminates time misalignment, this method first distinguishes false alarms caused by asynchronous reporting and reverses the false alarms to extract phase difference and drift velocity to continuously optimize the accuracy of asynchronous initial detection, forming a closed-loop self-repair at the edge. For confirmed real physical leakage, it further performs continuous or instantaneous classification through multi-cycle slope monitoring, and links pressure sensors and hydraulic model inversion to achieve leakage location with 5m-level accuracy. Finally, the conclusion is reported to the cloud through an encrypted link.
[0116] At the system architecture level, the edge nodes integrate hardware redundancy design, and the whole consists of two independent embedded processors and two physically separate storage units to form a primary and backup working mode.
[0117] The main processing unit incorporates a chip junction temperature sensor and a memory error correction circuit. The chip junction temperature sensor reads the processor core temperature at a fixed sampling rate of 1Hz. When the reading exceeds a preset limit temperature threshold 10 times consecutively, the internal logic of the main processing unit determines that the core temperature is too high. Simultaneously, the memory controller performs ECC-checked data reads and writes to the storage units. If an uncorrectable multi-bit error occurs, the memory error correction circuit immediately sets the corresponding error flag.
[0118] Once any of the above-mentioned faults is confirmed, the main processing unit pulls the level of the fault notification signal line from high to low through a dedicated fault notification signal line to form a falling edge trigger flag; the general input / output interface of the backup unit is configured in edge interrupt mode, and once the falling edge is captured, the internal hardware state machine of the backup unit immediately starts the takeover timing.
[0119] The takeover sequence includes: the backup unit first reads the latest topology maintenance task context and traffic verification intermediate variables from the dual-port shared storage area, then switches its own working clock source to the master system clock, and completes the handover of computing control within a preset time of 500ms, and begins to output synchronization instruction processing and balancing operator operations.
[0120] Throughout the switching process, one of the dual-path storage units is always exclusively accessed by the backup unit, ensuring that the verification data matrix and topology status table are not damaged due to the failure of the main processing unit, thereby ensuring uninterrupted operation of the monitoring task.
[0121] This embodiment also connects to a web-based visualization management terminal. The visualization management terminal embeds a 3D visualization engine based on the WebGL protocol and subscribes to real-time event streams from the data service interface of the edge nodes. When it receives topology update or balancing calculation results, the 3D visualization engine converts the pipeline cascade topology model into a 3D node connection diagram. At the same time, it draws a dynamic flow balance curve on the right panel of the interface. The data refresh interval of the dynamic flow balance curve is strictly set to 1000ms by a timer, corresponding to a stable refresh frequency of 1Hz, so that managers can intuitively and continuously observe the pipeline operation status.
[0122] Example 2
[0123] In the large-scale application scenario of the smart water management system in industrial parks, this method needs to deal with the access of a large number of water meter terminals with extremely high density.
[0124] In step S1 described in Example 1, when the total number of water meter terminals connected within the jurisdiction of an edge node exceeds 500 preset thresholds, the edge node's construction and maintenance module immediately initiates a load balancing strategy, dividing the original single pipeline topology into multiple logical subdomains. Each logical subdomain is equipped with a secondary master meter terminal and several tertiary sub-meter terminals, thereby forming a hierarchical multi-level topology structure.
[0125] When establishing the above multi-cascaded topology, the edge nodes automatically determine the level and subdomain to which the terminal belongs by parsing the physical location code carried in the information reported by each terminal. The physical location code is written by the installer through the near-field configuration tool when the terminal is deployed. The code includes the area number, building number, floor number and node sequence number fields. The edge nodes extract the level information from it according to the preset code parsing rules.
[0126] For a batch of new water meter terminals connected due to construction or expansion within the park, the network scanning function of the edge node captures the unique hardware identifier broadcast by these terminals, and adds the new connected terminals to the corresponding topology subtree in real time with the help of the dynamic service discovery protocol, without the need for manual remodeling.
[0127] The specific process of the dynamic service discovery protocol is as follows: After a new terminal joins the network, it actively broadcasts a network entry declaration message carrying a physical location code and a hardware identifier. The edge node listens to the message, parses the physical location code, attaches the new terminal node to the parent node of the corresponding level and subdomain in the topology tree, and returns an acknowledgment message to complete the registration.
[0128] To address the signal instability issue that often accompanies newly accessed nodes, edge nodes dynamically adjust the frequency of topology self-tests: during the initial access phase, the self-test cycle is shortened to a 1-hour step for continuous tracking; once monitoring indicates that the communication quality of the corresponding node has entered a steady state, the self-test cycle is restored to the normal 24-hour interval.
[0129] After implementing the above load balancing division, the strategy for triggering the reverse synchronization command in step S3 also needs to be adjusted accordingly. If the synchronization command is broadcast to more than 500 terminals at the same time, it is very easy to cause instantaneous congestion of the base station channel, which in turn leads to command loss or increased retransmission delay.
[0130] To this end, the edge nodes divide all terminals into 5 or more groups based on the divided logical subdomains, and assign a specific synchronization time slot to each group. The time slot start interval between adjacent groups is set to 200ms to achieve batch and staggered triggering. Although the instructions are issued in batches, the edge nodes uniformly write the same global target snapshot time into the timestamp patch field carried by each instruction packet.
[0131] After receiving the instruction, each water meter terminal does not immediately start sampling. Instead, the internal counter continuously compares the current value with the global target snapshot time. The internal counter is driven by the terminal's local crystal oscillator and calibrated according to the high-precision time reference signal carried in the instruction. Only when the counter value precisely matches the target time will the flow snapshot be captured through a hardware interrupt.
[0132] This quasi-synchronization mechanism based on a preset target time not only mitigates the risk of communication channel congestion under high concurrency, but also ensures that the traffic snapshots obtained by all terminals are strictly aligned on the physical timeline.
[0133] In response to the significant peak-to-valley differences in water usage patterns in industrial parks, the asynchronous flow initial detection in step S2 introduces a dynamic sliding window mechanism. During peak water usage periods, such as from 8:00 AM to 6:00 PM, the step size of the sliding window is reduced to 30 seconds to improve the response sensitivity to sudden leaks such as pipe bursts. During off-peak water usage periods, such as from 2:00 AM to 4:00 AM, the step size is extended to 300 seconds, thereby reducing the computational power consumption of edge nodes. At the same time, to avoid numerical overflow or low-bit loss when summing large amounts of accumulated flow from high-density terminals, the internal computational precision of the flow balancing operator is improved to the highest level, and a double-precision floating-point format is uniformly used for calculation to ensure the numerical stability of instantaneous deviation values.
[0134] During the process of obtaining the synchronous sampling snapshot in step S4, in addition to collecting flow rate and environmental parameters, the water meter terminal also uses the built-in accelerometer to monitor whether the meter is subjected to illegal vibration or abnormal tilt. Once a physical intervention event that meets the criteria is detected, the terminal sets an abnormal status flag in the data packet of the response synchronization command. After the edge node receives the snapshot data, it first parses the abnormal status flag and uses the abnormal status flag as an auxiliary basis for subsequent leakage judgment to avoid false association caused by human damage or meter relocation.
[0135] The collaborative verification step S5 further integrates historical data backtracking capabilities. The edge node is locally configured with a 128GB industrial-grade SSD high-capacity storage medium to save all snapshot records of synchronous sampling in the past 180 days. When the verification module detects abnormal flow deviation, it extracts historical data from the same period from the storage. Using the flow deviation value and the corresponding time period as feature vectors, the K-means clustering algorithm is used to mine the regular distribution characteristics of the flow in the same time period. The planned water wave peaks are automatically clustered into one category and excluded. By comparing the clustering results with the current deviation characteristics, the false alarm rate of physical leakage is stably controlled below 0.5%.
[0136] Furthermore, the update frequency of the communication compensation coefficient is automatically adjusted based on water usage periods: during periods of drastic fluctuations in water usage, the compensation coefficient is updated immediately after each synchronous sampling to promptly capture the impact of rapid changes in ambient temperature on the terminal crystal oscillator frequency; while during periods of stable water usage, the update cycle of the compensation coefficient is extended to once a week. This adaptive update mechanism maintains the accuracy of asynchronous monitoring while reducing unnecessary synchronization overhead.
[0137] Through the aforementioned enhanced designs for large-scale industrial parks, this method, while maintaining the core framework of reverse synchronization and collaborative verification in Example 1, utilizes load balancing partitioning, phased synchronization triggering, dynamic window smoothing, multi-dimensional auxiliary criteria, and intelligent analysis of historical data to address challenges such as channel congestion, computational saturation, and increased false alarm rates caused by high-density terminal access. This ensures both the real-time performance and accuracy of leakage identification while keeping the computational and communication overhead at the edge to a reasonable level, providing reliable support for the long-term stable operation of smart water management in industrial parks.
[0138] Based on the method flow described in Embodiments 1 and 2, the water meter terminal data collaborative management system based on IoT edge computing provided in this application can be configured as follows in specific implementation: This system includes edge nodes and multiple water meter terminals. The edge node serves as the core processing unit, and its internal components include a build and maintenance module, an instruction generation module, and a verification module.
[0139] The construction and maintenance module is used to perform topology management, initiate network scanning to discover terminals, construct a directed acyclic graph based on preset roles and pipeline cabling logic diagrams, establish the parent-child hierarchical relationship between master table terminals and sub-table terminals through spatial mapping, and generate and dynamically maintain the pipeline cascade topology model.
[0140] In the normal asynchronous monitoring mode, the edge node receives the cumulative flow data actively reported by each water meter terminal according to its own cycle. After performing sliding window smoothing processing, the flow balance operator calculates the instantaneous deviation value. When the instantaneous deviation value exceeds the dynamic threshold, the instruction generation module is awakened and generates a synchronous sampling instruction carrying a globally unique task sequence number and a high-precision time reference based on the local time source of the edge node. This instruction is then sent to all water meter terminals within the current topology range through a high-priority broadcast protocol.
[0141] Each water meter terminal's internal microcontroller responds to the synchronous sampling command with a hardware interrupt, bypassing the asynchronous cycle, and instantly drives the non-magnetic sensor array to perform flow snapshot acquisition, and sends the snapshot data, which includes parameters such as flow rate, battery voltage, and signal strength, back to the edge node.
[0142] Edge nodes organize snapshot data belonging to the same task into a synchronous data matrix based on the task sequence number. Then, the verification module calls the same flow balancing operator as asynchronous monitoring to recalculate the deviation and generate a verification deviation value. The verification module compares the verification deviation value with a preset deviation threshold: if it does not exceed the limit, it is judged as a false alarm, and the phase difference of each sub-meter terminal is automatically extracted to calculate the weight factor to update the communication compensation coefficient and optimize the accuracy of subsequent asynchronous monitoring; if the verification deviation value is still greater than the physical leakage judgment threshold, physical leakage is confirmed, and the pressure sensor data and hydraulic model inversion algorithm are linked to locate the physical coordinates of the leak point, and alarm information is reported through an encrypted channel.
[0143] At the system architecture level, edge nodes can operate in a primary / backup mode, consisting of two independent embedded processors and two physically separate storage units. The primary processing unit detects its own faults through internal chip junction temperature sensors and memory error checking circuits, and triggers the backup unit to take over via a fault notification signal line, ensuring uninterrupted operation of monitoring tasks. The system can also connect to a web-based visual management terminal, providing managers with a real-time display of the network topology's 3D node diagram and dynamic flow balance curves.
[0144] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects.
[0145] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment includes only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for collaborative management of water meter terminal data based on Internet of Things edge computing, characterized in that, include: In asynchronous monitoring mode, the edge node acquires the traffic data reported by the master table terminal and the sub-table terminal, and performs a traffic balancing operation on the traffic data to generate an instantaneous deviation value. When the instantaneous deviation value exceeds the dynamically generated physical leakage judgment threshold, the edge node actively sends a synchronization sampling instruction to the main table terminal and sub-table terminal within the topology range; wherein, the synchronization sampling instruction encapsulates a globally unique task sequence number and a high-precision time reference generated based on the local time source of the edge node; The edge node receives synchronous traffic snapshots collected and reported by each terminal in response to the synchronous sampling command, and constructs a synchronous data matrix based on the synchronous traffic snapshots associated with the same task sequence number. The edge node re-executes the traffic balancing operation on the traffic values in the synchronization data matrix to generate a verification deviation value; The verification deviation value is compared with the preset deviation threshold. If the verification deviation value is less than or equal to the preset deviation threshold, the previous deviation alarm is determined to be a false alarm caused by time asynchrony. If the verification deviation value is greater than the physical leakage determination threshold, the existence of physical leakage in the pipeline network is determined, and the leakage location and alarm process is triggered.
2. The water meter terminal data collaborative management method based on IoT edge computing according to claim 1, characterized in that, The edge node actively sends a synchronization sampling command to the main table terminal and sub-table terminals within the topology range, and also includes: The edge node calculates the timestamp patch field and embeds the synchronization sampling instruction. The timestamp patch field is the difference between the time when the edge node obtains the high-precision time base and the time when the instruction is encapsulated and submitted to the underlying communication stack, which is used by each terminal to compensate for the random delay introduced by instruction encapsulation and link transmission.
3. The water meter terminal data collaborative management method based on IoT edge computing according to claim 1, characterized in that, After determining that the previous deviation alarm was a false alarm caused by asynchronous time, the method further includes: The edge node extracts the timestamp of the most recent actively reported data from each sub-table terminal in asynchronous mode, and calculates the difference between it and the current synchronous sampling time to obtain the phase difference. The edge node combines the phase difference sequence recorded by each sub-table terminal in each synchronization verification to calculate the statistical mean of the time offset, and uses the statistical mean as a weighting factor bound to the hardware identifier of the corresponding sub-table terminal. In the subsequent asynchronous traffic initial detection operation, the edge node calls the weight factor to interpolate or shift the cumulative traffic values reported by each sub-table terminal to achieve virtual time alignment of asynchronous data.
4. The water meter terminal data collaborative management method based on IoT edge computing according to claim 3, characterized in that, Also includes: The edge nodes continuously track and calculate the slope of the clock offset of each sub-table terminal over time using the phase difference sequence recorded in each synchronization check. When the slope of change of any sub-terminal exceeds the preset drift threshold, the edge node automatically increases the synchronization frequency for that sub-terminal, and adjusts the synchronization command that was originally triggered only when the deviation exceeds the limit to actively push the time reference signal to the sub-terminal every preset time until the slope of change falls back below the drift threshold.
5. The water meter terminal data collaborative management method based on IoT edge computing according to claim 1, characterized in that, The edge node is configured in a primary / standby working mode by comprising a first processing unit, a second processing unit, a first storage unit, and a second storage unit; the method further includes: When the first processing unit confirms that the core temperature exceeds the preset threshold based on the internal chip junction temperature sensor or confirms that an uncorrectable memory error has occurred based on the memory error verification circuit, it sends a trigger level signal to the second processing unit through the fault notification signal line. In response to the trigger level signal, the second processing unit reads the latest topology maintenance task context and traffic verification intermediate variables from the dual-port shared storage area, switches its own working clock source to the master system clock, and completes the handover of computing control within the preset takeover time to ensure uninterrupted operation of the monitoring task.
6. The water meter terminal data collaborative management method based on IoT edge computing according to claim 1, characterized in that, The triggering leakage location and alarm process includes: The edge node initiates a data request to the pressure sensor deployed near the pipeline network to obtain the current pressure monitoring value. The edge node extracts the traffic deviation of the corresponding region from the synchronization data matrix; The flow deviation and the pressure monitoring value are used as inputs and substituted into a preset hydraulic model inversion algorithm. The hydraulic model inversion algorithm uses the pipe section length, pipe diameter and roughness coefficient to construct a set of hydraulic balance equations to deduce the physical coordinates of the leak point in the pipe network.
7. The water meter terminal data collaborative management method based on IoT edge computing according to claim 1 or 6, characterized in that, The triggering leakage location and alarm process also includes: The edge node extracts the verification deviation value of the current period and several consecutive synchronization cycles, and calculates the time change slope of the flow difference; If the slope of the change remains positive and the fluctuation amplitude is less than a preset threshold, it is determined to be a continuous leakage; if the flow difference fluctuates in a pulse manner, it is determined to be a transient leakage. The edge node packages the identified leakage type with the physical coordinates of the leakage point and then pushes a warning message to the cloud management platform through an encrypted channel.
8. The water meter terminal data collaborative management method based on IoT edge computing according to claim 1, characterized in that, The method further includes the following steps in constructing and maintaining the cascaded pipeline topology model: The edge node starts an independent topology maintenance thread, which automatically starts a full topology self-check every preset self-check cycle. If, within a self-inspection cycle, a status query for a certain sub-table terminal fails continuously and a cumulative number of consecutively missing heartbeat packets or traffic service data is missed, then the sub-table terminal is determined to be in a disconnected state, and the logical status of the corresponding terminal is changed to disconnected. In the subsequent topology link traversal of all traffic balancing operations, the edge node skips directly once it finds a node marked as disconnected, excluding the data of the corresponding terminal from the calculation scope; at the same time, it continuously listens for the signals of terminals marked as disconnected, and if it receives valid data again, it immediately restores the status of the corresponding terminal to online and reintegrates it into the calculation link.
9. The water meter terminal data collaborative management method based on IoT edge computing according to claim 1, characterized in that, Each terminal, in response to the synchronization sampling command, collects and reports a synchronization traffic snapshot, including: After the microcontroller inside the water meter terminal fully receives the synchronous sampling instruction packet at the physical layer, the nested interrupt vector controller immediately triggers the highest priority hardware interrupt, forcibly interrupting the terminal's current low-power mode or non-urgent task being executed. The interrupt service routine directly sends a set of high-speed serial instructions to the flow sensing front end, instantly driving the non-magnetic sensor array to perform a forced sampling. The non-magnetic sensor front end hardware circuit has built-in protection against strong magnetic attack interference. When the intensity of the externally applied static magnetic field exceeds the set threshold, the sensing channel automatically switches to differential compensation mode to ensure that the output value is valid.
10. A water meter terminal data collaborative management system based on Internet of Things (IoT) edge computing, used to execute the water meter terminal data collaborative management method based on IoT edge computing as described in any one of claims 1 to 9, characterized in that, It includes edge nodes and multiple water meter terminals; the edge nodes are equipped with a construction and maintenance module, an instruction generation module, and a verification module. The construction and maintenance module is used to construct and dynamically maintain the pipeline cascade topology model to establish the hierarchical parent-child relationship between the master meter terminal and the sub-meter terminals. The edge node is used to acquire traffic data reported by each terminal and perform traffic balancing calculation in asynchronous monitoring mode. When the instantaneous deviation value obtained by the calculation exceeds the dynamic threshold, the instruction generation module generates and broadcasts a synchronous sampling instruction encapsulated with a globally unique task sequence number and a high-precision time base. The water meter terminal is used to respond to the synchronous sampling command with a hardware interrupt, perform instantaneous flow snapshot acquisition, and transmit the snapshot data carrying the flow value back. The edge node is also used to construct a synchronization data matrix from snapshot data of the same task sequence number; The verification module is used to re-execute the flow balancing operation on the synchronous data matrix and, based on the comparison between the operation result and the preset deviation threshold, distinguish between false alarms caused by time asynchrony and actual physical leakage. When it is determined to be a false alarm, it automatically extracts the phase difference of each terminal to update the communication compensation coefficient. When it is determined to be an actual leakage, it links the pressure sensor data and calls the hydraulic model inversion algorithm to locate the leak point and triggers an alarm.