Water quality parameter prediction method and system based on multi-sensor data fusion

By using a multi-sensor data fusion method, an interactive gating mechanism and dynamic convolution kernel are used to remove single-point anomalies. By combining spatial relationship weights and frequency dynamic features to generate a global feature vector, the problems of data anomalies and insufficient spatial coordination in traditional water quality prediction are solved, and more accurate water quality parameter prediction is achieved.

CN120805047AActive Publication Date: 2025-10-17湖南省生态环境事务中心 +1

Patent Information

Application Number
CN202510921368.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-17
Estimated Expiration
2045-07-04

AI Technical Summary

Technical Problem

Traditional methods struggle to effectively handle single-point anomalies and spatial coordination issues in multi-sensor data, resulting in insufficient accuracy in water quality prediction.

Method used

A multi-sensor data fusion-based approach is adopted, which uses an interactive gating mechanism, dynamic convolution kernel, and anomaly detection gate to remove single-point anomalies. It combines spatial relationship weights and frequency dynamic features to generate a global feature vector, and uses a long short-term memory network to generate a water quality parameter heat map.

Benefits of technology

It improves the accuracy of water quality prediction, effectively identifies instantaneous equipment failures and water quality deterioration trends, and is suitable for monitoring scenarios in large-scale water areas. It solves the problems of feature interference and spatial heterogeneity caused by simple parameter splicing in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120805047A_ABST
    Figure CN120805047A_ABST
Patent Text Reader

Abstract

The invention discloses a water quality parameter prediction method and system based on multi-sensor data fusion, and the method comprises the steps: collecting and preprocessing original dissolved oxygen data and turbidity data, and obtaining dissolved oxygen data and turbidity data in a plurality of time windows; according to the dissolved oxygen data and the turbidity data in each time window, calculating a water quality feature vector, a dynamic convolution kernel and an abnormal discrimination probability of each sensor in the time window, and performing traversal elimination based on the abnormal discrimination probability to obtain a sensor sequence; according to geographic coordinates and water flow directions of sensors corresponding to data points in the sensor sequence, calculating spatial relationship weights among the sensors, according to the water quality feature vectors, calculating frequency dynamic features, and combining the spatial relationship weights and the frequency dynamic features to generate global feature vectors; and calculating a water quality parameter tensor according to the global feature vector and the long-short term memory network, and generating a water quality parameter thermodynamic diagram. According to the method, the problem of insufficient prediction precision caused by poor spatial collaboration of single-point abnormal data and multi-source data is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of water quality detection, and in particular to a water quality parameter prediction method and system based on multi-sensor data fusion. BACKGROUND

[0002] Water quality monitoring is a key link in environmental protection and water resource management. Traditional methods mainly rely on single sensors for monitoring at fixed points. However, due to the dynamic nature and spatial heterogeneity of water environments, especially in large lakes or river systems, the diffusion of pollutants is influenced by multiple factors such as wind direction and water flow. Single-point data often fails to fully reflect the true state of water quality. To address this issue, existing technologies deploy multiple sensors of the same type at different locations in the water area to expand the monitoring coverage. These sensors, which can be implemented in various ways such as floating, shore-based, or underwater robot-mounted, can monitor key indicators such as dissolved oxygen and turbidity in real time.

[0003] However, the current application of multi-sensor data fusion still faces the following challenges: Firstly, due to differences in sensor hardware, environmental interference, or communication failures, it is difficult to quickly distinguish whether abnormal data (such as sudden changes or drifts) from a single node is a real pollution event or a device failure. For example, when a sensor detects a sudden drop in dissolved oxygen, it may be a real signal of an algae outbreak, or it may be a reading anomaly caused by sensor membrane contamination. Traditional methods that rely on manual calibration or fixed thresholds are prone to misjudgment. Secondly, the spatial correlation of multi-source data is not fully utilized. Existing data fusion methods (such as simple averaging or weighted calculation) cannot effectively utilize water flow characteristics, making it difficult for prediction models to accurately capture pollution diffusion trends or predict future water quality changes. SUMMARY

[0004] Therefore, the present application aims to provide a water quality parameter prediction scheme based on multi-sensor data fusion to address the problem of insufficient water quality prediction accuracy due to single-point data anomalies and poor spatial coordination of multi-source data.

[0005] To achieve the above-mentioned purpose, the present application discloses a water quality parameter prediction method based on multi-sensor data fusion, comprising the following steps: S1: Collecting and preprocessing original dissolved oxygen data and turbidity data to obtain dissolved oxygen data and turbidity data within multiple time windows; S2: According to the dissolved oxygen data and turbidity data within each time window, sequentially calculating the water quality feature vector, dynamic convolution kernel, and anomaly discrimination probability of each sensor within the time window. According to the anomaly discrimination probability, all time windows are traversed to remove all sensors' data, and the complete sensor sequence after single-point anomaly removal is obtained; The calculation process of the anomaly discrimination probability comprises: based on a dynamic convolution kernel, performing local feature extraction on the water quality feature vector of the sensor by one-dimensional convolution, and generating an anomaly discrimination gate by a sigmoid function; based on the anomaly discrimination gate and Hadamard product operation, weighting and fusing the water quality feature vector activated by a ReLU function and the water quality feature vector processed by a multi-layer perception machine to obtain a fusion feature vector; performing multi-layer perception machine processing on the fusion feature vector, and generating the anomaly discrimination probability of the corresponding sensor in the time window by a sigmoid function; S3: According to the geographical coordinates and water flow direction of the corresponding sensor of each data point in the complete sensor sequence after single-point anomaly elimination, the spatial relationship weight between the sensors is calculated, the water quality feature vector is decomposed, optimized and fused to obtain the frequency dynamic feature, the spatial relationship weight is used to weight and fuse the frequency dynamic features of the adjacent sensors, the fusion result is processed through the spatiotemporal gating mechanism to generate the global feature vector; S4: According to the global feature vector, the water quality parameter tensor is calculated by combining the long short-term memory network, and the water quality parameter thermal map is generated by combining the geographical coordinates of the sensor.

