A rural water body water quality prediction method and device fusing meteorological and water quality time series data and a storage medium

By integrating the time-series correlation processing of rural water quality and meteorological data, the problem of missing and abnormal rural water quality monitoring data has been solved, enabling intelligent water quality prediction for scattered rural water bodies and supporting rural water environment management.

CN123180519APending Publication Date: 2026-11-27SCI RES ACADEMY OF GUANGXI ENVIRONMENTAL PROTECTION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611481853.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-22
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively utilize water quality monitoring data from scattered water bodies in rural areas, cannot predict water quality in multiple areas, and ignore the impact of regional meteorological conditions on water bodies, resulting in data gaps and abrupt changes, making them unsuitable for the complex hydrological environment in rural areas.

Method used

By acquiring time-series water quality monitoring data of rural water bodies and meteorological time-series data of catchment areas, spatial correlation, unified time identification, data quality processing, zonal aggregation, and inter-regional spatial correlation are performed to construct predictive input data. Then, a water quality time-series prediction model is used for time-series correlation processing to generate water quality prediction results.

Benefits of technology

It enables the comprehensive utilization of spatial zoning information of rural water bodies and meteorological information, completes intelligent water quality prediction and analysis for scattered rural water bodies, and provides a complete business process for rural water environment management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180519A_ABST
    Figure CN123180519A_ABST
Patent Text Reader

Abstract

The present application provides a kind of rural water body water quality prediction method, device and storage medium for fusing meteorology and water quality time series data, it is related to water environment monitoring technical field.The method steps are: obtaining the water quality, meteorological time series data of target rural water body and its catchment area, combined with water body spatial distribution completes data partition correlation and time mark uniformity, obtains space-time correlation data;Quality processing is done to space-time correlation data;According to water body partition relationship, complete data partition aggregation, spatial correlation, calculate partition water quality transmission and meteorological influence characteristics, obtain partition correlation data;Based on partition correlation data, construct prediction input data with historical time window;Input water quality time series prediction model trained, after time series correlation processing, obtain future water quality prediction time series data;Accordingly generate water quality change trend result and issue to water quality management terminal.The present application comprehensively utilizes water body partition, water quality and meteorological information, realizes rural scattered water body intelligent prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention mainly relates to the field of water environment monitoring technology, specifically to a method, device and storage medium for predicting water quality in rural water bodies by integrating meteorological and water quality time series data. Background Technology

[0002] Rural areas are characterized by a wide distribution of scattered water bodies such as ponds, ditches, and small tributaries. These water bodies are an important component of the rural water environment, and their water quality directly affects the rural living environment and agricultural production safety. Currently, grassroots water quality management in rural areas largely relies on staff regularly conducting on-site sampling and testing. Water quality indicators are obtained through manual on-site sampling and laboratory analysis. This approach is time-consuming, requires significant human and material resources, and only provides water quality results at discrete points in time. It struggles to capture the dynamic evolution of water quality due to weather and runoff conditions, making it difficult to provide early warning support for water quality monitoring.

[0003] In some areas, conventional time-series forecasting methods have begun to be used for water quality analysis. These methods primarily rely on single-point water quality monitoring data to extrapolate trends, with less consideration given to the external impacts of regional meteorological conditions on water bodies. Rural water systems are interconnected, with material exchange occurring between upstream and downstream ponds and ditches. Changes in local water quality can spread to surrounding areas along confluence paths. Conventional forecasting methods often treat each body of water as an independent entity, neglecting the interrelationships between different bodies of water.

[0004] Due to the constraints of the rural environment, monitoring equipment is prone to data loss and abrupt changes. Existing processing methods often involve simple data removal or direct supplementation, lacking data correction techniques that consider the spatial relationships within the water system. Therefore, relying solely on manual sampling or simple time-series analysis is insufficient to adapt to the complex hydrological environment of dispersed water bodies in rural areas, making it impossible to predict water quality in multiple areas and hindering routine management and proactive risk management of the rural water environment. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method, device and storage medium for predicting water quality in rural water bodies by integrating meteorological and water quality time series data, in order to overcome the shortcomings of the prior art.

