A method for associating water meter geographic indexes with collector port numbers and image evidence.

CN122570786APending Publication Date: 2026-08-14XINJIANG ZHUHUA WATER IND TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0005]本发明的主要目的在于提供一种基于采集器端口编号与影像存证的水表地理索引关联方法,以解决现有技术中端口编号与现场水表的对应关系依赖人工登记而易出错且难以核验、影像存证易被冒用、水表地理索引与影像存证各自维护而容易失去同步以及室内定位漂移导致地理索引错位的问题

Benefits of technology

[0016]本发明具有以下有益效果:首先,采集器为各端口编号生成随时间展开的挑战值并驱动该端口所连接的水表的指示器输出时序应答信号,现场终端经拍摄与还原,将与挑战值相符的水表确定为该端口编号所连接的水表,使端口编号由被动的登记标号转变为由所连水表主动表达的物理信号,从而在安装现场即可自动核验端口编号、水表标识与影像存证之间的对应关系,可当场发现接线串错,并使旧照片或他处照片因不携带当次下发的时序应答信号而被自然排除,提升了对应关系的准确性与防伪性;其次,采用希尔伯特曲线将地理坐标映射为一维索引键并统一组织水表地理索引与影像存证存储结构,使地理位置相邻的水表在两套结构中相邻聚拢,按位置检索与完整性校验落于同一局部,减少了重复维护并提升了检索与核验效率;此外,利用端口编号连续的水表在现场相互邻近这一关系作为约束,对坐标偏离所属端口分组的待纠偏水表依据同组其余水表的坐标予以纠正,仅需一次重新确定一维索引键即可同步更新两套结构,从而在不依赖高精度定位的前提下抑制了坐标漂移导致的索引错位,并保持各水表位置的相互区别。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122570786A_ABST
    Figure CN122570786A_ABST
Patent Text Reader

Abstract

This invention relates to the field of data processing technology, specifically to a method for associating water meter geographic indexes based on collector port numbers and image evidence. The water meter is equipped with an indicator that can be driven by the collector via a communication link. The method includes: Step 1, the collector generates a challenge value for each port number and drives the indicator of the connected water meter to output a time-series response signal; a field terminal captures and stores the image evidence and reconstructs the time-series response signal; the water meter matching the challenge value is identified as the water meter connected to the port number, establishing a binding relationship between the port number, water meter identifier, and image evidence; Step 2, a Hilbert curve is used to map the geographic coordinates into a one-dimensional index key; Step 3, water meters with consecutive port numbers are grouped into the same port group, and the coordinates of the water meter to be corrected are updated based on the coordinates of the other water meters in the same group, and its index position is updated synchronously. This invention improves the accuracy and anti-counterfeiting properties of the correspondence, facilitating retrieval and integrity verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data processing technology, specifically relating to a method for associating water meter geographic indexes based on collector port numbers and image evidence storage. Background Technology

[0002] With the widespread adoption of smart water meters and remote meter reading, data collectors typically connect to multiple nearby water meters via various ports, taking photos of the meters during installation and maintenance as visual evidence for future verification. To support rapid retrieval of water meters based on geographical location, current technologies often organize the latitude and longitude of the water meters using Geohash encoding or spatial indexes such as quadtrees or R-trees. To prevent image tampering, hash values ​​are often calculated for the images, or timestamps are added for storage.

[0003] However, the current practice for matching port numbers with actual water meters relies primarily on manual registration of port and meter numbers by installers. A row of similar-looking water meters is prone to incorrect port connections or registration, and such errors are difficult to detect afterward. Similarly, there is a lack of automatically verifiable link between captured image evidence and port numbers, making it difficult for the system to detect misuse of previously stored or other photographs. Furthermore, the water meter geographic index and image evidence are often established and maintained separately, easily becoming out of sync when water meters are added, deleted, or modified, requiring repeated maintenance of the same location information. Moreover, water meters are often installed in meter wells, pipe rooms, basements, or corridors, where satellite positioning signals are often obstructed, drifting, or even lost. This results in water meters belonging to the same building being scattered across the index, impacting retrieval efficiency.

[0004] Therefore, how to establish an accurate and tamper-proof association between port number, image evidence, and geographic location, and how to ensure that geographic index and image evidence are consistent and coordinated, remains an urgent problem to be solved in this field. Summary of the Invention

[0005] The main objective of this invention is to provide a method for associating water meter geographic indexes based on collector port numbers and image evidence, in order to solve the problems in the prior art where the correspondence between port numbers and on-site water meters relies on manual registration, which is prone to errors and difficult to verify; image evidence is easily misused; water meter geographic indexes and image evidence are maintained separately, which easily leads to loss of synchronization; and indoor positioning drift causes geographic index misalignment.

[0006] To solve the above problems, the technical solution of the present invention is implemented as follows: Based on the water meter geographic index association method using collector port number and image evidence storage, the water meter is equipped with an indicator that can be driven by the collector via a communication link, including: Step 1: For each port number, the collector generates a challenge value. The indicator of the water meter connected to the port number is driven by the communication link to output a timing response signal according to the challenge value. The on-site terminal captures and stores the image evidence and restores the timing response signal from the image evidence. The water meter whose restored timing response signal matches the challenge value is identified as the water meter connected to the port number, and the binding relationship between the port number, water meter identifier and image evidence is established. Step 2: Obtain the geographic coordinates of each water meter, use Hilbert curves to map the geographic coordinates to one-dimensional index keys, establish a geographic index of the water meters according to the one-dimensional index keys, and establish an image evidence storage structure according to the arrangement order of the one-dimensional index keys, so that the geographic index of the water meters and the image evidence storage structure are uniformly organized by the same one-dimensional index keys. Step 3: Group multiple water meters with consecutive port numbers on the same collector into the same port group. Use the same port group as a cluster with mutually connected constraints in the constraint clustering. Identify water meters whose geographical coordinates are closer to other port groups than their own port group as water meters to be corrected. Update the geographical coordinates of the water meters to be corrected based on the geographical coordinates of the other water meters in their own port group. Re-determine the one-dimensional index key of the water meters to be corrected based on the updated geographical coordinates. Synchronously update the position of the water meters to be corrected in the water meter geographical index and image evidence storage structure with the re-determined one-dimensional index key.

[0007] Furthermore, the challenge value is a sequence of states arranged chronologically. The state sequence consists of several lit states and several off states. Each lit state and each off state lasts for a preset duration. The lit state is when the indicator is lit, and the off state is when the indicator stops lighting up. The collector generates a unique challenge value for each port number on the same collector. In step 1, the collector selects the water meters connected to the port numbers one by one. When selecting a port number, it sends a selection notification for the port number to the field terminal and encodes the challenge value corresponding to the port number into a display command. The display command is sent to the selected water meter through the communication link, so that the indicator of the selected water meter shows the lit state and the off state in sequence according to the lit-off order and duration specified by the challenge value, as the output timing response signal.

