Water level data acquisition and processing system based on internet of things

Through trend identification and dynamic sampling frequency adjustment of the IoT water level data acquisition system, combined with timestamp indexing and bidirectional mapping structure, the problems of response lag and loose data structure in water level data acquisition and processing are solved, and more efficient water level data processing and sudden anomaly identification are achieved.

CN120508683BActive Publication Date: 2025-10-10中核第七研究设计院有限公司
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing water level data acquisition and processing system lacks the ability to judge the water level fluctuation trend in real time, resulting in delayed response and difficulty in capturing key data signals in a timely manner. In addition, the data structure is loose, the processing efficiency is low, and abnormal points cannot be located in time, which easily leads to early warning failure and reduced data reliability.

Method used

A water level data collection and processing system based on the Internet of Things is adopted. The trend recognition module is used to analyze the water level change trend, dynamically adjust the sampling frequency, combine the timestamp index mechanism with the bidirectional mapping structure to encapsulate the data, and identify the mutation breakpoints through the anomaly rejection module for segmented storage.

Benefits of technology

It improves the response sensitivity and timeliness of water level data, enhances the integrity of data structure and the convenience of index management, and improves the ability to identify sudden anomalies and the adaptability of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508683B_ABST
    Figure CN120508683B_ABST
Patent Text Reader

Abstract

The present application relates to water level data processing technical field, specifically to water level data acquisition and processing system based on internet of things, system includes trend identification module, sampling frequency modulation module, data encapsulation module, abnormal elimination module, instruction linkage module.In the present application, through analyzing continuous water level change trend, trend identification is realized and sampling frequency is dynamically adjusted, so that sampling interval and actual water level fluctuation state are matched, response sensitivity of water level data and timeliness of data acquisition are improved, time stamp index mechanism and bidirectional mapping structure are used to construct unified encapsulation format, integrity of water level data structure and convenience of index management are enhanced, sudden break point is identified through water level amplitude difference and data is stored in segments, data stability and sudden situation identification ability are improved, and adaptive ability of water level information processing, maintaining level of data continuity and response efficiency to sudden abnormality are overall improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water level data processing, and in particular to a water level data acquisition and processing system based on the Internet of Things. Background Art

[0002] The field of water level data processing technology involves real-time perception, data collection, data transmission and subsequent processing and analysis of water level information in natural water bodies or artificial waters, including water level change monitoring, precise collection of water level data, optimization of water level information transmission paths and comprehensive analysis of environmental parameters. It is widely used in flood prevention and early warning, water resources scheduling, water conservancy project supervision and other scenarios. Among them, the traditional water level data acquisition and processing system refers to the collection of water level height signals through specific equipment such as pressure water level sensors or ultrasonic water level sensors, and the lower computer controller regularly transmits the collected data to the upper computer platform through serial communication for processing and storage. Generally, the sensor ranging feedback signal acquisition method and the timed polling data transmission mechanism are used to complete the acquisition and synchronous update of water level data.

[0003] In the existing water level data collection and processing process, fixed-interval sampling is performed through a timed polling mechanism, which lacks the ability to judge the water level fluctuation trend in real time, resulting in delayed response when the water level changes drastically or suddenly, and difficulty in capturing key data signals in a timely manner. At the same time, the sensor collection results are directly uploaded to the host computer through serial communication. There is a lack of intermediate processing links to screen and encapsulate the data, resulting in a loose data structure and low processing efficiency. When there are sudden jumps or abnormal fluctuations, it is impossible to locate abnormal points in time and effectively isolate and mark the data, which can easily cause subsequent analysis deviations. In scenarios such as flood control monitoring that require high real-time and accuracy, it is easy to cause warning failures and reduced data reliability. Summary of the Invention

[0004] The purpose of the present invention is to solve the shortcomings of the prior art and propose a water level data acquisition and processing system based on the Internet of Things.

[0005] In order to achieve the above objectives, the present invention adopts the following technical solutions: The water level data acquisition and processing system based on the Internet of Things includes:

[0006] The trend identification module obtains the water level values ​​of three consecutive time points recorded by the water level collection node in the natural water body, calculates the difference direction of two adjacent groups of water level values, marks a unidirectional trend or an oscillating trend, and obtains a trend direction determination identifier;

[0007] The sampling frequency adjusting module multiplies the sampling interval and the adaptive sampling rate adjusting coefficient and writes the product into the timing register if the trend direction is unidirectional trend, or multiplies the sampling interval and the steady state maintaining coefficient and writes the product into the timing register if the trend direction is oscillation trend, to obtain a sampling frequency adjusting record;

[0008] The data packaging module binds a time stamp in sequence and establishes a sequential index according to each water level value generated by the sampling frequency adjusting record in the collection node, constructs a bidirectional mapping structure of the water level value and the index, compresses into a structure data block, and generates a water level data structure unit.

[0009] The abnormality elimination module calculates the amplitude difference between two adjacent points in sequence based on the water level data structure unit, judges whether the amplitude difference exceeds a hydrological mutation threshold, and if so, marks the corresponding index position as a breakpoint to generate a sudden jump breakpoint section index set.

[0010] As a further scheme of the present application, the trend direction determination identifier includes a trend category, a change continuity and a direction stability, the sampling frequency adjusting record includes a frequency adjusting coefficient category, a frequency adjusting result value and a register state, the water level data structure unit includes a time index structure, a water level mapping relationship and a compressed data block, and the sudden jump breakpoint section index set includes a breakpoint position marking record, a mutation amplitude level and a segmented storage index.

[0011] As a further scheme of the present application, the trend recognition module includes:

[0012] The water level difference value calculation sub-module obtains three time point water level values recorded in succession in the water level collection node in the natural water body, calculates the water level difference values of the first and second time points and the second and third time points respectively, calculates two water level difference values in sequence, and performs direction classification processing on the difference values to generate a water level difference value sequence.

[0013] The water level difference value direction judgment sub-module judges the positive and negative directions of the two groups of difference values according to the water level difference value sequence, marks as rising if the difference value is positive, marks as falling if the difference value is negative, combines the two direction judgment results to generate a difference value direction identifier pair.