[0006] Further, in the step S2, the calculation process of the water quality feature vector comprises: The dissolved oxygen data and the turbidity data in each time window are spliced, and the spliced result is linearly transformed to generate a water quality parameter interaction gate; the Hadamard product operation is performed on the water quality parameter interaction gate and the dissolved oxygen data to obtain the dissolved oxygen data after gating adjustment; the Hadamard product operation is performed on the result of subtracting the water quality parameter interaction gate from 1 and the turbidity data to obtain the turbidity data after gating adjustment; the dissolved oxygen data after gating adjustment and the turbidity data after gating adjustment are spliced, and the spliced result is processed by a bidirectional gated recurrent unit to generate the water quality feature vector of each sensor in the time window.

[0007] Further, the step S1 comprises: S11: Deploying the same type of water quality sensors at different positions of the water area, time-synchronously calibrating all the sensors, collecting the dissolved oxygen data and the turbidity data in the water, and recording the time stamp, the geographical coordinates and the water flow direction corresponding to each data point of the sensor to obtain the original dissolved oxygen data and the turbidity data, wherein the geographical coordinates of the sensor include the latitude, the longitude and the elevation value; S12: Based on the linear interpolation algorithm, the missing values in the original dissolved oxygen data and the turbidity data are filled, and the data points exceeding the normal fluctuation range are identified and removed by using the three standard deviation principle to obtain the arranged dissolved oxygen data and the turbidity data; S13: Dividing the time stamp of the arranged dissolved oxygen data and the turbidity data according to a fixed interval to obtain the dissolved oxygen data and the turbidity data in multiple time windows.

[0008] Further, the step S2 comprises: S21: According to the dissolved oxygen data and the turbidity data in each time window, the water quality feature vector of each sensor in the time window is calculated by an interactive gating mechanism, and the calculation method is: ; ; ; ; wherein, is the water quality parameter interaction gate, is the sigmoid function, is the water quality parameter interaction weight matrix, is the dissolved oxygen data of the i-th sensor in the time window, i is the first index of the sensor, is the splicing operation, is the turbidity data of the i-th sensor in the time window, is the water quality parameter interaction bias vector, is the gated adjusted dissolved oxygen data of the i-th sensor in the time window, is the Hadamard product, is the gated adjusted turbidity data of the i-th sensor in the time window, is the water quality feature vector of the i-th sensor in the time window, is the bidirectional gated recurrent unit; S22: According to the geographical coordinates of the sensor, a position correlation weight matrix is generated, and combined with the water quality feature vector corresponding to the sensor, the dynamic convolution kernel of each sensor in the time window is calculated, and the calculation method is: ; wherein, is the position correlation weight matrix of the i-th sensor and the j-th sensor, j is the second index of the sensor, is the exponential of a natural constant, is the spatial decay coefficient, , is the longitude and latitude in the geographical coordinates of the i-th sensor, is the longitude and latitude in the geographical coordinates of the j-th sensor, is the square of the Euclidean distance, is the dynamic convolution kernel of the i-th sensor in the time window, is the neighborhood sensor set of the i-th sensor, is the multilayer perception, is the water quality feature vector of the j-th sensor in the time window; S23: According to the water quality feature vector of the sensor and the dynamic convolution kernel, the abnormal discrimination probability of each sensor in the time window is calculated, and the calculation method is: ; ; ; wherein, is the abnormal discrimination gate of the i-th sensor in the time window, is one-dimensional convolution, is the fusion feature vector of the i-th sensor in the time window, is the ReLU function, is the abnormal discrimination probability of the i-th sensor in the time window; S24: According to the abnormal discrimination probability, it is judged whether to remove the data points of the corresponding sensor in the time window, if , the data points of the sensor are removed, if , the data points of the sensor are retained; after traversing all sensors, the sensor sequence after single-point anomaly removal in the time window is obtained; after traversing all time windows, the complete sensor sequence after single-point anomaly removal is obtained.