[0006] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A method for predicting the water quality of rural water bodies by integrating meteorological and water quality time-series data, comprising the following steps: The water quality monitoring time series data of the target rural water body and the meteorological time series data of the catchment area where the target rural water body is located are obtained. Based on the spatial distribution of the target rural water body, the water quality monitoring time series data are associated with the corresponding water body partitions. A unified time identifier is configured for the water quality monitoring time series data and the meteorological time series data to obtain spatiotemporal correlation data. The spatiotemporal correlation data is subjected to data quality processing to obtain spatiotemporal correlation data with improved data quality. Based on the water body zoning relationship of the target rural water body, the water quality monitoring time series data and meteorological time series data corresponding to each water body zoning in the spatiotemporal correlation data after data quality processing are zoning aggregated and spatially correlated between zoning intervals to obtain spatial topological correlation zoning time series data. Based on the spatial topological correlation zoning time series data, the water quality transfer characteristics and meteorological influence characteristics between each water body zoning are calculated to obtain zoning correlation data. Based on the partition association data, predictive input data with historical time windows is constructed, wherein the predictive input data includes the water quality change characteristics of the target rural water body within the historical time window and the meteorological change characteristics of the catchment area within the historical time window; The predicted input data is input into a pre-trained water quality time series prediction model. The water quality change characteristics and the meteorological change characteristics are time series correlated by the water quality time series prediction model to obtain the water quality prediction time series data of the target rural water body in the future prediction time window. The water quality change trend results of the target rural water body are generated based on the water quality prediction time series data, and the water quality change trend results are output to the designated water quality management terminal.

[0007] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: A rural water quality prediction device that integrates meteorological and water quality time series data, comprising: The data acquisition module is used to acquire water quality monitoring time series data of the target rural water body and meteorological time series data of the catchment area where the target rural water body is located, and associate the water quality monitoring time series data with the corresponding water body partition based on the spatial distribution of the target rural water body, and configure a unified time identifier for the water quality monitoring time series data and the meteorological time series data to obtain spatiotemporal correlation data; The data quality processing module is used to perform data quality processing on the spatiotemporal correlation data to obtain spatiotemporal correlation data after data quality processing. The partition association module is used to perform partition aggregation and inter-partition spatial association on the water quality monitoring time series data and meteorological time series data corresponding to each water body partition in the spatiotemporal association data after data quality processing, based on the water body partition relationship of the target rural water body, to obtain spatial topological association partition time series data, and calculate the water quality transfer characteristics and meteorological influence characteristics between each water body partition based on the spatial topological association partition time series data to obtain partition association data; A prediction input construction module is used to construct prediction input data with historical time windows based on the partition association data, wherein the prediction input data includes the water quality change characteristics of the target rural water body within the historical time window and the meteorological change characteristics of the catchment area within the historical time window; The water quality prediction module is used to input the prediction input data into a pre-trained water quality time series prediction model, and to perform time series correlation processing on the water quality change characteristics and the meteorological change characteristics through the water quality time series prediction model to obtain the water quality prediction time series data of the target rural water body within the future prediction time window. The result output module is used to generate the water quality change trend result of the target rural water body based on the water quality prediction time series data, and output the water quality change trend result to the designated water quality management terminal.

[0008] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: a rural water quality prediction device that integrates meteorological and water quality time series data, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it realizes the rural water quality prediction method that integrates meteorological and water quality time series data as described above.

[0009] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the rural water quality prediction method that integrates meteorological and water quality time-series data as described above.

[0010] The beneficial effects of this invention are: by acquiring time-series data of rural water quality and meteorological time-series data of catchment areas, it completes the entire process of water quality prediction processing, including spatial correlation of water body zones, unified time identification, data quality processing, calculation of zone correlation features, construction of prediction inputs, model time-series prediction, and output of trend results. This enables the comprehensive utilization of rural water body spatial zoning information, water quality information, and meteorological information, thereby completing intelligent water quality prediction and analysis for scattered rural water bodies and providing a complete water quality prediction business processing flow for rural water environment management terminals. Attached Figure Description

[0011] Figure 1 A flowchart of a rural water quality prediction method provided in an embodiment of the present invention; Figure 2 A block diagram of a rural water quality prediction device provided in an embodiment of the present invention. Detailed Implementation

[0012] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0013] Example 1: As Figure 1 As shown in the figure, this embodiment of the invention provides a method for predicting the water quality of rural water bodies by integrating meteorological and water quality time-series data, including the following steps: S1. Obtain water quality monitoring time series data of the target rural water body and meteorological time series data of the catchment area where the target rural water body is located, and associate the water quality monitoring time series data with the corresponding water body partition based on the spatial distribution of the target rural water body, and configure a unified time identifier for the water quality monitoring time series data and the meteorological time series data to obtain spatiotemporal correlation data; S2. Perform data quality processing on the spatiotemporal correlation data to obtain spatiotemporal correlation data after data quality processing; S3. Based on the water body zoning relationship of the target rural water body, perform zoning aggregation and inter-zone spatial correlation on the water quality monitoring time series data and meteorological time series data corresponding to each water body zoning in the spatiotemporal correlation data after data quality processing, to obtain spatial topological correlation zoning time series data, and calculate the water quality transfer characteristics and meteorological influence characteristics between each water body zoning based on the spatial topological correlation zoning time series data to obtain zoning correlation data. S4. Construct predictive input data with historical time windows based on the partition association data, wherein the predictive input data includes the water quality change characteristics of the target rural water body within the historical time window and the meteorological change characteristics of the catchment area within the historical time window; S5. Input the predicted input data into a pre-trained water quality time series prediction model, and perform time series correlation processing on the water quality change characteristics and the meteorological change characteristics through the water quality time series prediction model to obtain the water quality prediction time series data of the target rural water body in the future prediction time window. S6. Generate the water quality change trend results of the target rural water body based on the water quality prediction time series data, and output the water quality change trend results to the designated water quality management terminal.