[0014] The trend direction determination sub-module judges whether the two direction identifiers are consistent based on the difference value direction identifier pair, judges as unidirectional trend if the directions are consistent, judges as oscillation trend if the directions are opposite, and marks according to the trend direction judgment result to obtain a trend direction determination identifier.

[0015] As a further scheme of the present application, the sampling frequency adjusting module includes:

[0016] The trend screening submodule reads the identification value according to the collection point based on the trend direction determination identification, judges whether each trend identification is a one-way trend or a shock trend, classifies the record with the identification of the one-way trend as No. 1, classifies the record with the shock trend as No. 0, generates a classification index, and finally obtains a trend classification identification result;

[0017] The sampling interval adjustment submodule matches the corresponding adjustment strategy according to the trend classification identification result, combines the current sampling interval value and the loop response time increment for combined calculation if the trend is a one-way trend, introduces a trend judgment window and a fluctuation density for overall dynamic division adjustment if the trend is a shock trend, obtains an adjusted sampling interval through operation, and maps the corresponding interval value to the original sampling record according to the trend type to obtain a sampling interval adjustment record.

[0018] The sampling writing submodule writes the sampling interval adjustment record into the timing register, updates each record unit by matching the collection node ID and the adjustment value list, and writes the adjustment value into each record unit to update and establish a sampling frequency adjustment record.

[0019] As a further scheme of the present application, the data packaging module comprises:

[0020] The time binding submodule pairs the sampling time and the water level value one by one according to the sampling frequency adjustment record, sets the sequential index using a fixed step increment logic, determines the logical position of the binding structure in the sequence, and generates a water level binding index structure.

[0021] The mapping construction submodule establishes a bidirectional mapping list according to the water level value and the sequential index in the water level binding index structure, establishes a mapping structure using a hash table, generates a forward mapping using the sequential index as the key and the water level value as the value, generates a reverse mapping using the water level value as the key and the sequential index as the value, obtains a compressed mapping index value of each sampling record through operation, integrates the index value and the corresponding water level record in a structure, and obtains a compressed mapping encoding table.

[0022] The structure compression submodule reads each compressed index value and the corresponding original water level value according to the compressed index sequence in the compressed mapping encoding table, combines them into a structure unit, divides the sequence using a fixed-length structure block, combines all structure blocks into a whole structure data, and obtains a water level data structure unit.

[0023] As a further scheme of the present application, the abnormality elimination module comprises:

[0024] The amplitude difference extraction submodule extracts the water level values ​​and sampling times corresponding to any two adjacent sampling points in sequence based on the water level values ​​of all continuous time periods in the water level data structure unit, and establishes an amplitude difference sequence. It sorts all adjacent water level difference values, records their position indexes in the original data, and establishes a corresponding relationship between the amplitude difference and its time span to obtain an amplitude change sequence;

[0025] The mutation judgment submodule performs a judgment operation based on the amplitude difference information of all records in the amplitude change sequence and the hydrological mutation threshold, detecting whether each water level difference exceeds the threshold. If the mutation condition is met, the location is marked as the mutation location, and the location information is uniformly collected and sorted to finally obtain a sudden change index list;

[0026] The breakpoint marking submodule reads the corresponding water level structure number and time field in sequence according to all the mutation positions in the sudden change index list, identifies the start and end positions of the segment where each mutation point is located, and uses the mutation point as the cutting node to construct an inter-segment grouping index for the water level data. The correspondence between all the divided segment numbers and the original data is uniformly recorded and archived to establish a sudden breakpoint segment index set.

[0027] As a further embodiment of the present invention, the system further comprises:

[0028] The instruction linkage module is based on all the structural positions in the sudden breakpoint segment index set, combined with the task cache table in the water level acquisition node controller, and injects the sampling interval and data read and write status identifier according to the structure number corresponding to each segment to generate the Internet of Things water level acquisition and processing mapping table;

[0029] The Internet of Things water level collection and processing mapping table includes task number mapping results, read and write status control records, and sampling frequency injection information.

[0030] As a further solution of the present invention, the instruction linkage module includes:

[0031] The structure number extraction submodule sequentially reads the start and end positions of each breakpoint segment based on all structure positions in the sudden breakpoint segment index set, extracts the corresponding structure number set, and sorts the structure numbers according to the order of appearance in the sampling sequence, merges and marks the continuous number sequences, and generates a segment structure number list;

[0032] The task parameter binding submodule binds the task injection parameters according to each numbered section sequence in the section structure number list, identifies the corresponding task record position of each structure number in the cache table of the water level collection node controller task, extracts the sampling interval, data writing state and communication response state for comparison, performs field binding operation on the task items missing or to be updated, sets the update strategy according to the section attribute information corresponding to the structure number, and generates a control task injection parameter set;

[0033] The information mapping generation submodule establishes a task field mapping dictionary taking the structure number as the primary key according to each item of structure number and corresponding parameter information recorded in the control task injection parameter set, aggregates the sampling interval identifier, data read-write state and communication response state, and establishes an index order table to obtain the Internet of Things water level collection processing mapping table.

[0034] Compared with the prior art, the advantages and positive effects of the present application are that:

[0035] In the present application, trend recognition is realized by analyzing continuous water level change trend and dynamically adjusting the sampling frequency, so that the sampling interval matches the actual water level fluctuation state, the response sensitivity of water level data and the timeliness of data acquisition are improved, the time stamp indexing mechanism and bidirectional mapping structure are used to construct a unified packaging format, the integrity of the water level data structure and the convenience of index management are enhanced, the data stability and the ability to identify sudden changes are improved by identifying sudden change points through water level amplitude difference and storing data in segments, and the adaptive ability of water level information processing, the level of maintaining data continuity and the response efficiency to sudden abnormalities are improved as a whole. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 The system flowchart of the present application is shown in the figure;

[0037] Figure 2 The trend recognition module flowchart of the present application is shown in the figure;

[0038] Figure 3 The sampling frequency modulation module flowchart of the present application is shown in the figure;