[0008] Furthermore, in step 1, after receiving the selection notification of the port number, the field terminal captures images of the water meter installation area and takes continuous pictures. The frame interval of the continuous pictures is shorter than the duration of each state in the state sequence, so that each lit state and each extinguished state in the state sequence is recorded by at least one frame of image, resulting in a continuous multi-frame image that records the indicator lighting and extinguishing process and contains multiple water meters. The image evidence is stored as a continuous multi-frame image. In the continuous multi-frame image, the field terminal selects the image areas where the brightness alternately increases and decreases between all frames as candidate indicator areas. The brightness of each candidate indicator area is extracted frame by frame. The midpoint between the maximum and minimum brightness values ​​of the candidate indicator area in all frames is used as the brightness threshold of the candidate indicator area. Frames with brightness higher than the brightness threshold are determined to be lit states, and frames with brightness lower than the brightness threshold are determined to be extinguished states. The same states in the continuous multi-frame images are merged according to the duration of each state to form a state sequence with the same form as the challenge value, which is used as the timing response signal reconstructed from the candidate indicator areas.

[0009] Furthermore, in step 1, the field terminal determines the image area where the indicator is located by selecting the candidate indicator area that satisfies the following three conditions: the restored timing response signal and the challenge value are the same in terms of the number of states, the order of on / off states, and the correspondence of the duration of each state. The water meter where the indicator is located is determined to be the water meter connected to the port number, and the timing response signal restored from the candidate indicator area is used as the timing response signal of the water meter connected to the port number.

[0010] Furthermore, the water meter identification includes at least one of the following: water meter number, QR code, barcode, and electronic identification. The water meter identification is read or identified by the field terminal. In step 1, the field terminal records and compiles the port number, water meter identification, image evidence, and restored timing response signal into a binding relationship table. When the field terminal receives the selection notification for the subsequent port number, it repeats the process of shooting, restoring, and confirming in step 1 for the water meter connected to the subsequent port number to obtain the binding relationship between all port numbers on the collector, water meters, and image evidence.

[0011] Furthermore, in step 2, according to the pre-set number of levels, the coverage area of ​​the geographic coordinates of all water meters is divided equally along the longitude and latitude directions, so that the number of divisions in the longitude direction is equal to the number of divisions in the latitude direction and both are integer powers of 2, resulting in a raster matrix with an equal number of rows and columns. The longitude value of each water meter is mapped to a raster column number according to its relative position within the longitude range of the coverage area, and the latitude value of each water meter is mapped to a raster row number according to its relative position within the latitude range of the coverage area. At each level, the order of accessing each quadrant at each level is determined according to the quadrant access order of the Hilbert curve and the directional rotation rules between levels, recursively up to the last level, assigning continuously increasing numbers to all rasters along the Hilbert curve, and using the number of the raster into which each water meter falls as the one-dimensional index key of each water meter.

[0012] Furthermore, in step 2, when multiple water meters fall into the same grid and have the same one-dimensional index key, the water meter identifier is used as the secondary sorting basis to uniquely determine the arrangement of water meters with the same one-dimensional index key; all water meters are arranged in ascending order according to the one-dimensional index key, and organized into a water meter geographic index that supports the range of a given one-dimensional index key and returns all water meters within that range, so that water meters with adjacent one-dimensional index keys are stored adjacently in the water meter geographic index, and the retrieval of a given geographic range is transformed into the retrieval of a continuous interval of the one-dimensional index key.

[0013] Furthermore, in step 2, the order of each leaf is determined according to the same one-dimensional index key as the water meter geographic index. The image evidence of each water meter, along with the fixed-length summary value obtained by the image evidence of all images according to the pre-set summary algorithm, is used as the leaf corresponding to each water meter. Starting from the leaf of the last layer, two adjacent leaves are merged into one parent node. The summary value of the merged child node is calculated again as the summary value of the parent node. For layers with an odd number of nodes, the last node is directly promoted to the next layer to participate in the next merging. The merging is carried out layer by layer until a root node is generated, resulting in the image evidence storage structure. The summary value of the root node is used as the integrity verification value of the image evidence storage structure. After the water meter is retrieved by the water meter geographic index according to the continuous interval of the given one-dimensional index key, the summary values ​​of each node are recalculated and compared along the image evidence storage structure from the leaf corresponding to the water meter to the root node to verify the integrity of the water meter image evidence.

[0014] Furthermore, the port numbers of the data collector are configured according to the installation location sequence of the water meters, so that water meters with consecutive port numbers are adjacent within the installation area. In step 3, multiple water meters with consecutive port numbers are grouped into the same port group according to the pre-set port group length, and all water meters in the same port group are set to be mutually connected. The number of clusters in the constraint clustering is equal to the number of port groups. For each port group, the average of the geographical coordinates of all water meters in the port group is taken to obtain the group center point of the port group. For each water meter, the distance from the geographical coordinates of the water meter to the group center point of all port groups is calculated. Among the group center points of all port groups, the group center point closest to the geographical coordinates of the water meter is determined. When the group center point closest to the geographical coordinates of the water meter is the group center point of the port group to which the water meter belongs, the water meter is set as a maintaining water meter. When the group center point closest to the geographical coordinates of the water meter is the group center point of another port group, the water meter is set as a water meter to be corrected.

[0015] Furthermore, in step 3, for each water meter to be corrected within each port group, the water meter whose port number is less than and closest to the port number of the water meter to be corrected is identified as the pre-reference water meter, and the water meter whose port number is greater than and closest to the port number of the water meter to be corrected is identified as the post-reference water meter. When both pre-reference and post-reference water meters exist for the water meter to be corrected, the line connecting the geographical coordinates of the pre-reference and post-reference water meters is divided equally, such that the number of equal segments is one more than the number of port numbers between the pre-reference and post-reference water meters. The points on the line between the pre-reference and post-reference water meters are then assigned to the port numbers between the pre-reference and post-reference water meters in ascending order of port number, and the geographical coordinates of the water meter to be corrected are updated to be relative to the port number of the water meter to be corrected. The coordinates of the corresponding equal division points are used to ensure that the geographical coordinates of each water meter within the same port group remain distinct. When the water meter to be corrected has only one of the previous and subsequent reference water meters, or when the number of water meters in the port group to which the water meter to be corrected belongs is 0, the water meter to be corrected is marked as a manually checked water meter and its original geographical coordinates are retained. For each water meter whose geographical coordinates have been updated, the one-dimensional index key of the water meter to be corrected is re-determined based on the updated geographical coordinates of the water meter according to the method of mapping geographical coordinates to one-dimensional index keys in step 2. The storage location of the water meter to be corrected in the water meter geographical index and the position of the corresponding leaf in the image evidence storage structure of the water meter to be corrected are updated synchronously with the re-determined one-dimensional index key. The updated water meter geographical index, the updated image evidence storage structure, and all port numbers on the collector, as well as the binding relationship between the water meter and the image evidence, are output.