[0014] In the above embodiments, by acquiring time-series water quality data of rural water bodies and meteorological time-series data of catchment areas, the entire process of water quality prediction processing is completed, including spatial association of water body zones, unified time identification, data quality processing, calculation of zone association features, construction of prediction inputs, model time-series prediction, and output of trend results. This enables the comprehensive utilization of rural water body spatial zoning information, water quality information, and meteorological information, thereby completing intelligent water quality prediction and analysis for scattered rural water bodies and providing a complete water quality prediction business processing flow for rural water environment management terminals.

[0015] Preferably, S1, acquiring water quality monitoring time-series data of the target rural water body and meteorological time-series data of the catchment area where the target rural water body is located, and associating the water quality monitoring time-series data with the corresponding water body partitions based on the spatial distribution of the target rural water body, and configuring a unified time identifier for the water quality monitoring time-series data and the meteorological time-series data to obtain spatiotemporal correlation data, including: S11. Collect water quality monitoring time-series data from water quality sensor nodes deployed in the target rural water body, and collect meteorological time-series data from meteorological monitoring stations in the catchment area. The water quality monitoring time-series data includes time-series records of at least one of the following indicators: dissolved oxygen, ammonia nitrogen, total phosphorus, and pH value. The meteorological time-series data includes time-series records of at least one of the following indicators: rainfall, temperature, humidity, and wind speed. S12. Based on the spatial distribution of the target rural water bodies, the water quality monitoring time series data are classified according to the water body partitions to which each water quality sensor node belongs, and a mapping relationship between each water quality monitoring time series data and the corresponding water body partition is established to obtain partition mapping data. S13. The water quality monitoring time series data and the meteorological time series data in the partition mapping data are timestamped according to a unified time base, and each time series data is labeled with a time identifier in a unified format to obtain spatiotemporal correlation data.

[0016] For example, a village contains three ponds and field ditches connecting them, which are divided into three water zones according to their catchment areas. Multiple water quality sensors are installed in the ponds and ditches, and the township meteorological station provides meteorological observation data. The sensor sampling interval is 1 hour, and the meteorological station outputs hourly data. The pond sensor data is assigned to the corresponding pond zone, and the ditch measurement points are assigned to the ditch zone. The data is uniformly converted into a timestamp in the format of "year-month-day-hour:00" to complete the spatiotemporal matching of multi-source monitoring data.

[0017] In the above embodiments, multiple water quality indicators and meteorological indicators are collected by water quality sensor nodes and meteorological monitoring stations, respectively. The mapping relationship between monitoring points and water body zoning is established and the timestamp alignment is completed. This enables the spatial attribution binding and temporal dimension unification of the dispersed and heterogeneous monitoring data, thereby eliminating the inconsistency problem of multi-source data in terms of spatial attribution and time reference. The result is spatiotemporal correlation data with matching spatiotemporal dimensions, providing a regular raw data foundation for subsequent data processing and feature calculation.

[0018] Preferably, S2, the spatiotemporal correlation data is subjected to data quality processing to obtain spatiotemporal correlation data after data quality processing, including: S21. Perform outlier detection on the water quality monitoring time series data and meteorological time series data in the spatiotemporal correlation data respectively. Based on the physical reasonable value range and time series statistical distribution characteristics of each water quality index and meteorological index, mark the abnormal data points that exceed the reasonable range. S22. Fill in the missing values ​​of the abnormal data points and the original missing data points by using a spatial interpolation method based on adjacent monitoring points within the same water body partition to obtain continuous and complete time series data. S23. The continuous and complete time series data are smoothed and denoised using the exponentially weighted moving average method to obtain smoothed time series data. S24. Dimensionless processing is performed on each water quality index and meteorological index in the smoothed time series data to obtain spatiotemporal correlation data after data quality processing.

[0019] Specifically, rural field sensors are easily affected by algae attachment and power supply fluctuations, resulting in obviously unreasonable abnormal values ​​such as negative ammonia nitrogen concentration and pH exceeding 14. Data loss may occur during certain periods due to equipment power outages. In such cases, spatial interpolation is used to fill the gaps by using other normal measuring points within the same pond area, and then exponential weighted moving average is used to eliminate short-term jump noise. Since the numerical magnitudes of ammonia nitrogen and rainfall are vastly different, maximum-minimum standardization is used to complete dimensionless scaling and eliminate the calculation bias caused by dimensions.