[0009] It needs to be further explained that, first, the application dynamically allocates weights to dissolved oxygen data and turbidity data through an interactive gating mechanism, generates a gating value through a sigmoid function to adaptively adjust the contribution of the two types of parameters, and then captures the time sequence correlation characteristics through a bidirectional gated recurrent unit, overcoming the feature interference problem caused by simple splicing of multiple parameters in traditional methods; second, based on the spatial attenuation characteristics of the geographical coordinates of the sensors, a position correlation weight matrix is constructed, so that the water quality feature vectors of the neighborhood sensors are differentially weighted when fused in the multi-layer perception machine, and the generated dynamic convolution kernel can accurately represent the spatial correlation of the local water area; and finally, the feature fusion is realized through the abnormal discrimination gate; Compared with the conventional threshold detection method, the present application has three advantages by setting this step: first, the interactive gating mechanism is aimed at the nonlinear coupling characteristics of dissolved oxygen and turbidity in water (such as synchronous abnormality of the two caused by algae reproduction), which realizes mutual correction between parameters; second, the dynamic convolution kernel adaptively adjusts the size of the neighborhood influence through the position correlation weight matrix, effectively dealing with the monitoring blind area problem caused by uneven distribution of sensors in the lake water area; third, the fusion mechanism based on the abnormal discrimination gate can simultaneously capture device instantaneous failure (characterized by feature mutation) and real water quality deterioration (characterized by continuous abnormality), avoiding false removal caused by accidental failure of the sensor, and is particularly suitable for scenes where multiple source sensor data exist in parameter coupling and complexity in large-scale water monitoring scenarios.

[0010] Further, the step S3 comprises: S31: According to the geographical coordinates and the flow direction of each data point corresponding to the sensor in the complete sensor sequence after single-point abnormality rejection, the spatial relationship weight between each sensor is calculated, and the calculation method is: ; ; ; wherein, is the Euclidean distance between the ith sensor and the jth sensor, is the two-norm operation, is the flow direction similarity between the ith sensor and the jth sensor, is the cosine similarity, is the flow direction vector of the ith sensor, is the flow direction vector of the jth sensor, is the spatial relationship weight between the ith sensor and the jth sensor, is the spatial relationship weight matrix, is the difference between the elevation value of the ith sensor in the geographical coordinates and the elevation value of the jth sensor in the geographical coordinates; S32: The water quality feature vector of the sensor is decomposed into low-frequency features and high-frequency features, and then enhanced and smoothed respectively to obtain the frequency dynamic features after fusion; S33: According to the spatial relationship weight and the frequency dynamic feature, a global feature vector is generated, and the calculation method is: ; wherein, is the spatially weighted fusion feature, are the frequency dynamic features of the ith and jth sensors respectively, is the spatiotemporal gating vector, is the spatiotemporal gating weight matrix, is the global feature vector, is the global average pooling.

[0011] Further, the step S32 comprises: S321: The water quality feature vector of the sensor is frequency-decomposed to obtain high-frequency features and low-frequency features, and the calculation method is: ; ; wherein, is the low-frequency feature of the ith sensor, is the one-dimensional average pooling, is the high-frequency feature of the ith sensor; S322: Gated enhancement is performed on the low-frequency feature to obtain an enhanced low-frequency feature, and the calculation manner is: wherein, is a low-frequency gating weight, is an enhanced low-frequency feature of the i th sensor, is a hollow convolution; S323: Dynamic Bessel kernel convolution is performed on the high-frequency feature to obtain a smoothed high-frequency feature, and the calculation manner is: wherein, is a dynamic kernel bandwidth coefficient, is a Bessel function convolution kernel, is a zero-order Bessel function, is a smoothed high-frequency feature of the i th sensor; S324: Feature fusion is performed on the enhanced low-frequency feature and the smoothed high-frequency feature to obtain a frequency dynamic feature, and the calculation manner is: wherein, is a frequency dynamic feature of the i th sensor, is layer normalization.

[0012] ​​​​​​It should be further explained that, first, the present invention combines the Euclidean distance exponential attenuation value of the sensor's geographic coordinates, the similarity of the water flow direction, and the elevation difference to generate spatial relationship weights, and comprehensively evaluates spatial proximity, hydrological connectivity, and terrain height through the sigmoid function, breaking through the limitation of traditional methods that only rely on distance; then, the present invention implements frequency decomposition of the water quality feature vector of the sensor and performs frequency band optimization, extracts low-frequency features that characterize long-term trends through one-dimensional average pooling, and uses the water quality feature vector to subtract the low-frequency features to separate the high-frequency features representing instantaneous fluctuations, and innovatively adopts void convolution combined with gated enhancement mechanism to enhance low-frequency characteristics. The slow-changing laws of the watershed in the high-frequency characteristics (such as the cumulative effect of pollutant migration) are taken into account, and the random interference in the high-frequency characteristics (such as equipment measurement noise) is smoothed by dynamic Bessel kernel convolution. The two are fused through layer normalization to form a frequency dynamic feature that takes both trend and noise resistance into consideration; finally, the present invention performs weighted fusion of the frequency dynamic characteristics of the neighborhood sensors based on the spatial relationship weight, and then performs nonlinear screening of the spatial weighted fusion features through the spatiotemporal gating vector, dynamically adjusting the contribution weights of different regions to the global characteristics, and effectively dealing with the spatial heterogeneity problem caused by uneven sensor deployment density and differences in monitoring target areas in large-scale water area monitoring.

[0013] Furthermore, the step S4 includes: S41: Based on the global feature vector, the water quality parameter tensor is generated in combination with the long short-term memory network. The calculation method is: ; ; ; ; in, is the hidden state vector of the tth time step, t is the time step index, is the total number of time steps, is the long short-term memory network, is the dissolved oxygen prediction vector at the tth time step, is the dissolved oxygen prediction weight matrix, is the dissolved oxygen prediction bias vector, is the turbidity prediction vector at the t-th time step, is the turbidity prediction weight matrix, is the turbidity prediction bias vector, is the water quality parameter tensor, From the first time step to the The concatenation result of the dissolved oxygen prediction vector and the turbidity prediction vector at each time step; S42: Generate a water quality parameter heat map based on the water quality parameter tensor and the geographic coordinates of the sensor. The calculation method is: ; ; in, is the spatial distribution matrix of the t-th time step, is the inverse distance weighted interpolation algorithm, is the geographic coordinate matrix of the sensor, is the water quality parameter heat map at the tth time step, is the pseudo color mapping function, is the maximum and minimum normalization, From the first time step to the The splicing result of the spatial distribution matrix of time steps.