[0016] This invention has the following beneficial effects: First, the data collector generates a challenge value that unfolds over time for each port number and drives the indicator of the water meter connected to that port to output a timing response signal. The on-site terminal, after capturing and restoring the image, identifies the water meter matching the challenge value as the water meter connected to that port number. This transforms the port number from a passive registration label into a physical signal actively expressed by the connected water meter. Thus, the correspondence between the port number, water meter identification, and image evidence can be automatically verified on-site. Wiring errors can be detected immediately, and old photos or photos from other locations are naturally excluded because they do not carry the timing response signal issued in this instance, improving the accuracy and anti-counterfeiting properties of the correspondence. Second, the use of Hill... The Bert curve maps geographic coordinates to a one-dimensional index key and unifies the organization of water meter geographic index and image evidence storage structure. This allows geographically adjacent water meters to be clustered together in both structures, and location retrieval and integrity verification fall into the same local area, reducing redundant maintenance and improving retrieval and verification efficiency. In addition, by using the relationship that water meters with consecutive port numbers are adjacent to each other on site as a constraint, water meters whose coordinates deviate from their respective port groups are corrected based on the coordinates of other water meters in the same group. Only one re-determination of the one-dimensional index key is needed to synchronously update both structures, thereby suppressing index misalignment caused by coordinate drift without relying on high-precision positioning, and maintaining the mutual distinction of the positions of each water meter. Attached Figure Description

[0017] Figure 1 This is a schematic diagram illustrating the principle of the response binding between the port number and the water meter provided in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the principle of a unified organization of water meter geographic index and image evidence storage structure based on Hilbert curves, provided in an embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the principle of equal-division interpolation correction of the geographic coordinates of the water meter to be corrected based on port grouping constraint clustering, as provided in an embodiment of the present invention. Detailed Implementation

[0018] Based on the water meter geographic index association method using collector port number and image evidence storage, the water meter is equipped with an indicator that can be driven by the collector via a communication link, including: Step 1: For each port number, the collector generates a challenge value. The indicator of the water meter connected to the port number is driven by the communication link to output a timing response signal according to the challenge value. The on-site terminal captures and stores the image evidence and restores the timing response signal from the image evidence. The water meter whose restored timing response signal matches the challenge value is identified as the water meter connected to the port number, and the binding relationship between the port number, water meter identifier and image evidence is established. Step 2: Obtain the geographic coordinates of each water meter, use Hilbert curves to map the geographic coordinates to one-dimensional index keys, establish a geographic index of the water meters according to the one-dimensional index keys, and establish an image evidence storage structure according to the arrangement order of the one-dimensional index keys, so that the geographic index of the water meters and the image evidence storage structure are uniformly organized by the same one-dimensional index keys. See Figure 1 , Figure 1 This is a schematic diagram illustrating the principle of response binding between port numbers and water meters. (For example...) Figure 1 As shown, multiple ports of the data collector are connected to multiple water meters installed on the riser via cables. The currently selected port drives the indicator of the water meter connected to it to flash a timing response signal via the communication link. The camera of the field terminal is aimed at the installation area of ​​the water meter to take continuous pictures. Figure 1 The upper part shows the timing response signal as a waveform, which consists of alternating on and off states for a preset duration. The following section combines... Figure 1 The implementation process of step 1 will be explained.

[0019] Step 3: Group multiple water meters with consecutive port numbers on the same collector into the same port group. Use the same port group as a cluster with mutually connected constraints in the constraint clustering. Identify water meters whose geographical coordinates are closer to other port groups than their own port group as water meters to be corrected. Update the geographical coordinates of the water meters to be corrected based on the geographical coordinates of the other water meters in their own port group. Re-determine the one-dimensional index key of the water meters to be corrected based on the updated geographical coordinates. Synchronously update the position of the water meters to be corrected in the water meter geographical index and image evidence storage structure with the re-determined one-dimensional index key.

[0020] At water meter installation sites, data collectors typically connect to multiple nearby water meters via various ports, each port being uniquely identified by a port number within the collector. To establish a verifiable correspondence between port numbers and actual water meters on-site, the collector generates a challenge value for each port number at the start of an installation or inspection session. This challenge value is not a static label but rather a sequence of light and dark states that unfolds over time, consisting of several alternating on and off states, each lasting for a pre-defined duration. For example, a challenge value can contain 12 states, with on and off states alternating, and each state's duration taking values ​​from two ranges: approximately 200 milliseconds for short states and approximately 400 milliseconds for long states. Simultaneously utilizing both the order of the states and the duration of each state to carry information significantly expands the range of challenge value values: if the number of states in the state sequence is denoted as... The number of duration increments available for each state is denoted as follows: The number of distinguishable duration patterns is approximately .when , At that time, the number was approximately 4096, far exceeding the number of ports on a single data collector (commonly 16 to 128). This allowed for the assignment of distinct challenge values ​​to the port numbers on the same data collector. Furthermore, occasional light and dark disturbances in the field environment (such as pedestrians obscuring projections, glass reflections, and flickering of other lights) made it extremely difficult to precisely reproduce a pattern for a certain duration. This characteristic played a crucial role in subsequent identification.

[0021] The data collector then encodes the challenge value corresponding to the port number into a display command, which is sent to the selected water meter via the communication link between the port number and the water meter. The communication link can be an M-Bus bus or an RS-485 bus, with typical baud rates of 2400 or 9600. Upon receiving the display command, the water meter's indicator sequentially enters an on / off state according to the order and duration specified by the challenge value: the on state corresponds to the indicator illuminating, and the off state corresponds to the indicator stopping illuminating. The key to this step is that only water meters electrically connected to the port will respond to the display command and display the corresponding pattern; even if a row of identical-looking water meters are arranged on-site, only the correctly connected water meters will respond. Thus, the port number is transformed from a passive textual label in the ledger into a physical signal that can be actively expressed by the water meter connected to that port, thereby becoming the basis for automatically and reliably determining the corresponding relationship.

[0022] Simultaneously, upon receiving the strobe notification for the port number, the on-site terminal captures and continuously photographs the installation area of ​​the water meter. The frame rate needs to match the duration of the status update: Let the frame interval (the time interval between two adjacent frames) for continuous shooting be... The duration of the shortest state in the state sequence of the challenge value is... The goal is that each state should be sampled at least a certain number of frames. Then it should be made In the example, the camera captures at 30 frames per second, with a frame interval of approximately 33 milliseconds. The shortest state takes 200 milliseconds, so each state is recorded in approximately 6 frames, satisfying the requirement of... The requirement is that the frame interval be shorter than the duration of the shortest state to prevent a brief state from falling exactly between two adjacent frames and being missed in the whole process. If a missed state occurs, the reconstructed state sequence will have gaps or misalignments, resulting in failure to match the challenge value. Therefore, this oversampling condition is a prerequisite for fully capturing timing information.

[0023] After obtaining multiple consecutive frames of images containing various water meters and recording the indicator's on / off process, the on-site terminal first locates the indicator in the images and then reads its flashing content. Location does not rely on manual identification but rather on the temporal characteristics of the flashing itself: the brightness of each image region is examined across frames, and regions where brightness repeatedly increases and decreases over time are selected as candidate indicator regions. To eliminate minor fluctuations caused by texture and noise, an amplitude condition can be added, requiring the brightness range (i.e., the difference between the maximum and minimum brightness values) of the candidate indicator region across all frames to reach a certain amplitude, for example, not less than 60 in the grayscale range of 0 to 255. Regions below this amplitude are considered background and omitted.

