Cloud-based sluice monitoring and control system

By calculating the discreteness of the water level time series set and the adaptive index structure, and combining the Manning formula to calculate the water flow propagation lag time, the database index of the sluice gate monitoring system was optimized, which solved the problems of data causal alignment and response delay in water conservancy facilities, and improved the monitoring efficiency and response speed of the system.

CN121560892APending Publication Date: 2026-02-24NANTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610084155.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-22
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

In existing technologies, traditional cloud-based sluice gate monitoring systems ignore the physical lag in the transmission of upstream water conditions to the current station during data collection. This results in the stored data failing to accurately reflect the causal relationship between upstream and downstream hydraulic systems. Furthermore, the fixed index structure leads to increased response delays in scenarios with high-frequency water level changes, reducing the efficiency of remote monitoring of water conservancy facilities.

Method used

By calculating the statistical dispersion of the water level time series set, an adaptive index structure is constructed. The Manning formula is used to calculate the water flow propagation lag time, and logical index time keys are generated. The capacity of the database index nodes is optimized to ensure data causal alignment and query response speed under high concurrency.

Benefits of technology

This improved the stability and response speed of the database in scenarios with high-frequency water level changes, ensuring the real-time and efficient transmission of monitoring data for water conservancy facilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560892A_ABST
    Figure CN121560892A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a cloud-based sluice monitoring and control system, which comprises a water level state sensing module, an index structure self-adaptive module, a node splitting threshold coefficient, a node splitting threshold coefficient calculation module, a node splitting threshold coefficient calculation module, a node splitting threshold coefficient calculation module and a node splitting threshold coefficient calculation module, the causal lag calculation module generates a water flow propagation lag time amount by using an upstream discharge amount and a Manning formula, and the spatial-temporal index construction module generates a logic index time key, sets a B + tree node capacity upper limit according to a splitting coefficient, and writes data into an index structure. According to the method, fluctuation characteristics are quantized, index splitting coefficients are dynamically matched according to variances, the stability of a high-frequency data writing structure is optimized, and a logic index time key is generated in combination with the inversion flow velocity of the upstream discharge amount so as to correct physical acquisition time; and the index construction efficiency and the query response speed of the database during high concurrency are improved on the basis of ensuring the causal alignment of the time series data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a cloud-based sluice gate monitoring and control system. Background Technology

[0002] Data processing technology typically encompasses the acquisition, storage, retrieval, processing, transformation, and transmission of various types of data. It involves systematic integration from the underlying database architecture to the upper-level information interaction platform, aiming to achieve efficient management and utilization of information resources. Traditional cloud-based sluice gate monitoring systems collect real-time water level data and equipment status information through water level gauges, flow meters, and gate opening sensors deployed at the sluice gate site. These signals are then aggregated and encoded using a field-mounted programmable logic controller (PLC), and the data packets are transmitted to a remote cloud server via 4G or fiber optic network communication modules. The cloud server is equipped with a database management system to store historical operational data and runs applications to generate a visual monitoring interface. Management personnel access the cloud platform via a desktop computer or mobile device connected to the internet to view the sluice gate's real-time operating parameters and video monitoring footage, thereby achieving remote centralized monitoring of decentralized water conservancy facilities.

[0003] Existing technologies store data linearly based on the time of data collection, ignoring the physical lag in the transmission of upstream water conditions to the current station. This results in the stored data failing to accurately reflect the causal relationship between upstream and downstream hydraulic systems, leading to a lack of precise time alignment for water conservancy regulation and analysis. Furthermore, traditional database index structures use fixed node capacity configurations, which cannot adaptively adjust according to the degree of water condition fluctuations. In scenarios with high-frequency water level changes during the flood season, fixed indexes are prone to frequent node splits and uneven space utilization, resulting in increased response latency during high-concurrency read and write of massive amounts of data, and reducing the data throughput efficiency and real-time performance of remote monitoring of water conservancy facilities. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a cloud-based sluice gate monitoring and control system.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a cloud-based sluice gate monitoring and control system includes:

[0006] The water level status sensing module collects real-time water level data output by the water level monitoring instrument in front of the gate, constructs a time series set of water levels including continuous sampling points, calls the variance calculation function to calculate the statistical dispersion of the water level time series set, and generates the water level fluctuation variance value.

[0007] An adaptive index structure module constructs a mapping table between variance values ​​and splitting coefficients, retrieves the coefficient values ​​corresponding to the water level fluctuation variance value, and generates node splitting threshold coefficients when the water level fluctuation variance value exceeds the warning threshold.

[0008] The causal lag calculation module obtains the real-time discharge flow rate and the distance between upstream and downstream gate stations monitored by the flow meter of the upstream hydrological station. It uses the real-time discharge flow rate and the preset river roughness parameter to calculate the average flow velocity of the water flow using the Manning formula. It then divides the distance between upstream and downstream gate stations by the average flow velocity to generate the water flow propagation lag time.

[0009] The spatiotemporal index construction module generates a logical index time key by subtracting the water flow propagation lag time from the collection timestamp, sets the node capacity limit of the B+ tree index structure in the cloud time series database according to the node splitting threshold coefficient, and writes the associated data into the B+ tree index structure using the logical index time key.