[0020] In the above embodiments, by performing outlier marking, missing data imputation, temporal smoothing and denoising, and dimensionless processing on spatiotemporal correlated data, abnormal noise caused by sensor acquisition can be eliminated, missing data fragments generated during the monitoring process can be supplemented, and computational interference caused by the difference in dimensions between different physical indicators can be eliminated. This results in the output of a continuous, reliable, and uniform time-series dataset, reducing the adverse effects of sensor acquisition defects on subsequent feature calculations and model prediction results.

[0021] Preferably, S3, based on the water body zoning relationship of the target rural water body, the water quality monitoring time series data and meteorological time series data corresponding to each water body zoning in the spatiotemporal correlation data after data quality processing are zoned, aggregated, and spatially correlated between zoning intervals to obtain spatially topologically correlated zoning time series data. Based on the spatially topologically correlated zoning time series data, the water quality transfer characteristics and meteorological influence characteristics between each water body zoning are calculated to obtain zoning correlation data, including: S31. Based on the water body zoning relationship of the target rural water body, the water quality monitoring time series data and meteorological time series data corresponding to each water body zoning in the spatiotemporal correlation data after data quality processing are zoned and aggregated to obtain the zoning-level time series data of each water body zoning. S32. Construct a spatial weight matrix for each water body partition based on the spatial topological connection relationship. Perform spatial correlation on the partition-level time series data based on the spatial weight matrix to obtain spatially topologically correlated partition time series data. The spatial weight matrix for each water body partition... The construction formula is: , in, The total number of water body zones. The first element in the interval space weight matrix The water body zone and the first Spatial correlation weights between water body zones For partitioning With partitions Spatial distance or confluence path length between them For distance scale parameters, For partitioning A set of adjacent partitions that have direct spatial connections; S33. Calculate the water quality transfer characteristics between water body partitions based on the spatial topological association of the partitioned time-series data and the partitioned spatial weight matrix, including: For any two partitions that have a spatial connection and partitions Calculate partitions To partition Water quality transfer coefficient , is represented as: , in, Water quality index type For partitioning At any moment Traffic, For partitioning At any moment water quality indicators concentration value, This refers to the length of the historical statistical time window. For partitioning the interval space weight matrix To partition Weighted elements; S34. Based on the spatial topological association of the partitioned time-series data, calculate the meteorological impact characteristics of each water body partition, including: For any water body partition Calculate its meteorological impact feature vector within the historical time window. , is represented as: , in, For a moment Rainfall, For temperature, For humidity, For wind speed, This represents a vector concatenation operation. For partitioning Meteorological element weight vector, This represents element-wise multiplication; S35. The water quality transfer coefficient and the meteorological influence feature vector are fused using a feature fusion formula to obtain the partitioned correlation data. The feature fusion formula is as follows: , in, For partitioning The corresponding set of water quality transfer coefficients, For partitioning The meteorological impact feature vector, For the merged partitioned data, This is a vector concatenation operation.

[0022] Taking a series of waterways consisting of upstream ponds, intermediate ditches, and downstream ponds as an example, the length of the confluence path is used as... A spatial weight matrix is ​​constructed. After rainfall, pollutants from upstream ponds are transported downstream along ditches. The water quality transfer coefficient can quantitatively characterize the contribution of upstream ponds to downstream ditches and ponds. The meteorological influence feature vector is used to characterize the driving force of meteorological conditions such as heavy rainfall and high temperature on the water quality of ponds in this region. Finally, the inter-regional transfer coefficients and meteorological influence vectors are concatenated to obtain the region association data that includes both spatial feedback and meteorological driving information for each region.

[0023] In the above embodiments, by performing partitioned aggregation on the time-series data of each water body partition, constructing a spatial weight matrix by combining the topological connections of the water bodies, calculating the water quality transfer coefficient between partitions and the meteorological influence characteristics of each partition in turn, and completing feature splicing and fusion, it is possible to quantify the material transport and transfer relationship between different water body partitions in rural areas and the driving effect of meteorological elements on the water quality of the partitions. In this way, partitioned correlation data that simultaneously carries spatial topology, water quality transfer, and meteorological driving information can be obtained, fully exploring the spatial feedback law of water bodies under the rural pit, pond, and ditch interconnection system.