[0024] For each candidate indicator region, the brightness is extracted frame by frame, and a binary judgment is made between on and off states. The brightness threshold used for the judgment is the median value between the maximum and minimum brightness values ​​of that region across all frames. ,in The brightness threshold for this candidate indicator area. and These represent the maximum and minimum brightness values ​​of the candidate indicator region across all frames; brightness values ​​higher than... The frame is judged as being in a lit state, with a brightness lower than [the specified value]. The frame is judged to be in an off state. The median value between the maximum and minimum values ​​is used instead of a fixed grayscale threshold because: the ambient light levels vary greatly in different manholes and corridors, and the absolute brightness of the same model indicator differs significantly under strong light and dim light. A fixed threshold may become ineffective after changing the location or time period; the median value adapts to the brightness range of the area itself, and only the relative change in brightness is considered, thus it can stably distinguish between luminous and non-luminous states without the need for field-by-field calibration. After completing the frame-by-frame discrimination, several frames that are consecutive in time and have the same state are merged into one state according to their duration, and then arranged in chronological order to form a state sequence with the same form as the challenge value, which serves as the time-series response signal reconstructed for the candidate indicator area.

[0025] Next, we proceed with identification and confirmation. There may be more than one area in the image where the brightness changes; for example, water meters at adjacent ports might be activated almost simultaneously, or water meters connected to nearby collectors might also be flashing. Therefore, we don't directly identify the area with the most drastic change as the target. Instead, within each candidate indicator area, we check the consistency of the reconstructed timing response signal with the challenge value corresponding to that port number in three aspects: whether the number of states is the same, whether the order of lighting up and turning off is the same, and whether the duration of each state corresponds. The duration check allows for a certain tolerance to accommodate shooting shake and merging errors: for the first... Each state requires... ,in This is the state's index in the sequence. The first of the restored timing response signals The duration of each state. For the corresponding number in the challenge value The duration specified for each state To allow for a relative deviation, an example of 0.2 is used. Only when all three aspects are met is the candidate indicator area considered the target, and the water meter located in the candidate indicator area identified as the water meter connected to that port number. The judgment criterion is "matching the challenge value" rather than simply selecting the brightest or most changing area. This is because the former anchors the verification to the pattern newly issued by the data collector on-site and specific to that port: any photos from other locations, previously taken and stored old photos, or even the on / off status of another water meter on-site do not carry this real-time pattern and are therefore eliminated in the comparison process; connection errors will also be exposed as a result: if a water meter that should be connected to this port is mistakenly connected to another port during installation, the corresponding pattern will be displayed by another water meter, and the verification result will be inconsistent with the on-site markings.

[0026] After confirming the correspondence, the on-site terminal reads or identifies the water meter identifier of the selected water meter. This identifier can be obtained from the water meter number, QR code, barcode on the water meter nameplate, or an electronic identifier built into the water meter. Subsequently, a binding relationship is established between the port number, the water meter identifier, and the image evidence obtained during the capture, and these three are recorded. To enhance the evidentiary value, the recording time, the record of the challenge value issued by the data acquisition device, and the summary value obtained from the image evidence content can also be saved during the recording. In some implementations, a digital signature and a trusted timestamp can be added to the above records to form a traceable and tamper-proof closed loop of "which water meter, which port it is connected to, when it was captured, and which terminal captured the image".

[0027] There are several alternative implementations for the above process. The indicator can be a light-emitting diode, an LCD screen displaying digital segment codes, or a backlit display window. When using an indicator that can display multiple brightness levels or variable colors (e.g., red, green, and blue), a single state is no longer limited to on and off, but can carry more information through brightness levels or colors, thereby transmitting the same length of challenge value in a shorter time. The way the challenge value is carried is also expanded from the duration of on and off to a brightness sequence or color sequence. When locating candidate indicator regions, in addition to relying on the temporal fluctuations of brightness, the indicator position can be determined first using trained target detection before decoding, or the characteristic frequency corresponding to the flicker can be detected in the frequency domain. In addition to taking the median value between the maximum and minimum values, the threshold for binary discrimination can also be determined adaptively according to the intra-frame brightness distribution, or the state boundary can be defined by detecting the transition edge of the time derivative of brightness. In addition to comparing relative deviations as described above, time verification can also employ dynamic time warping to align the restored sequence with the challenge value sequence before assessing the degree of agreement, thus better accommodating non-uniform time distortion during the shooting process. Communication links can be wired (M-Bus, RS-485), or wireless (LoRa, NB-IoT, etc.). The shooting device can be a smartphone camera or a dedicated handheld terminal; when using a rolling shutter camera, the duration of each state can be appropriately extended (e.g., not less than 300 milliseconds) to avoid misinterpreting bright and dark stripes caused by line-by-line exposure as state transitions. To further improve efficiency, the data acquisition unit can simultaneously assign orthogonal challenge values ​​to multiple ports on the same device and drive them together, enabling the on-site terminal to simultaneously restore and confirm the correspondence of multiple water meters in a single continuous shooting, thereby merging port-by-port verification into a single batch verification.

[0028] After step 1, each port number on the data collector has been associated with a local water meter and its image storage. To enable rapid location-based searching and real-time verification of image storage for a particular water meter in a large-scale water meter scenario, two structures are typically required: a spatial index and a tamper-proof evidence structure. If two separate structures are established using different keys, they are prone to synchronization issues due to additions, deletions, and modifications, and the same location information needs to be maintained twice. This embodiment uses a shared index key for both structures. First, the geographic coordinates of each water meter are mapped to a one-dimensional index key. Then, both the water meter geographic index and the image storage structure are arranged according to this one-dimensional index key, thus maintaining alignment.

[0029] First, obtain the geographic coordinates of each water meter. Geographic coordinates include longitude and latitude values, which can be collected by the on-site terminal during the confirmation of correspondence, or supplemented later from surveying data. The smallest rectangular area spanned by the geographic coordinates of all water meters is taken as the coverage area, with one value interval in both the longitude and latitude directions. Next, the coverage area is regularized into a square grid matrix: according to a pre-defined number of levels. Divide into longitude and latitude directions respectively. Divide into equal parts, resulting in a sheet with a total of 10 rows and 10 columns. The raster matrix, where The number of grid levels determines the level of detail in the grid. Which grid a water meter falls into is determined by the relative position of its longitude and latitude values ​​within the coverage area. In the formula This refers to the grid column number where the water meter falls. For raster row numbers; This is the longitude value of the water meter. This is the latitude value of the water meter; , The minimum and maximum longitude values ​​of the covered area in the longitude direction. , The minimum and maximum latitude values ​​of the covered area in the latitudinal direction; This indicates rounding down to the nearest integer, meaning taking the largest integer not exceeding the value within the parentheses. When the water meter's longitude value equals the maximum longitude value or the latitude value equals the maximum latitude value, the grid column number or grid row number calculated using the above formula will reach... They are all categorized into the maximum available value. The reason for using "relative position plus rounding" instead of directly using the raw latitude and longitude values ​​is that the coverage areas of different cities and regions vary greatly, and the original latitude and longitude units also differ. Normalizing before placing into a grid can unify coverage areas of any size and location into the same set of values ​​from 0 to... The integer row and column numbers are used, and the subsequent curve encoding and indexing are independent of the specific site. For example, if the coverage area spans approximately 10,000 meters east-west and north-south, then... The grid matrix is ​​65536 rows by 65536 columns, and the side length of a single grid is about 0.15 meters, which is sufficient to distinguish two adjacent water meters into different grids.