[0010] As a further aspect of the present invention, the water level fluctuation variance value includes fluctuation amplitude statistics, dispersion numerical markers, and temporal stability scores; the node splitting threshold coefficient specifically includes page fill rate threshold, splitting trigger ratio, and node overflow tolerance; the water flow propagation lag time specifically refers to wave propagation delay value, hydraulic response interval, and transmission offset duration; and the B+ tree index structure includes root node pointer, leaf node sequence, branch index key, and logical time mapping table.

[0011] As a further aspect of the present invention, the water level sensing module includes:

[0012] The data acquisition submodule acquires real-time water level data in front of the gate, processes the real-time water level data in front of the gate through a preset signal filtering algorithm, filters out high-frequency noise components and abnormal change points, and generates purified effective water level values.

[0013] The time-series construction submodule stores the effective water level values ​​into a first-in-first-out queue according to the collection time sequence. When the queue length reaches the preset window size, the queue contents are locked, and a time-series set of water levels from continuous sampling points including timestamps is constructed.

[0014] The discrete calculation submodule calls the variance calculation function to calculate the sum of squared deviations of each data point in the continuous sampling point water level time series set from the set mean. The sum of squared deviations is then divided by the total number of sampling points and normalized to generate the water level fluctuation variance value.

[0015] As a further aspect of the present invention, the specific logic for the discrete calculation submodule to execute the variance calculation function is as follows:

[0016] Obtain the time series set of water levels at the continuous sampling points and the total number of sampling points included in the set, and calculate the arithmetic mean of the values ​​of all sampling points as the baseline water level.

[0017] The following variance calculation formula is used to process the time series set of water levels at continuous sampling points to generate the water level fluctuation variance value:

[0018] ;

[0019] in, This represents the variance of water level fluctuations. Represents the total number of sampling points. Representing the The effective water level values ​​at each sampling point Represents the baseline water level. This represents the preset volatility weighting coefficient. This represents the water level value at the previous sampling point. This represents the sampling time interval.

[0020] As a further aspect of the present invention, the index structure adaptive module includes:

[0021] The mapping construction submodule obtains historical water level fluctuation statistics and database performance indicators, establishes the correspondence between differentiated fluctuation ranges and optimal splitting parameters through cluster analysis, and constructs a mapping table of variance values ​​and splitting coefficients, including multi-level index key values.

[0022] The threshold retrieval submodule takes the water level fluctuation variance value as the query key and inputs it into the mapping table between the variance value and the splitting coefficient. It then uses a binary search algorithm to locate the fluctuation range to which the water level fluctuation variance value belongs and extracts the basic splitting parameter corresponding to the range from the mapping table.

[0023] The coefficient generation submodule determines whether the variance of the water level fluctuation is greater than a preset warning threshold. If the determination result is yes, a preset aggressive adjustment factor is applied to the basic splitting parameters to generate node splitting threshold coefficients.

[0024] As a further aspect of the present invention, the specific process by which the coefficient generation submodule determines the node splitting threshold coefficient includes:

[0025] Obtain the default page fill rate and default overflow tolerance included in the basic split parameters, and calculate the ratio of the water level fluctuation variance value to the warning threshold to generate the fluctuation over-limit ratio;

[0026] The default page fill rate is calculated by performing a reverse linear decay calculation using the fluctuation over-limit ratio to generate a page fill rate threshold.

[0027] Multiply the default overflow tolerance by the logarithmic function value of the fluctuation over-limit ratio to generate the node overflow tolerance, and integrate the page fill rate threshold with the node overflow tolerance to generate the node splitting threshold coefficient.

[0028] As a further aspect of the present invention, the causal lag calculation module includes:

[0029] The parameter acquisition submodule reads the real-time discharge flow monitored by the flow meter of the upstream hydrological station, and extracts the distance between upstream and downstream gate stations, preset river roughness parameters, and river hydraulic radius data from the system configuration library.

[0030] The velocity calculation submodule converts the real-time discharge volume into velocity units, combines the preset river roughness parameters and the river hydraulic radius data, and uses the Manning formula to back-calculate the velocity value under the current hydraulic conditions to generate the average flow velocity.

[0031] The lag generation submodule calculates the quotient between the upstream and downstream gate spacing and the average flow velocity of the water flow, and corrects the quotient by superimposing a preset system processing delay constant to generate the water flow propagation lag time.

[0032] As a further aspect of the present invention, the logical formula used by the flow velocity calculation submodule to calculate the average flow velocity of the water flow is as follows:

[0033] ;

[0034] in, Represents the average flow velocity of the water. This represents the preset channel roughness parameter. Data representing the hydraulic radius of the river channel. This represents the hydraulic gradient calculated using real-time discharge volume and river cross-sectional area. This represents the preset flow rate correction factor.

[0035] As a further aspect of the present invention, the spatiotemporal index construction module includes:

[0036] The key-value generation submodule obtains the collection timestamp and the water flow propagation lag time, performs time subtraction to obtain the physical occurrence time, converts the physical occurrence time into a long integer value and performs hash mapping to generate a logical index time key.

[0037] The capacity adjustment submodule reads the current node configuration of the B+ tree index structure, dynamically modifies the split determination condition of the leaf nodes according to the page fill rate threshold in the node split threshold coefficient, and sets the upper limit of the node capacity of the B+ tree index structure.