[0014] On the basis of the above content, the present invention also discloses an early warning method based on spatiotemporal parameter tensor, which is calculated as follows: ; in, is the warning result of the t-th time step, is the indicator function, is the dissolved oxygen warning threshold, For the logical "or" operation, is the turbidity warning threshold.

[0015] The present invention also discloses a water quality parameter prediction system based on multi-sensor data fusion, comprising: Data acquisition and preprocessing module: collects raw dissolved oxygen data and turbidity data and performs preprocessing to obtain dissolved oxygen data and turbidity data in multiple time windows; Sensor abnormal data elimination module: Based on the dissolved oxygen data and turbidity data in each time window, the water quality feature vector, dynamic convolution kernel and abnormal discrimination probability of each sensor in the time window are calculated in sequence. Based on the abnormal discrimination probability, the data of all sensors in all time windows are traversed and eliminated to obtain a complete sensor sequence after single-point anomaly elimination; Global feature calculation module: Based on the geographic coordinates and water flow direction of each sensor corresponding to each data point in the complete sensor sequence after single-point anomaly removal, the spatial relationship weights between sensors are calculated. The water quality feature vectors are decomposed, optimized, and fused to obtain frequency dynamic features. The frequency dynamic features of neighboring sensors are weightedly fused based on the spatial relationship weights. The fusion results are processed through a spatiotemporal gating mechanism to generate a global feature vector. Water quality parameter heat map generation module: Based on the global feature vector, the long short-term memory network is combined to generate a water quality parameter tensor, and the water quality parameter heat map is generated in combination with the geographic coordinates of the sensor.

[0016] Compared with the prior art, the application has the beneficial effects that: (1) The application effectively solves the deficiencies of traditional water quality prediction methods in terms of abnormal data processing and spatial correlation by using a two-stage processing mechanism of sensor single-point abnormality rejection and global feature vector construction. The application first realizes single-point abnormality detection and rejection through an interactive gating mechanism and a dynamic convolution kernel to ensure the reliability of the input data, and then constructs a global feature vector based on spatial relationship weights and frequency dynamic features, fully considering the spatial distribution characteristics of the sensor network and the spatiotemporal evolution law of the water quality parameters. This progressive processing procedure not only ensures data quality but also enhances the spatial collaborative representation ability of multi-source data, thereby improving the accuracy of water quality prediction.

[0017] (2) The application dynamically adjusts the contribution of dissolved oxygen parameters and turbidity parameters through an interactive gating mechanism to solve the feature interference problem caused by simple splicing of parameters in traditional methods. The application constructs a dynamic convolution kernel through a position correlation weight matrix to realize accurate representation of local water space correlation. The application creatively uses an abnormality discrimination gate for feature fusion, which can not only capture device instantaneous faults but also identify water quality deterioration trends, and is particularly suitable for scenarios where multi-source sensor data has parameter coupling and complexity in large-scale water monitoring scenarios.

[0018] (3) The application constructs spatial relationship weights by fusing multi-dimensional geographic parameters such as Euclidean distance, flow direction, and elevation difference, overcoming the limitations of traditional methods that only consider the influence of distance parameters. At the same time, the application performs frequency decomposition and frequency band optimization on the water quality feature vectors of the sensors, respectively enhances low-frequency features through hollow convolution, and smooths high-frequency features through a dynamic Bezier kernel, thereby realizing targeted processing of different frequency band features of water quality parameters. Finally, the application designs a spatiotemporal gating mechanism to dynamically adjust regional contribution weights, effectively solving the feature fusion problem caused by spatial heterogeneity of multiple sensors. The water quality parameter heat map generated thereby can more accurately reflect the pollutant migration and diffusion law in complex water environments. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 A flowchart of a water quality parameter prediction method based on multi-sensor data fusion provided for Embodiment 1 of the application is shown. Figure 2 The application of the method of Embodiment 1 of the application to the before-and-after change comparison of a certain lake pollution control is shown, where Fig. (a) is a water quality parameter heat map before pollution control, and Fig. (b) is a water quality parameter heat map after pollution control. DETAILED DESCRIPTION

[0020] The application will be further described in conjunction with the accompanying drawings, but in no way limits the application, any transformation or replacement based on the teaching of the application belongs to the protection scope of the application.

[0021] Embodiment 1 As shown in the figure, a water quality parameter prediction method based on multi-sensor data fusion comprises the following steps: Figure 1 S1: Collecting original dissolved oxygen data and turbidity data and preprocessing to obtain dissolved oxygen data and turbidity data in multiple time windows; specifically: S11: Deploying the same type of water quality sensor at different positions in the water area, time-synchronously calibrating all sensors, collecting dissolved oxygen data and turbidity data in water, and recording the time stamp corresponding to each data point, the geographic coordinates of the sensor, and the water flow direction to obtain the original dissolved oxygen data and turbidity data, the geographic coordinates of the sensor including latitude, longitude and elevation value; S12: Based on the linear interpolation algorithm, filling in the missing values in the original dissolved oxygen data and turbidity data, and using the three standard deviation principle to identify and remove data points outside the normal fluctuation range to obtain the sorted dissolved oxygen data and turbidity data; S13: Dividing the sorted dissolved oxygen data and turbidity data according to every 10 time stamps to obtain dissolved oxygen data and turbidity data in multiple time windows. S2: According to the dissolved oxygen data and turbidity data in each time window, sequentially calculating the water quality feature vector, dynamic convolution kernel and anomaly discrimination probability of each sensor in the time window, and according to the anomaly discrimination probability, traversing and removing the data of all sensors in all time windows to obtain the complete sensor sequence after single-point anomaly removal; specifically:

[0022] S21: According to the dissolved oxygen data and turbidity data in each time window, the water quality feature vector of each sensor in the time window is calculated through the interactive gating mechanism, and the calculation method is: wherein, is the water quality parameter interaction door, is the sigmoid function, is the water quality parameter interaction weight matrix, is the dissolved oxygen data of the i-th sensor in the time window, i is the first index of the sensor, ​​​​​​the turbidity data of the i-th sensor in the time window, is an interaction bias vector of water quality parameters, the gated adjusted dissolved oxygen data of the i-th sensor in the time window, is a Hadamard product, the gated adjusted turbidity data of the i-th sensor in the time window, is a water quality feature vector of the i-th sensor in the time window, is a bidirectional gated recurrent unit; S22: generating a position correlation weight matrix according to the geographical coordinates of the sensors, and combining the water quality feature vectors corresponding to the sensors, to calculate the dynamic convolution kernel of each sensor in the time window, and the calculation method is: ; wherein, is the position correlation weight matrix of the i-th sensor and the j-th sensor, and j is the second index of the sensor, is the exponential of a natural constant, is a spatial decay coefficient, , is the longitude and latitude in the geographical coordinates of the i-th sensor, is the longitude and latitude in the geographical coordinates of the j-th sensor, is the square of the Euclidean distance, is the dynamic convolution kernel of the i-th sensor in the time window, is the neighborhood sensor set of the i-th sensor, is a multi-layer perception, is a water quality feature vector of the j-th sensor in the time window; S23: according to the water quality feature vectors and the dynamic convolution kernel of the sensors, the abnormal discrimination probability of each sensor in the time window is calculated, and the calculation method is: ; ; ; wherein, is the abnormal discrimination gate of the i-th sensor in the time window, is a one-dimensional convolution, is a fusion feature vector of the i-th sensor in the time window, is a ReLU function, is the abnormal discrimination probability of the i-th sensor in the time window; S24: according to the abnormal discrimination probability, whether to remove the data points of the corresponding sensor in the time window is selected, if , the data points of the sensor are removed, and if If the condition is met, the data point of the sensor is retained; after traversing all sensors, the sensor sequence after single-point abnormality elimination in the time window is obtained; after traversing all time windows, the complete sensor sequence after single-point abnormality elimination is obtained. In the embodiment, is set to 0.7.

[0023] S3: According to the geographical coordinates and water flow direction of the sensors corresponding to each data point in the complete sensor sequence after single-point abnormality elimination, the spatial relationship weight between each sensor is calculated, the frequency dynamic feature is calculated according to the water quality feature vector, and the global feature vector is generated based on the spatial relationship weight and the frequency dynamic feature; specifically: S31: According to the geographical coordinates and water flow direction of the sensors corresponding to each data point in the complete sensor sequence after single-point abnormality elimination, the spatial relationship weight between each sensor is calculated, and the calculation method is: ; ; ; Wherein, is the Euclidean distance between the i th sensor and the j th sensor, is the two-norm operation, is the water flow direction similarity between the i th sensor and the j th sensor, is the cosine similarity, is the water flow direction vector of the i th sensor, is the water flow direction vector of the j th sensor, is the spatial relationship weight between the i th sensor and the j th sensor, is the spatial relationship weight matrix, is the difference between the elevation value of the i th sensor in the geographical coordinates and the elevation value of the j th sensor in the geographical coordinates; S32: The frequency dynamic feature is obtained by frequency decomposition and respective optimization processing of the water quality feature vector of the sensor; specifically: S321: The water quality feature vector of the sensor is frequency decomposed to obtain high-frequency features and low-frequency features, and the calculation method is: ; ; Wherein, is the low-frequency feature of the i th sensor, is one-dimensional average pooling, is the high-frequency feature of the i th sensor; S322: The low-frequency feature is enhanced by gating to obtain the enhanced low-frequency feature, and the calculation method is: ; ; wherein, is a low-frequency gating weight, is an enhanced low-frequency feature of the i-th sensor, is a hole convolution; S323: performing dynamic Bessel kernel convolution on the high-frequency feature to obtain a smoothed high-frequency feature, and the calculation manner is: ; ; ; wherein, is a dynamic kernel bandwidth coefficient, is a Bessel function kernel, is a zero-order Bessel function, is a smoothed high-frequency feature of the i-th sensor; S324: performing feature fusion on the enhanced low-frequency feature and the smoothed high-frequency feature to obtain a frequency dynamic feature, and the calculation manner is: ; wherein, is a frequency dynamic feature of the i-th sensor, is layer normalization; S33: generating a global feature vector according to the spatial relationship weight and the frequency dynamic feature, and the calculation manner is: ; wherein, is a spatially weighted fusion feature, are frequency dynamic features of the i-th and j-th sensors respectively, is a spatiotemporal gating vector, is a spatiotemporal gating weight matrix, is a global feature vector, is a global average pooling.