[0030] See Figure 2 , Figure 2 This is a schematic diagram illustrating the principle of a unified organization of water meter geographic indexes and image evidence storage structures based on Hilbert curves. Figure 2As shown, the coverage area is divided into a grid matrix with an equal number of rows and columns. A continuous Hilbert curve passes through all the grids in sequence and assigns a one-dimensional index key to each grid in ascending order. Each water meter takes the number of the grid it falls on as its one-dimensional index key. Figure 2 The geographic query range marked by the dashed box corresponds to several consecutive one-dimensional index key intervals. Therefore, searching this range only requires scanning these consecutive intervals.

[0031] The choice of a square with sides that are powers of 2 as the grid matrix is ​​not arbitrary, but a prerequisite for the recursive generation of the Hilbert curve. The Hilbert curve is a continuous polygonal line that passes through all grid cells, where adjacent grid cells are always adjacent on the plane. Its generation process is top-down recursion: the coarsest layer treats the grid matrix as a 2x2 quadrant, visiting them sequentially in a U-shaped order: entering from the lower left quadrant, passing through the upper left and upper right quadrants, and finally reaching the lower right quadrant. Within each quadrant, the same U-shaped order is used, mirrored or rotated according to directional rotation rules, so that the exit of the polygonal line in the previous quadrant connects to the entrance of the polygonal line in the next quadrant, and so on recursively until the final level of individual grid cells. All grid cells are numbered consecutively from 0 along this curve, and the order in which a grid cell is visited serves as the one-dimensional index key for the water meter falling within it.

[0032] Specifically, in a computable form, let the grid column number be... With grid row number All with Bitwise binary representation, processed layer by layer from the most significant bit to the least significant bit, one-dimensional index key. Accumulate using the following formula: ;in This is the one-dimensional index key of the raster, i.e., its access sequence number on the Hilbert curve; The hierarchy number, starting from the coarsest level. Decrease to the finest layer 0; For the first The quadrant code determined by the layer indicates which of the four quadrants the current location is in; , These are the corresponding binary bits of the raster column number and raster row number after the orientation rotation rule adjustment for this layer, with values ​​of 0 or 1; Indicates bitwise XOR operation; coefficient It is the first The number of grid cells in each quadrant of a layer is used to scale the selection of higher-level quadrants to the correct order. Quadrant encoding is... Just right for , , , The four quadrants are numbered 0, 1, 2, and 3, which is consistent with the U-shaped access order mentioned above. The direction rotation rule transforms the lower-level coordinates after each level is determined: when At that time, if First, flip the column and row coordinates of the current layer and the lower layers (i.e., subtract the current value from the maximum available value in the sub-range), and then swap the column and row coordinates. This step ensures that the U-shaped polyline of the next finer layer is oriented with the endpoints connected end to end, thus maintaining the continuity of the entire curve.

[0033] The key reason for choosing the Hilbert curve over simple row-by-row numbering lies in its preservation of proximity. With row-by-row scanning, the last cell in a row is adjacent to the first cell in the next row in terms of numbering, but they are separated by the width of a row on the plane. If an index is built based on this, two geographically adjacent water meters might receive vastly different numbers, while two numbered adjacent water meters might be spatially far apart. Because the Hilbert curve never jumps, adjacent cells on the plane are also roughly adjacent in one-dimensional order, and cells adjacent in one-dimensional order are always adjacent on the plane. The direct effect of this is that a rectangular geographical area corresponds to only a few consecutive intervals on the one-dimensional index key, so range queries only need to scan these consecutive intervals. Similarly, geographically concentrated water meters in an image evidence storage structure will fall under the same subtree, and verifying or retrieving a certain area only touches a part of the structure.

[0034] After obtaining the one-dimensional index key of each water meter, the water meter geographic index arranges all water meters in ascending order of their one-dimensional index keys, ensuring that water meters with adjacent one-dimensional index keys are stored adjacently in the index. It also supports returning all water meters falling within a given continuous interval of one-dimensional index keys. In terms of data organization, a B+ tree can be used with the one-dimensional index key as the key, or a UB tree can be directly embedded with the one-dimensional index key as the primary key. Alternatively, an array sorted by one-dimensional index keys can be used in conjunction with binary search. When multiple water meters fall into the same grid, these water meters will receive the same one-dimensional index key, and the arrangement order will no longer be unique. This will lead to uncertainty in the order of leaves in the image evidence storage structure. If the leaf order is different each time it is constructed, the recalculated results during integrity verification will not be comparable to the previously saved results. Therefore, a secondary sorting criterion is introduced: for water meters with the same one-dimensional index key, the order is further determined by the water meter identifier in ascending order, ensuring that the arrangement of any group of water meters with the same key is uniquely determined, and the leaf order can thus be reproduced. When performing a query on a rectangular geographic area, the grid cells covered by the rectangle can first be grouped into several continuous one-dimensional index key intervals along the Hilbert curve. Then, the water meter geographic index can be retrieved segment by segment and summarized. For example, a neighborhood spanning approximately 32 by 32 grid cells can usually be grouped into several continuous intervals.

[0035] The image evidence storage structure uses a one-dimensional index key, identical to the water meter geographic index, to determine the order of each leaf. Each leaf consists of two parts: the image evidence corresponding to the water meter itself, and a summary value obtained by calculating the entire image content of that image evidence. The leaf summary value is generated using the following formula: ;in To sort by one-dimensional index key order The summary value of the leaf; For the first The complete image content of the water meter image evidence corresponding to each leaf, that is, the complete byte sequence of the continuous multi-frame image obtained in step 1. A pre-defined digest algorithm, such as SHA-256, compresses an input of arbitrary length into a fixed-length digest value. The reason for using a fixed-length digest algorithm that is highly sensitive to the input is that image evidence itself is large and varies in length; direct byte-by-byte comparison is inefficient and inconvenient to store. In contrast, the digest value has a fixed length (32 bytes for SHA-256, for example), and even a single pixel change in the original image will significantly alter the digest value. Therefore, it can sensitively indicate whether an image evidence has been altered.

[0036] Starting from the leaves at the bottom layer, merge two adjacent leaves into one parent node. The summary value of the parent node is obtained by concatenating the summary values ​​of its two child nodes and then calculating the summary again. In the formula This is the summary value of the parent node; , These are the summary values ​​of the left and right child nodes that participated in the merging, respectively; This indicates byte-by-byte concatenation, meaning the summary values ​​of the left and right child nodes are joined end-to-end and used as the input for the summary algorithm. This process of merging pairs at each level and moving upwards continues until a root node is generated. The summary value of the root node serves as the integrity verification value for the entire image evidence storage structure. During pairwise merging, if the number of nodes in a certain level is odd, the last node of that level is directly promoted to the next level and participates in the next merge along with the nodes merged from the previous level. This ensures that the entire structure remains well-defined even when the number of leaves is not a power of 2. This hierarchical structure of "re-digesting the summary" has two functions: If any image record is altered, its leaf summary value changes accordingly, and the summary values ​​of parent nodes at each level along the way change successively, ultimately reflected in the integrity check value. Therefore, comparing only one integrity check value is sufficient to detect any tampering in the entire batch of evidence. Furthermore, when verifying the image record of a single water meter, it is not necessary to recalculate the entire image; only the leaf image is taken, along with the summary values ​​of sibling nodes at each level along the path from that leaf to the root node (approximately [number missing]). indivual, The number of water meters (i.e., the number of leaves) can be recalculated layer by layer and compared with the saved value. With a water meter count of 100,000, only about 17 nodes need to be touched.