[0039] Figure 4 The data packaging module flowchart of the present application is shown in the figure;

[0040] Figure 5 The abnormality elimination module flowchart of the present application is shown in the figure;

[0041] Figure 6 The instruction linkage module flowchart of the present application is shown in the figure. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and not to limit the present application.

[0043] In the description of the present application, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, in the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.

[0044] Please refer to Figure 1 The water level data acquisition and processing system based on the Internet of Things comprises:

[0045] The trend identification module obtains three time point water level values recorded continuously by the water level acquisition node in the natural water body, calculates the difference direction of adjacent two groups of water level values, and compares the two difference directions. When both directions are positive or negative, it is marked as a one-way trend, and if one is positive and the other is negative, it is marked as a shock trend, and a trend direction determination mark is obtained.

[0046] The sampling frequency adjustment module, based on the trend direction determination mark, combines the current sampling interval time value. If the trend direction is a one-way trend, the product of the sampling interval and the adaptive sampling rate adjustment coefficient (in accordance with the "Hydrological Monitoring Data Communication Protocol") is calculated and written into the timing register. If the trend direction is a shock trend, the product of the sampling interval and the steady-state maintenance coefficient (in accordance with the "Geographic Information Positioning Service" standard) is calculated and written into the timing register, and a sampling frequency adjustment record is obtained.

[0047] The data encapsulation module binds time stamps in sequence and establishes sequential indexes according to each water level value generated by the sampling frequency adjustment record control in the acquisition node, constructs a bidirectional mapping structure of the water level value and the index, compresses it into a structure data block, and generates a water level data structure unit.

[0048] The abnormality elimination module calculates the amplitude difference between adjacent two points in sequence based on all continuous time period water level values in the water level data structure unit, judges whether the amplitude difference exceeds the hydrological mutation threshold (±10 cm / 5 min according to GB / T50138-2010), and if it does, marks the corresponding index position as a breakpoint, records the breakpoint position and stores the water level data before and after the breakpoint in segments, and generates a set of jump breakpoint segment indexes.

[0049] The instruction linkage module injects the sampling interval and the data read-write state identifier corresponding to the structure number of each segment into the task buffer table in the water level collection node controller based on the set of all structure positions of the jump breakpoint segment, to generate the Internet of Things water level collection processing mapping table.

[0050] The trend direction determination identifier includes a trend category, a change continuity, and a direction stability. The sampling frequency adjustment record includes a frequency adjustment coefficient category, a frequency adjustment result value, and a register state. The water level data structure unit includes a time index structure, a water level mapping relationship, and a compressed data block. The set of jump breakpoint segment indexes includes a breakpoint position marker record, a mutation amplitude level, and a segment storage index. The Internet of Things water level collection processing mapping table includes a task number mapping result, a read-write state control record, and sampling frequency injection information.

[0051] Please refer to Figure 2 , the trend identification module includes:

[0052] The water level difference value calculation submodule obtains three time point water level values recorded by the water level collection node in the natural water body in succession, calculates the water level difference values of the first and second time points and the second and third time points respectively, sequentially calculates two water level difference values, and performs direction classification processing on the difference values to generate a water level difference value sequence.

[0053] The water level difference value calculation submodule obtains three time point water level values recorded by the water level collection node in the natural water body in succession, calculates the water level difference values of the first and second time points and the second and third time points respectively, sequentially calculates two water level difference values, and performs direction classification processing on the difference values to generate a water level difference value sequence. Taking July 1, 2024 as an example, the sampling times of the collection points A01, A02 and A03 are set as 06:00, 12:00 and 18:00 respectively, and the water level values recorded by each collection point are read, with the water level values of A01 being 2.35 meters, 2.42 meters and 2.50 meters, the water level values of A02 being 2.48 meters, 2.46 meters and 2.43 meters, and the water level values of A03 being 2.41 meters, 2.47 meters and 2.49 meters. The water level difference values of the first and second time points are obtained by subtracting the water level values of the first and second time points, and the water level difference values of the second and third time points are obtained by subtracting the water level values of the second and third time points. For example, the first group of difference values of A01 is 2.42-2.35=0.07 meters, and the second group of difference values is 2.50-2.42=0.08 meters, indicating that the water level is continuously rising. The first group of difference values of A02 is 2.46-2.48=-0.02 meters, and the second group of difference values is 2.43-2.46=-0.03 meters, indicating that the water level is continuously falling. The first group of difference values of A03 is 2.47-2.41=0.06 meters, and the second group of difference values is 2.49-2.47=0.02 meters, also indicating an upward trend. Each group of difference values should be accurate to 0.01 meters, and the original water level values should be continuously collected by the water level sensor and uploaded to the system for processing. The recording and calculation process can be completed in batches by scripts on the data platform side, and the difference value sequence is generated in sequence and summarized as shown in the following table.

[0054] Table 1 water level difference calculation table

[0055]

[0056] As shown in Table 1, the system completes the continuity change analysis according to the water level difference value at each time point, forms the water level difference value sequence of each collection point, and finally generates the water level difference value sequence.

[0057] The water level difference direction judgment submodule judges the positive and negative directions of the two groups of difference values according to the water level difference value sequence. If the difference value is positive, it is marked as rising, and if it is negative, it is marked as falling. The two direction judgment results are combined to generate a pair of difference direction identifiers.

[0058] According to the water level difference value sequence, the directionality of the two groups of difference values of each collection point is judged. When the difference value is positive, it is marked as rising, and when the difference value is negative, it is marked as falling. For example, in Table 1, the difference value 1 and the difference value 2 of A01 are both positive, which are 0.07 meters and 0.08 meters respectively, and are judged as "rising-rising". The two difference values of A02 are both negative, and are judged as "falling-falling". The two difference values of A03 are also both positive, and are judged as "rising-rising". During execution, the direction judgment should be realized by judging the positive and negative attributes of the difference value. Conditional statements or interval logic are used for assignment conversion. In the judgment logic, the difference value needs to be strictly divided into three categories. If it is greater than 0, it is marked as rising. If it is less than 0, it is marked as falling. If it is equal to 0, it is marked as flat. For example, when the difference value 1 is 0.00 meters, it can be regarded as no change in water level, and the direction is "stable". In the actual system, it is recommended that the difference value retain two decimal places, with an accuracy of centimeters. The subsequent system combines the two direction identifiers to form a pair of direction markers, reflecting the continuous change direction of the collection point in the two time periods, as shown in Table 2.