[0038] The data writing submodule uses the logical index time key as the primary key to insert data packets including the effective watermark value into the leaf nodes of the B+ tree index structure, and triggers a node split operation when the node data volume reaches the upper limit of the node capacity of the B+ tree index structure.

[0039] As a further aspect of the present invention, the specific process of data insertion and node splitting performed by the data writing submodule includes:

[0040] Locate the target leaf node in the B+ tree index structure that corresponds to the value range of the logical index time key, and append the data packet to the end of the leaf node sequence of the target leaf node;

[0041] Real-time monitoring of the actual data occupancy of the target leaf node, and comparison of the actual data occupancy with the upper limit of the node capacity of the B+ tree index structure;

[0042] If the actual data usage exceeds the maximum capacity of the B+ tree index structure node and meets the split trigger ratio in the node split threshold coefficient, then the node splitting procedure is started, the current leaf node is created and the branch index key of the parent node is updated, thus completing the update of the B+ tree index structure.

[0043] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0044] In this invention, the fluctuation characteristics of water level time series statistical discrete quantification are calculated, and the index split coefficient is dynamically matched based on variance. When the fluctuation exceeds the warning line, the upper limit of the database B+ tree index node capacity is automatically adjusted to optimize the stability of high-frequency data writing structure. Combining upstream discharge and river parameters, the average flow velocity of water flow is inverted using the Manning formula, and the transmission lag time is calculated to generate logical index time keys. The physical acquisition time is corrected to a logical time containing causal logic to complete the data storage. On the basis of ensuring causal alignment of time series data, the index building efficiency and query response speed of the database under high concurrency are improved. Attached Figure Description

[0045] Figure 1 This is a block diagram illustrating the overall system architecture of the present invention.

[0046] Figure 2 This is a flowchart of the water level status sensing logic of the present invention;

[0047] Figure 3 This is a flowchart illustrating the adaptive logic of the index structure of this invention.

[0048] Figure 4 This is a flowchart of the causal lag calculation logic of the present invention;

[0049] Figure 5 The flowchart illustrates the construction logic of the spatiotemporal index in this invention. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this invention clearer, the software-based technical solution is described in detail below with reference to system architecture diagrams and embodiments. It should be understood that the specific embodiments described herein are only for explaining the technical solutions of this invention and do not constitute a limitation on the scope of protection.

[0051] In the description of this invention, the system architecture relationships or data processing flows indicated by terms such as "layer," "module," "interface," "data flow," "client," and "server" are all defined based on the architecture diagram or flowchart corresponding to the embodiments. This way of describing is only used to clearly illustrate the logical relationships between the elements in the technical solution, and not to limit the physical deployment form. The term "multiple" includes two or more technical units, including but not limited to multiple data nodes, processing threads, service instances, or functional components and other scalable elements. The specific number is determined according to the actual business scenario and needs to be specifically specified.

[0052] Please see Figure 1 and Figure 2 This invention provides a technical solution: a cloud-based sluice gate monitoring and control system comprising:

[0053] The water level status sensing module collects real-time water level data output by the water level monitoring instrument in front of the gate, constructs a time series set of water levels including continuous sampling points, calls the variance calculation function to calculate the statistical dispersion of the water level time series set, and generates the water level fluctuation variance value.

[0054] The variance of water level fluctuations includes fluctuation amplitude statistics, dispersion numerical labels, and time series stability scores;

[0055] The water level status sensing module includes:

[0056] The data acquisition submodule acquires real-time water level data in front of the gate, processes the real-time water level data in front of the gate through a preset signal filtering algorithm, filters out high-frequency noise components and abnormal abrupt changes, and generates purified effective water level values.

[0057] The time series construction submodule stores the valid water level values ​​into a first-in-first-out queue according to the collection time sequence. When the queue length reaches the preset window size, the queue contents are locked, and a time series set of water levels from continuous sampling points including timestamps is constructed.

[0058] The discrete calculation submodule calls the variance calculation function to calculate the sum of squared deviations of each data point in the continuous sampling point water level time series set from the set mean. The sum of squared deviations is divided by the total number of sampling points and normalized to generate the water level fluctuation variance value.

[0059] The specific logic for executing the variance calculation function in the discrete computation submodule is as follows:

[0060] Obtain the time series set of water levels from continuous sampling points and the total number of sampling points included in the set, and calculate the arithmetic mean of the values ​​of all sampling points as the baseline water level.

[0061] The following variance calculation formula is used to process the time series set of water level data from consecutive sampling points to generate the variance value of water level fluctuations:

[0062] ;

[0063] in, This represents the variance of water level fluctuations. Represents the total number of sampling points. Representing the The effective water level values ​​at each sampling point Represents the baseline water level. This represents the preset volatility weighting coefficient. This represents the water level value at the previous sampling point. This represents the sampling time interval.

[0064] The data acquisition submodule first activates the high-frequency radar water level gauge, setting the sampling frequency to 1Hz, to continuously monitor the water level at the upstream section of the sluice gate. The sensor outputs a raw analog signal, which is converted into a digital water level sequence after analog-to-digital conversion. During the acquisition process, the submodule calls a preset moving average filtering algorithm, setting the filtering window length to 5, meaning that it takes the five most recently acquired water level data points each time. Perform an arithmetic average; for example, the raw water level data sequence collected at a certain moment is... ,in The submodule performs filtering operations to identify abrupt high-frequency noise caused by birds flying overhead. Data that deviates from the mean by more than 3 standard deviations should be removed and replaced with linear interpolation. Then calculate average This serves as the effective water level value after purification at that moment.