[0024] S4: generating a water quality parameter tensor according to the global feature vector in combination with a long short-term memory network, and generating a water quality parameter heat map in combination with the geographical coordinates of the sensors; specifically: S41: generating a water quality parameter tensor according to the global feature vector in combination with a long short-term memory network, and the calculation manner is: ; ; ; ; wherein, is the hidden state vector at the t-th time step, t is the time step index, is the total number of time steps, is the long short-term memory network, is the dissolved oxygen prediction vector at the t-th time step, is the dissolved oxygen prediction weight matrix, is the dissolved oxygen prediction bias vector, is the turbidity prediction vector at the t-th time step, is the turbidity prediction weight matrix, is the turbidity prediction bias vector, is the water quality parameter tensor, is the splicing result of the dissolved oxygen prediction vectors and the turbidity prediction vectors from the 1st time step to the th time step; S42: generate a water quality parameter thermodynamic map according to the water quality parameter tensor and the geographic coordinates of the sensor, and the calculation method is: ; ; wherein, is the spatial distribution matrix at the t-th time step, is the inverse distance weighted interpolation algorithm, is the geographic coordinate matrix of the sensor, is the water quality parameter thermodynamic map at the t-th time step, is the pseudo-color mapping function, is the min-max normalization, is the splicing result of the spatial distribution matrices from the 1st time step to the th time step.

[0025] The method in this embodiment is applied to track and observe the pollution treatment situation of a certain lake, and the before-and-after change comparison is as shown in Figure 2 , wherein, figure (a) shows that there is an obvious red high-pollution core area (five-star position) in the lower left corner of the lake at the beginning, the pollution diffusion presents a gradient decreasing distribution trend from southwest to northeast as a whole, figure (b) shows that after the treatment of the lake, the range of the original high-pollution area is greatly reduced, only a small piece of red area is reserved, the whole area is dominated by the blue low-pollution area (probability below 0.2), and the position marked by the yellow five-star keeps fixed (the pollution core position does not move, and the outline shape basically remains), which further indicates that the treatment process accurately targets the pollution source and does not disturb the overall water dynamic environment of the lake, and the treatment effect can be clearly seen by comparing the two figures.

[0026] Embodiment 2: The application further discloses a water quality parameter prediction system based on multi-sensor data fusion, which comprises the following modules. A data acquisition and preprocessing module is configured to acquire original dissolved oxygen data and turbidity data and perform preprocessing to obtain dissolved oxygen data and turbidity data in a plurality of time windows. A sensor abnormal data elimination module is configured to sequentially calculate water quality feature vectors, dynamic convolution kernels and abnormality discrimination probabilities of sensors in each time window according to the dissolved oxygen data and the turbidity data in the time window, perform traversal elimination on data of all sensors in all time windows according to the abnormality discrimination probabilities, and obtain a complete sensor sequence after single-point abnormality elimination. A global feature calculation module is configured to calculate spatial relationship weights between sensors according to geographical coordinates and water flow directions of sensors corresponding to data points in the complete sensor sequence after single-point abnormality elimination, decompose, optimize and fuse the water quality feature vectors to obtain frequency dynamic features, perform weighted fusion on frequency dynamic features of neighboring sensors based on the spatial relationship weights, process the fusion results through a space-time gating mechanism, and generate a global feature vector. A water quality parameter heat map generation module is configured to generate a water quality parameter tensor based on the global feature vector and a long short-term memory network, and generate a water quality parameter heat map based on geographical coordinates of the sensors.

[0027] The water quality parameter prediction system provided by the embodiment is used for implementing the water quality parameter prediction method in Embodiment 1, wherein functions realized by each functional module of the water quality parameter prediction system correspond to each step of the water quality parameter prediction method one by one, and thus, details are not repeated here.

[0028] It should be noted that the serial numbers of the embodiments of the application are only for description, and do not represent advantages or disadvantages of the embodiments. In addition, the terms "include", "contain" or any other variants thereof in the present text are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, device, article or method. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, device, article or method including the element.

[0029] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, also can be through hardware, but in many cases the former is the better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the contribution to the prior art can be embodied in the form of software products, the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disc, optical disc) as described above, including a number of instructions to make a terminal device (may be a mobile phone, computer, server, or network equipment, etc.) executes the method described in the embodiments of the present application.