[0059] Table 2 difference value direction judgment table

[0060]

[0061] Referring to Table 2, through the directionality conversion and combination, the system completes the expression of the water level change behavior in the direction, and finally generates a pair of difference direction identifiers.

[0062] The trend direction determination submodule judges whether the two direction identifiers are consistent based on the pair of difference direction identifiers. If the directions are consistent, it is judged as a one-way trend. If the directions are opposite, it is judged as a shock trend. According to the trend direction judgment result, a trend direction determination identifier is obtained.

[0063] According to the difference direction mark, the trend type of the direction combination of each collection point is judged. The judgment basis is whether the two direction marks are consistent. If consistent, it is "up-up" or "down-down" type, and it is determined as a single trend. If the direction is inconsistent, such as "up-down" or "down-up", it is a shock trend. In A01 and A03, the direction is "up-up", and A02 is "down-down". All of them are single trends. If A04 is "up-down", it is determined as a shock trend. In the execution process, it is recommended to set a pre-judgment condition table to set a one-to-one mapping between the direction combination category and the trend type, such as "up-down" mapping to shock, "down-up" mapping to shock, and the rest mapping to single. The system compares and outputs the trend type in sequence according to the collection point, and the trend judgment list is formed by collecting all the collection point results, as shown in Table 3.

[0064] Table 3 Trend direction judgment table

[0065]

[0066] As shown in Table 3, based on the combination relationship of water level change direction, the system completes the classification judgment of trend type, and finally obtains the trend direction judgment mark.

[0067] Please refer to Figure 3 , the sampling frequency modulation module comprises:

[0068] The trend screening submodule reads the mark value according to the collection point based on the trend direction judgment mark, judges whether each trend mark is a single trend or a shock trend, classifies the records with single trend mark as 1, and classifies the records with shock trend mark as 0, and generates a classification index, and finally obtains a trend classification mark result;

[0069] Based on the trend direction judgment mark, the trend category of all sampling points is extracted. The system reads the trend judgment result field from the upstream module. The field value includes "single trend" and "shock trend". In the execution process, the system judges the trend state of each node in a string matching manner. If the result field is "single trend", it is assigned as 1, otherwise as 0, and recorded as a classification mark. In the implementation process, the trend identification results of sampling points A01, A02 and A03 are "single trend", "shock trend" and "single trend" respectively. The system automatically sets the corresponding classification marks of them as 1, 0 and 1 respectively. This operation is completed by traversing the trend mark list and the condition judgment logic. In Python, the classification mapping operation can be performed in batch through if condition structure, forming the trend mark classification structure shown in the following table, which is used for subsequent sampling strategy branch path selection.

[0070] Table 4 Trend classification mark table

[0071]

[0072] As shown in Table 4, the trend classification identification value will be used in the sampling strategy switching condition judgment node to finally generate the trend classification identification result.

[0073] The sampling interval adjustment submodule matches the corresponding adjustment strategy according to the trend classification identification results. If the trend is a unidirectional trend, it combines the current sampling interval value and the loop response time increment for combined calculation. If the trend is an oscillating trend, it introduces the trend judgment window and fluctuation density to perform overall dynamic division adjustment using the formula:

[0074] ;

[0075] The adjusted sampling interval is obtained by calculation, and the corresponding interval value is mapped to the original sampling record one by one according to the trend type to obtain the sampling interval adjustment record, where: Indicates the interval value after the sampling frequency is adjusted, in seconds. Indicates the current sampling interval. Its value is dynamically set by the sampling device based on the current system status or the sampling feedback of the previous cycle. The unit is also seconds. Indicates the time difference between the current sampling point and the reference point in the loop window. This value can be obtained by recording the timestamp of the sampling point and subtracting it from the timestamp of the reference point. The unit is seconds.

[0076] If the current sampling timestamp is 15.8 seconds and the reference sampling point is 13.7 seconds, then , Measured over the past several cycles Assume that the system obtains the time increment sequence {1.5, 1.6, 1.4, 1.3, 1.7, 1.5, 1.5, 1.6, 1.4, 1.3} in 10 cycles, and the sum is 15.8. The average value is , It represents the fluctuation density of data points per unit time. Its source is the square of the standard deviation of the sampled signal data within the unit time period. For example, 20 data points {3.1, 3.4, 3.2, 3.3, ...} are collected within 1 second, and their average value is 3.2. Then the standard deviation , squared to , for example, calculated , and then calculate the average value for multiple time periods , For example, the statistical results in the previous 10 seconds are {1.2, 1.4, 1.6, 1.5, 1.8, 1.9, 1.7, 1.6, 1.3, 1.5}, and the average is , put the above values ​​into the formula and the calculation process is as follows: First, find , then ask , and then we get the square root result Finally, all values are brought into the formula: The results show that when the current time increment of the sampling point is slightly larger than the historical average, and the data fluctuation density is also slightly higher than the historical average, the sampling system automatically adjusts the original sampling interval from 1.2 seconds to about 1.481 seconds, thereby adapting to the sampling timing strategy recommended by the trend state classification node. The adjusted sampling interval refers to the time interval value obtained by dynamically correcting the original fixed sampling time based on the combination of the current running state of the sampling node, the trend type, the response characteristics and the data fluctuation characteristics. This interval reflects the adaptive adjustment capability of the sampling system to the data update frequency under different trend scenarios. Its essence is to obtain a time correction value by calculating the combined effect of the sampling interval and the device response delay, and weighting the data fluctuation intensity and trend persistence. This value can be used to control the triggering frequency of the acquisition module, thereby realizing the corresponding sampling frequency adjustment when the system faces unidirectional rapid change or stable oscillation stage, so that the data acquisition behavior is synchronized with the dynamic characteristics of the external environment. The interval is written into the timing register as a period to directly drive the subsequent automatic sampling process.