[0024] Preferably, S4, constructing predictive input data with historical time windows based on the partition association data, wherein the predictive input data includes the water quality change characteristics of the target rural water body within the historical time window and the meteorological change characteristics of the catchment area within the historical time window, including: S41. Based on the partition association data, extract the water quality change characteristics and meteorological change characteristics of each water body partition within the historical time window to obtain partition feature sequence data, wherein, for any water body partition Its historical time window Water quality change characteristics and meteorological change characteristics They are represented as follows: , , in, For partitioning The partitioned associated data sequence, For partitioning The meteorological impact feature vector sequence, and These are timing coding functions, For the current predicted time, The length of the historical time window; S42. Perform time alignment and dimensional concatenation on the feature sequence data of all water body partitions to construct the prediction input data, wherein the expression of the prediction input data is: , in, The total number of water body zones. For the historical water quality change feature set of all zones, This is a set of historical meteorological change characteristics for all regions. This involves splicing along the feature dimension.

[0025] Set historical time window The system takes 24 hours, which means using the partition association data of each pit, pond and ditch partition over the past 24 hours; it encodes the water quality transmission and evolution and meteorological influence evolution of each partition into feature vectors through a time-series coding function; then it aligns the coding vectors of all three water body partitions in time, splices and merges them along the feature dimension, and assembles them into an input sample that the model can read, so as to realize the unified input of historical information of multiple partitions.

[0026] In the above embodiments, water quality change features and meteorological change features of each partition under the historical time window are extracted by the time-series coding function. Then, the feature sequences of all partitions are time-aligned and feature dimensions are spliced ​​to generate prediction input data. This can transform the partition-related data into a time-series feature sequence that is adapted to the input format of the prediction model, thereby unifying and integrating the historical evolution information of all water body partitions, so that the model can learn the water quality evolution patterns and meteorological change patterns of different partitions at the same time.

[0027] Preferably, S5, the predicted input data is input into a pre-trained water quality time-series prediction model, and the water quality change characteristics and meteorological change characteristics are correlated in a time series by the water quality time-series prediction model to obtain the water quality prediction time-series data of the target rural water body within the future prediction time window, including: S51. Input the predicted input data into a pre-trained water quality time series prediction model, the water quality time series prediction model including a feature extraction layer and a time series decoding layer; S52. The feature extraction layer performs cross-modal feature interaction on the water quality change features and meteorological change features in the predicted input data to obtain fused time-series features, wherein the expression for the cross-modal feature interaction is: , in, To predict the set of water quality change features in the input data, To predict the set of meteorological change features in the input data, 、 、 For learnable weight matrix, For the attention calculation function, To integrate temporal features; S53. The fused temporal features are processed by the temporal decoding layer to predict the water quality concentration values ​​of each water body partition within the future time window, thereby obtaining the water quality prediction time-series data of the target rural water body within the future prediction time window. The temporal decoding layer is a gated loop unit, and its expression is: , in, For partitioning In the future Predicted water quality concentration values For decoding function, To be hidden in history This represents the time offset within the future prediction time window.

[0028] The model is pre-trained using the historical pit and ditch monitoring dataset of the village; the attention interaction layer automatically learns the correlation weights between meteorological elements such as rainfall and high temperature and ammonia nitrogen and total phosphorus water quality, for example, it identifies that rainfall has a higher weight on the total phosphorus concentration of downstream pits and ponds; the gated cyclic unit temporal decoding extrapolates the future based on fused features, and can output the hourly predicted concentrations of ammonia nitrogen and total phosphorus in each pit and ditch zone for the next 12 hours.

[0029] In the above embodiments, the cross-modal attention interaction between water quality features and meteorological features is realized through the feature extraction layer inside the water quality time series prediction model. Then, the time series decoding layer composed of gated recurrent units performs time series inference to obtain the future water quality prediction time series data of each zone. This enables deep fusion learning of water quality time series information and meteorological driving information, thereby fully capturing the nonlinear time series evolution law of rural water quality under meteorological disturbance conditions and outputting the water quality concentration prediction results of each water zone for future periods.

[0030] Preferably, S6, generating water quality change trend results for the target rural water body based on the water quality prediction time series data, and outputting the water quality change trend results to a designated water quality management terminal, includes: S62. Perform trend analysis on the water quality prediction sequence, calculate the slope of water quality change for each water body partition within the future prediction time window, and determine the direction of water quality change trend based on the slope of water quality change to obtain the water quality change trend results for each water body partition. For any water body partition... , in, For partitioning In the future Predicted water quality concentration values This is the derivative of water concentration with time, i.e., the slope of water quality change. The preset deterioration threshold, The preset improvement threshold; S63. Encapsulate the water quality change trend results into a result data packet including the change trend direction of each water body zone, the predicted concentration value and the corresponding timestamp, and send the result data packet to the designated water quality management terminal.