[0065] The aforementioned moving average filtering algorithm is a digital signal processing method for smoothing signal data. It takes a segment of data point by point in sequence, averages it, and uses the calculated average value as the output value of the current point, thereby effectively suppressing the interference of random noise and improving the smoothness of the data.

[0066] The timing construction submodule initializes a length of A first-in-first-out (FIFO) queue is used, corresponding to a 60-second monitoring window. Whenever a new valid water level value is generated, the submodule pushes it to the tail of the queue. If the queue currently has fewer than 60 elements, it continues to wait; if the queue is full, the oldest data point at the head of the queue is removed, maintaining a constant queue length of 60. The submodule binds a UNIX timestamp of the acquisition time to each data point in the queue, forming a structured, continuous sampling point water level time series set. When the queue is full, a locking mechanism is triggered, copying the current 60 data points and their timestamp snapshots from memory to the computation buffer for subsequent discreteness calculations.

[0067] The discrete computing submodule reads the continuous sampling point water level time series set from the buffer and iterates through the 60 floating-point water level values ​​in the set. The submodule first performs an accumulation operation to sum the values, then divides the sum by the total number of sampling points (60) to obtain the baseline water level. Subsequently, the submodule iterates through the set again, for each sampling point. Calculate its relationship with The submodule calculates the difference and squares it. Simultaneously, it reads the value from the previous time step for that sampling point. The absolute difference between the two values ​​is calculated to characterize the instantaneous rate of change. The submodule multiplies the squared difference by the weighted instantaneous rate of change to complete the calculation of the single-point fluctuation value. All single-point fluctuation values ​​are summed and divided by the total number of 60 to generate the final water level fluctuation variance value. The value is then formatted as a double-precision floating-point number, along with the end timestamp of the current calculation window, and output to the downstream module.

[0068] Regarding the logical formula for the variance calculation function executed in the discrete computation submodule:

[0069] ;

[0070] in, The variance of the water level fluctuation in the final output quantifies the degree of fluctuation in the current water level. This represents the total number of sampling points within the sampling window; in this embodiment, the value is 60. Representing the The effective water level values ​​at each sampling point are in meters. This represents the arithmetic mean of all sampling points within the current window, i.e., the baseline water level. The symbol represents the number of elements in the window from the first to the second. The calculation results of each data point are summed up. The preset fluctuation weighting coefficient is a dimensionless empirical parameter used to amplify the impact of high-frequency fluctuations on the overall variance. In the representative time series, located at The value of the sampling point at the previous position; It represents the absolute value of the water level change between two adjacent sampling points; This represents the sampling time interval, which is 1 second in this embodiment.

[0071] To determine the values ​​of the parameters in the formula, this embodiment obtains data through a control experiment conducted in an actual water tank laboratory. The experimental settings are as follows: parameters The setup process involves selecting a known segment of steady-flow data (variance baseline 0.001) and a segment of turbulent flow data during gate opening (the desired variance needs to be increased to above 0.01 to trigger the alarm). If set... The variance of the turbulent data was only 0.002, indicating insufficient discrimination. Testing revealed that when... When the value is 10, the calculation results of turbulence data can be effectively amplified to the 0.015 range, therefore, it is set to... The specific calculation example is as follows: A simplified demonstration is performed using three consecutive data points from the time series set (actually 60). Assume... , , ;

[0072] The collected data sequence is as follows: (Prequel point) , , ;

[0073] The first step is to calculate the baseline water level. ;

[0074] The second step is to calculate each point:

[0075] The calculated value of point 1 is ;

[0076] The calculated value of point 2 is ;

[0077] The calculated value of point 3 is ;

[0078] The third step is to calculate the average:

[0079] ;

[0080] The calculation result This indicates that the current water level is fluctuating slightly and is below the normal warning line, so the system determines that the water flow is relatively stable.

[0081] Please see Figure 1 and Figure 3The index structure adaptive module constructs a mapping table between variance values ​​and splitting coefficients, retrieves the coefficient values ​​corresponding to the water level fluctuation variance values, and generates node splitting threshold coefficients when the water level fluctuation variance values ​​exceed the warning threshold.

[0082] The node split threshold coefficients are specifically the page fill rate threshold, split trigger ratio, and node overflow tolerance.

[0083] The index structure adaptive module includes:

[0084] The mapping construction submodule obtains historical water level fluctuation statistics and database performance indicators, establishes the correspondence between differentiated fluctuation ranges and optimal splitting parameters through cluster analysis, and constructs a mapping table of variance values ​​and splitting coefficients, including multi-level index key values.

[0085] The threshold retrieval submodule takes the water level fluctuation variance value as the query key and inputs the variance value and split coefficient mapping table. It uses a binary search algorithm to locate the fluctuation range to which the water level fluctuation variance value belongs and extracts the basic split parameters corresponding to the range from the mapping table.

[0086] The coefficient generation submodule determines whether the variance of water level fluctuation is greater than the preset warning threshold. If the determination result is yes, the preset aggressive adjustment factor is applied to the basic splitting parameters to generate the node splitting threshold coefficient.