[0077] The overall operation logic of the formula is based on the demand of the trend adaptive sampling strategy, and the purpose is to dynamically adjust the difference between the current sampling behavior and the historical statistical behavior in the real-time sampling process. First, the multiplication in the formula combines the current sampling interval with the subsequent standardized adjustment factor, that is, the current sampling interval is enlarged or reduced by a set of unitless change ratios. The adjustment factor is composed of two standardized indicators, where the numerator represents the relative change amplitude between the current sampling time increment and the historical time increment average. If the current increment is significantly larger than the historical average, it means that the current sampling point deviates far from the trend reference time, and the sampling may not be dense enough, so the sampling period should be shortened appropriately. When it is small, it means that the change is slow, and the sampling pace can be slowed down appropriately. In the denominator It represents the scaling of the change amplitude of the volatility density. Since the volatility density is essentially calculated based on the variance, it is measured using the squared standard deviation. However, in order to avoid excessive impact and amplification of outliers, the proportional term is structurally processed with a square root to slow down its growth, so that the sampling interval will not be over-compressed when the fluctuation is severe. The square root operation has a buffering effect, making the adjustment behavior smoother and more stable. Finally, by dividing the time difference normalization factor by the volatility density factor, an overall adjustment ratio is formed, which represents the relative proportion of "sampling time lag effect" and "data volatility". After multiplying this ratio by the current sampling interval, the update adjustment of the current sampling period is completed, so that the entire formula structurally integrates the dual control logic of "time delay trend" and "volatility trend", thereby meeting the dynamic adjustment requirements of real-time adaptive sampling.

[0078] The sampling writing submodule adjusts the record based on the sampling interval, writes it synchronously to the timing register, updates it one by one by matching the acquisition node ID with the adjustment value list, writes the adjustment value to each record unit, and updates and establishes the sampling frequency adjustment record;

[0079] According to the sampling interval adjustment record, the write update operation is performed on the timing register of each collection point. The system traverses the collection point ID list at the execution layer, retrieves the corresponding sampling interval adjustment value one by one, and writes it to the timing trigger configuration area through the register interface. For example, if the interval corresponding to node A01 is 108.67 seconds, the original 10-second value is replaced with 108.67 seconds. The system records the log content after executing the write operation. The write format includes three fields: timestamp, collection point number, interval before update, and interval after update. The update is completed after the node operation is confirmed to be correct. This operation is executed in a loop in the periodic sampling module. After each round of interval configuration update, a record index is synchronously established for data frequency modulation review or trend repair identification, and finally a sampling frequency adjustment record is established.

[0080] See also Figure 4 , the data encapsulation module includes:

[0081] The time binding submodule adjusts each water level value generated under the record control according to the sampling frequency, pairs the sampling time with the water level value one by one, and uses the fixed step-size auto-increment logic to set the sequential index to determine the logical position of the binding structure in the sequence and generate the water level binding index structure;

[0082] According to the sampling frequency adjustment record control of each water level value generated, the system synchronously extracts the water level sequence and time series in the records of each collection node. The system matches the corresponding sampling time field and water level field for each record in turn, and generates a logical number index based on the timestamp sequence. The sampling time field uses a unified period trigger. Taking the water level sampling every 10 seconds in node A01 as an example, the system collects 5 samples to form a time series T=[0, 10, 20, 30, 40] seconds, and the corresponding water level values ​​are V=[3.10, 3.12, 3.14, 3.11, 3.13] meters. The system packages each pair of <time, water level> information in chronological order and generates a sequential index G=[1, 2, 3, 4, 5] to indicate the arrangement position of the data in the logical sequence. By establishing a structured table mapping, the system expresses each record as a record unit in the form of <sampling sequence number, water level value, index G, sampling time>. The results are shown in Table 5, which serves as the basic input for subsequent mapping construction:

[0083] Table 5 Water level binding index structure table

[0084]

[0085] As shown in Table 5, the system has established a timestamp binding structure and a sequential number identifier for each sampling record, and obtained a water level binding index structure.

[0086] The mapping construction submodule establishes a bidirectional mapping list based on the water level value and the sequential index in the water level binding index structure, and uses a hash table to establish the mapping structure. It generates a forward mapping with the sequential index as the key and the water level value as the value, and generates a reverse mapping with the water level value as the key and the sequential index as the value, and uses the formula:

[0087] ;

[0088] The operation obtains the compression mapping index value of each sampling record, and structurally integrates the index value with the corresponding water level record to obtain the compression mapping coding table, where: Indicates the The compressed mapping index value of the sampling record, in meters per second, Indicates the Water level value, in meters, Indicates the The sequential index is a dimensionless natural number. represents the average of the sequential index, Indicates the The time offset of the sampling time relative to the reference time, in seconds. Indicates the total number of sampling records;

[0089] According to the water level value and index value G obtained in Table 6, the system constructs a forward hash map with G as the key, such as {1: 3.10, 2: 3.12, 3: 3.14, 4: 3.11, 5: 3.13}, and constructs a reverse map {3.10: 1, 3.12: 2, ...}, and then calculates the compressed index code for each record. Let the water level value of the third record be meters, corresponding index , time series seconds, the system first calculates the index average.

[0090] ;

[0091] Then calculate the index variance term and the time sum of squares:

[0092] ;

[0093] ;

[0094] Substitute into the formula:

[0095] ;

[0096] calculate:

[0097] ;

[0098] ;

[0099] This value represents the normalized mapping index value of the record under the water level intensity and sequence distribution. Other sampling records are substituted into their respective 、 、 By participating in the calculation, a complete compression index list can be formed, and finally a compression mapping encoding table can be obtained.