[0030] The above is only the preferred embodiment of the present application, not therefore limit the patent scope of the present application, any equivalent structure or equivalent flow transformation made by using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A water quality parameter prediction method based on multi-sensor data fusion, characterized in that: The following steps are involved: S1: Collect the original dissolved oxygen data and turbidity data and preprocess them to obtain the dissolved oxygen data and turbidity data in multiple time windows; S2: Based on the dissolved oxygen data and turbidity data in each time window, the water quality feature vector, dynamic convolution kernel and abnormal discrimination probability of each sensor in the time window are calculated in sequence. According to the abnormal discrimination probability, the data of all sensors in all time windows are traversed and eliminated to obtain the complete sensor sequence after single point anomaly elimination; The calculation process of the abnormality discrimination probability includes: based on the dynamic convolution kernel, using one-dimensional convolution to extract local features of the water quality feature vector of the sensor, and generating an abnormality discrimination gate through the sigmoid function; based on the abnormality discrimination gate and Hadamard product operation, weighted fusion is performed on the water quality feature vector activated by the ReLU function and the water quality feature vector processed by the multi-layer perceptron to obtain a fused feature vector; the fused feature vector is processed by the multi-layer perceptron, and the abnormality discrimination probability of the corresponding sensor in the time window is generated through the sigmoid function; S3: Based on the geographic coordinates and water flow directions of the sensors corresponding to each data point in the complete sensor sequence after single-point anomalies are eliminated, the spatial relationship weights between the sensors are calculated. The water quality feature vectors are decomposed, optimized, and fused to obtain frequency dynamic features. The frequency dynamic features of neighboring sensors are weightedly fused based on the spatial relationship weights. The fusion results are processed through a spatiotemporal gating mechanism to generate a global feature vector. S4: Based on the global feature vector, the water quality parameter tensor is calculated in combination with the long short-term memory network, and the water quality parameter heat map is generated in combination with the geographic coordinates of the sensor.

2. The water quality parameter prediction method based on multi-sensor data fusion according to claim 1 is characterized in that: In step S2, the calculation process of the water quality characteristic vector includes: The dissolved oxygen data and turbidity data in each time window are spliced, and the splicing result is linearly transformed. The sigmoid function is used to generate the water quality parameter interaction gate. The water quality parameter interaction gate is Hadamard-producted with the dissolved oxygen data to obtain the gated dissolved oxygen data. The Hadamard product of the result of subtracting the water quality parameter interaction gate from 1 is performed with the turbidity data to obtain the gated turbidity data. The gated dissolved oxygen data and the gated turbidity data are spliced, and the splicing result is processed by a bidirectional gated recurrent unit to generate the water quality feature vector of each sensor in the time window.

3. The water quality parameter prediction method based on multi-sensor data fusion according to claim 1 is characterized in that: The step S1 comprises: S11: Deploy water quality sensors of the same type at different locations in the water area, perform time synchronization calibration on all sensors, collect dissolved oxygen data and turbidity data in the water, and record the timestamp, sensor geographic coordinates, and water flow direction corresponding to each data point to obtain the original dissolved oxygen data and turbidity data. The sensor geographic coordinates include latitude, longitude, and elevation values. S12: Based on the linear interpolation algorithm, fill in the missing values ​​in the original dissolved oxygen data and turbidity data, and use the triple standard deviation principle to identify and remove data points that are out of the normal fluctuation range to obtain the sorted dissolved oxygen data and turbidity data; S13: Divide the sorted dissolved oxygen data and turbidity data by time stamps according to fixed intervals to obtain dissolved oxygen data and turbidity data within multiple time windows.

4. The water quality parameter prediction method based on multi-sensor data fusion according to claim 3 is characterized in that: The step S2 comprises: S21: Based on the dissolved oxygen data and turbidity data in each time window, the water quality characteristic vector of each sensor in the time window is calculated through the interactive gating mechanism. The calculation method is: ; ; ; ; in, is the interactive gate for water quality parameters, is the sigmoid function, is the water quality parameter interaction weight matrix, is the dissolved oxygen data of the i-th sensor in the time window, i is the first index of the sensor, For splicing operations, is the turbidity data of the i-th sensor in the time window, is the water quality parameter interaction bias vector, is the gated and adjusted dissolved oxygen data of the i-th sensor in the time window, For Hadamard, is the gated turbidity data of the i-th sensor in the time window, is the water quality feature vector of the i-th sensor in the time window, It is a bidirectional gated recurrent unit; S22: Generate a position association weight matrix based on the geographic coordinates of the sensor, and combine it with the water quality feature vector corresponding to the sensor to calculate the dynamic convolution kernel of each sensor in the time window. The calculation method is: ; in, is the position association weight matrix between the i-th sensor and the j-th sensor, j is the second index of the sensor, To take the exponent of a natural constant, is the spatial attenuation coefficient, , is the longitude and latitude of the i-th sensor in geographic coordinates, is the longitude and latitude of the jth sensor in geographic coordinates, is the square of the Euclidean distance, is the dynamic convolution kernel of the i-th sensor in the time window, is the neighborhood sensor set of the i-th sensor, is a multi-layer perceptron, is the water quality feature vector of the jth sensor in the time window; S23: Based on the water quality feature vector and dynamic convolution kernel of the sensor, the abnormality discrimination probability of each sensor in the time window is calculated as follows: ; ; ; in, is the abnormality discrimination gate of the i-th sensor in the time window, is a one-dimensional convolution, is the fusion feature vector of the i-th sensor in the time window, is the ReLU function, is the abnormality discrimination probability of the i-th sensor in the time window; S24: Choose whether to remove the data points of the corresponding sensor in the time window according to the abnormality judgment probability. If , then remove the data point of the sensor, if , then the data point of the sensor is retained; after traversing all sensors, the sensor sequence after removing single-point anomalies in the time window is obtained; after traversing all time windows, the complete sensor sequence after removing single-point anomalies is obtained.