[0037] Thus, the water meter geographic index and the image evidence storage structure are uniformly organized using the same one-dimensional index key, with geographically adjacent water meters clustered together in both structures. This simplifies the verification process: first, the target water meter is retrieved from the water meter geographic index according to a continuous interval of the given one-dimensional index key, obtaining its position in the ranking; then, based on this position, the corresponding leaf node in the image evidence storage structure is located; from that leaf node, the summary values ​​of each node are re-evaluated and compared with the stored integrity verification value; if they match, the image evidence of the water meter is deemed complete and unaltered. Sharing the same index key and the same ranking order ensures that location-based evidence retrieval and on-site verification fall within the same local area, which is the significance of organizing the two structures on the same Hilbert curve.

[0038] This section also allows for multiple alternatives. Besides the Hilbert curve, other space-filling curves such as the Z-order curve can be used, but the latter have larger jumps at row and column carry points, resulting in poorer proximity preservation than the Hilbert curve, and range queries will be segmented into more fragments. Number of levels Values ​​can be selected between 12 and 24 based on the required resolution and bond length. Larger grids have finer grids and fewer collisions with other grids, but the range of values ​​for a one-dimensional index key is (0 to...). The larger the value, the better. The carrying structure of the water meter geographic index, besides B+ trees, UB trees, and ordered arrays, can also be placed in a key-value database that supports range queries. Secondary sorting can be based on port numbers or entry order, in addition to water meter identifiers, as long as the order of entry for water meters with the same key can be uniquely determined. For the digest algorithm, besides SHA-256, algorithms that output fixed-length digests, such as SHA-3 and BLAKE2, can be used. For the merging of the image evidence storage structure, besides binary merging, a multi-branch form can be adopted where each parent node merges a fixed number of child nodes; for odd-numbered nodes, in addition to direct promotion, the last node can be copied before participating in the merging. When further reducing verification overhead is needed, the digest values ​​of the subtrees of several geographically concentrated leaves can be pre-cached, so that a single verification of the entire area only compares the digest value at the root of that subtree.

[0039] After completing step 2, each water meter is positioned in a specific location within the water meter geographic index and image storage structure. However, the validity of these positions relies on the reliability of the geographic coordinates themselves, while on-site coordinates are often unreliable: water meters are often installed in meter wells, pipe rooms, basements, or deep within stairwells, where satellite positioning signals are blocked by building structures and pipe walls, resulting in missing or drifted longitude and latitude values ​​by tens of meters. Indexes based solely on such coordinate arrangements easily scatter water meters belonging to the same building to distant locations, affecting the compactness of the range retrieval and causing leaves in the same area within the image storage structure to become scattered. Step 3 addresses this problem by finding a more reliable basis independent of satellite positioning to correct obviously misaligned coordinates.

[0040] This principle is reflected in the wiring method of the data collector. When installing water meters, workers connect adjacent water meters sequentially to adjacent ports on the data collector along the same riser, meter box, or laying path. Therefore, the continuity of port numbers itself records the arrangement order of the water meters on site and their proximity. Based on this, according to a pre-set port grouping length, several water meters with consecutive port numbers on the same data collector are grouped into the same port group. For example, if the port grouping length is 8, then water meters with port numbers 1 to 8 are grouped into one port group, those with port numbers 9 to 16 into the next, and so on. All water meters within the same port group are usually clustered together on site because their port numbers are consecutive, with a distance of no more than a few meters between them. This "must be adjacent" relationship is applied as a constraint to the constrained clustering, and each port group corresponds to one cluster in the constrained clustering, with the number of clusters equal to the number of port groups. Instead of rediscovering clusters, clusters are determined directly based on reliable port topology. This is because step 1 has already verified the correspondence between port numbers and water meters in hardware through real-time comparison of challenge values ​​and timing response signals. This correspondence is far more reliable than drifting coordinates, so the coordinates should be constrained rather than depended on.

[0041] See Figure 3 , Figure 3 This is a schematic diagram illustrating the principle of port-based grouping constraint clustering for equal-division interpolation correction of the geographic coordinates of the water meter to be corrected. (Example) Figure 3 As shown, water meters with consecutive port numbers form two port groups, each with a group center point. One water meter belonging to this port group is identified as the water meter to be corrected because its geographical coordinates are closer to the group center point of the other port groups. Within this port group, the front and rear reference water meters on both sides of the water meter to be corrected are selected along the port number. The line connecting the front and rear reference water meters is divided equally according to the number of port numbers. The water meter to be corrected is then corrected to the equally divided point corresponding to its port number. The following is combined with... Figure 3 The implementation process of step 3 will be explained.

[0042] Next, we determine whether the coordinates of each water meter match the port group to which it belongs. For each port group, we first take the arithmetic mean of the geographical coordinates of all water meters within it, and use this as the group center point: ;in This represents a port group. Port grouping The number of internal water meters Port grouping A water meter inside, , Water meters The longitude and latitude values, , Port grouping The longitude and latitude values ​​of the group center point are then calculated. Subsequently, for each water meter, the distance from its geographical coordinates to the group center point of all port groups is calculated. In the formula For water meters Geographic coordinates to port grouping The distance between the group center points; , For water meters The longitude and latitude values; , Port grouping The longitude and latitude values ​​of the grouping center point; Take the center latitude of the coverage area. This is used to convert the difference in longitude (where the east-west direction is shorter than the north-south direction) to a scale consistent with the difference in latitude, making lateral and longitudinal distances comparable. Among the group center points of all port groups, the one closest to the water meter is selected: if the nearest group center point is the group center point of the port group to which the water meter belongs, it means the coordinates match the port topology, and it is designated as a "maintaining" water meter; if the nearest group center point is the group center point of another port group, it means the water meter is spatially closer to another cluster, contradicting its port affiliation, and it is designated as a "water meter to be corrected." The judgment is based on relative distance to the center of each cluster, rather than setting an absolute distance threshold, because the density of different communities and meter boxes varies greatly, making absolute thresholds difficult to apply uniformly. By comparing the relative distance of the water meter to the center of each cluster, it can determine which cluster it is closer to, thus adapting to the density of each port group.