[0087] The specific process by which the coefficient generation submodule determines the node splitting threshold coefficient includes:

[0088] Obtain the default page fill rate and default overflow tolerance included in the basic split parameters, and calculate the ratio of the water level fluctuation variance value to the warning threshold to generate the fluctuation over-limit ratio;

[0089] The default page fill rate is calculated by performing an inverse linear decay calculation using the fluctuation over-limit ratio, and a page fill rate threshold is generated.

[0090] The node overflow tolerance is generated by multiplying the default overflow tolerance by the logarithmic function value of the fluctuation over-limit ratio, and then the node splitting threshold coefficient is generated by integrating the page fill rate threshold with the node overflow tolerance.

[0091] The mapping construction submodule first extracts water level fluctuation statistics (approximately 31 million records) from the historical database over the past year, along with corresponding performance metrics such as database write latency and CPU utilization. The submodule then uses the K-Means clustering algorithm to analyze the historical data. Cluster analysis was performed on the values, dividing them into three differential fluctuation ranges: a stable range and a stable range. General fluctuation range 2000 volatile range For each interval, the optimal B+ tree splitting parameters that can maintain the lowest write latency (below 50ms) are determined by backtracking historical performance metrics. For example, in a stable interval, the optimal page fill rate is 0.9 to reduce space waste; in a drastically fluctuating interval, the optimal page fill rate needs to be reduced to 0.5 to reduce the IO overhead caused by frequent splits. The submodule solidifies these correspondences into a variance value and splitting coefficient mapping table, which is stored in an in-memory hash table. The key value is the upper and lower limits of the fluctuation interval, and the value is a structure containing the basic splitting parameters (default page fill rate, default overflow tolerance).

[0092] The K-Means clustering algorithm mentioned above is an iterative clustering analysis algorithm. Its steps are to randomly select K objects as initial cluster centers, then calculate the distance between each object and each seed cluster center, and assign each object to the cluster center closest to it. The cluster centers and the objects assigned to them represent a cluster.

[0093] The threshold retrieval submodule receives the water level fluctuation variance value output by the previous module. (Continuing from the assumptions of the previous example, this is set as a case with significant fluctuations.) The submodule will... As the query key, a binary search is performed within the key-value range of the mapping table. Because... The algorithm identifies a "highly volatile range." The submodule extracts the basic splitting parameters from the mapping items within this range: default page fill rate. Default overflow tolerance (Number of entries).

[0094] The coefficient generation submodule reads the preset warning threshold. This embodiment sets ;

[0095] Submodule executes the judgment logic:

[0096] The result is yes;

[0097] At this point, the dynamic adjustment process begins. The submodule first calculates the fluctuation over-limit ratio. ;

[0098] Subsequently, the submodule calls the preset aggressive adjustment factor (with a linear decay coefficient). ), to correct the basic parameters;

[0099] Calculate the page fill rate threshold:

[0100] ;

[0101] Simultaneously calculate node overflow tolerance:

[0102] Rounded down to 14;

[0103] Finally, the submodule sets the page fill rate threshold. (i.e., 43.75%) is integrated with the node overflow tolerance of 14 into a node splitting threshold coefficient, which is then sent to the spatiotemporal index construction module.

[0104] Table 1 lists the parameter mappings and calculation examples under different fluctuation ranges, as shown in Table 1:

[0105] Table 1. Mapping and Adjustment Table for Fluctuation Variance Parameters

[0106]

[0107] As shown in Table 1, when the input variance exceeds the warning threshold, the page fill rate threshold will be further reduced to reserve more space to cope with possible data bursts.

[0108] Please see Figure 1 and Figure 4 The causal lag calculation module obtains the real-time discharge flow rate and the distance between upstream and downstream gate stations monitored by the flow meter of the upstream hydrological station. It uses the real-time discharge flow rate and the preset river roughness parameters to calculate the average flow velocity using the Manning formula. The distance between upstream and downstream gate stations is divided by the average flow velocity to generate the flow propagation lag time.

[0109] The water flow propagation lag time specifically refers to the wave propagation delay value, hydraulic response interval, and transmission offset time.

[0110] The causal lag calculation module includes:

[0111] The parameter acquisition submodule reads the real-time discharge flow monitored by the flow meter of the upstream hydrological station, and extracts the distance between upstream and downstream gate stations, preset river roughness parameters, and river hydraulic radius data from the system configuration library.

[0112] The velocity calculation submodule converts the real-time discharge volume into velocity units, combines preset river roughness parameters and river hydraulic radius data, and uses Manning's formula to back-calculate the velocity value under the current hydraulic conditions to generate the average flow velocity.

[0113] The lag generation submodule calculates the quotient between the distance between upstream and downstream gate stations and the average flow velocity of the water flow. It then corrects the quotient by adding a preset system processing delay constant to generate the water flow propagation lag time.

[0114] The flow velocity calculation submodule uses the following logical formula to calculate the average flow velocity of water:

[0115] ;

[0116] in, Represents the average flow velocity of the water. This represents the preset channel roughness parameter. Data representing the hydraulic radius of the river channel. This represents the hydraulic gradient calculated using real-time discharge volume and river cross-sectional area. This represents the preset flow rate correction factor.