5. The water quality parameter prediction method based on multi-sensor data fusion according to claim 4 is characterized in that: The step S3 comprises: S31: Calculate the spatial relationship weights between sensors based on the geographic coordinates and water flow directions of the sensors corresponding to each data point in the complete sensor sequence after single point anomalies are eliminated. The calculation method is: ; ; ; in, is the Euclidean distance between the i-th sensor and the j-th sensor, To take the two-norm operation, is the similarity of water flow direction between the i-th sensor and the j-th sensor, is the cosine similarity, is the water flow direction vector of the i-th sensor, is the water flow direction vector of the jth sensor, is the spatial relationship weight between the i-th sensor and the j-th sensor, is the spatial relationship weight matrix, is the difference between the elevation value of the i-th sensor in geographic coordinates and the elevation value of the j-th sensor in geographic coordinates; S32: Decompose the water quality feature vector of the sensor into low-frequency features and high-frequency features, perform enhancement and smoothing on them respectively, and fuse them to obtain frequency dynamic features; S33: Generate global feature vectors based on spatial relationship weights and frequency dynamic features. The calculation method is: ; in, is the spatial weighted fusion feature, are the frequency dynamic characteristics of the i-th and j-th sensors respectively, is the spatiotemporal gating vector, is the spatiotemporal gating weight matrix, is the global eigenvector, is global average pooling.

6. The water quality parameter prediction method based on multi-sensor data fusion according to claim 5 is characterized in that: The step S32 includes: S321: Perform frequency decomposition on the water quality feature vector of the sensor to obtain high-frequency features and low-frequency features. The calculation method is: ; ; in, is the low-frequency feature of the i-th sensor, is one-dimensional average pooling, is the high-frequency feature of the i-th sensor; S322: Perform gate enhancement on the low-frequency features to obtain enhanced low-frequency features. The calculation method is: ; ; in, is the low-frequency gating weight, is the low-frequency feature after enhancement of the i-th sensor, It is a dilated convolution; S323: Perform dynamic Bessel kernel convolution on the high-frequency features to obtain smoothed high-frequency features. The calculation method is: ; ; ; in, is the dynamic kernel bandwidth coefficient, is the Bessel function convolution kernel, is the zero-order Bessel function, is the high-frequency feature of the i-th sensor after smoothing; S324: Fusing the enhanced low-frequency features and the smoothed high-frequency features to obtain frequency dynamic features. The calculation method is: ; in, is the frequency dynamic characteristics of the i-th sensor, Normalize the layer.

7. The water quality parameter prediction method based on multi-sensor data fusion according to claim 5 is characterized in that: The step S4 comprises: S41: Based on the global feature vector, the water quality parameter tensor is generated in combination with the long short-term memory network. The calculation method is: ; ; ; ; in, is the hidden state vector of the tth time step, t is the time step index, is the total number of time steps, is the long short-term memory network, is the dissolved oxygen prediction vector at the tth time step, is the dissolved oxygen prediction weight matrix, is the dissolved oxygen prediction bias vector, is the turbidity prediction vector at the t-th time step, is the turbidity prediction weight matrix, is the turbidity prediction bias vector, is the water quality parameter tensor, From the first time step to the The concatenation result of the dissolved oxygen prediction vector and the turbidity prediction vector at each time step; S42: Generate a water quality parameter heat map based on the water quality parameter tensor and the geographic coordinates of the sensor. The calculation method is: ; ; in, is the spatial distribution matrix of the t-th time step, is the inverse distance weighted interpolation algorithm, is the geographic coordinate matrix of the sensor, is the water quality parameter heat map at the tth time step, is the pseudo color mapping function, is the maximum and minimum normalization, From the first time step to the The splicing result of the spatial distribution matrix of time steps.

8. A water quality parameter prediction system based on multi-sensor data fusion, characterized in that: include: Data acquisition and preprocessing module: collects raw dissolved oxygen data and turbidity data and performs preprocessing to obtain dissolved oxygen data and turbidity data in multiple time windows; Sensor abnormal data elimination module: Based on the dissolved oxygen data and turbidity data in each time window, the water quality feature vector, dynamic convolution kernel and abnormal discrimination probability of each sensor in the time window are calculated in sequence. Based on the abnormal discrimination probability, the data of all sensors in all time windows are traversed and eliminated to obtain a complete sensor sequence after single-point anomaly elimination; Global feature calculation module: Based on the geographic coordinates and water flow direction of each sensor corresponding to each data point in the complete sensor sequence after single-point anomaly removal, the spatial relationship weights between sensors are calculated. The water quality feature vectors are decomposed, optimized, and fused to obtain frequency dynamic features. The frequency dynamic features of neighboring sensors are weightedly fused based on the spatial relationship weights. The fusion results are processed through a spatiotemporal gating mechanism to generate a global feature vector. Water quality parameter heat map generation module: Based on the global feature vector, it combines the long short-term memory network to generate a water quality parameter tensor, and combines the sensor's geographic coordinates to generate a water quality parameter heat map; To realize the water quality parameter prediction method based on multi-sensor data fusion as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Multi-temporal information combined hyperspectral change detection method based on graph transformer guidance

    CN116843923A

  • Abnormality detection method and device

    CN116910507A

  • Dynamic graph convolution traffic flow prediction method based on spatial-temporal characteristics

    CN117037491A

  • Water quality prediction method and device and computer readable storage medium

    CN117851802A

  • Environmental monitoring data anomaly detection method, medium and system

    CN119807728A

Cited By

  • Water quality prediction and evaluation method based on multi-source data

    CN121786355A

  • Multi-dimensional canal flow monitoring method for farmland irrigation

    CN122084048A

  • A multi-dimensional monitoring method for water channel flow of farmland irrigation

    CN122084048B