[0043] After identifying the water meter to be corrected, it is not simply moved to the center point of the current port group. If a group of water meters to be corrected were all placed at the same center point, their coordinates would overlap, the actual positional differences between the meters would disappear, the index would lose its discriminative power, and a large number of meters might even fall into the same grid. A more reliable approach is to use interpolation based on the continuity of port numbers. Specifically, within the port group to which the water meter to be corrected belongs, the nearest and reliable retaining water meters on both sides along the port number direction are found: the retaining water meter with a port number less than that of the water meter to be corrected and the closest one is taken as the previous reference water meter, and the retaining water meter with a port number greater than that of the water meter to be corrected and the closest one is taken as the next reference water meter. Connect the geographical coordinates of the previous and subsequent reference water meters with a line segment. Divide the line segment into equal parts by adding one to the number of port numbers separating the two reference water meters. That is, let the number of segments equal the number of port numbers of the subsequent reference water meter minus the number of port numbers of the previous reference water meter. Thus, each point on the line segment between the two reference water meters corresponds one-to-one with each port number separating the two reference water meters. Then, update the coordinates of the water meter to be corrected to the coordinates of the points corresponding to its port numbers. The calculation method is as follows: ;in The port number of the water meter to be corrected; , These are the port numbers of the front and rear reference water meters, respectively, and they satisfy the following conditions: ; , The longitude and latitude values ​​of the previous reference water meter. , The longitude and latitude values ​​of the subsequent reference water meter; , The ratio of the updated longitude and latitude values ​​of the water meter to be corrected. This indicates the relative position of the port number of the water meter to be corrected between the port numbers of the preceding and following reference water meters, with a value between 0 and 1. For example, if the port number of the preceding reference water meter is 3 and the port number of the following reference water meter is 7, then the line segment is divided into 4 segments. The three water meters to be corrected, with port numbers 4, 5, and 6, fall at positions 1 / 4, 2 / 4, and 3 / 4 from the preceding reference water meter, respectively. Thus, the deviated coordinates are corrected to the laying path of this cluster, while water meters at adjacent ports fall at different positions, preserving their distinction. The port number is used as the interpolation reference because the wiring is sequential along the laying path, and the order of the port numbers roughly corresponds to the order in which the water meters are arranged along the laying path. The landing point obtained by proportionally interpolating the port number between two reliable anchor points best matches the actual layout on site.

[0044] Not every water meter to be corrected has a retaining water meter on both sides. If its port number is less than the port number of all retaining water meters in this port group, then a previous reference water meter is missing; if it is greater than the port number of all retaining water meters, then a subsequent reference water meter is missing; if there is no retaining water meter in the entire port group, then there is no basis on either side. In the above situations, instead of forcibly extrapolating, the water meter is marked as a manually verified water meter and its original geographical coordinates are retained for manual verification, because forcibly extrapolating when there is a lack of reliable anchor points is likely to introduce new errors.

[0045] After the coordinates are updated, the index is synchronized accordingly. This step benefits from the fact that the two structures share the same one-dimensional index key in step 2: for each water meter whose coordinates have been updated, the one-dimensional index key is recalculated based on its updated longitude and latitude values, following the same raster division and quadrant access order of the Hilbert curve in step 2. Based on this new one-dimensional index key, the water meter is first moved from its old position to the new position corresponding to the new key in the water meter geographic index, and then its corresponding leaf is moved to the same new position in the image evidence storage structure. For each leaf affected by the position change, the summary value of each parent node along the way is recalculated layer by layer from its own node upwards until the integrity check value of the root node is updated. Recalculating the one-dimensional index key once simultaneously drives the update of the retrieval structure and the evidence structure, and the two are always aligned and will not be misaligned due to this correction. After all the water meters to be corrected are updated, the updated water meter geographic index, the updated image evidence storage structure, the port number on the collector, and the binding relationship between the water meter and the image evidence are output.

[0046] This part also has several alternative implementations. Port grouping can be defined not only by a pre-set port group length, but also by meter box identification, collector branches, or a port interval configuration table, as long as water meters within the same port group are indeed adjacent on-site. When injecting port topology into constraint clustering, in addition to the hard constraint of directly defining the same port group as a cluster, graph clustering can be used where geographical distance and port group affiliation jointly determine the edges. Water meters within the same port group are set as mandatory edges, while edges between different port groups are set as non-negotiable before clustering. The determination of the water meter to be corrected can be based on "which cluster center it is closer to," or it can be examined whether the distance from the water meter to the center point of its port group exceeds a certain multiple of the distances from other water meters within the port group to the group center point, or whether most of the geographically closest water meters belong to other port groups. For coordinate correction, in addition to the equal interpolation along the port numbers mentioned above, it can be changed to taking a weighted average based on the port number intervals to the preceding and following reference water meters, or simply moving the water meter to be corrected a limited distance towards the center point of the port group instead of replacing it entirely, in order to retain more information about the original coordinates; for boundary cases where there are no single-sided reference water meters, a limited extrapolation can also be made along the direction determined by the two outermost water meters within the port group. For distance measurement, in addition to the planar distance with longitude conversion mentioned above, the great circle distance that takes into account the curvature of the Earth can also be used, or the latitude and longitude of the covered area can be projected onto a plane rectangular coordinate system and then the Euclidean distance can be taken. Judgment and correction can be performed only once, because the interpolated landing point must fall within the range of this cluster. When rejudging, these water meters have been assigned to this port group. If the port groups on site are intertwined or the coordinate noise is too large, the group center point of each port group can be recalculated and rejudged after updating the coordinates. This process can be repeated until the judgment results of the water meters and the water meters to be corrected no longer change, or until the preset number of iterations is reached.

[0047] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for associating water meter geographic indexes with collector port numbers and image evidence storage, characterized in that, The water meter is equipped with an indicator that can be driven by the data collector via a communication link, including: Step 1: For each port number, the collector generates a challenge value. The indicator of the water meter connected to the port number is driven by the communication link to output a timing response signal according to the challenge value. The on-site terminal captures and stores the image evidence and restores the timing response signal from the image evidence. The water meter whose restored timing response signal matches the challenge value is identified as the water meter connected to the port number, and the binding relationship between the port number, water meter identifier and image evidence is established. Step 2: Obtain the geographic coordinates of each water meter, use Hilbert curves to map the geographic coordinates to one-dimensional index keys, establish a geographic index of the water meters according to the one-dimensional index keys, and establish an image evidence storage structure according to the arrangement order of the one-dimensional index keys, so that the geographic index of the water meters and the image evidence storage structure are uniformly organized by the same one-dimensional index keys. Step 3: Group multiple water meters with consecutive port numbers on the same collector into the same port group. Use the same port group as a cluster with mutually connected constraints in the constraint clustering. Identify water meters whose geographical coordinates are closer to other port groups than their own port group as water meters to be corrected. Update the geographical coordinates of the water meters to be corrected based on the geographical coordinates of the other water meters in their own port group. Re-determine the one-dimensional index key of the water meters to be corrected based on the updated geographical coordinates. Synchronously update the position of the water meters to be corrected in the water meter geographical index and image evidence storage structure with the re-determined one-dimensional index key.

2. The method as described in claim 1, characterized in that, The challenge value is a sequence of states arranged chronologically. The sequence consists of several lit states and several off states, each with a preset duration. The lit state is when the indicator is lit, and the off state is when the indicator stops lighting up. The data collector generates a unique challenge value for each port number on the same data collector. In step 1, the data collector selects the water meters connected to the port numbers one by one. When selecting a port number, it sends a selection notification to the field terminal and encodes the challenge value corresponding to the port number into a display command. The display command is then sent to the selected water meter via the communication link, causing the indicator of the selected water meter to sequentially display the lit and off states according to the lit and off order and duration specified by the challenge value, serving as the output timing response signal.

