A multi-source perception fusion tipping bucket rain gauge method and system

CN122883293APending Publication Date: 2026-10-09CHENGDU UNIV OF INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610791271.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-03
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0008]旨在解决现有翻斗式雨量计在高雨强、外界干扰及传感器失效等复杂工况下存在的异步漏计、误触发及计量稳定性不足的问题

Benefits of technology

[0026]1、本发明采用采集层-边缘计算层-路由层的三层架构,将信号获取、数据处理与通信传输分层解耦,采集层完成原始信号的事件化输出,边缘计算层承担视觉分析、事件对齐与融合计算,路由层负责数据传输;该架构功能划分明确,便于在现有翻斗式雨量计基础上加装升级,具有良好的工程适用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122883293A_ABST
    Figure CN122883293A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of rain gauge, in particular to a multi-source perception fusion tipping bucket rain gauge method and system, aiming at solving the problems of missing and false counting of the existing tipping bucket rain gauge under high rain intensity, interference and sensor failure conditions. The system includes a collection layer, an edge computing layer and a routing layer; the collection layer converts the infrared pair tube and dry reed tube signals into unified discrete events; the edge computing layer uses the improved YOLOv8n-Pose model to detect the key points of the tipping bucket tip, extracts the visual overturning event based on the steady state interval and the boundary line, aligns the multi-source events through rain intensity adaptive time tolerance, realizes window level fusion by using D-S evidence theory, outputs the overturning times, and combines the external photoelectric rain sensor for minute scale layered decision and low confidence residual trace; the routing layer completes data uploading. The present application significantly improves the measurement reliability and environmental adaptability of the tipping bucket rain gauge under complex conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rainfall measurement technology, specifically to a tipping bucket rainfall measurement method and system based on multi-source sensing fusion. Background Technology

[0002] The tipping bucket rain gauge is a standardized precipitation measurement instrument widely used in meteorology and hydrology worldwide. It collects precipitation through a standard-diameter collection vessel, which then flows into a tipping bucket centered on a pivot. When the accumulated water reaches a preset volume, the bucket tipps due to a change in its center of gravity, simultaneously triggering a reed switch to generate a standard electrical pulse signal. This allows for the automatic observation of continuous precipitation processes by converting them into discrete electrical pulses. The instrument has a simple mechanical structure, low manufacturing cost, and is easy to maintain, making it a cornerstone of automatic weather stations and hydrological monitoring networks.

[0003] However, with the increasing frequency of extreme precipitation events due to global climate change and the higher demands placed on accurate disaster prevention and mitigation, the limitations of tipping bucket rain gauges are becoming increasingly apparent in practical applications. In actual rainfall measurement, once the amount of rain injected into the tipping bucket reaches the tipping threshold, the bucket requires a certain amount of mechanical movement time to complete one tipping and return to a stable rain-collecting state. The counting sensor can only output an electrical pulse the instant the bucket passes the trigger point, meaning the tipping bucket rain gauge cannot record the complete process of the bucket's actual tipping and reset. Under high rainfall conditions, the continuous and rapid injection of rainwater makes it easier for the metering and counting buckets to become out of sync, causing a disconnect between the actual rain-collecting process inside the bucket and the external counting signal, resulting in missed counts. Furthermore, the reed switch sensor currently used in tipping bucket rain gauges is a mechanical magnetic switch, susceptible to strong electromagnetic interference from lightning, electrical equipment, etc., leading to false pulses or malfunctions. Even minor vibrations of the bucket near the equilibrium point can be misinterpreted as valid tipping by sensitive circuits, introducing noise.

[0004] To reduce the aforementioned errors, various improvement schemes have emerged in existing technologies. A common approach is to deploy multiple traditional tipping bucket rain gauges at different locations and perform a weighted average of the observation results for the same time period. This method utilizes the spatial redundancy of multiple measuring points to improve the stability of regional rainfall estimation, but it cannot solve the problem of information loss in the internal metering link of a single tipping bucket rain gauge. If multiple tipping bucket rain gauges use the same measurement principle and similar mechanical structure, systematic errors such as rainfall intensity dependence error, mechanical underestimation, and insufficient dynamic response will not automatically disappear due to weighted averaging. In addition, multiple rain gauges significantly increase the costs of equipment purchase, installation, maintenance, and subsequent calibration, reducing the original advantages of the tipping bucket rain gauge's simple structure and low cost.

[0005] Another approach to improvement is to add auxiliary sensors to the same tipping bucket rain gauge. Existing technologies replace or supplement reed switches with optocouplers or infrared photodiodes to improve anti-interference capabilities through non-contact detection. However, these solutions still rely on discrete pulse counting, only reflecting whether a trigger has occurred, and cannot fully describe the tipping bucket's rotation process. Therefore, they cannot effectively solve the problem of asynchronous undercounting between the metering and counting buckets under high rainfall intensity. Some technologies have also attempted to introduce visual sensors, but existing visual solutions mainly use an indirect buoy water level measurement method, estimating rainfall by monitoring the buoy displacement within the tipping bucket's water tank. The visual object and detection principle are fundamentally different from directly observing the tipping bucket's rotation process, and they fail to organically integrate with multi-source information such as reed switches and infrared photodiodes.

[0006] In summary, existing tipping bucket rain gauges suffer from problems such as asynchronous missed readings, false triggering, and decreased result stability under complex operating conditions including high rainfall intensity, external interference, and sensor failure. Existing improvement methods struggle to balance metrological performance with application feasibility. Therefore, there is an urgent need for a technical solution that can improve metrological reliability under complex operating conditions by integrating multi-source sensing while maintaining the original mechanical structure of the tipping bucket rain gauge. Summary of the Invention

[0007] To address the aforementioned problems, the present invention aims to provide a multi-source sensing fusion method and system for tipping bucket rainfall measurement.