[0117] The parameter acquisition submodule reads the register values ​​of the upstream hydrological station flow meter through the industrial Ethernet interface to obtain the real-time discharge flow. Simultaneously, the submodule accesses the system configuration library to extract the distance between upstream and downstream gate stations. (i.e., 12 kilometers). The submodule also loads preset river channel physical parameters: preset river channel roughness parameters. (Corresponding to clean, natural soil river channels), and the river channel hydraulic radius data. Since the hydraulic radius varies with water level, the submodule consults the "Water Level-Hydraulic Radius Relationship Table" based on the current upstream water level to obtain the hydraulic radius at the current water level. In addition, the submodule adjusts the discharge rate based on real-time data. with average cross-sectional area of ​​the river channel (set as) To estimate the hydraulic gradient based on the relationship between the two. .

[0118] The flow velocity calculation submodule incorporates the above parameters into the transformation logic of the Manning formula. First, it calculates an approximate hydraulic gradient using empirical formulas or the difference in water levels between upstream and downstream. Here, it is set to obtain the value through real-time monitoring. The submodule performs exponentiation: calculates... and Subsequently, these intermediate values ​​were compared with the roughness. and preset flow rate correction coefficient (In this embodiment, the value is set to 0.95 to correct for the resistance caused by the river's bend.) A series of multiplications are performed to obtain the average flow velocity under the current hydraulic conditions. .

[0119] The delayed generation submodule performs a division operation, using the distance between upstream and downstream gate stations. Divide by the calculated average flow velocity The theoretical propagation time is obtained. Considering the physical delays inherent in data acquisition, transmission, and system processing, a preset system processing delay constant is added to the theoretical time for each submodule. The final summation generates the water flow propagation lag time. This time measurement is accurate to the second and is used for subsequent timeline alignment.

[0120] The Manning formula mentioned above is an empirical formula used in fluid mechanics to calculate the average velocity of uniform flow in open channels or pipes. This formula establishes a quantitative relationship between flow velocity and channel roughness, hydraulic radius, and hydraulic gradient.

[0121] Regarding the logical formula used by the flow rate calculation submodule:

[0122] ;

[0123] in, This represents the average flow velocity of water, measured in meters per second. This represents the Manning roughness coefficient, a dimensionless parameter; the smaller the value, the smoother the river channel. Represents the hydraulic radius, in meters, which is the ratio of the cross-sectional area of ​​the water passage to the wetted perimeter; Representing the hydraulic gradient, it is a dimensionless parameter that characterizes the energy loss rate along the flow path; The preset velocity correction factor is a dimensionless parameter used to compensate for deviations in the Manning formula under specific non-uniform flow conditions; the exponent and This is an empirical physical index.

[0124] The specific calculation example is as follows: Parameters are set as follows: , , , ;

[0125] The first step is to calculate the hydraulic radius term: ;

[0126] The second step is to calculate the hydraulic gradient term: ;

[0127] The third step is to substitute the values ​​into the formula to calculate the flow rate:

[0128] ;

[0129] Step 4: Calculate the lag time.

[0130] Theoretical dissemination time ;

[0131] Step 5: Add system latency:

[0132] (Approximately 2.2 hours);

[0133] The result indicates that current hydrological changes upstream will be transmitted to downstream gate stations in approximately 7925 seconds, and this timeframe will be used to correct the time index of data writing.

[0134] Please see Figure 1 and Figure 5 The spatiotemporal index construction module generates a logical index time key by subtracting the water flow propagation lag time from the collection timestamp. It sets the node capacity limit of the B+ tree index structure in the cloud time series database based on the node splitting threshold coefficient, and uses the logical index time key to write the associated data into the B+ tree index structure.

[0135] The B+ tree index structure includes a root node pointer, a leaf node sequence, branch index keys, and a logical time mapping table;

[0136] The spatiotemporal index building module includes:

[0137] The key-value generation submodule obtains the collection timestamp and the water flow propagation lag time, performs time subtraction to obtain the physical occurrence time, converts the physical occurrence time into a long integer value and performs hash mapping to generate a logical index time key.

[0138] The capacity adjustment submodule reads the current node configuration of the B+ tree index structure, dynamically modifies the split judgment condition of the leaf node according to the page fill rate threshold in the node split threshold coefficient, and sets the upper limit of the node capacity of the B+ tree index structure.

[0139] The data writing submodule uses the logical index time key as the primary key to insert data packets including the effective watermark value into the leaf nodes of the B+ tree index structure, and triggers a node split operation when the node data volume reaches the upper limit of the B+ tree index structure node capacity.

[0140] The specific process of data insertion and node splitting performed by the data writing submodule includes:

[0141] Locate the target leaf node in the B+ tree index structure that corresponds to the logical index time key value range, and append the data packet to the end of the leaf node sequence of the target leaf node;

[0142] Real-time monitoring of the actual data usage of the target leaf node, and comparison of the actual data usage with the upper limit of the B+ tree index structure node capacity;

[0143] If the actual data usage exceeds the maximum capacity of the B+ tree index structure node and meets the split trigger ratio in the node split threshold coefficient, then the node splitting procedure is started, the current leaf node is created and the branch index key of the parent node is updated, thus completing the update of the B+ tree index structure.

[0144] The key-value generation submodule obtains the physical acquisition timestamp of the current data packet, for example, November 28, 2025, 10:00:00, which corresponds to the UNIX timestamp. (Example values);

[0145] Simultaneously read the water flow propagation lag time output by the causal lag calculation module. ;

[0146] Submodule performs subtraction:

[0147] ;

[0148] This result represents the "logical occurrence time" of the data, meaning that the hydrological impact actually corresponds to the state upstream 7925 seconds ago. Subsequently, the submodule inputs this long integer value into the MurmurHash3 algorithm for hash mapping, generating a 64-bit unique logical index time key to solve the hotspot write problem in distributed storage.

[0149] The MurmurHash3 algorithm mentioned above refers to a non-cryptographic hash function that is suitable for general hash-based lookup operations. It has high computational performance and good collision resistance, and can map input data of arbitrary length to a hash value of fixed length.

[0150] The capacity adjustment submodule connects to the B+ tree configuration interface of the cloud-based time-series database, reads the physical capacity limit of the current leaf node, and sets it to... Record; the submodule reads the node splitting threshold coefficient generated in Example 2, where the page fill rate threshold is... The submodule dynamically modifies the splitting logic of the B+ tree in memory, forcibly setting the splitting trigger threshold from the default 100% (i.e., full load) or the normal 70% to a higher threshold. The data is rounded down to 87 records; this means that when the data in a node accumulates to 87 records, it is necessary to prepare for a split.

[0151] The data writing submodule uses the generated logical index time key as the primary key of the B+ tree to locate the target leaf node. This node currently stores 86 data records. The submodule appends a data packet containing the valid water level value (such as the previously calculated 12.558m) and the original variance value to this node, at which point the node's record count becomes 87. The submodule immediately performs real-time monitoring and comparison: Is the current occupied number of 87 records greater than or equal to the set capacity limit of 87 records? The result is yes. At this point, although the physical space is not full, to cope with possible sudden write pressure during periods of high fluctuation, the submodule immediately initiates the node splitting procedure. It allocates a new leaf node space, moves the latter half of the data in the current node (such as the last 43 records) to the new node, and extracts the minimum key value of the new node to update the branch index key of the parent node.

[0152] Table 2 shows the specific status of data writing and split determination, as shown in Table 2:

[0153] Table 2 B+ Tree Node Splitting Status Table

[0154]

[0155] Referring to Table 2, under the aggressive fill rate threshold control, the system performs a split when only 43.75% of the nodes are occupied. This ensures that the index structure always retains more than 50% of the redundant write capacity under high water level fluctuations (large variance), avoiding write blocking caused by page full splits when data floods arrive.

[0156] The above embodiments illustrate preferred embodiments of the present invention. Any equivalent adjustments to the technical solution based on software engineering methods are within the scope of protection, including but not limited to: implementing algorithm logic using different programming languages, refactoring functional modules into services, adjusting data interaction protocols, and optimizing resource scheduling strategies. Any implementation scheme derived from reasonable modifications to the data processing flow, service call chain, or system architecture layer without departing from the core technology of the present invention should be considered within the scope of protection defined by the claims of the present invention.

Claims

1. A cloud-based sluice gate monitoring and control system, characterized in that, The system includes: The water level status sensing module collects real-time water level data output by the water level monitoring instrument in front of the gate, constructs a time series set of water levels including continuous sampling points, calls the variance calculation function to calculate the statistical dispersion of the water level time series set, and generates the water level fluctuation variance value. An adaptive index structure module constructs a mapping table between variance values ​​and splitting coefficients, retrieves the coefficient values ​​corresponding to the water level fluctuation variance value, and generates node splitting threshold coefficients when the water level fluctuation variance value exceeds the warning threshold. The causal lag calculation module obtains the real-time discharge flow rate and the distance between upstream and downstream gate stations monitored by the flow meter of the upstream hydrological station. It uses the real-time discharge flow rate and the preset river roughness parameter to calculate the average flow velocity of the water flow using the Manning formula. It then divides the distance between upstream and downstream gate stations by the average flow velocity to generate the water flow propagation lag time. The spatiotemporal index construction module generates a logical index time key by subtracting the water flow propagation lag time from the collection timestamp, sets the node capacity limit of the B+ tree index structure in the cloud time series database according to the node splitting threshold coefficient, and writes the associated data into the B+ tree index structure using the logical index time key.

2. The cloud-based sluice gate monitoring and control system according to claim 1, characterized in that, The water level fluctuation variance value includes fluctuation amplitude statistics, dispersion numerical label, and temporal stability score. The node splitting threshold coefficient specifically includes page fill rate threshold, splitting trigger ratio, and node overflow tolerance. The water flow propagation lag time specifically refers to wave propagation delay value, hydraulic response interval, and transmission offset duration. The B+ tree index structure includes root node pointer, leaf node sequence, branch index key, and logical time mapping table.

3. The cloud-based sluice gate monitoring and control system according to claim 2, characterized in that, The water level sensing module includes: The data acquisition submodule acquires real-time water level data in front of the gate, processes the real-time water level data in front of the gate through a preset signal filtering algorithm, filters out high-frequency noise components and abnormal change points, and generates purified effective water level values. The time-series construction submodule stores the effective water level values ​​into a first-in-first-out queue according to the collection time sequence. When the queue length reaches the preset window size, the queue contents are locked, and a time-series set of water levels from continuous sampling points including timestamps is constructed. The discrete calculation submodule calls the variance calculation function to calculate the sum of squared deviations of each data point in the continuous sampling point water level time series set from the set mean. The sum of squared deviations is then divided by the total number of sampling points and normalized to generate the water level fluctuation variance value.

4. The cloud-based sluice gate monitoring and control system according to claim 3, characterized in that, The specific logic for the discrete computation submodule to execute the variance calculation function is as follows: Obtain the time series set of water levels at the continuous sampling points and the total number of sampling points included in the set, and calculate the arithmetic mean of the values ​​of all sampling points as the baseline water level. The following variance calculation formula is used to process the time series set of water levels at continuous sampling points to generate the water level fluctuation variance value: ; in, This represents the variance of water level fluctuations. Represents the total number of sampling points. Representing the The effective water level values ​​at each sampling point Represents the baseline water level. This represents the preset volatility weighting coefficient. This represents the water level value at the previous sampling point. This represents the sampling time interval.

5. The cloud-based sluice gate monitoring and control system according to claim 4, characterized in that, The index structure adaptive module includes: The mapping construction submodule obtains historical water level fluctuation statistics and database performance indicators, establishes the correspondence between differentiated fluctuation ranges and optimal splitting parameters through cluster analysis, and constructs a mapping table of variance values ​​and splitting coefficients, including multi-level index key values. The threshold retrieval submodule takes the water level fluctuation variance value as the query key and inputs it into the mapping table between the variance value and the splitting coefficient. It then uses a binary search algorithm to locate the fluctuation range to which the water level fluctuation variance value belongs and extracts the basic splitting parameter corresponding to the range from the mapping table. The coefficient generation submodule determines whether the variance of the water level fluctuation is greater than a preset warning threshold. If the determination result is yes, a preset aggressive adjustment factor is applied to the basic splitting parameters to generate node splitting threshold coefficients.

6. The cloud-based sluice gate monitoring and control system according to claim 5, characterized in that, The specific process by which the coefficient generation submodule determines the node splitting threshold coefficient includes: Obtain the default page fill rate and default overflow tolerance included in the basic split parameters, and calculate the ratio of the water level fluctuation variance value to the warning threshold to generate the fluctuation over-limit ratio; The default page fill rate is calculated by performing a reverse linear decay calculation using the fluctuation over-limit ratio to generate a page fill rate threshold. Multiply the default overflow tolerance by the logarithmic function value of the fluctuation over-limit ratio to generate the node overflow tolerance, and integrate the page fill rate threshold with the node overflow tolerance to generate the node splitting threshold coefficient.

7. The cloud-based sluice gate monitoring and control system according to claim 1, characterized in that, The causal lag calculation module includes: The parameter acquisition submodule reads the real-time discharge flow monitored by the flow meter of the upstream hydrological station, and extracts the distance between upstream and downstream gate stations, preset river roughness parameters, and river hydraulic radius data from the system configuration library. The velocity calculation submodule converts the real-time discharge volume into velocity units, combines the preset river roughness parameters and the river hydraulic radius data, and uses the Manning formula to back-calculate the velocity value under the current hydraulic conditions to generate the average flow velocity. The lag generation submodule calculates the quotient between the upstream and downstream gate spacing and the average flow velocity of the water flow, and corrects the quotient by superimposing a preset system processing delay constant to generate the water flow propagation lag time.

8. The cloud-based sluice gate monitoring and control system according to claim 7, characterized in that, The logical formula used by the flow velocity calculation submodule to calculate the average flow velocity of the water is as follows: ; in, Represents the average flow velocity of the water. This represents the preset channel roughness parameter. Data representing the hydraulic radius of the river channel. This represents the hydraulic gradient calculated using real-time discharge volume and river cross-sectional area. This represents the preset flow rate correction factor.

9. The cloud-based sluice gate monitoring and control system according to claim 8, characterized in that, The spatiotemporal index construction module includes: The key-value generation submodule obtains the collection timestamp and the water flow propagation lag time, performs time subtraction to obtain the physical occurrence time, converts the physical occurrence time into a long integer value and performs hash mapping to generate a logical index time key. The capacity adjustment submodule reads the current node configuration of the B+ tree index structure, dynamically modifies the split determination condition of the leaf nodes according to the page fill rate threshold in the node split threshold coefficient, and sets the upper limit of the node capacity of the B+ tree index structure. The data writing submodule uses the logical index time key as the primary key to insert data packets including the effective watermark value into the leaf nodes of the B+ tree index structure, and triggers a node split operation when the node data volume reaches the upper limit of the node capacity of the B+ tree index structure.

10. The cloud-based sluice gate monitoring and control system according to claim 9, characterized in that, The specific process of data insertion and node splitting performed by the data writing submodule includes: Locate the target leaf node in the B+ tree index structure that corresponds to the value range of the logical index time key, and append the data packet to the end of the leaf node sequence of the target leaf node; Real-time monitoring of the actual data occupancy of the target leaf node, and comparison of the actual data occupancy with the upper limit of the node capacity of the B+ tree index structure; If the actual data usage exceeds the maximum capacity of the B+ tree index structure node and meets the split trigger ratio in the node split threshold coefficient, then the node splitting procedure is started, the current leaf node is created and the branch index key of the parent node is updated, thus completing the update of the B+ tree index structure.