[0031] Taking total phosphorus as an example, managers pre-configure deterioration and improvement thresholds; if the predicted slope of total phosphorus in downstream ponds for the next 6 hours is greater than the deterioration threshold, the trend is marked as deteriorating; if the total phosphorus change in a ditch zone is within the threshold range, it is marked as stable; the trend label, hourly predicted total phosphorus and ammonia nitrogen concentrations, and corresponding timestamps for each zone are packaged and pushed to the township water environment management platform terminal, so that managers can carry out control and treatment of ponds with deterioration risks in advance.

[0032] In the above embodiments, by solving the slope of the water quality prediction sequence and combining it with a preset threshold to classify the water quality into three trend levels: deterioration, stability, and improvement, the trend level, predicted concentration, and timestamp are encapsulated into a result data packet and sent to the water quality management terminal. This enables business-oriented trend analysis of the original numerical prediction results, thereby transforming the time-series prediction data output by the model into business results readable by management personnel, supporting risk identification, early warning assessment, and management and disposal of rural water environment.

[0033] Example 2: As Figure 2 As shown in the figure, this embodiment of the invention also provides a rural water quality prediction device that integrates meteorological and water quality time-series data, including: The data acquisition module is used to acquire water quality monitoring time series data of the target rural water body and meteorological time series data of the catchment area where the target rural water body is located, and associate the water quality monitoring time series data with the corresponding water body partition based on the spatial distribution of the target rural water body, and configure a unified time identifier for the water quality monitoring time series data and the meteorological time series data to obtain spatiotemporal correlation data; The data quality processing module is used to perform data quality processing on the spatiotemporal correlation data to obtain spatiotemporal correlation data after data quality processing. The partition association module is used to perform partition aggregation and inter-partition spatial association on the water quality monitoring time series data and meteorological time series data corresponding to each water body partition in the spatiotemporal association data after data quality processing, based on the water body partition relationship of the target rural water body, to obtain spatial topological association partition time series data, and calculate the water quality transfer characteristics and meteorological influence characteristics between each water body partition based on the spatial topological association partition time series data to obtain partition association data; A prediction input construction module is used to construct prediction input data with historical time windows based on the partition association data, wherein the prediction input data includes the water quality change characteristics of the target rural water body within the historical time window and the meteorological change characteristics of the catchment area within the historical time window; The water quality prediction module is used to input the prediction input data into a pre-trained water quality time series prediction model, and to perform time series correlation processing on the water quality change characteristics and the meteorological change characteristics through the water quality time series prediction model to obtain the water quality prediction time series data of the target rural water body within the future prediction time window. The result output module is used to generate the water quality change trend result of the target rural water body based on the water quality prediction time series data, and output the water quality change trend result to the designated water quality management terminal.

[0034] This invention also provides a rural water quality prediction device that integrates meteorological and water quality time-series data, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the rural water quality prediction method that integrates meteorological and water quality time-series data as described above.

[0035] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the rural water quality prediction method that integrates meteorological and water quality time-series data as described above.

[0036] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0037] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0038] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0039] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0040] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0041] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for predicting water quality in rural water bodies by integrating meteorological and water quality time-series data, characterized in that, Includes the following steps: The water quality monitoring time series data of the target rural water body and the meteorological time series data of the catchment area where the target rural water body is located are obtained. Based on the spatial distribution of the target rural water body, the water quality monitoring time series data are associated with the corresponding water body partitions. A unified time identifier is configured for the water quality monitoring time series data and the meteorological time series data to obtain spatiotemporal correlation data. The spatiotemporal correlation data is subjected to data quality processing to obtain spatiotemporal correlation data with improved data quality. Based on the water body zoning relationship of the target rural water body, the water quality monitoring time series data and meteorological time series data corresponding to each water body zoning in the spatiotemporal correlation data after data quality processing are zoning aggregated and spatially correlated between zoning intervals to obtain spatial topological correlation zoning time series data. Based on the spatial topological correlation zoning time series data, the water quality transfer characteristics and meteorological influence characteristics between each water body zoning are calculated to obtain zoning correlation data. Based on the partition association data, predictive input data with historical time windows is constructed, wherein the predictive input data includes the water quality change characteristics of the target rural water body within the historical time window and the meteorological change characteristics of the catchment area within the historical time window; The predicted input data is input into a pre-trained water quality time series prediction model. The water quality change characteristics and the meteorological change characteristics are time series correlated by the water quality time series prediction model to obtain the water quality prediction time series data of the target rural water body in the future prediction time window. The water quality change trend results of the target rural water body are generated based on the water quality prediction time series data, and the water quality change trend results are output to the designated water quality management terminal.