[0008] This invention aims to address the problems of asynchronous missed readings, false triggering, and insufficient metering stability in existing tipping bucket rain gauges under complex operating conditions such as high rainfall intensity, external interference, and sensor failure. The technical solution is as follows:

[0009] A tipping bucket rain gauge system with multi-source sensing fusion includes a data acquisition layer, an edge computing layer, and a routing layer;

[0010] The acquisition layer is used to acquire the output signals of two infrared phototransistors and one reed switch at a fixed sampling period. After filtering and threshold judgment, the flip events are extracted. Each event includes a timestamp, event attributes and event quality. The acquisition layer receives a unified time base from the edge computing layer through a serial port. When reporting events, it carries the local timing value, and the edge computing layer recovers the absolute time.

[0011] The edge computing layer is used for:

[0012] Receive events reported by the acquisition layer and restore the absolute time of the events based on a unified time base;

[0013] The camera captures a sequence of images of the tipping bucket, the key point detection model is used to output the position of the tipping bucket tip, and the visual flipping event is extracted based on the tip trajectory.

[0014] The event acquisition layer events and visual flip events are mapped to the same timeline, and the multi-source events are organized in a windowed manner and aligned in time through the event alignment module.

[0015] Within each time window, the window-level observation results of each channel are fused through the fusion module, and the estimated number of flips and window-level quality summary of that time window are output.

[0016] The number of flips of multiple consecutive time windows is accumulated and converted into minute-level rainfall. The reliability of minute-level rainfall is determined by combining external reference information. When the reliability is low, a logging mechanism is triggered to save minute-level rainfall records, window-level quality summaries, and video clip indexes.

[0017] The routing layer is used to receive the minute results from the edge computing layer and upload the data to a remote server.

[0018] A metering method using the multi-source sensing fusion tipping bucket rain gauge system as described in claim 1 includes the following steps:

[0019] Step 1: The acquisition layer acquires the output signals of two infrared phototransistors and one reed switch at a fixed sampling period. After filtering and threshold judgment, the flip events are extracted. Each event includes a timestamp, event attributes, and event quality.

[0020] Step 2: The edge computing layer acquires a sequence of metering bucket images through a camera, outputs the position of the tip of the bucket using a key point detection model, and extracts visual flipping events based on the tip trajectory;

[0021] Step 3: The edge computing layer restores the absolute time of the events obtained in Step 1 based on a unified time base, maps them to the same time axis as the visual flip events obtained in Step 2, and performs windowed organization and time alignment of the multi-source events through the event alignment module.

[0022] Step 4: Within each time window, the edge computing layer fuses the window-level observation results of each channel through the fusion module, and outputs the estimated number of flips for that time window and a summary of the window-level quality.

[0023] Step 5: The edge computing layer accumulates the number of flips of multiple consecutive time windows and converts them into minute-scale rainfall. It combines external reference information to determine the reliability of minute-scale rainfall and triggers a logging mechanism when the reliability is low to save minute-scale rainfall records, window-level quality summaries, and video clip indexes.

[0024] Step 6: The routing layer receives the minute results from the edge computing layer and uploads the data to the remote server.

[0025] The beneficial effects of this invention are:

[0026] 1. This invention adopts a three-layer architecture of acquisition layer - edge computing layer - routing layer, which decouples signal acquisition, data processing and communication transmission into layers. The acquisition layer completes the event-based output of the raw signal, the edge computing layer undertakes visual analysis, event alignment and fusion calculation, and the routing layer is responsible for data transmission. This architecture has a clear functional division, which is convenient for upgrading and adding to the existing tipping bucket rain gauge and has good engineering applicability.

[0027] 2. Under high rainfall conditions, traditional double-tipping bucket rain gauges suffer from significant cumulative underestimation due to the asynchronous tilting of the metering bucket and the counting bucket. This invention directly observes the tilting process of the metering bucket through a visual channel and combines infrared and reed switch multi-source information fusion to effectively compensate for the missed counts caused by asynchronous phenomena.

[0028] 3. Under the condition of dynamic changes in rainfall intensity, the cumulative error of traditional solutions is significantly amplified; the present invention can adapt to the changes in the response time difference of multi-source channels under different rainfall intensity conditions by using a windowed alignment method with adaptive time tolerance of rainfall intensity and a window-level fusion mechanism.

[0029] 4. Traditional reed switch sensors are susceptible to electromagnetic interference, which can generate false pulses and lead to overestimation of rainfall. This invention integrates multi-source information from infrared photocells and visual channels, and through an evidence-based fusion mechanism, it can maintain accurate metering output even when a single sensor is disturbed.

[0030] 5. When the reed switch fails completely, the traditional double tipping bucket rain gauge basically loses its metering function and the cumulative error increases sharply; the present invention can still maintain normal metering by relying on the visual channel and infrared channel, and reduces the impact weight of the failed channel through the reliability allocation mechanism of the fusion module.

[0031] 6. This invention combines an external photoelectric rain sensor to determine reliability at the minute scale, automatically triggering logging for low-reliability minutes, saving minute-level rainfall records, window-level quality summaries, and video clip indexes, providing data support for post-event review, anomaly analysis, and system optimization. Attached Figure Description

[0032] Figure 1 This is a general framework diagram of the tipping bucket rain gauge system based on multi-source sensing fusion of the present invention.

[0033] Figure 2 A schematic diagram illustrating the waveform of the lateral displacement at the tip and the flipping event.

[0034] Figure 3 This is a comparison chart of the effects of three different filters.

[0035] Figure 4 Diagram of event alignment for merge windows Detailed Implementation

[0036] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0037] I. System Overall Architecture

[0038] like Figure 1 As shown, the present invention provides a multi-source sensing fusion tipping bucket rain gauge system, which includes a three-layer architecture of acquisition layer, edge computing layer and routing layer.

