Water conservancy project water quality detection method and system based on artificial intelligence
By using AI-based multi-source data processing and multi-task spatiotemporal graph convolutional networks, the lag problem of traditional water quality detection methods is solved, enabling real-time water quality monitoring and emergency decision support for water conservancy projects.
Patent Information
- Application Number
- CN202511724648.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-11-24
AI Technical Summary
Traditional water quality testing methods rely on manual sampling and laboratory analysis, which cannot achieve real-time monitoring and timely response, resulting in delayed test results and failing to support real-time management and decision-making in water conservancy projects.
Using an artificial intelligence-based approach, a multi-task spatiotemporal graph convolutional network is constructed through multi-source data acquisition, preprocessing, and feature extraction. Combined with a genetic algorithm to optimize the model, water quality detection and pollution diffusion simulation are achieved, providing emergency decision-making suggestions.
It enables real-time monitoring and accurate detection of water quality, supports timely emergency response and scientific decision-making in water conservancy projects, and improves the accuracy and functional completeness of water quality testing.
Smart Images

Figure CN121191645A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of water conservancy engineering, and particularly relates to a water quality detection method and system for water conservancy engineering based on artificial intelligence. BACKGROUND
[0002] In the field of water conservancy engineering, water quality detection is a key link to ensure the safety and rational use of water resources. Traditional water quality detection methods usually rely on manual sampling and then laboratory analysis and detection. This approach has many drawbacks. On the one hand, the frequency of manual sampling is low, which cannot realize real-time monitoring of water quality and is difficult to discover sudden changes in water quality in time. On the other hand, the laboratory detection process is complex and time-consuming, and the detection results have a lag, which cannot provide timely and effective data support for real-time management and decision-making of water conservancy engineering. SUMMARY
[0003] The present application relates to the technical field of water conservancy engineering, and particularly relates to a water quality detection method and system for water conservancy engineering based on artificial intelligence.
[0004] The first aspect of the present application provides a water quality detection method for water conservancy engineering based on artificial intelligence, which comprises the following steps: Collecting first multi-source data for water conservancy engineering, aligning water quality parameter data, remote sensing image data and meteorological and hydrological data in the first multi-source data based on time stamp to obtain second multi-source data; Performing data preprocessing and feature extraction processing on the second multi-source data to obtain target feature data; Designing a multi-task spatio-temporal graph convolution network and using a genetic algorithm to optimize parameters to construct a water quality detection model; Inputting the target feature data into the water quality detection model and outputting water quality detection results through the water quality detection model; When the water quality detection result determines that the water quality is abnormal, generating a pollution diffusion simulation atlas based on the spatio-temporal graph structure and the water quality diffusion law, and providing emergency decision-making suggestions according to the water conservancy dispatching scheme.
[0005] Optionally, in the first implementation manner of the first aspect of the present application, the data preprocessing and feature extraction processing on the second multi-source data to obtain the target feature data comprises: For the water quality parameter data in the second multi-source data, a sliding window method is used for smoothing processing, a Kalman filtering algorithm is combined to dynamically estimate and eliminate noise in the data, and principal component analysis is used for feature extraction on the preprocessed water quality parameter data to obtain water quality parameter features; For remote sensing image data in the second multi-source data, radiation correction and geometric correction are first performed, then wavelet transform algorithm is used to extract high-frequency water quality abnormal signal, convolutional neural network is used for feature extraction on the preprocessed remote sensing image data, and remote sensing image features are obtained; For meteorological and hydrological data of remote sensing image data in the second multi-source data, the physical relationship and statistical correlation between the meteorological and hydrological data and the water quality parameters are analyzed, meteorological and hydrological factors related to water quality change are screened out, and statistical features of time series are extracted according to the screening results, to obtain meteorological and hydrological features; The water quality parameter features, the remote sensing image features and the meteorological and hydrological features are integrated, and finally target feature data is obtained.
[0006] Optionally, in the second implementation manner of the first aspect of the present application, the data preprocessing and feature extraction processing on the second multi-source data to obtain the target feature data comprises: For water quality parameter data in the second multi-source data, a sliding window method is used for smoothing processing, a Kalman filter algorithm is combined to dynamically estimate and eliminate noise in the data, and principal component analysis is used for feature extraction on the preprocessed water quality parameter data, to obtain water quality parameter features; For remote sensing image data in the second multi-source data, radiation correction and geometric correction are first performed, then wavelet transform algorithm is used to extract high-frequency water quality abnormal signal, convolutional neural network is used for feature extraction on the preprocessed remote sensing image data, and remote sensing image features are obtained; For meteorological and hydrological data of remote sensing image data in the second multi-source data, the physical relationship and statistical correlation between the meteorological and hydrological data and the water quality parameters are analyzed, meteorological and hydrological factors related to water quality change are screened out, and statistical features of time series are extracted according to the screening results, to obtain meteorological and hydrological features; The water quality parameter features, the remote sensing image features and the meteorological and hydrological features are integrated, and finally target feature data is obtained.
[0007] Optionally, in the third implementation manner of the first aspect of the present application, the radiation correction and geometric correction are first performed on the remote sensing image data in the second multi-source data, then wavelet transform algorithm is used to extract high-frequency water quality abnormal signal, and convolutional neural network is used for feature extraction on the preprocessed remote sensing image data, to obtain remote sensing image features, comprising: The geometrically corrected remote sensing image data is converted into a digital matrix, wavelet decomposition is performed on the remote sensing image data of each band to obtain approximate coefficients and detail coefficients of different scales, and water quality high-frequency abnormal signals are identified by analyzing the detail coefficients under different scales; Threshold processing is first performed on each layer of detail coefficients obtained by wavelet decomposition to distinguish signals and noises, and then wavelet reconstruction is performed on the processed detail coefficients to generate enhanced images; After preprocessing the enhanced image, it is input into a convolutional neural network. The convolutional layer uses convolutional kernels of different sizes to perform convolution operations on the input image to extract local features. The pooling layer downsamples the convolutional output. By stacking multiple layers of convolution and pooling operations, abstract features from low level to high level are extracted step by step. The feature maps of each layer are obtained by forward propagation. Global average pooling is then performed on the feature maps to generate feature vectors of fixed length, forming the final remote sensing image features.
[0008] Optionally, in a fourth implementation of the first aspect of the present invention, the multi-task spatiotemporal graph convolutional network includes at least a spatial branch, a temporal branch, and a task branch.
[0009] Optionally, in the fifth implementation of the first aspect of the present invention, the step of using a genetic algorithm to optimize parameters and construct a water quality detection model includes: Each parameter in the parameter space is mapped to a chromosome code, and an initial population is randomly generated, with each individual representing a set of model parameter combinations. The tournament selection method is adopted. Multiple individuals are randomly selected from the current population, their fitness values are compared, and the best individual is selected to enter the mating pool. The selection is repeated until there are a preset number of individuals in the mating pool. Crossover is performed on individuals in the mating pool. Two parent individuals are randomly selected. For each parameter gene locus, crossover is performed with a crossover probability of 0.8. If crossover is performed, a heuristic crossover method is used to generate offspring parameter values to obtain offspring individuals. For each gene locus of each offspring individual, a mutation probability of 0.01 is used to determine whether a mutation occurs. If a mutation occurs, a new value is randomly generated within the range of parameter values. The individual with the highest fitness in the current population is retained and directly enters the next generation, replacing the individual with the lowest fitness in the offspring. Repeated selection, crossover, mutation, and elite retention operations are performed until the maximum number of iterations is reached. After the iterations are completed, the parameter combination corresponding to the historical best individual is selected as the final optimization result to construct the water quality detection model.
[0010] Optionally, in a sixth implementation of the first aspect of the present invention, the step of inputting the target feature data into the water quality detection model and outputting the water quality detection result through the water quality detection model includes: The target feature data is sorted by timestamp to construct the input sequence, and a spatiotemporal graph is constructed based on the network topology of water conservancy projects. The spatiotemporal graph is input into the spatial branch of the water quality detection model. The spatial dependencies between nodes are captured through multi-layer graph convolution operations. Each layer of graph convolution updates the current node representation by aggregating the information of neighboring nodes, learns the propagation pattern of water quality in space, and applies a graph attention mechanism to adaptively adjust the weights of neighboring nodes to generate node representations that integrate spatial information. The node representation sequence output from the spatial branch is input into the temporal branch. A bidirectional LSTM is used to process the temporal information, capturing the trend of water quality change over time. A temporal attention mechanism is applied to automatically focus on important time points and generate feature representations that integrate spatiotemporal information. The feature representation output from the spatial branch is input into the task branch, and three sub-tasks—water quality classification, anomaly detection, and pollution source tracing—are executed in parallel. The prediction results of the three sub-tasks are then integrated to output the water quality detection results.
[0011] A second aspect of the present invention provides an artificial intelligence-based water quality detection system for water conservancy projects, the system comprising: The data acquisition module is used to collect first multi-source data for water conservancy projects. Based on the timestamp, the water quality parameter data, remote sensing image data and meteorological and hydrological data in the first multi-source data are aligned to obtain second multi-source data. The feature extraction module is used to perform data preprocessing and feature extraction on the second multi-source data to obtain target feature data; The model building module is used to design a multi-task spatiotemporal graph convolutional network and to use a genetic algorithm to optimize parameters and build a water quality detection model. The water quality testing module is used to input target feature data into the water quality testing model and output water quality testing results through the water quality testing model. The decision-making suggestion module is used to generate a pollution diffusion simulation map based on the spatiotemporal diagram structure and water diffusion law when water quality test results indicate that the water quality is abnormal, and to provide emergency decision-making suggestions according to the water conservancy project scheduling plan.
[0012] A third aspect of the present invention provides an artificial intelligence-based water quality testing device for water conservancy projects, the artificial intelligence-based water quality testing device comprising a memory and at least one processor, the memory storing instructions; the at least one processor calling the instructions in the memory to cause the artificial intelligence-based water quality testing device to perform the various steps of the artificial intelligence-based water quality testing method for water conservancy projects as described in any of the preceding claims.
[0013] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the artificial intelligence-based water quality detection method for water conservancy projects as described in any of the preceding claims.
[0014] The technical solution provided by this invention involves collecting first multi-source data for water conservancy projects, aligning water quality parameter data, remote sensing image data, and meteorological and hydrological data from the first multi-source data based on timestamps to obtain second multi-source data; performing data preprocessing and feature extraction on the second multi-source data to obtain target feature data; designing a multi-task spatiotemporal graph convolutional network and using a genetic algorithm for parameter optimization to construct a water quality detection model; inputting the target feature data into the water quality detection model, and outputting water quality detection results through the water quality detection model; when the water quality detection results determine that the water quality is abnormal, based on the spatiotemporal graph... This invention analyzes the structure and diffusion patterns of water quality to generate a pollution diffusion simulation map and provides emergency decision-making suggestions based on water conservancy project scheduling plans. Through comprehensive collection and deep fusion of multi-source data, it provides a rich and accurate data foundation for water quality testing. Data processing and feature enhancement effectively improve data quality and feature representation capabilities. By fully learning the spatiotemporal characteristics of water quality data through a multi-task spatiotemporal graph convolutional network, it simultaneously achieves water quality classification, anomaly detection, and pollution source tracing, improving the accuracy and functional completeness of water quality testing. This enables precise early warning and scientific decision-making, providing strong support for water quality management in water conservancy projects. Attached Figure Description
[0015] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention.
[0016] Figure 1 A flowchart of an artificial intelligence-based water quality detection method for water conservancy projects provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an artificial intelligence-based water quality detection system for water conservancy projects provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an artificial intelligence-based water quality testing device for water conservancy projects provided in an embodiment of the present invention. Detailed Implementation
[0017] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0018] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 The flowchart of the water quality detection method for water conservancy projects based on artificial intelligence provided in this embodiment of the invention includes the following steps: Step 101: Collect the first multi-source data for the water conservancy project, and align the water quality parameter data, remote sensing image data and meteorological and hydrological data in the first multi-source data based on the timestamp to obtain the second multi-source data; In this embodiment, an IoT sensor network is deployed at the inlet, outlet, key nodes, and easily polluted areas of the water conservancy project to collect water quality parameters such as water temperature, turbidity, conductivity, and dissolved oxygen in real time. The sensor network adopts low-power wide-area network communication technology to ensure stable data transmission to the data center; it also accesses satellite / UAV remote sensing data to obtain water spectral characteristic data, including chlorophyll a concentration and suspended matter distribution; and utilizes remote sensing image processing technology to preprocess the acquired remote sensing image data with radiometric and geometric corrections to improve data quality. Furthermore, it integrates meteorological and hydrological data, aligning water quality parameter data, remote sensing data, and meteorological and hydrological data based on timestamps to construct a dynamic environmental correlation model that comprehensively reflects the relationship between water quality and environmental factors affecting the water conservancy project.
[0019] Step 102: Perform data preprocessing and feature extraction on the second multi-source data to obtain target feature data; In this embodiment, for the water quality parameter data in the second multi-source data, a sliding window method is used for smoothing, combined with the Kalman filter algorithm to dynamically estimate and eliminate noise in the data. Principal component analysis is then used to extract features from the preprocessed water quality parameter data to obtain water quality parameter features. For the remote sensing image data in the second multi-source data, radiometric and geometric corrections are first performed, and then wavelet transform algorithm is used to extract high-frequency water quality anomaly signals. Convolutional neural network is used to extract features from the preprocessed remote sensing image data to obtain remote sensing image features. For the meteorological and hydrological data in the remote sensing image data in the second multi-source data, the physical relationship and statistical correlation between them and the water quality parameters are analyzed. Meteorological and hydrological factors related to water quality changes are screened out, and statistical features of the time series are extracted based on the screening results to obtain meteorological and hydrological features. The water quality parameter features, remote sensing image features, and meteorological and hydrological features are integrated to finally obtain the target feature data.
[0020] In this embodiment, a sliding window method is used to smooth the water quality parameter data, generating a preliminary smoothed water quality parameter sequence; a Kalman filter model is constructed, and the smoothed water quality parameter sequence contains observations of both real signals and noise; the state vector and error covariance matrix are initialized, and process noise covariance and observation noise covariance parameters are set; for the water quality parameters at each time point, the state at the current time is predicted based on the state estimate of the previous time step and a preset state transition model; the predicted error covariance is updated according to the error covariance matrix and process noise covariance, generating the prior state estimate and error covariance for the current time step; the current... The actual observed values at each time point are compared with the predicted values to calculate the residuals. Based on the residuals and the observation noise covariance, the Kalman gain is calculated. The Kalman gain is used to adjust the prior state estimate, generate the posterior state estimate for the current time point, and update the error covariance matrix. This process is repeated for all time points to obtain the denoised water quality parameter sequence. The denoised water quality parameter sequence is then standardized to construct the covariance matrix of the standardized water quality parameters. Eigenvalue decomposition is performed to calculate the eigenvalues and their corresponding eigenvectors. The eigenvalues are sorted in descending order, and the eigenvectors corresponding to the k largest eigenvalues are selected to obtain the water quality parameter features.
[0021] In this embodiment, the geometrically corrected remote sensing image data is converted into a digital matrix. Wavelet decomposition is performed on the remote sensing image data of each band to obtain approximation coefficients and detail coefficients at different scales. By analyzing the detail coefficients at different scales, high-frequency water quality anomaly signals are identified. First, threshold processing is performed on the detail coefficients obtained from wavelet decomposition to distinguish between signals and noise. Then, wavelet reconstruction is performed on the processed detail coefficients to generate enhanced images. After preprocessing, the enhanced images are input into a convolutional neural network. The convolutional layers use convolutional kernels of different sizes to perform convolution operations on the input images to extract local features. The pooling layers downsample the convolution output. By stacking multiple layers of convolution and pooling operations, abstract features from low to high levels are gradually extracted. Feature maps of each layer are obtained through forward propagation. Global average pooling is performed on the feature maps to generate fixed-length feature vectors, forming the final remote sensing image features.
[0022] Step 103: Design a multi-task spatiotemporal graph convolutional network and use a genetic algorithm to optimize parameters to build a water quality detection model; In this embodiment, a spatiotemporal graph is constructed based on the network structure of water conservancy projects, such as the connection relationship between rivers and reservoirs. Monitoring points are used as nodes in the graph, and the edge weights between nodes are determined based on spatial distance, water flow direction, and flow velocity. For each time step, water quality parameters, meteorological and hydrological data, and remote sensing features are used as node features to construct a spatiotemporal graph sequence. In the time dimension, nodes of adjacent time steps are connected through time windows to form spatiotemporal dependencies.
[0023] In this embodiment, the multi-task spatiotemporal graph convolutional network includes at least a spatial branch, a temporal branch, and a task branch.
[0024] In this embodiment, each parameter in the parameter space is mapped to a chromosome code, and an initial population is randomly generated. Each individual represents a set of model parameter combinations. A tournament selection method is used to randomly select multiple individuals from the current population, compare their fitness values, and select the best individual to enter the mating pool. This selection is repeated until there are a preset number of individuals in the mating pool. Crossover is performed on the individuals in the mating pool. Two parent individuals are randomly selected, and for each parameter gene locus, a crossover probability of 0.8 is used to determine whether to perform crossover. If crossover occurs, a heuristic crossover method is used to generate offspring parameter values, resulting in offspring individuals. For each gene locus of each offspring individual, a mutation probability of 0.01 is used to determine whether to mutate. If mutation occurs, a new value is randomly generated within the parameter value range. The individual with the highest fitness in the current population is retained and directly enters the next generation, replacing the individual with the lowest fitness in the offspring. The selection, crossover, mutation, and elite retention operations are repeated until the maximum number of iterations is reached. After the iteration ends, the parameter combination corresponding to the historical best individual is selected as the final optimization result to construct the water quality detection model.
[0025] Step 104: Input the target feature data into the water quality detection model, and output the water quality detection results through the water quality detection model; In this embodiment, the target feature data is sorted by timestamp to construct an input sequence. Based on the network topology of the water conservancy project, a spatiotemporal graph is constructed. The spatiotemporal graph is input into the spatial branch of the water quality detection model. Multi-layer graph convolution operations are used to capture the spatial dependencies between nodes. Each layer of graph convolution updates the current node representation by aggregating neighboring node information, learning the propagation pattern of water quality in space. A graph attention mechanism is applied to adaptively adjust the weights of neighboring nodes, generating node representations that integrate spatial information. The node representation sequence output from the spatial branch is input into the temporal branch. A bidirectional LSTM is used to process the temporal information, capturing the trend of water quality changes over time. A temporal attention mechanism is applied to automatically focus on important time points, generating feature representations that integrate spatiotemporal information. The feature representations output from the spatial branch are input into the task branch, and three sub-tasks—water quality classification, anomaly detection, and pollution source tracing—are executed in parallel. The prediction results of the three sub-tasks are integrated to output the water quality detection result.
[0026] In this embodiment, water quality classification: the probability distribution of water quality levels is output through a fully connected layer and a softmax activation function, and the category with the highest probability is selected as the prediction result; anomaly detection: an anomaly score is output through a binary classifier, and if it is greater than the threshold, it is determined to be a water quality anomaly, and the anomaly confidence is calculated at the same time; pollution source tracing: based on the spatiotemporal propagation mode, the probability distribution of possible pollution source locations is output through a fully connected layer to identify the most likely pollution source direction.
[0027] Step 105: When the water quality test results confirm that the water quality is abnormal, a pollution diffusion simulation map is generated based on the spatiotemporal diagram structure and water diffusion law, and emergency decision-making suggestions are provided according to the water conservancy project scheduling plan.
[0028] In this embodiment, when the water quality test results are determined to be abnormal, the pollution propagation path is traced back based on the spatiotemporal graph structure. The changes in node characteristics at the time of the anomaly are analyzed. Combined with the pollution source tracing probability distribution, the most likely pollution source location is determined. By comparing the graph structure differences at different time steps, key nodes and paths of pollution propagation are identified, and an initial pollution diffusion model is established. Parameters related to water flow are extracted from the spatiotemporal graph, including flow velocity, flow direction, and water level at each monitoring point. Combined with historical hydrological data and real-time meteorological conditions, a dynamic hydrodynamic model is constructed. The distribution law of water flow parameters in space is learned through a graph convolutional network, providing a physical basis for pollution diffusion simulation. Based on historical pollution event data, a diffusion coefficient estimation model is trained to analyze the diffusion characteristics of different types of pollutants under different water flow conditions, establish the mapping relationship between pollutant characteristics and diffusion coefficient, and dynamically adjust the diffusion coefficient using node features and edge weights in the spatiotemporal graph to reflect the spatial heterogeneity of the water environment. An improved convection-diffusion equation is adopted, combined with a hydrodynamic model and diffusion coefficient, to simulate pollution diffusion on a spatiotemporal map. The location of the pollution source is used as the initial condition, and the concentration distribution of pollutants in the future time period is predicted through iterative calculation. The regulation effect of water conservancy facilities on water flow is considered, and the boundary conditions are dynamically adjusted during the simulation process. Based on the simulated pollutant concentration distribution and combined with water quality standard thresholds, areas with different risk levels are divided into high-risk, medium-risk, and low-risk areas, generating a risk heat map that evolves over time, visually displaying the spatial range and temporal dynamics of pollution diffusion. Historical scheduling plans and real-time status data of water conservancy projects are retrieved to establish an evaluation model of the relationship between scheduling plans and pollution diffusion. For different scheduling measures, such as gate opening and closing, reservoir discharge, and pumping, the impact on pollution diffusion paths and concentrations is simulated. Evaluation indicators include pollution diffusion rate reduction rate, high-risk area reduction rate, and pollutant residence time. Generate optimal emergency decision-making recommendations, such as recommending the best gate control scheme, reservoir discharge volume and timing, pumping direction, etc., and recommend corresponding physical / chemical / biological treatment methods based on pollutant type and concentration, and clarify the best implementation time window for each measure; The results of pollution diffusion simulation and emergency decision-making recommendations are integrated into a visual map, a dynamic pollution diffusion heat map, marking areas with different risk levels, the scheduling status of key water conservancy facilities and recommended adjustment plans, an emergency response timeline, showing the optimal implementation sequence and time window for each measure, prediction of decision-making effects, and comparison of pollution control effects under different plans.
[0029] In this embodiment, newly collected multi-source data is periodically added to the historical dataset, and the data is reprocessed and feature enhanced. The water quality detection model is then retrained and optimized. At the same time, the reinforcement learning early warning strategy model is adjusted based on feedback results from actual applications and newly emerging water quality problems to ensure that the entire water quality detection system can adapt to constantly changing water quality and environmental conditions and maintain good detection, early warning, and decision support performance.
[0030] Please see Figure 2 A schematic diagram of the structure of an artificial intelligence-based water quality detection system for water conservancy projects provided in this embodiment of the invention. The system includes: The data acquisition module is used to collect first multi-source data for water conservancy projects. Based on the timestamp, the water quality parameter data, remote sensing image data and meteorological and hydrological data in the first multi-source data are aligned to obtain second multi-source data. The feature extraction module is used to perform data preprocessing and feature extraction on the second multi-source data to obtain target feature data; The model building module is used to design a multi-task spatiotemporal graph convolutional network and to use a genetic algorithm to optimize parameters and build a water quality detection model. The water quality testing module is used to input target feature data into the water quality testing model and output water quality testing results through the water quality testing model. The decision-making suggestion module is used to generate a pollution diffusion simulation map based on the spatiotemporal diagram structure and water diffusion law when water quality test results indicate that the water quality is abnormal, and to provide emergency decision-making suggestions according to the water conservancy project scheduling plan.
[0031] Figure 3 This is a schematic diagram of the structure of an AI-based water quality testing device for water conservancy projects provided in an embodiment of the present invention. The AI-based water quality testing device 600 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 610 (e.g., one or more processors) and a memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) for storing application programs 633 or data 632. The memory 620 and storage media 630 can be temporary or persistent storage. The program stored in the storage media 630 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the AI-based water quality testing device 600. Furthermore, the processor 610 may be configured to communicate with the storage media 630 to execute the series of instruction operations in the storage media 630 on the AI-based water quality testing device 600 to implement the method provided in the above embodiment.
[0032] The AI-based water quality testing equipment 600 for water conservancy projects may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input / output interfaces 660, and / or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The structure of the water quality testing equipment for water conservancy projects based on artificial intelligence shown does not constitute a limitation on the computer equipment provided by the present invention. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0033] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the various steps of the artificial intelligence-based water quality detection method for water conservancy projects provided in the above embodiments.
[0034] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described equipment or apparatus / unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0035] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0036] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A water quality detection method for hydraulic engineering based on artificial intelligence, characterized in that, The method includes the following steps: For the first multi-source data collected for water conservancy projects, the water quality parameter data, remote sensing image data, and meteorological and hydrological data in the first multi-source data are aligned based on the timestamp to obtain the second multi-source data; The second multi-source data is preprocessed and feature extracted to obtain the target feature data. A multi-task spatiotemporal graph convolutional network was designed, and a genetic algorithm was used to optimize the parameters to build a water quality detection model. Input the target feature data into the water quality detection model, and output the water quality detection results through the water quality detection model; When water quality testing results indicate water quality anomalies, a pollution diffusion simulation map is generated based on the spatiotemporal structure and water diffusion patterns, and emergency decision-making suggestions are provided according to the water conservancy project scheduling plan.
2. The water quality detection method for water conservancy projects based on artificial intelligence as described in claim 1, characterized in that, The process of preprocessing and feature extraction of the second multi-source data to obtain target feature data includes: For the water quality parameter data in the second multi-source dataset, a sliding window method is used for smoothing, combined with the Kalman filter algorithm to dynamically estimate and eliminate noise in the data, and principal component analysis is used to extract features from the preprocessed water quality parameter data to obtain water quality parameter features. For the remote sensing image data in the second multi-source data, radiometric and geometric corrections are first performed, then wavelet transform algorithm is used to extract high-frequency water quality anomaly signals, and convolutional neural network is used to extract features from the preprocessed remote sensing image data to obtain remote sensing image features. For the meteorological and hydrological data of remote sensing imagery in the second multi-source data, the physical relationship and statistical correlation between them and water quality parameters are analyzed, meteorological and hydrological factors related to water quality changes are screened out, and statistical features of time series are extracted based on the screening results to obtain meteorological and hydrological features. By integrating water quality parameter characteristics, remote sensing image characteristics, and meteorological and hydrological characteristics, the target characteristic data is finally obtained.
3. The water quality detection method for water conservancy projects based on artificial intelligence as described in claim 2, characterized in that, The water quality parameter data in the second multi-source data is smoothed using a sliding window method, combined with a Kalman filter algorithm to dynamically estimate and eliminate noise in the data. Principal component analysis is then used to extract features from the preprocessed water quality parameter data, yielding water quality parameter features, including: The sliding window method was used to smooth the water quality parameter data, generating a preliminary smoothed water quality parameter sequence. A Kalman filter model was constructed, and the smoothed water quality parameter sequence contained observations of both real signals and noise. Initialize the state vector and error covariance matrix, and set the process noise covariance and observation noise covariance parameters; For each water quality parameter at each time point, the state at the current time is predicted based on the state estimate of the previous time point and the preset state transition model; Based on the error covariance matrix and the process noise covariance, update the prediction error covariance to generate the prior state estimate and error covariance at the current time. The actual observed value at the current moment is compared with the predicted value, the residual is calculated, and the Kalman gain is calculated based on the residual and the observation noise covariance. The prior state estimate is adjusted using Kalman gain to generate the posterior state estimate at the current time, and the error covariance matrix is updated. This process is repeated for all time points to obtain the denoised water quality parameter sequence. The denoised water quality parameter sequence is standardized to construct the covariance matrix of the standardized water quality parameters. Eigenvalue decomposition is then performed to calculate the eigenvalues and corresponding eigenvectors. The eigenvalues are sorted in descending order, and the eigenvectors corresponding to the k largest eigenvalues are selected to obtain the water quality parameter features.
4. The water quality detection method for water conservancy projects based on artificial intelligence as described in claim 2, characterized in that, For the remote sensing image data in the second multi-source data, radiometric and geometric corrections are first performed, then wavelet transform algorithms are used to extract high-frequency water quality anomaly signals, and convolutional neural networks are used to extract features from the preprocessed remote sensing image data to obtain remote sensing image features, including: The geometrically corrected remote sensing image data is converted into a digital matrix. Wavelet decomposition is performed on the remote sensing image data of each band to obtain approximation coefficients and detail coefficients at different scales. By analyzing the detail coefficients at different scales, high-frequency water quality anomaly signals are identified. First, thresholding is performed on the detail coefficients of each layer obtained by wavelet decomposition to distinguish between signal and noise. Then, wavelet reconstruction is performed on the processed detail coefficients to generate enhanced images. After preprocessing the enhanced image, it is input into a convolutional neural network. The convolutional layer uses convolutional kernels of different sizes to perform convolution operations on the input image to extract local features. The pooling layer downsamples the convolutional output. By stacking multiple layers of convolution and pooling operations, abstract features from low level to high level are extracted step by step. The feature maps of each layer are obtained by forward propagation. Global average pooling is then performed on the feature maps to generate feature vectors of fixed length, forming the final remote sensing image features.
5. The water quality detection method for water conservancy projects based on artificial intelligence as described in claim 1, characterized in that, The multi-task spatiotemporal graph convolutional network includes at least spatial branches, temporal branches, and task branches.
6. The water quality detection method for water conservancy projects based on artificial intelligence as described in claim 1, characterized in that, The process of using a genetic algorithm to optimize parameters and construct a water quality detection model includes: Each parameter in the parameter space is mapped to a chromosome code, and an initial population is randomly generated, with each individual representing a set of model parameter combinations. The tournament selection method is adopted. Multiple individuals are randomly selected from the current population, their fitness values are compared, and the best individual is selected to enter the mating pool. The selection is repeated until there are a preset number of individuals in the mating pool. Crossover is performed on individuals in the mating pool. Two parent individuals are randomly selected. For each parameter gene locus, crossover is performed with a crossover probability of 0.
8. If crossover is performed, a heuristic crossover method is used to generate offspring parameter values to obtain offspring individuals. For each gene locus of each offspring individual, a mutation probability of 0.01 is used to determine whether a mutation occurs. If a mutation occurs, a new value is randomly generated within the range of parameter values. The individual with the highest fitness in the current population is retained and directly enters the next generation, replacing the individual with the lowest fitness in the offspring. Repeated selection, crossover, mutation, and elite retention operations are performed until the maximum number of iterations is reached. After the iterations are completed, the parameter combination corresponding to the historical best individual is selected as the final optimization result to construct the water quality detection model.
7. The water quality detection method for water conservancy projects based on artificial intelligence as described in claim 1, characterized in that, The step of inputting target feature data into the water quality detection model and outputting water quality detection results through the water quality detection model includes: The target feature data is sorted by timestamp to construct the input sequence, and a spatiotemporal graph is constructed based on the network topology of water conservancy projects. The spatiotemporal graph is input into the spatial branch of the water quality detection model. The spatial dependencies between nodes are captured through multi-layer graph convolution operations. Each layer of graph convolution updates the current node representation by aggregating the information of neighboring nodes, learns the propagation pattern of water quality in space, and applies a graph attention mechanism to adaptively adjust the weights of neighboring nodes to generate node representations that integrate spatial information. The node representation sequence output from the spatial branch is input into the temporal branch. A bidirectional LSTM is used to process the temporal information, capturing the trend of water quality change over time. A temporal attention mechanism is applied to automatically focus on important time points and generate feature representations that integrate spatiotemporal information. The feature representation output from the spatial branch is input into the task branch, and three sub-tasks—water quality classification, anomaly detection, and pollution source tracing—are executed in parallel. The prediction results of the three sub-tasks are then integrated to output the water quality detection results.
8. A water quality detection system for hydraulic engineering based on artificial intelligence, characterized in that, The system includes: The data acquisition module is used to collect first multi-source data for water conservancy projects. Based on the timestamp, the water quality parameter data, remote sensing image data and meteorological and hydrological data in the first multi-source data are aligned to obtain second multi-source data. The feature extraction module is used to perform data preprocessing and feature extraction on the second multi-source data to obtain target feature data; The model building module is used to design a multi-task spatiotemporal graph convolutional network and to use a genetic algorithm to optimize parameters and build a water quality detection model. The water quality testing module is used to input target feature data into the water quality testing model and output water quality testing results through the water quality testing model. The decision-making suggestion module is used to generate a pollution diffusion simulation map based on the spatiotemporal diagram structure and water diffusion law when water quality test results indicate that the water quality is abnormal, and to provide emergency decision-making suggestions according to the water conservancy project scheduling plan.
9. A water quality testing device for hydraulic engineering based on artificial intelligence, characterized in that, The AI-based water quality testing device for water conservancy projects includes a memory and at least one processor. The memory stores instructions. The at least one processor invokes the instructions in the memory to cause the AI-based water quality testing device for water conservancy projects to perform the various steps of the AI-based water quality testing method for water conservancy projects as described in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the artificial intelligence-based water quality detection method for water conservancy projects as described in any one of claims 1-7.
Citation Information
Patent Citations
Water area pollution prediction method based on multiple scales and multiple dimensions
CN118228923A
Multi-model coupling water quality optimization method, system and equipment based on digital twinning
CN119359485A
Intelligent underground water quality supervision method and system
CN120013706A
River water quality parameter supervision method and system based on deep learning
CN120319366A
River pollutant tracing system and method based on digital twinning
CN120355435A
Cited By
Marine organism community abnormal change detection method and system based on multi-modal characteristics
CN121561739A
Intelligent de-noising processing method for signals of marine multi-parameter precision measuring instrument
CN122041822A
A portable air pollution detection device
CN122409972A