2. The method for predicting rural water quality by integrating meteorological and water quality time-series data as described in claim 1, characterized in that, Acquire time-series water quality monitoring data of the target rural water body and meteorological time-series data of the catchment area where the target rural water body is located. Based on the spatial distribution of the target rural water body, associate the water quality monitoring time-series data with the corresponding water body zones. Configure a unified time identifier for the water quality monitoring time-series data and the meteorological time-series data to obtain spatiotemporal correlated data, including: Water quality monitoring time-series data is collected from water quality sensor nodes deployed in the target rural water bodies, and meteorological time-series data is collected from meteorological monitoring stations in the catchment area. The water quality monitoring time-series data includes time-series records of at least one of the following indicators: dissolved oxygen, ammonia nitrogen, total phosphorus, and pH value. The meteorological time-series data includes time-series records of at least one of the following indicators: rainfall, temperature, humidity, and wind speed. Based on the spatial distribution of the target rural water bodies, the water quality monitoring time series data are classified according to the water body partitions to which each water quality sensor node belongs, and a mapping relationship between each water quality monitoring time series data and the corresponding water body partition is established to obtain partition mapping data. The water quality monitoring time series data and the meteorological time series data in the partition mapping data are timestamped according to a unified time base, and each time series data is labeled with a time identifier in a unified format to obtain spatiotemporal correlation data.

3. The method for predicting rural water quality by integrating meteorological and water quality time-series data as described in claim 1, characterized in that, The spatiotemporal correlation data is subjected to data quality processing to obtain spatiotemporal correlation data with improved data quality, including: Anomaly detection is performed on the water quality monitoring time series data and meteorological time series data in the spatiotemporal correlation data respectively. Based on the physical reasonable value range and time series statistical distribution characteristics of each water quality index and meteorological index, abnormal data points that exceed the reasonable range are marked. Missing values ​​are filled in for the abnormal data points and the original missing data points. The filling is performed based on the spatial interpolation method of adjacent monitoring points within the same water body zone to obtain continuous and complete time series data. The continuous and complete time series data are smoothed and denoised using the exponentially weighted moving average method to obtain smoothed time series data. The water quality and meteorological indicators in the smoothed time series data are respectively subjected to dimensionless processing to obtain spatiotemporal correlation data after data quality processing.

4. The method for predicting rural water quality by integrating meteorological and water quality time-series data according to claim 1, characterized in that, Based on the water body zoning relationships of the target rural water bodies, the water quality monitoring time-series data and meteorological time-series data corresponding to each water body zoning in the spatiotemporal correlation data after data quality processing are zoned, aggregated, and spatially correlated between zoning intervals to obtain spatially topologically correlated zoning time-series data. Based on the spatially topologically correlated zoning time-series data, the water quality transfer characteristics and meteorological influence characteristics between each water body zoning are calculated to obtain zoning correlation data, including: Based on the water body zoning relationship of the target rural water body, the water quality monitoring time series data and meteorological time series data corresponding to each water body zoning in the spatiotemporal correlation data after data quality processing are zoned and aggregated to obtain the zoning-level time series data of each water body zoning. Based on the spatial topological connectivity of each water body zone, a spatial weight matrix is ​​constructed for each zone. Based on this spatial weight matrix, spatial correlation is performed on the zone-level time-series data to obtain spatially topologically correlated zone-level time-series data. The spatial weight matrix is ​​then used to construct the spatial weight matrix for each zone. The construction formula is: , in, The total number of water body zones. The first element in the interval space weight matrix The water body zone and the first Spatial correlation weights between water body zones For partitioning With partitions Spatial distance or confluence path length between them For distance scale parameters, For partitioning A set of adjacent partitions that have direct spatial connections; Based on the spatial topological association of the partitioned time-series data and the partitioned spatial weight matrix, the water quality transfer characteristics between each water body partition are calculated, including: For any two partitions that have a spatial connection relationship and partitions Calculate partitions To partition Water quality transfer coefficient , is represented as: , in, Water quality index type For partitioning At any moment Traffic, For partitioning At any moment water quality indicators concentration value, The length of the historical statistical time window. For partitioning the interval space weight matrix To partition Weighted elements; Based on the spatial topological association of the partitioned time-series data, the meteorological impact characteristics of each water body partition are calculated, including: For any water body partition Calculate its meteorological impact feature vector within the historical time window. , represented as: , in, For a moment Rainfall, For temperature, For humidity, For wind speed, This represents a vector concatenation operation. For partitioning Meteorological element weight vector, This represents element-wise multiplication; The water quality transfer coefficient and the meteorological influence feature vector are fused using a feature fusion formula to obtain the partitioned correlation data. The feature fusion formula is as follows: , in, For partitioning The corresponding set of water quality transfer coefficients, For partitioning The meteorological impact feature vector, For the merged partitioned data, This is a vector concatenation operation.