[0039] The acquisition layer is used to acquire the output signals of two infrared photodiodes and one reed switch at a fixed sampling period. After filtering and thresholding, the flip events are extracted. Each event includes a timestamp, event attributes, and event quality. The acquisition layer receives a unified time base from the edge computing layer via a serial port. When reporting events, it only carries the local timing value, and the edge computing layer recovers the absolute time.

[0040] The edge computing layer is the core computing unit of the entire system. It is used to receive events reported by the acquisition layer and recover absolute time. It acquires metering bucket tipping image sequences through cameras and outputs the tipping tip position using a key point detection model. It extracts visual flipping events based on the tip trajectory. It maps acquisition layer events and visual flipping events to the same time axis and performs windowing organization and time alignment through the event alignment module. Within each time window, the fusion module fuses the window-level observation results of each channel and outputs the flipping number estimate and window-level quality summary. It accumulates the flipping number of multiple consecutive time windows and converts it into minute-scale rainfall. It combines external reference information to determine minute-scale credibility. When the credibility is low, it triggers a logging mechanism to save minute-scale rainfall records, window-level quality summaries, and video clip indexes.

[0041] The routing layer is used to receive minute results from the edge computing layer and upload the data to a remote server.

[0042] II. Specific Implementation Methods of the Acquisition Layer

[0043] 2.1 Hardware Implementation of the Acquisition Layer

[0044] The acquisition layer's main control circuit uses an STM32F103C8T6 chip as the main microcontroller. In the infrared transistor circuit, a TSAL6200 infrared transmitter is selected, with an AO3400 MOSFET as the driver. The infrared receiver is an HS0038A, which integrates photoelectric detection, preamplification, and filtering / demodulation structures, enabling it to directly convert the received infrared signal into a level signal. In the reed switch interface circuit, the acquisition layer obtains a 12V pulse signal from the reed switch, while the main control operates at a 3.3V level.

[0045] 2.2 Software Implementation of the Acquisition Layer

[0046] After the system starts up, the acquisition layer first completes system initialization and receives and saves the time base sent by the edge computing layer via serial port (baud rate of 9600bps). When the acquisition layer subsequently reports events, it only carries the local millisecond count. The edge computing layer uses the time base synchronized during the startup phase to restore the events to a unified timeline.

[0047] After normal operation, the timer interrupt acquires the input voltages of the two infrared diodes and reed switches at fixed intervals and writes them to the buffer. The main loop retrieves data from the buffer, completes event judgment, and sends the data via serial port. After detecting a valid toggle, the acquisition layer sends the event to the upper layer in the form of an event frame.

[0048] The acquisition layer provides a quality label for each event while generating it. The event quality is primarily based on threshold margin, decision stability, and jitter during the flipping process. Jitter features are statistically analyzed on the unfiltered sampled sequence, while event determination is still based on the filtered sequence. Furthermore, the acquisition layer introduces a "rhythm anomaly factor" as a discount cue. This factor compares the time interval between two consecutive valid flipping events with the recent baseline interval. When the interval is abnormally large and then returns to the baseline interval, the quality of the event is downgraded to indicate a potential risk of missed triggers within that window.

[0049] III. Specific Implementation Methods of the Edge Computing Layer

[0050] 3.1 Edge Computing Layer Hardware Platform

[0051] The edge computing layer uses the RK3568 chip as its core processing unit. The interface circuitry of the edge computing layer includes: a TTL serial port (connected to the acquisition layer), a USB interface (connected to the camera), an RS485 interface (connected to the photoelectric rain sensor), and an Ethernet interface (connected to the routing layer). The vision module uses a USB camera, installed at a height of 4cm, with the lens 5cm away from the metering bucket. This installation ensures stable observation of the metering bucket area at a relatively close distance without causing mechanical interference to the normal flipping and resetting process of the bucket.

[0052] 3.2 Overall Software Flow of Edge Computing Layer

[0053] The edge computing layer program runs in an Ubuntu environment and is implemented in Python. After startup, it first loads runtime parameters and initializes the serial port, USB camera, RS485 interface, and network port. Simultaneously, it loads the RKNN model deployed on the RK3568 platform. After initialization, the edge computing layer generates a unified time base `base_epoch_ms` and sends it to the acquisition layer. When the acquisition layer subsequently reports events, it only carries the local timing value `tick`. Upon receiving this, the edge computing layer uses the sum of `base_epoch_ms` and `tick` to reconstruct the absolute time of the event, thus unifying the events from the acquisition layer and the flip events extracted from the visual side onto the same timeline.

[0054] After the program enters the running state, it continuously receives infrared and reed switch event frames uploaded by the acquisition layer via pyserial and completes frame parsing; it uses OpenCV to call the USB camera to continuously capture frames and feeds the images into the RKNN model for inference; it processes the data obtained from serial port parsing and the visual flip events extracted by the visual link program into discrete events with the same format. The program organizes the multi-source events in absolute time order and fuses and outputs the number of flips of the current 10-second fusion window, while retaining the window-level quality summary.

[0055] After the program accumulates six 10-second fusion window results, it performs a minute-by-minute settlement. The program sums the flip counts of the six fusion windows and converts them into minute-by-minute rainfall based on the 0.1mm rainfall increment corresponding to each flip. Simultaneously, it summarizes the quality information of each fusion window within that minute to form a minute-by-minute quality summary. Then, the edge computing layer, combined with data from the external photoelectric rain sensor read via RS485, completes minute-level hierarchical decision-making. If the current minute is determined to be a low-confidence result, further logging is triggered, saving the minute record, window-level summary, and related video index. Finally, the program sends the minute results to the routing layer via the network interface.

[0056] 3.3 Detection of key points at the tip of the bucket and extraction of visual flip events

[0057] 3.3.1 Key Point Detection Model