[0100] The compression mapping index value refers to the normalized strength index calculated during the water level data encapsulation process, combining the numerical size of each water level record, the degree of its position offset in the sequence, and the corresponding sampling time. This index reflects the structural importance of the data in the overall sampling distribution by multiplying the water level value by the discreteness of the index sequence in which it is located. At the same time, it is normalized using the sum of the squares of all sampling times as the time series scale standard, so that records under different time spans are comparable during compression processing. Finally, this value is used as a scalar result after one-dimensional compression to construct an index mapping table, and is used as a positioning code input in the subsequent structural compression process, providing a unified measurement basis for the structural reorganization of the original water level data.

[0101] The numerator part of the formula Represents the current water level value combination weight between the index sequence offset degree of the position where the value is located, index offset reflects the dispersion degree of each record in the sequence distribution relative to the average position, the sum of the square reflects the overall fluctuation trend, and the dispersion is then square rooted to eliminate the quantitative amplification brought by the square, and finally multiplied by the current water level value obtain the structure strength term; the denominator part denotes the square root of the sum of all sampling time points, which constitutes a normalized proportion factor of the time axis. If the sampling interval is uniform, the denominator can stably measure the degree of change in the time span. The final overall ratio is processed by absolute value to output a positive structure index value , reflecting the joint response characteristics of water level change and sampling structure under sequence distribution and time distribution.

[0102] The structure compression submodule reads each compression index value and the corresponding original water level value according to the compression index sequence in the compression mapping encoding table, combines them into a structure unit, divides the sequence into fixed-length structure blocks, combines all structure blocks into whole structure data, and obtains the water level data structure unit;

[0103] According to the index value and water level value of each record in the compression mapping encoding table, the system converts it into a structure unit format 〈compression index value, water level value〉, performs structure packing operation, sets 5 records as 〈0.1730, 3.10〉, 〈0.1776, 3.12〉, 〈0.1813, 3.14〉, 〈0.1760, 3.11〉, 〈0.1798, 3.13〉, the structure unit length is set to 16 bytes, the system splices each two units into a structure block and marks the starting index address, forms a binary structure segment, and appends null bytes to fill the data less than 1 structure block to ensure block size consistency. In this example, 5 records will generate two complete blocks and one filling block containing 1 record. The structure block will finally be written into the storage medium structure page as the water level compression data area, and the water level data structure unit is finally obtained.

[0104] Please refer to Figure 5 The anomaly elimination module includes:

[0105] The amplitude difference extraction submodule extracts the water level values and sampling times corresponding to any two adjacent sampling points in sequence based on all continuous time period water level values in the water level data structure unit, establishes an amplitude difference sequence, arranges all adjacent water level difference values, records their position index in the original data, and establishes the correspondence between the amplitude difference and its time span to obtain the amplitude change sequence.

[0106] Based on the water level data structure unit all continuous time period water level value, the system reads water level sequence and sampling time sequence in turn, extracts all adjacent sampling point water level pair through sequential traversal method, obtains the difference value of the corresponding water level value of the previous time point and the next time point, records the time period number and data position index information corresponding to the difference value, judges the current water level change direction as rising or falling, and adds trend label to each water level difference value, further forms the change trend sequence, the system integrates all water level difference value, trend type, time period number, data index and other information to generate structured data unit, finally obtains complete amplitude change table, for example, taking a monitoring point as an example, the sampling time interval is fixed as 5 minutes, the water level value is 3.12 meters, 3.14 meters, 3.21 meters, 3.28 meters, 3.35 meters and 3.33 meters in turn, the corresponding time is 0 seconds, 300 seconds, 600 seconds, 900 seconds, 1200 seconds and 1500 seconds, the water level change data identified by the system is as follows:

[0107] Table 6 water level amplitude change table

[0108]

[0109] As shown in table 6, the system has generated a standard amplitude difference data set based on the original water level record, combined with the sampling time and trend direction, established a complete water level change information sequence, and finally obtained the amplitude change sequence.

[0110] The mutation judgment submodule judges according to the amplitude change sequence of all recorded amplitude difference information, detects whether each water level difference value exceeds the threshold value according to the threshold value of hydrological mutation, marks the position as mutation position under the condition of meeting the mutation condition, and collects and arranges the position information, finally obtains the jump change index list;

[0111] Based on the water level difference and trend information recorded in the amplitude change sequence, the system reads the amplitude difference value and the time period number in each record in turn, and compares each amplitude difference value with the preset hydrological mutation judgment benchmark. According to the national standard GB / T50138-2010, the hydrological mutation judgment threshold is set to ±0.10 meters / 5 minutes. The system judgment condition is whether the current amplitude difference value exceeds the threshold. If it exceeds, the system marks the index position corresponding to the starting position of the time period. The system further extracts the water level values ​​before and after the mutation segment and the corresponding time points to determine whether the mutation feature is continuous. If two consecutive amplitude differences exceed the threshold, it is considered a continuous mutation segment. The system regards its starting point as the sudden jump starting point and adds it to the sudden jump record list. During the judgment process, the system judges all amplitude segment records in turn and updates the sudden jump identification information one by one, eventually forming a sudden jump segment sequence. For example, in the above data, assuming that a monitoring point has an amplitude difference of 0.13 meters, the system identifies the record where the difference is located as the sudden jump point and outputs its position sequence number and time information. The integrated sudden jump position record is as follows:

[0112] Table 7 Sudden jump change position table

[0113]

[0114] As shown in Table 7, multiple sudden change segments are determined, and their start and end times, amplitude differences, and sequence number information are registered, and finally a sudden change index list is obtained.

[0115] The breakpoint annotation submodule reads the corresponding water level structure number and time field in sequence according to all mutation positions in the sudden change index list, identifies the start and end positions of each segment where the mutation point is located, and uses the mutation point as the cutting node to build an inter-segment grouping index for the water level data. The correspondence between all divided segment numbers and the original data is uniformly recorded and archived to establish a sudden breakpoint segment index set;

[0116] According to the jump sequence position in the jump change index list, the system calls the corresponding water level structure data in sequence and performs data segmentation according to the jump starting point number. The system uses the jump point as the segment boundary to split the water level original data front and back to form two continuous and non-overlapping data segments. For each segment of data, a segment index number is generated and its time number and start and end structure position information are recorded. When reconstructing the structure segment, the system retains the original sampling order and generates a segment number for each segment. Combined with the jump position, a segment mapping table is generated to record the correspondence between the segment number and the original sequence number. The resulting structure is as follows:

[0117] Table 8 Sudden breakpoint segment index table

[0118]

[0119] As shown in Table 8, the breakpoint segmentation structure is constructed according to the jump point position, the segment number has been indexed to the original water level data, and finally the jump breakpoint segment index set is established.

[0120] Please refer to Figure 6 , the instruction linkage module comprises:

[0121] The structure number extraction submodule reads the start position and end position of each breakpoint segment in sequence based on all structure positions in the jump breakpoint segment index set, extracts the corresponding structure number set, and sorts them according to the appearance order of the structure number in the sampling sequence, merges and marks the continuous number sequence, and generates the segment structure number list;

[0122] Based on all structure positions in the jump breakpoint segment index set, the system reads the start number and end number fields of the segment in sequence, and extracts the structure number one by one in the number interval. The continuousness of the extracted number set is verified, and if the number is continuous, it is marked as a valid number segment. Further, the number of numbers contained in each number segment is counted, and a number density information table is constructed. The number density is obtained by dividing the total number of each segment by its number span. The system then sequentially establishes a segment number index for all valid number segments, and generates a structure number list sorted by structure order. Combined with the sampling node task scheduling structure mapping standard, the segment number segment and the sampling controller mapping table are field-aligned to generate a number mapping field. For example, the monitoring segment A01 has a start number of 101 and an end number of 150, a total of 50 records. Segment A02 has a start number of 201 and an end number of 250, a total of 50 records. Segment A03 has a start number of 301 and an end number of 350, a total of 50 records. The final output of the system is as follows:

[0123] Table 9 Segment Structure Number Table

[0124]

[0125] As shown in Table 9, the system has completed the continuity identification and number statistics in the segment number extraction process. Through the number density and the structured organization of the segment position, the task field alignment basis is formed, and finally the segment structure number list is generated.

[0126] The task parameter binding submodule binds the water level collection node controller task cache table according to each number segment sequence in the segment structure number list, identifies the corresponding task record position of each structure number in the cache table, and extracts the sampling interval, data writing state and communication response state for comparison. The field binding operation is performed on the task items missing or to be updated. According to the segment attribute information corresponding to the structure number, the update strategy is set, and the control task injection parameter set is generated;

[0127] According to the structure number content in the structure number list, the system reads the numbers one by one and indexes to the corresponding row in the controller task cache table, extracts the sampling interval field, data read-write identification field and communication response state field in the task field in turn, performs field integrity check operation, and identifies and fills the missing field record. The filling value comes from the joint judgment result of structure number density, sampling priority, cache scheduling state and current timestamp. If the structure number density is 1.0, the section is A01, the current control state is ready, the sampling interval field is set to 60 seconds, the data read-write state is set to writable, and the communication state is set to synchronous and valid, the system injects the field values 60, writable and synchronous into the numbers 101, 102 and 103 respectively, and performs sequential cycle injection on the number segment, updates the corresponding row of the task cache table, constructs the number-field pair combination structure, and outputs the task injection field in order according to the number sequence, as shown in the following table:

[0128] Table 10 Control task injection field table

[0129]

[0130] As shown in Table 10, the number segment task field has been injected and mapped according to the structure number, forming the task control field update structure, and finally generating the control task injection parameter set.

[0131] The information mapping generation submodule establishes a task field mapping dictionary based on each structure number and corresponding parameter information recorded in the control task injection parameter set, with the structure number as the primary key, aggregates the sampling interval identification, data read-write state and communication response state, and establishes an index order table to obtain the Internet of Things water level collection and processing mapping table.

[0132] According to all task field values in the control task injection parameter set, the system constructs a task information mapping structure with the structure number as the primary index and the sampling interval, data state and communication state as the associated fields. The system generates a structure number mapping table unit in the memory mapping space, with each structure number corresponding to a task field structure record. The record marks the injection state identification, field source identification and update timestamp field. The structure numbers are arranged in ascending order to generate the mapping table structure. The system calls the task scheduling module mapping area to write the above table into the mapping area, and registers the total number of structure number mapping entries. The system performs data integrity verification operation to remove missing field items or invalid number items. Finally, the task field structure entry is written and the task mapping output table is generated, as shown below:

[0133] Table 11 Water level collection and processing mapping table

[0134]

[0135] As shown in Table 11, the water level collection task has completed the construction of the linkage mapping table through the structure number and field content. The structure number and the field form a one-to-one correspondence. The system task scheduling area successfully establishes the Internet of Things water level collection and processing mapping table.

[0136] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.

Claims

1. The water level data acquisition and processing system based on the Internet of Things is characterized by: The system comprises: The trend identification module obtains the water level values ​​of three consecutive time points recorded by the water level collection node in the natural water body, calculates the difference direction of two adjacent groups of water level values, marks a unidirectional trend or an oscillating trend, and obtains a trend direction determination identifier; The sampling frequency modulation module calculates and obtains the adjusted sampling interval based on the trend direction determination identifier and the current sampling interval time value, and writes the adjusted sampling interval into the timing register to obtain a sampling frequency adjustment record; The data encapsulation module adjusts the recording control of each water level value generated by the sampling frequency in the acquisition node, binds the timestamp in sequence according to the sampling time and establishes a sequential index, constructs a bidirectional mapping structure between the water level value and the index, and compresses it into a structured data block to generate a water level data structure unit; The abnormality elimination module calculates the amplitude difference between two adjacent points based on the water level data structure unit, determines whether the amplitude difference exceeds the hydrological mutation threshold, and if so, marks the corresponding index position as a breakpoint to generate a sudden breakpoint segment index set; The sampling frequency modulation module includes: The trend screening submodule determines the trend direction based on the identification, reads the identification value by collection point classification, determines whether each trend identification is a unidirectional trend or an oscillating trend, classifies the record identified as a unidirectional trend with a classification number of 1, and classifies the record identified as an oscillating trend with a classification number of 0, and generates a classification index to finally obtain the trend classification identification result; The sampling interval adjustment submodule matches the corresponding adjustment strategy according to the trend classification identification result. If the trend is a unidirectional trend, it combines the current sampling interval value with the loop response time increment for combined calculation. If the trend is an oscillating trend, it introduces the trend judgment window and fluctuation density, performs overall dynamic division adjustment, calculates and obtains the adjusted sampling interval, and maps the corresponding interval value with the original sampling record one by one according to the trend type to obtain the sampling interval adjustment record; The sampling writing submodule adjusts the sampling interval record based on the sampling interval, writes the timing register synchronously, updates the adjustment value list one by one by matching the acquisition node ID and writing the adjustment value to each record unit, and updates and establishes the sampling frequency adjustment record.