5. The method for predicting rural water quality by integrating meteorological and water quality time-series data according to claim 1, characterized in that, Based on the partitioned correlation data, predictive input data with historical time windows is constructed. The predictive input data includes the water quality change characteristics of the target rural water body within the historical time window and the meteorological change characteristics of the catchment area within the historical time window, including: Based on the aforementioned partition association data, water quality and meteorological change characteristics of each water body partition within a historical time window are extracted to obtain partition feature sequence data. For any water body partition... Its historical time window Water quality change characteristics and meteorological change characteristics They are represented as follows: , , in, For partitioning The partitioned associated data sequence, For partitioning The meteorological impact feature vector sequence, and These are timing coding functions, For the current predicted time, The length of the historical time window; The prediction input data is constructed by performing time alignment and dimensional concatenation on the feature sequence data of all water body partitions, wherein the expression of the prediction input data is: , in, The total number of water body zones. For the historical water quality change feature set of all zones, This is a set of historical meteorological change characteristics for all regions. This involves splicing along the feature dimension.

6. The method for predicting rural water quality by integrating meteorological and water quality time-series data according to claim 1, characterized in that, The predicted input data is input into a pre-trained water quality time-series prediction model. The model then performs time-series correlation processing on the water quality change characteristics and the meteorological change characteristics to obtain the water quality prediction time-series data for the target rural water body within a future prediction time window, including: The predicted input data is input into a pre-trained water quality time-series prediction model, which includes a feature extraction layer and a time-series decoding layer. The feature extraction layer performs cross-modal feature interaction on the water quality change features and meteorological change features in the predicted input data to obtain fused time-series features. The expression for the cross-modal feature interaction is as follows: , in, To predict the set of water quality change features in the input data, To predict the set of meteorological change features in the input data, 、 、 For learnable weight matrix, For the attention calculation function, To integrate temporal features; The time-series decoding layer performs time-series correlation processing on the fused time-series features to predict the water quality concentration values ​​of each water body partition within a future time window, thereby obtaining the water quality prediction time-series data of the target rural water body within the future prediction time window. The time-series decoding layer is a gated loop unit, expressed as: , in, For partitioning In the future Predicted water quality concentration values For decoding function, To be hidden in history This represents the time offset within the future prediction time window.

7. The method for predicting rural water quality by integrating meteorological and water quality time-series data according to claim 1, characterized in that, Based on the water quality prediction time series data, generate the water quality change trend results of the target rural water body, and output the water quality change trend results to the designated water quality management terminal, including: Trend analysis is performed on the water quality prediction sequence to calculate the slope of water quality change for each water body partition within the future prediction time window. Based on the slope of water quality change, the direction of water quality change trend is determined, and the water quality change trend results for each water body partition are obtained. Specifically, for any water body partition... , in, For partitioning In the future Predicted water quality concentration values This is the derivative of water concentration with time, i.e., the slope of water quality change. The preset deterioration threshold, The preset improvement threshold; The water quality change trend results are encapsulated into a result data packet including the change trend direction of each water body zone, the predicted concentration value and the corresponding timestamp, and the result data packet is sent to the designated water quality management terminal.

8. A rural water quality prediction device that integrates meteorological and water quality time-series data, characterized in that, include: The data acquisition module is used to acquire water quality monitoring time series data of the target rural water body and meteorological time series data of the catchment area where the target rural water body is located, and associate the water quality monitoring time series data with the corresponding water body partition based on the spatial distribution of the target rural water body, and configure a unified time identifier for the water quality monitoring time series data and the meteorological time series data to obtain spatiotemporal correlation data; The data quality processing module is used to perform data quality processing on the spatiotemporal correlation data to obtain spatiotemporal correlation data after data quality processing. The partition association module is used to perform partition aggregation and inter-partition spatial association on the water quality monitoring time series data and meteorological time series data corresponding to each water body partition in the spatiotemporal association data after data quality processing, based on the water body partition relationship of the target rural water body, to obtain spatial topological association partition time series data, and calculate the water quality transfer characteristics and meteorological influence characteristics between each water body partition based on the spatial topological association partition time series data to obtain partition association data; A prediction input construction module is used to construct prediction input data with historical time windows based on the partition association data, wherein the prediction input data includes the water quality change characteristics of the target rural water body within the historical time window and the meteorological change characteristics of the catchment area within the historical time window; The water quality prediction module is used to input the prediction input data into a pre-trained water quality time series prediction model, and to perform time series correlation processing on the water quality change characteristics and the meteorological change characteristics through the water quality time series prediction model to obtain the water quality prediction time series data of the target rural water body within the future prediction time window. The result output module is used to generate the water quality change trend result of the target rural water body based on the water quality prediction time series data, and output the water quality change trend result to the designated water quality management terminal.

9. A rural water quality prediction device that integrates meteorological and water quality time-series data, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the rural water quality prediction method that integrates meteorological and water quality time-series data as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the rural water quality prediction method that integrates meteorological and water quality time series data as described in any one of claims 1 to 7.