[0058] This invention employs an improved YOLOv8n-Pose model as the keypoint detection model for the tip of the tip. The improvements include: introducing a DySample dynamic sampling module to replace the nearest neighbor upsampling operation in the original network, thereby enhancing the ability to preserve detailed information about the tip of the tip during feature recovery; using a Slim-Neck structure in the neck network and making lightweight adjustments to the multi-scale feature fusion path, thus achieving a balance between reducing computational overhead and improving the efficiency of feature fusion at different levels; and using WingLoss as the keypoint regression loss function to strengthen the model's ability to constrain small and medium error samples, thereby improving the localization accuracy of the tip keypoint.

[0059] The training dataset for the model was a self-built dataset. Before data acquisition, a USB camera was fixed in front of the rain gauge to ensure the tipping bucket remained within the effective field of view throughout its rotation. A peristaltic pump was used to inject water into the rain gauge's inlet, with the rainfall intensity set from 0 mm / min to 6 mm / min and then back to 0 mm / min in 0.5 mm / min increments, continuously recording the tipping bucket movement for 10 minutes. After acquiring the raw video, frame extraction was performed, removing highly repetitive frames to create a raw image sample set of 4000 images. Labelme was used to annotate the dataset, highlighting key points at the tip of the tipping bucket.

[0060] 3.3.2 Visual Flip Event Extraction

[0061] The camera continuously captures a sequence of images of the rain gauge's interior. The visual keypoint detection model outputs the position and detection score of the keypoint at the tip of the tipping bucket in each frame. Let the output of frame f be:

[0062] ;

[0063] in, For the tip pixel coordinates, The keypoint detection score is calculated by arranging the results of each frame in chronological order to obtain the keypoint trajectory sequence.

[0064] Under fixed installation position and fixed shooting angle conditions, the lateral coordinates of the tip of the tip converge near two relatively stable positions during the stationary phase. These two positions can be regarded as the two steady-state centers of the tip's lateral trajectory, denoted as the left steady-state reference position x. L and right steady-state reference position x R To obtain the left and right steady-state reference positions, the lateral coordinate sequence was extracted from the sample segment where the tipping bucket was in a clearly stationary state, and its mean was calculated for each segment:

[0065] ;

[0066] in, and These represent the number of samples in the left and right steady states, respectively. and These are the lateral coordinates of the tip within the left and right steady-state sample segments, respectively.

[0067] Let the standard deviations of the left and right steady-state sample segments be respectively and Then, establish left and right steady-state intervals near the reference position:

[0068] ;

[0069] Where λ is the interval coefficient, used to adjust the width of the steady-state interval.

[0070] When the trajectory is located at L I When the tipping bucket is inside, it can be considered to be in a left-steady state; when the trajectory is located at R... I When the bucket is inside, it can be considered to be in a right-steady state.

[0071] After determining the left and right steady-state reference positions, state boundary lines can be further established. Since the left and right steady states correspond to the two convergence centers of the lateral trajectory, their midpoint is taken as the initial boundary position. Establishing state boundary lines:

[0072] ;

[0073] This formula shows that when the lateral coordinate is to the left of x0, it is closer to the left-hand steady state, and when it is to the right of x0, it is closer to the right-hand steady state. Thus, the flipping process can be understood as the tip trajectory starting from one steady-state region, crossing the boundary line, and entering the other steady-state region. A schematic diagram of the tip's lateral displacement waveform and the flipping event is shown below. Figure 2 .

[0074] To avoid misjudgment caused by single-frame jitter, the original horizontal coordinate sequence x... k Filtering was performed. The performance of 3-point moving average filtering, 5-point Gaussian filtering, and 3-point median filtering was compared (see the comparison chart of the three filtering effects). Figure 3 As shown), use 3-point median filtering:

[0075] ;

[0076] This invention defines a valid flip as: a complete process in which the trajectory starts from a steady-state interval on one side, completes a cross-side change, and finally re-establishes a stable state in the steady-state interval on the other side. Therefore, the flip event is no longer determined by whether the coordinates of a single frame instantaneously cross the boundary line, but is jointly determined by the temporal structure of "source steady state - cross-boundary - target steady state".

[0077] The rule stipulates that a steady state is considered established only when the trajectory remains continuously within a certain steady-state interval for at least N seconds. The condition for establishing a left-side steady state is:

[0078] ;

[0079] The condition for establishing right-hand stability is:

[0080] ;

[0081] A valid flip is defined as the complete process in which the trajectory starts from one steady-state interval, crosses the boundary line x0, and finally re-establishes a stable state in the other steady-state interval. The moment of the first crossing of the boundary line is used as the time marker of the flip event.

[0082] 3.4 Multi-source event alignment

[0083] 3.4.1 Standardized Event Representation

[0084] Events from any source are uniformly represented as:

[0085] ;

[0086] in, For event time stamping, For event properties, For the quality of the event.

[0087] For infrared transistor and reed switch events, The main characteristics are the source and trigger type of the channel; for visual events, It mainly indicates information such as the direction of rotation.

[0088] 3.4.2 Window-based organization

[0089] Multi-source events are organized using a windowing approach. Let the m-th fusion window be:

[0090] ;

[0091] in, To unify the start time of the timeline, This is the length of the fusion window. In this embodiment... Take 10 seconds.

[0092] If fixed boundaries are used for direct windowing, when an event happens to be near the window boundary, due to local time shifts between different channels for the same flip, multi-source events belonging to the same actual flip may be assigned to adjacent windows, thus increasing statistical mismatch within the window. A schematic diagram of event alignment in the fusion window is shown below. Figure 4 As shown.

[0093] 3.4.3 Rainfall Intensity Adaptive Time Tolerance

[0094] The relationship between rainfall intensity I and maximum channel time difference Δt was established in advance through experiments. max The empirical mapping relationship between them:

[0095] ;

[0096] in, This is an empirical function obtained by fitting experimental data; this function reflects the maximum time broadening of the multi-source channels for the same flip under different rainfall intensities.

[0097] Use the rainfall intensity estimate from the previous output period. As the basis for calculating the current window boundary time tolerance, the time tolerance at the m-th boundary is defined as:

[0098] ;

[0099] Where η is the safety factor, which is taken as 1.2 in this embodiment.

[0100] Let the right boundary of the m-th fusion window be:

[0101] ;

[0102] At the border The nearby boundary tolerance zone is:

[0103] ;

[0104] When the event timestamp When the boundary tolerance zone is not reached, the window is directly assigned according to the fixed time window rule; when... ∈B m When a boundary event occurs, it is considered a boundary event, and its attribution is corrected based on the statistical results of multi-source events within adjacent windows to reduce the impact of boundary splitting on window-level statistics. Combining the experimental results of rainfall intensity-sensor time difference, the rainfall intensity adaptive time tolerance correction mechanism, and the requirement for normalized output results of rainfall values, this embodiment uses 10s as the fusion window length for subsequent window-level statistics and multi-source fusion modeling.

[0105] After the events are successfully merged into a single window, a set of visual events is formed within the m-th fusion window. Infrared event set And the reed switch event set. The number of valid events for each channel within this window is denoted as:

[0106] ;

[0107] Where s∈{v,ir,r}, Represents the cardinality of a set.

[0108] In summary, the multi-source event alignment method of the present invention consists of three steps: first, events from different sources are uniformly expressed under a unified time reference; second, multi-source events are organized in a windowed manner; and finally, the boundary time tolerance is adaptively adjusted according to the change in rainfall intensity, and the boundary events are corrected by windowing.

[0109] 3.5 Window-level Blending

[0110] 3.5.1 Window-level observations and reliability

[0111] The m-th fusion window W m Within the internal, the effective event counts for the visual, infrared, and reed switch channels are respectively , and For each channel, its window-level observation within the m-th fusion window is: .

[0112] Suppose that the s-th channel within the m-th fusion window detects... There are 1 valid events, and the corresponding event quality is denoted as . , ,… The average quality of the window level for the s-th channel within the m-th fusion window is defined as:

[0113] ;

[0114] The reliability of the s-th channel within the m-th fusion window is denoted as . The value ranges from 0 to 1. The larger the value, the higher the overall quality of events within that channel in that window, and the higher the reliability of its frequency observations should be assigned in subsequent fusion; if... A smaller value indicates that the current observation stability within the window of that channel is weaker, thus reducing its impact on the fusion results.

[0115] 3.5.2 Recognition Framework and Basic Probability Assignment

[0116] The recognition frame of the m-th fusion window is represented as:

[0117] ;

[0118] Where, N m This represents the maximum number of flips that may occur within the time window; in this embodiment, it is set to 20.

[0119] For the s-th channel within the m-th fusion window, construct the basic probability assignment between two focal elements:

[0120] ;

[0121] The basic probability assignment for the remaining propositions is zero.

[0122] 3.5.3 Evidence Combination and Result Determination

[0123] When the conflict between multiple sources of evidence is within an acceptable range, the Dempster combination rule, i.e., the DS (Dempster-Shafer) evidence theory, is used for fusion. This involves assigning any two basic probability distributions. and The combination result is denoted as The expression is:

[0124] ;

[0125] in, Let B be the conflict coefficient, where B is a focal element of evidence source a, representing the probability that the evidence source believes "event B has occurred"; and C is a focal element of evidence source b, representing the probability that the evidence source believes "event C has occurred".

[0126] Conflict coefficient Defined as:

[0127] ;

[0128] When the conflict coefficient exceeds the threshold (In this embodiment, the value is 0.60), the Yager method is used to handle highly conflicting evidence. For any non-empty and non-universal proposition... ,have:

[0129] ;

[0130] Complete series The probability distribution is as follows:

[0131] ;

[0132] According to this embodiment, the comprehensive basic probability allocation of the three channels... Calculate as follows: when the conflict coefficient hour, When the conflict coefficient hour, .

[0133] The estimated number of flips within the m-th fusion window is taken from the single-element proposition with the highest support:

[0134] ;

[0135] Simultaneously retain the quality summary of the current window:

[0136] ;

[0137] 3.6-minute scale hierarchical decision-making and record keeping

[0138] 3.6.1 Minute Rainfall Conversion

[0139] Let the results of the 6 consecutive fusion windows corresponding to minute t be as follows: The output of the j-th fusion window is: Let the increase in rainfall corresponding to a single effective reversal be . Then the merged rainfall in minute t is:

[0140] ;

[0141] 3.6.2-minute summary

[0142] The conflict coefficients of the 6 fusion windows within minute t are respectively The final support for each window is: The minute summary includes the maximum conflict coefficient, the window index corresponding to the maximum conflict, and the minimum support within that minute.

[0143] ;

[0144] 3.6.3 Credibility Assessment and Traceability

[0145] The external photoelectric rain gauge provides the minute rainfall at minute t. The fusion results and external references These are mapped to rainfall intensity levels. Rainfall intensity is divided into three levels: Level 1 corresponds to 0–1.5 mm / min, Level 2 corresponds to 1.5–3 mm / min, and Level 3 corresponds to greater than or equal to 3 mm / min. The rainfall intensity level mapping function is as follows:

[0146] ; in, Rainfall intensity per minute.

[0147] Minute-scale reliability determination relies on both internal window-level quality summaries and external reference observations from photoelectric rain gauges. A minute is classified as a low-reliability minute if it exhibits a large window-level conflict coefficient, low window-level support, or low overall channel reliability, or if the fusion result is inconsistent with the rainfall intensity level of the external reference.

[0148] When minute t is determined to be a low-confidence minute, the system triggers a logging mechanism to retain the measurement results, window-level quality information, and related indexes for that minute, supporting subsequent manual review, anomaly analysis, and result uploading. The logged content includes: the minute-level rainfall record and its external consistency check results; the estimated number of flips for the six fusion windows within that minute; the quality summary for each window; the index of the maximum conflict window and its related summary; and the video clip indexes from the visual channel and external environment cameras.