2. The water level data acquisition and processing system based on the Internet of Things according to claim 1 is characterized in that: The trend direction determination identifier includes trend category, change continuity, and directional stability; the sampling frequency adjustment record includes frequency modulation coefficient type, frequency modulation result value, and register status; the water level data structure unit includes time index structure, water level mapping relationship, and compressed data block; the sudden breakpoint segment index set includes breakpoint position mark record, mutation amplitude level, and segmented storage index.

3. The water level data acquisition and processing system based on the Internet of Things according to claim 1 is characterized in that: The trend identification module includes: The water level difference calculation submodule obtains the water level values ​​of three time points continuously recorded by the water level acquisition node in the natural water body, calculates the difference between the water level values ​​of the first and second time points, and the second and third time points, calculates two water level differences in sequence, and classifies the differences in direction to generate a water level difference sequence; The water level difference direction judgment submodule judges the positive and negative directions of the two sets of differences based on the water level difference sequence. If the difference is positive, it is marked as rising; if it is negative, it is marked as falling. The two direction judgment results are combined to generate a difference direction identification pair; The trend direction determination submodule determines whether the two direction identifications are consistent based on the difference direction identification pair. If the directions are consistent, it is determined to be a unidirectional trend. If the directions are opposite, it is determined to be an oscillating trend. The trend direction determination result is marked to obtain the trend direction determination identification.

4. The water level data acquisition and processing system based on the Internet of Things according to claim 1 is characterized in that: The data encapsulation module includes: The time binding submodule adjusts each water level value generated under the recording control according to the sampling frequency, pairs the sampling time with the water level value one by one, sets the sequential index using fixed-step auto-increment logic, determines the logical position of the binding structure in the sequence, and generates a water level binding index structure; The mapping construction submodule establishes a bidirectional mapping list according to the water level value and the sequential index in the water level binding index structure, establishes the mapping structure in a hash table manner, generates a forward mapping with the sequential index as the key and the water level value as the value, and generates a reverse mapping with the water level value as the key and the sequential index as the value, calculates and obtains the compressed mapping index value of each sampling record, and structurally integrates the index value with the corresponding water level record to obtain a compressed mapping coding table; The structure compression submodule reads each compression index value and the corresponding original water level value according to the compression index sequence in the compression mapping code table, combines them into structural units, divides the sequence into fixed-length structural blocks, combines all structural blocks into a whole block of structural data, and obtains the water level data structural unit.

5. The water level data acquisition and processing system based on the Internet of Things according to claim 1 is characterized in that: The abnormality elimination module includes: The amplitude difference extraction submodule extracts the water level values ​​and sampling times corresponding to any two adjacent sampling points in sequence based on the water level values ​​of all continuous time periods in the water level data structure unit, and establishes an amplitude difference sequence. It sorts all adjacent water level difference values, records their position indexes in the original data, and establishes a corresponding relationship between the amplitude difference and its time span to obtain an amplitude change sequence; The mutation judgment submodule performs a judgment operation based on the amplitude difference information of all records in the amplitude change sequence and the hydrological mutation threshold, detecting whether each water level difference exceeds the threshold. If the mutation condition is met, the location is marked as the mutation location, and the location information is uniformly collected and sorted to finally obtain a sudden change index list; The breakpoint marking submodule reads the corresponding water level structure number and time field in sequence according to all the mutation positions in the sudden change index list, identifies the start and end positions of the segment where each mutation point is located, and uses the mutation point as the cutting node to construct an inter-segment grouping index for the water level data. The correspondence between all the divided segment numbers and the original data is uniformly recorded and archived to establish a sudden breakpoint segment index set.

6. The water level data acquisition and processing system based on the Internet of Things according to claim 1 is characterized in that: The system further comprises: The instruction linkage module is based on all the structural positions in the sudden breakpoint segment index set, combined with the task cache table in the water level acquisition node controller, and injects the sampling interval and data read and write status identifier according to the structure number corresponding to each segment to generate the Internet of Things water level acquisition and processing mapping table; The Internet of Things water level collection and processing mapping table includes task number mapping results, read and write status control records, and sampling frequency injection information.

7. The water level data acquisition and processing system based on the Internet of Things according to claim 6 is characterized in that: The instruction linkage module includes: The structure number extraction submodule sequentially reads the start and end positions of each breakpoint segment based on all structure positions in the sudden breakpoint segment index set, extracts the corresponding structure number set, and sorts the structure numbers according to the order of appearance in the sampling sequence, merges and marks the continuous number sequences, and generates a segment structure number list; The task parameter binding submodule connects to the task cache table of the water level acquisition node controller according to each number segment sequence in the segment structure number list, identifies the task record position corresponding to each structure number in the cache table, extracts the sampling interval, data writing status and communication response status for comparison, performs field binding operations on task items that are missing or to be updated, sets the update strategy according to the segment attribute information corresponding to the structure number, and generates a control task injection parameter set; The information mapping generation submodule establishes a task field mapping dictionary based on each structure number and corresponding parameter information recorded in the control task injection parameter set, with the structure number as the primary key, aggregates the sampling interval identifier, data reading and writing status, and communication response status, and establishes an index sequence table to obtain the Internet of Things water level collection and processing mapping table.

Citation Information

Patent Citations

  • Multifunctional metering detection system

    CN120277595A

  • Method for automatically identifying valid data acquisition module and system

    WO2021104387A1