3. The method as described in claim 2, characterized in that, In step 1, after receiving the selection notification of the port number, the field terminal captures images of the water meter installation area and takes continuous pictures. The frame interval of the continuous pictures is shorter than the duration of each state in the state sequence, so that each lit state and each extinguished state in the state sequence is recorded by at least one frame of image, resulting in a continuous multi-frame image that records the indicator lighting and extinguishing process and contains multiple water meters. The image evidence is stored as a continuous multi-frame image. In the continuous multi-frame image, the field terminal selects the image areas where the brightness alternately increases and decreases in all frames as candidate indicator areas. The brightness of each candidate indicator area is extracted frame by frame. The midpoint between the maximum and minimum brightness values ​​of the candidate indicator area in all frames is used as the brightness threshold of the candidate indicator area. Frames with brightness higher than the brightness threshold are determined to be lit states, and frames with brightness lower than the brightness threshold are determined to be extinguished states. The same states in the continuous multi-frame images are merged according to the duration of each state to form a state sequence with the same form as the challenge value, which is used as the timing response signal reconstructed from the candidate indicator areas.

4. The method as described in claim 3, characterized in that, In step 1, the field terminal determines the image area where the indicator is located by selecting the candidate indicator area that satisfies the following three conditions: the restored timing response signal and the challenge value are the same in terms of the number of states, the order of on / off states, and the correspondence of the duration of each state. The water meter where the indicator is located is determined to be the water meter connected to the port number, and the timing response signal restored from the candidate indicator area is used as the timing response signal of the water meter connected to the port number.

5. The method as described in claim 4, characterized in that, The water meter identification includes at least one of the following: water meter number, QR code, barcode, and electronic identification. The water meter identification is read or identified by the field terminal. In step 1, the field terminal records and compiles the port number, water meter identification, image evidence, and restored timing response signal into a binding relationship table. When the field terminal receives the selection notification for the subsequent port number, it repeats the process of shooting, restoring, and confirming in step 1 for the water meter connected to the subsequent port number to obtain the binding relationship between all port numbers on the collector, water meters, and image evidence.

6. The method as described in claim 1, characterized in that, In step 2, according to the pre-set number of levels, the coverage area of ​​all water meters' geographical coordinates is divided equally along the longitude and latitude directions, ensuring that the number of divisions along the longitude and latitude directions are equal and both are powers of 2, resulting in a raster matrix with an equal number of rows and columns. The longitude values ​​of each water meter are mapped to raster column numbers according to their relative positions within the longitude range of the coverage area, and the latitude values ​​of each water meter are mapped to raster row numbers according to their relative positions within the latitude range of the coverage area. At each level, the order of accessing each quadrant at each level is determined according to the quadrant access order of the Hilbert curve and the directional rotation rules between levels, recursively up to the last level. All raster cells are assigned continuously increasing numbers along the Hilbert curve, and the number of the raster cell in which each water meter falls is used as the one-dimensional index key for each water meter.

7. The method as described in claim 6, characterized in that, In step 2, when multiple water meters fall into the same grid and have the same one-dimensional index key, the water meter identifier is used as the secondary sorting basis to uniquely determine the arrangement of water meters with the same one-dimensional index key. All water meters are arranged in ascending order of one-dimensional index key, and organized into a water meter geographic index that returns all water meters within a given range of one-dimensional index key. This ensures that water meters with adjacent one-dimensional index keys are stored adjacently in the water meter geographic index, and transforms the retrieval of a given geographic range into the retrieval of a continuous interval of one-dimensional index key.

8. The method as described in claim 7, characterized in that, In step 2, the order of each leaf is determined according to the same one-dimensional index key as the water meter geographic index. The image evidence of each water meter, along with the fixed-length summary value obtained by the image evidence of all images, is used as the leaf corresponding to each water meter. Starting from the leaf of the last layer, two adjacent leaves are merged into one parent node. The summary value of the merged child node is calculated again and used as the summary value of the parent node. For layers with an odd number of nodes, the last node is directly promoted to the next layer to participate in the next merging. Merging is carried out layer by layer until a root node is generated, resulting in the image evidence storage structure. The summary value of the root node is used as the integrity verification value of the image evidence storage structure. After the water meter is retrieved by the water meter geographic index according to the continuous interval of the given one-dimensional index key, the summary values ​​of each node are recalculated and compared along the image evidence storage structure from the leaf corresponding to the water meter to the root node to verify the integrity of the water meter image evidence.

9. The method as described in claim 1, characterized in that, The port numbers of the collector are configured according to the installation position of the water meters, so that water meters with consecutive port numbers are adjacent in the installation area; in step 3, multiple water meters with consecutive port numbers are grouped into the same port group according to the pre-set port group length, and all water meters in the same port group are set to be mutually connected constraints, and the number of clusters in the constraint cluster is equal to the number of port groups. For each port group, the average of the geographic coordinates of all water meters within the port group is used to obtain the group center point. For each water meter, the distance from the water meter's geographic coordinates to the group center point of all port groups is calculated. Among the group center points of all port groups, the group center point closest to the water meter's geographic coordinates is determined. When the group center point closest to the water meter's geographic coordinates is the group center point of the port group to which the water meter belongs, the water meter is set as a maintaining water meter. When the group center point closest to the water meter's geographic coordinates is the group center point of another port group, the water meter is set as a water meter to be corrected.

10. The method as described in claim 9, characterized in that, In step 3, for each water meter to be corrected within each port group, the water meter whose port number is less than and closest to the port number of the water meter to be corrected is designated as the pre-reference water meter, and the water meter whose port number is greater than and closest to the port number of the water meter to be corrected is designated as the post-reference water meter. When both pre-reference and post-reference water meters exist for the water meter to be corrected, the line connecting the geographical coordinates of the pre-reference and post-reference water meters is divided equally, such that the number of equal segments is one more than the number of port numbers between the pre-reference and post-reference water meters. The points on the line between the pre-reference and post-reference water meters are then assigned to the port numbers between the pre-reference and post-reference water meters in ascending order of port number, and the geographical coordinates of the water meter to be corrected are updated to correspond to the port number of the water meter to be corrected. The coordinates of the equally divided points ensure that the geographical coordinates of each water meter within the same port group remain distinct. When the water meter to be corrected has only one of the previous and subsequent reference water meters, or when the number of water meters in the port group to which the water meter to be corrected belongs is 0, the water meter to be corrected is marked as a manually checked water meter and its original geographical coordinates are retained. For each water meter whose geographical coordinates have been updated, the one-dimensional index key of the water meter to be corrected is re-determined based on the updated geographical coordinates of the water meter, following the method of mapping geographical coordinates to one-dimensional index keys in step 2. The storage location of the water meter to be corrected in the water meter geographical index and the position of the corresponding leaf in the image evidence storage structure of the water meter to be corrected are also updated synchronously with the re-determined one-dimensional index key. The updated water meter geographical index, the updated image evidence storage structure, all port numbers on the collector, and the binding relationship between the water meter and the image evidence are output.