[0149] IV. Detailed Implementation of the Routing Layer

[0150] 4.1 Routing Layer Hardware

[0151] The routing layer controller uses an STM32F407 chip, and the Ethernet PHY chip is a LAN8720A, which connects to the internal MAC of the STM32F407 via the RMII interface. The 4G communication module is a Quectel EC200U series (LTE Cat 1 / Cat 1bis), supporting a maximum downlink speed of 10Mbps and a maximum uplink speed of 5Mbps.

[0152] 4.2 Routing Layer Software

[0153] The routing layer program is developed based on RT-Thread, and the network protocol stack uses LwIP. The internal interface is an Ethernet port used to receive data from the edge computing layer; the external interface connects to the RNDIS EC200U network card via USB, ultimately connecting to the 4G network.

[0154] The program consists of a main thread and a signal management sub-thread. After starting, the main thread sequentially executes peripheral initialization, USB host stack initialization, network card initialization, and TCP / IP protocol stack initialization. After initialization, the main thread enters the data forwarding runtime state. After starting, the signal management sub-thread compares the signal strength based on the CSQ of each network on the 4G module. If no better network is found, the sub-thread enters a "wait for next detection time" state, and then re-detects the network signal after the time expires. If a better network is found, the sub-thread first notifies the main thread to pause forwarding to avoid an uncertain forwarding path during handover. It then switches to the optimal network, and after the handover is complete, notifies the main thread to resume forwarding. The SIM card supports three different carrier networks, and the routing layer program automatically selects the network with the best signal.

[0155] V. Experimental Verification and Results Data

[0156] 5.1 Experimental Environment

[0157] To verify the actual output performance of this invention, a simulated rainfall experimental platform was built. A water storage tank was set above the platform as the water source. After flowing through a peristaltic pump, the water was sprayed from a shower head onto a double-tipping bucket rain gauge. A diversion and receiving container was set below the rain gauge to collect the outflowing water and send it to a water collection tank through a drain hose. The water collection tank was placed on an electronic scale, which was connected to a host computer to record the mass changes during the experiment.

[0158] The reference true value is obtained by weighing. The electronic scale records the cumulative mass of the water collection bucket every minute and sends it to the host computer. The difference between two adjacent weighing values ​​corresponds to the actual inflow mass within that 1-minute time window, which is then converted into the reference rainfall.

[0159] 5.2 Evaluation Indicators

[0160] Cumulative relative error is used as the evaluation index. Let the reference rainfall at minute t be... The fusion solution output is The traditional double-tipping bucket rain gauge solution outputs as follows: Then, over the entire statistical period T, the cumulative relative error of the fusion scheme is... Defined as:

[0161] ;

[0162] Cumulative relative error of traditional scheme The definition is similar. The decrease in the absolute value of the cumulative relative error is... .

[0163] 5.3 Experimental Results

[0164] Five sets of experiments were set up under different working conditions: light rain intensity (1 mm / min) experiment, heavy rain intensity (6 mm / min) experiment, variable rain intensity experiment, interference experiment, and reed switch failure experiment.

[0165] Under light rain intensity conditions: the cumulative relative error of the traditional solution is -2.5%, while that of the fusion solution of this invention is -2.5%, which is equivalent to the traditional solution, indicating that this invention does not compromise the original light rain intensity measurement capability.

[0166] Heavy rain and severe working conditions: The cumulative relative error of the traditional solution is -15.47%, while that of the integrated solution of this invention is -0.31%, and the absolute value of the cumulative relative error decreases by 15.16 percentage points.

[0167] Varying rainfall intensity conditions (light rainfall intensity - heavy rainfall intensity - light rainfall intensity): The cumulative relative error of the traditional scheme is -12.43%, while that of the fusion scheme of this invention is -2.45%, and the absolute value of the cumulative relative error decreases by 9.98 percentage points.

[0168] Interference conditions (magnetic interference applied to the reed switch channel under light rain): The cumulative relative error of the traditional solution is +11.65%, while that of the fusion solution of this invention is -2.79%, with a decrease in the absolute value of the cumulative relative error of 8.86 percentage points.

[0169] Reed switch failure condition: The cumulative relative error of the traditional solution is -67.51%, while that of the integrated solution of this invention is -5.58%, and the absolute value of the cumulative relative error decreases by 61.93 percentage points.

[0170] 5.4 Outdoor Continuous Operation Verification

[0171] The system was placed in an outdoor environment and operated continuously for 10 days. The main observations included whether there were any power outages, shutdowns, restarts, or interruptions in minute recording. After the experiment, the operation logs and minute records were checked. The results showed that the system did not experience any shutdowns or abnormal data recordings during the test, and no abnormal restart information was found in the logs. This indicates that the system operates stably under outdoor testing conditions and can meet the basic requirements for continuous operation.

Claims

1. A tipping bucket rain gauge system with multi-source sensing fusion, characterized in that, It includes a data acquisition layer, an edge computing layer, and a routing layer; The acquisition layer is used to acquire the output signals of two infrared phototransistors and one reed switch at a fixed sampling period. After filtering and threshold judgment, the flip events are extracted. Each event includes a timestamp, event attributes and event quality. The acquisition layer receives a unified time base from the edge computing layer through a serial port. When reporting events, it carries the local timing value, and the edge computing layer recovers the absolute time. The edge computing layer is used for: Receive events reported by the acquisition layer and restore the absolute time of the events based on a unified time base; The camera captures a sequence of images of the tipping bucket, the key point detection model is used to output the position of the tipping bucket tip, and the visual flipping event is extracted based on the tip trajectory. The event acquisition layer events and visual flip events are mapped to the same timeline, and the multi-source events are organized in a windowed manner and aligned in time through the event alignment module. Within each time window, the window-level observation results of each channel are fused through the fusion module, and the estimated number of flips and window-level quality summary of that time window are output. The number of flips of multiple consecutive time windows is accumulated and converted into minute-level rainfall. The reliability of minute-level rainfall is determined by combining external reference information. When the reliability is low, a logging mechanism is triggered to save minute-level rainfall records, window-level quality summaries, and video clip indexes. The routing layer is used to receive the minute results from the edge computing layer and upload the data to a remote server.

2. The multi-source sensing fusion tipping bucket rain gauge system according to claim 1, characterized in that, The extraction of visual flip events based on tip trajectory in the edge computing layer is specifically as follows: median filtering is performed on the tip's lateral coordinate sequence. Based on the pre-defined steady-state intervals on both sides and the state boundary line, the tip trajectory starts from one side's steady-state interval, completes the cross-side change, and finally re-establishes a stable state in the other side's steady-state interval. That is, the process that satisfies the temporal structure of "source steady-state establishment → crossing the boundary line → target steady-state establishment" is determined as a valid visual flip event, and the moment of the first crossing of the boundary line is used as the time marker of the event.

3. The multi-source sensing fusion tipping bucket rain gauge system according to claim 1, characterized in that, The model used for keypoint detection at the tip of the tip in the edge computing layer is an improved YOLOv8n-Pose model. The improvements include: introducing a DySample dynamic sampling module to replace nearest neighbor upsampling in the neck feature fusion network; replacing the original neck network with a Slim-Neck lightweight structure; and using WingLoss as the keypoint regression loss function.

4. The multi-source sensing fusion tipping bucket rain gauge system according to claim 1, characterized in that, The event alignment module performs windowing and time alignment of multi-source events as follows: All flip events from infrared sensors, reed switch sensors, and vision sensors are uniformly represented as standardized events containing timestamps, event attributes, and event quality, and mapped onto the same unified time axis to form a discrete event sequence arranged chronologically. The event sequence is divided using continuous time windows of fixed length, with each time window having a unified start time and a fixed duration. The maximum response time difference of the visual channel, infrared channel and reed switch channel to the same flip under different rainfall intensities was determined in advance through experiments, and an empirical correspondence between rainfall intensity and maximum channel time difference was established. For the current time window, the time tolerance at the boundary of the current time window was calculated using the rainfall intensity value estimated in the previous time period. This tolerance is positively correlated with the rainfall intensity, and the greater the rainfall intensity, the greater the tolerance. Near the boundary of each time window, a boundary tolerance interval is set with the boundary as the center and a width twice that of the time tolerance. When the time stamp of an event falls within the boundary tolerance interval, it is determined as a boundary event. Instead of immediately classifying it into the current window or the next window, the classification of the boundary event is corrected based on the overall statistical results of multi-source events in the two adjacent time windows. For events whose time markers do not fall within the boundary tolerance range, they are directly processed according to the time window to which their time markers belong. After windowing is completed, visual event sets, infrared event sets, and reed switch event sets are formed within each time window, and the number of events in each set is counted for subsequent fusion calculations.

5. The multi-source sensing fusion tipping bucket rain gauge system according to claim 1, characterized in that, The fusion module fuses the window-level observation results from each channel in the following ways: Within each time window, the number of valid flip events detected by the visual channel, infrared channel, and reed switch channel are counted separately, and the reliability of each channel within that time window is calculated. The reliability is obtained by averaging the quality of each event within the window for that channel, reflecting the overall reliability of the observation results of that channel in the current time period; Use the set of possible flip count values ​​as the recognition framework; For each channel, the number of events it statistically records is taken as a proposition, and the reliability of that channel is taken as the basic probability mass of that proposition; at the same time, the entire recognition framework is taken as another proposition, and the remaining probability mass is assigned to it; the probability mass of the remaining propositions is zero. The basic probability distributions of the three channels are compared, and the degree of conflict between them is calculated. When the degree of conflict does not exceed a preset threshold, the Dempster combination rule is used for fusion. The Dempster combination rule accumulates the support of each channel for the same proposition, and at the same time, the contradictory parts are normalized proportionally and redistributed to each proposition. When the degree of conflict exceeds the preset threshold, the Yager combination rule is switched to fusion. The Yager combination rule only retains the support of each channel for the common proposition, while all contradictory parts are included in the whole set and are no longer normalized and assigned to specific propositions, so as to retain the uncertainty of the observation results in the current time period. After fusion, among all the specific frequency propositions in the recognition framework, the frequency with the highest probability quality after fusion is selected as the estimated number of flips for that time window.

6. A measurement method using the tipping bucket rain gauge system with multi-source sensing fusion as described in claim 1, characterized in that, Includes the following steps: Step 1: The acquisition layer acquires the output signals of two infrared phototransistors and one reed switch at a fixed sampling period. After filtering and threshold judgment, the flip events are extracted. Each event includes a timestamp, event attributes, and event quality. Step 2: The edge computing layer acquires a sequence of metering bucket images through a camera, outputs the position of the tip of the bucket using a key point detection model, and extracts visual flipping events based on the tip trajectory; Step 3: The edge computing layer restores the absolute time of the events obtained in Step 1 based on a unified time base, maps them to the same time axis as the visual flip events obtained in Step 2, and performs windowed organization and time alignment of the multi-source events through the event alignment module. Step 4: Within each time window, the edge computing layer fuses the window-level observation results of each channel through the fusion module, and outputs the estimated number of flips for that time window and a summary of the window-level quality. Step 5: The edge computing layer accumulates the number of flips of multiple consecutive time windows and converts them into minute-scale rainfall. It combines external reference information to determine the reliability of minute-scale rainfall and triggers a logging mechanism when the reliability is low to save minute-scale rainfall records, window-level quality summaries, and video clip indexes. Step 6: The routing layer receives the minute results from the edge computing layer and uploads the data to the remote server.

7. The measurement method according to claim 6, characterized in that, Step 2 specifically includes: Step 2.1: Continuously acquire image sequences of the metering bucket using a camera. Utilize a keypoint detection model to output the position and detection score of the keypoints at the tip of the bucket in each frame. Let the output of the f-th frame be: ; in, For the tip pixel coordinates, For the test score; Arrange the results of each frame in chronological order to obtain the keypoint trajectory sequence. }; Step 2.2: Extract the tip lateral coordinate sequence from the sample segment where the tipping bucket is in a clearly stationary state, and calculate the left steady-state reference position for each. and right steady-state reference position : ; in, and These represent the number of samples in the left and right steady states, respectively. and These are the lateral coordinates of the tip within the left and right steady-state sample segments, respectively. Step 2.3: Let the standard deviations of the left and right steady-state sample segments be respectively... and Establish left and right steady-state intervals and as follows: ; in, Interval coefficients; The state boundary line is represented as: ; Step 2.4: Process the original horizontal coordinate sequence Perform 3-point median filtering to obtain the trajectory used for judgment: ; in, This indicates the result obtained after 3-point median filtering. The horizontal coordinate value of the frame tip; Step 2.5: It is stipulated that the trajectory should remain continuously within a certain steady-state interval for at least [a certain period of time]. At frame rate, it is assumed that steady state has been established on that side; the condition for establishing left-side steady state is: ; The condition for establishing right-hand stability is: ; in, Indicates from the start frame The initial frame offset; The lateral coordinate of the tip of the bucket after median filtering is the first... + The value of the frame; Step 2.6: Define a valid flip as a trajectory that starts from one side of the steady-state interval and crosses the dividing line. The complete process of re-establishing a stable state within the steady-state region on the other side; the moment of first crossing the boundary line is used as the time marker for the flip event.

8. The measurement method according to claim 7, characterized in that, Step 3 specifically includes: Step 3.1: Represent events from any source uniformly as follows: ; in, For event time stamping, For event properties, For the quality of the event; The infrared and reed switch events output by the acquisition layer and the flip events extracted by the vision channel are mapped onto a unified time axis to form a discrete event sequence. Step 3.2: Organize multi-source events using a windowing approach, assuming the first... A fusion window for: ; in, To unify the start time of the timeline, The length of the merge window; Step 3.3: Establish rainfall intensity in advance through experiments With the maximum channel time difference The empirical mapping relationship between them: ; in, This is an empirical function obtained by fitting experimental data; The rainfall intensity estimate from the previous output period is used as the basis for calculating the current window boundary time tolerance. The first... The time tolerance at each boundary is: ; in, For safety factor; Step 3.4: Let the first... The right boundary of each merge window is: ; At the border The nearby boundary tolerance zone is represented as follows: ; When the event timestamp When the boundary tolerance zone is not reached, the window is directly assigned according to the fixed time window rule; when... When this happens, it is treated as a boundary event, and its attribution is corrected based on the statistical results of multi-source events in adjacent windows, so as to reduce the impact of boundary splitting on window-level statistics. Step 3.5: After the event is completed and returned to the window, the first... Each fusion window forms a set of visual events. Infrared event set and reed switch event set The number of valid events for each channel within this window is recorded as follows: ; in, , Represents the cardinality of a set.

9. The measurement method according to claim 8, characterized in that, Step 4 specifically includes: Step 4.1: In the first... Within each time window, the number of valid events for the visual channel, infrared channel, and reed switch channel are counted separately. , , As window-level observations for each channel , Simultaneously, calculate the window-level reliability of each channel. The reliability is determined by the quality of each event within the window of the channel. The average value is given, that is, when the number of events within the window is greater than 0, the window-level reliability is... for: ; Step 4.2: Establish the recognition framework for this time window as follows: ; in, This represents the maximum number of flips that may occur within this time window; For each channel, construct a two-focal-element basic probability assignment: assign probability mass only to single-element propositions. and the complete collection Θ m The probability assignment for the remaining propositions is zero; Step 4.3: For each fusion window, calculate the conflict coefficient between multi-source evidence. When the conflict coefficient Not exceeding the preset threshold At that time, the Dempster combination rule is used to recursively fuse the basic probability allocation of each channel; when the conflict coefficient Exceeding the preset threshold At this time, switch to the Yager combinatorial rule to include all conflicting qualities in the global set Θ. m ; Step 4.4: After fusion, take the value corresponding to the single-element proposition with the highest support in the recognition framework as the estimated number of flips for that time window. At the same time, retain the window-level quality summary of the window. The window-level quality summary includes the conflict coefficient. Support of the proposition in the final output count and window-level reliability of each channel. , , .

10. The measurement method according to claim 9, characterized in that, Step 5 specifically includes: Step 5.1: Let the first... The minutes correspond to 6 consecutive fusion windows, and the number of flips for each time window is as follows: , ,…, Let the rainfall increment corresponding to a single effective flip be Then the first The merged rainfall per minute is: ; Step 5.2: Summarize the results. A window-level quality summary within a minute, including the maximum conflict factor within that minute. , minimum support And statistics on the reliability of each channel; Step 5.3: Read the minute rainfall given by the external photoelectric rain sensor at minute t. The fusion results External references Mapped to rainfall intensity levels and ; The mapping rule for the rainfall intensity level is as follows: when the minute rainfall intensity is less than 1.5 mm / min, it is level 1; when it is between 1.5 mm / min and 3 mm / min, it is level 2; and when it is greater than or equal to 3 mm / min, it is level 3. Step 5.4: Based on the maximum conflict coefficient, minimum support, reliability statistics of each channel, and consistency between the fusion result and the rainfall intensity level of the external reference within minute t, comprehensively determine the credibility of that minute; when the internal quality indicators or external consistency indicate low credibility, trigger the auditing mechanism. Step 5.5: The logging mechanism saves the following content: Minute-by-minute rainfall record And its external consistency check results, the estimated number of flips of the 6 time windows within this minute. The system includes quality summaries for each window, the index of the maximum conflict window and related summaries, and video clip indexes for the visual channel and external environment cameras.