Underground water quality risk identification method and system for environmental safety

By constructing an artificial neural network model with adaptive feature fusion, the problem of insufficient targeting and flexibility in water quality risk identification in existing technologies is solved, enabling real-time, low-cost water quality risk identification and assessment, and improving the efficiency and accuracy of water quality monitoring.

CN120911954APending Publication Date: 2025-11-07BEIJING NORMAL UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511027223.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing water quality risk identification and diagnosis technologies lack specificity, making it difficult to ensure the safety of water quality when drawing water from rivers. They also cannot monitor water quality changes in real time, are costly, and are difficult to adapt to water quality changes in different regions and time periods, exhibiting poor flexibility and generalization ability.

Method used

An artificial neural network model based on adaptive feature fusion is adopted. By acquiring training samples, preprocessing, constructing the neural network model, and training with the scaling conjugate gradient algorithm, the water quality risk level of groundwater is identified in combination with water quality classification standards.

Benefits of technology

It enables real-time monitoring of water quality changes, reduces monitoring costs, improves the efficiency and accuracy of water quality identification, provides decision-makers with clear references, can handle complex nonlinear relationships, and provides accurate water quality risk assessments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120911954A_ABST
    Figure CN120911954A_ABST
Patent Text Reader

Abstract

The invention provides an underground water quality risk identification method and system for environmental safety, and relates to the technical field of data processing, and the method comprises the steps: obtaining a plurality of training samples; preprocessing the training sample; constructing an artificial neural network model based on adaptive feature fusion; inputting the training sample into an artificial neural network model, and determining a water quality index predicted value; training an artificial neural network model through a zoom conjugate gradient algorithm according to the water quality index true value and the water quality index predicted value of each training sample; acquiring a to-be-identified underground water quality parameter set; inputting a to-be-identified underground water quality parameter set into the trained artificial neural network model, and outputting a predicted water quality index; calculating a water quality risk confidence coefficient by combining the predicted water quality index and a water quality classification standard; and determining a water quality risk grade according to the water quality risk confidence.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a groundwater quality risk identification method and system for environmental safety. BACKGROUND

[0002] Environmental safety refers to methods taken for the purpose of protecting the environment, especially in assessing and managing water quality. Environmental safety generally means ensuring the quality and sustainability of natural resources such as water and air to prevent negative impacts on ecosystems and human life. Groundwater refers to water bodies existing below the ground surface, usually stored in pores in rock layers or soil. Water quality risk refers to the possibility that water quality parameters such as pH, dissolved oxygen, and pollutant content in water bodies may exceed safety standards, thereby threatening human health, ecosystems, or the environment.

[0003] By identifying groundwater quality risks in a timely and accurate manner, water resources can be protected from pollution, thereby protecting the ecological environment of water bodies and organisms and humans that rely on these water sources. Groundwater quality risk identification methods improve the scientificity and efficiency of groundwater quality management through technical means, contributing to the protection of environmental safety, especially in the protection of water resources for human life and ecosystems.

[0004] However, existing water quality risk identification and diagnosis techniques lack specificity and are difficult to ensure the safety of water taken from rivers. Secondly, existing techniques mainly evaluate water source water quality safety based on water quality standards, and the evaluation results are difficult to directly reflect the impact of water source water quality on human health. This leads to the inability to monitor water quality changes in real time and high costs. In addition, it is usually difficult to adapt to water quality changes in different regions and time periods, and the flexibility and generalization ability are poor. SUMMARY

[0005] To address the technical problems of existing water quality risk identification and diagnosis techniques lacking specificity, being difficult to ensure the safety of water taken from rivers, and existing techniques mainly evaluating water source water quality safety based on water quality standards, evaluation results being difficult to directly reflect the impact of water source water quality on human health, leading to the inability to monitor water quality changes in real time and high costs, and in addition, existing techniques are usually difficult to adapt to water quality changes in different regions and time periods, poor flexibility and generalization ability, the present application provides a groundwater quality risk identification method and system for environmental safety.

[0006] The technical solutions provided by the embodiments of the present application are as follows: First aspect: The groundwater quality risk identification method for environmental safety provided by the embodiments of the present application comprises: S1: acquire a plurality of training samples, wherein each training sample comprises a set of water quality parameters of groundwater in a certain historical period and a corresponding water quality index true value; S2: pretreat each training sample; S3: construct an artificial neural network model based on adaptive feature fusion; S4: input each pretreated training sample into the artificial neural network model to determine a water quality index predicted value; S5: according to the water quality index true value and the water quality index predicted value, train the artificial neural network model by a scaled conjugate gradient algorithm; S6: acquire a set of water quality parameters of groundwater to be identified; S7: input the set of water quality parameters of the groundwater to be identified into the trained artificial neural network model to determine a predicted water quality index; S8: combine the predicted water quality index and a water quality classification standard to calculate a water quality risk confidence; S9: according to the water quality risk confidence, determine a water quality risk level of the groundwater to be identified, and complete the groundwater water quality risk identification.

[0007] Optionally, the set of water quality parameters comprises a plurality of water quality parameters; The water quality parameters comprise pH value, dissolved oxygen content, conductivity, chloride content, ammonia content, fecal coliform content, alkalinity and test results of the groundwater.

[0008] Optionally, the calculation process of the water quality index true value specifically comprises: S101: calculate a quality point of each water quality parameter; S102: according to the standard of the World Health Organization, calculate a unit weight of each water quality parameter; S103: according to the quality point and the unit weight of each water quality parameter, determine the water quality index true value by a weighted arithmetic index method.

[0009] Optionally, the pretreatment comprises missing value filling processing, abnormal value processing and normalization processing; The normalization processing is specifically minimum-maximum normalization processing.

[0010] Optionally, the S4 specifically comprises: S401: input water quality parameters in an input layer of the artificial neural network model; S402: extract a plurality of hidden state feature maps in the water quality parameters in a hidden layer of the artificial neural network model, wherein the hidden layer comprises a plurality of hidden layer neurons; S403: In the fusion layer of the artificial neural network model, each of the hidden state feature maps is adaptively fused to obtain a fusion feature map; S404: In the prediction layer of the artificial neural network model, the water quality index prediction value is determined according to the fusion feature map.

[0011] Optionally, the S403 specifically comprises: S4031: Each of the hidden state feature maps is down-sampled to ensure that the sizes of each of the hidden state feature maps are consistent; S4032: The intermediate scores of each of the down-sampled hidden state feature maps are calculated; S4033: The adaptive weight coefficients of each of the down-sampled hidden state feature maps are calculated according to each of the intermediate scores; S4034: Each of the down-sampled hidden state feature maps is adaptively fused according to each of the adaptive weight coefficients to obtain the fusion feature map.

[0012] Optionally, the S5 specifically comprises: S501: According to the error between the water quality index true value and the water quality index prediction value, the adjustment direction of the weight and the bias in the artificial neural network model is determined by the back propagation algorithm; S502: According to the adjustment direction, the weight and the bias are updated by the scaled conjugate gradient algorithm; S503: The overfitting index is calculated based on the artificial neural network model after the weight and the bias are updated; S504: It is judged whether the overfitting index is greater than an overfitting threshold, if yes, step S505 is entered, otherwise, the training of the artificial neural network model is completed; S505: A Dropout layer is introduced between the fusion layer and the prediction layer of the artificial neural network model; S506: The parameters of the Dropout layer are initialized, and the network parameters of the input layer, the hidden layer and the fusion layer of the artificial neural network model are frozen; S507: The parameters of the Dropout layer are updated by the scaled conjugate gradient algorithm until the overfitting index is less than the overfitting threshold, and the training of the artificial neural network model is completed.

[0013] Optionally, the S8 specifically comprises: S801: The grade interval and the adjacent boundary threshold value of the predicted water quality index are determined; S802: According to the grade interval and the adjacent boundary threshold value, the parameter variation coefficient of the water sample to be identified is calculated; S803: calculating the water quality risk confidence according to the parameter variation coefficient.

[0014] Optionally, the water quality risk level specifically includes excellent water quality, good water quality, medium water quality, poor water quality, and undrinkable water quality.

[0015] The second aspect: The embodiment of the present application provides a kind of underground water quality risk identification system for environmental safety, comprising: Processor; Memory, computer readable instructions are stored on memory, when computer readable instructions are executed by processor, the underground water quality risk identification method for environmental safety as in the first aspect is realized.

[0016] The third aspect: The embodiment of the present application provides a kind of computer readable storage medium, which stores computer program, and the program is executed by processor to realize the underground water quality risk identification method for environmental safety as in the first aspect.

[0017] The technical scheme provided by the embodiment of the present application brings at least the following beneficial effects: In the embodiment of the present application, by obtaining a plurality of training samples, and preprocessing each training sample, then, an artificial neural network model based on adaptive feature fusion is constructed, the training sample is input into the artificial neural network model, the water quality index prediction value is determined, according to the water quality index true value and the water quality index prediction value of each training sample, the artificial neural network model is trained through scaling conjugate gradient algorithm, so as to speed up the training of model. Finally, by obtaining the underground water quality parameter set to be identified, and inputting the underground water quality parameter set to be identified into the trained artificial neural network model, the predicted water quality index is output, according to the predicted water quality index, combined with water quality classification standard, the water quality risk level is identified, the real-time monitoring of water quality change is realized, the monitoring cost is reduced, through adaptive feature fusion and neural network model training, complex nonlinear relationship can be processed, so that more accurate water quality index prediction is obtained, the efficiency and precision of water quality identification are improved, and clear reference is provided for decision makers. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0019] Figure 1A flowchart of an environmental safety-oriented groundwater quality risk identification method provided by an embodiment of the present application is shown in FIG. 1. Figure 2 A structural diagram of an environmental safety-oriented groundwater quality risk identification system provided by an embodiment of the present application is shown in FIG. 2. DETAILED DESCRIPTION

[0020] The technical solutions in the present application will be described below with reference to the drawings.

[0021] In the embodiments of the present application, the words such as "example", "for example" are used to represent an example, illustration or description. Any embodiment or design scheme described as "example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the word "example" is intended to present the concept in a specific manner. In addition, in the embodiments of the present application, the meaning expressed by "and / or" can be both, or can be one of the two.

[0022] In the embodiments of the present application, "image" and "picture" can be used interchangeably at times. It should be pointed out that the meanings expressed by the two are consistent when the distinction between them is not emphasized. The words "of", "corresponding" and "relevant" can be used interchangeably at times. It should be pointed out that the meanings expressed by the three are consistent when the distinction between them is not emphasized.

[0023] In the embodiments of the present application, the subscript such as W1 can be written in the form of non-subscript such as W1 at times. The meanings expressed by the two are consistent when the distinction between them is not emphasized.

[0024] To make the technical problems, technical solutions and advantages of the present application clearer, specific embodiments will be described in detail below with reference to the drawings.

[0025] Reference is made to the accompanying drawings and specific embodiments described in the specification. Figure 1 A flowchart of an environmental safety-oriented groundwater quality risk identification method provided by an embodiment of the present application is shown in FIG. 1.

[0026] The present application provides an environmental safety-oriented groundwater quality risk identification method, which can be implemented by an environmental safety-oriented groundwater quality risk identification device, which can be a terminal or a server. The processing flow of the environmental safety-oriented groundwater quality risk identification method can include the following steps: S1: obtaining a plurality of training samples, wherein each training sample includes a set of water quality parameters of groundwater in a certain historical period and a corresponding water quality index true value.

[0027] Training samples refer to the dataset used to train the machine learning model. Historical periods refer to groundwater quality data over a past period, which serves as a reference to help the model understand the changing patterns of different water quality parameters at different points in time. The water quality parameter set includes a series of numerical characteristics describing water quality (such as pH, dissolved oxygen, chloride content, etc.), which reflect the quality status of groundwater. The true water quality index refers to the actual water quality index value calculated according to standards within the historical period.

[0028] It's important to note that by collecting groundwater quality data from multiple historical periods, the model can learn from comprehensive and realistic data. This training sample not only covers various water quality parameters (such as pH and dissolved oxygen) but also helps the model accurately understand the relationship between each water quality parameter and water quality risk through its correlation with actual water quality indices. In this way, the model can grasp the changing patterns of groundwater quality during training, laying a solid foundation for subsequent predictions and risk assessments.

[0029] In one possible implementation, the water quality parameter set includes multiple water quality parameters; Water quality parameters include: pH value, dissolved oxygen content, conductivity, chloride content, ammonia content, fecal coliform content, alkalinity, and test results of groundwater.

[0030] S2: Preprocess each training sample.

[0031] Preprocessing refers to the process of cleaning and transforming data before it is input into the model, in order to ensure the quality and adaptability of the data.

[0032] It should be noted that the preprocessing step improves the quality of the data, ensuring the stability and accuracy of the artificial neural network model training in subsequent steps, thereby enhancing the reliability and effectiveness of the entire system in identifying groundwater quality risks.

[0033] In one possible implementation, the calculation process for the true value of the water quality index specifically includes: S101: Calculation of mass points for each water quality parameter:

[0034] in, Q i Indicates the first i Quality points for each water quality parameter M i Indicates the first i The measured values ​​of each water quality parameter I i Indicates the first i The optimal values ​​for each water quality parameterS i Indicates the first i Standard values ​​for each water quality parameter. S102: Calculate the unit weight of each water quality parameter according to the standards of the World Health Organization:

[0035] in, W i Indicates the first i The unit weight of each water quality parameter.

[0036] S103: Based on the quality points and unit weights of each water quality parameter, the true value of the water quality index is determined using the weighted arithmetic index method.

[0037] in, q Indicates water quality index, The summation symbol is used.

[0038] In one possible implementation, preprocessing includes missing value imputation, outlier handling, and normalization.

[0039] Missing value imputation refers to using certain methods (such as mean imputation, median imputation, or interpolation) to fill in the missing values ​​when certain water quality parameters are missing in the dataset, so as to avoid incomplete or biased model training due to missing values.

[0040] Outlier handling involves identifying and correcting these values ​​to make the data more representative and reliable.

[0041] Normalization is a method that converts water quality parameters at different scales to a uniform range (usually between 0 and 1).

[0042] The normalization process specifically involves: min-max normalization.

[0043] in, Indicates the first i Normalized data values ​​of each water quality parameter x i Indicates the first i Data values ​​of water quality parameters, min A Max represents the minimum value among all values ​​in the set of water quality parameters. A This represents the maximum value among all values ​​in the set of water quality parameters.

[0044] It is necessary to note that through comprehensive preprocessing of training samples, the reliability and consistency of data quality are ensured. The missing value filling process ensures the integrity of the data and avoids the deviation of the model due to incomplete data. The outlier processing helps to eliminate error data, so that the model learns the water quality data that is more consistent with the actual situation. The normalization processing adjusts the scale of different water quality parameters, so that the contribution of each parameter to the model remains consistent, avoiding the situation where certain parameters dominate the model training due to large numerical values.

[0045] S3: Construct an artificial neural network model based on adaptive feature fusion.

[0046] Among them, adaptive feature fusion is a technology that combines multiple input features (such as water quality parameters), which can dynamically adjust the weights of different input features according to their influence and importance. Artificial neural network (ANN) is a computational model that simulates the structure of human brain neurons, composed of multiple levels of neuron nodes. It learns the features of input data and adjusts weights and biases to complete tasks such as pattern recognition, classification, regression, etc. The artificial neural network model here is used for prediction tasks of groundwater water quality risk identification.

[0047] It is necessary to note that through the adaptive feature fusion technology, the most relevant water quality parameter features can be automatically selected and combined, which enables the model to effectively capture the contribution of each feature to water quality risk when facing complex water quality data. Adaptive feature fusion not only improves the accuracy of the model, but also enables the model to have stronger adaptability and flexibility on different groundwater data sets. The use of artificial neural networks further enhances the model's ability to handle nonlinear relationships, enabling it to learn more accurate prediction rules from complex water quality parameters.

[0048] S4: Input each preprocessed training sample into the artificial neural network model to determine the water quality index prediction value.

[0049] Among them, the water quality index prediction value is the water quality index predicted by the model, indicating the water quality state calculated by the artificial neural network model through the input water quality parameters.

[0050] It is necessary to note that by inputting the training samples into the already constructed artificial neural network model, the network level structure and nonlinear characteristics can be utilized to accurately predict the water quality index of groundwater, which can better capture the complex relationship between water quality parameters and provide more accurate water quality index prediction compared to traditional methods. The advantage of this structure is that it does not require manual intervention and can automatically adjust the internal weights of the model according to the input data, adapting to changes in different data, significantly improving the reliability and flexibility of water quality risk identification.

[0051] In one possible implementation, S4 specifically includes: S401: Input water quality parameters into the input layer of the artificial neural network model.

[0052] The input layer is the first layer of the artificial neural network model, through which water quality parameters (such as pH and dissolved oxygen) are passed to the network.

[0053] S402: In the hidden layer of the artificial neural network model, extract multiple hidden state feature maps from the water quality parameters. The hidden layer includes multiple hidden layer neurons.

[0054] in, y j Indicates the first j The hidden state output by each hidden layer neuron. σ 1 represents the hidden layer activation function. W j Indicates the first j The weight vector of each hidden layer neuron. T This indicates the transpose operation. X Represents the input state vector. b j Indicates the first j The bias term of each hidden layer neuron. ω ij Indicates the first j The th hidden layer neuron i The weight of each water quality parameter, the first i Data values ​​for each water quality parameter, n This indicates the total number of water quality parameters.

[0055] Hidden layers are located between the input and output layers. Each hidden layer consists of multiple neurons (nodes) responsible for processing the input data and extracting more complex features. Through hidden layers, the network can capture complex nonlinear relationships from the input data. Hidden features refer to the features extracted by the hidden layer through processing input data (such as water quality parameters). Hidden features are typically learned automatically by the neural network and are not directly provided by the data.

[0056] S403: In the fusion layer of the artificial neural network model, the hidden state feature maps are adaptively fused to obtain the fused feature map.

[0057] The fusion layer is a layer in an artificial neural network whose function is to combine and weight features from multiple hidden states in the hidden layers. A hidden state refers to the output or activation value of a neuron in each layer of the neural network. Adaptive fusion means that in the fusion layer, the network can automatically adjust the fusion strategy based on the characteristics of the input data, adjusting the weights according to the importance of each hidden state. The fused feature is the output of the fusion layer; it is a new feature obtained by adaptively fusing multiple hidden states.

[0058] In one possible implementation, S403 specifically includes: S4031: Downsample each hidden state feature map to ensure that the size of each hidden state feature map is consistent.

[0059] In this context, the hidden state feature map refers to the feature map of the output of a neuron in a hidden layer of a neural network. When processing data, each neuron transforms the input data into output (i.e., the hidden state), and these outputs form a feature map that reflects the feature representation of the hidden layer.

[0060] S4032: Calculate the median score of each hidden state feature map after downsampling:

[0061] in, Indicates position ( u , v The first one at ) j The median score of each hidden state feature map, where Sofmax represents the Sofmax activation function. T j Indicates the first j The intermediate weight matrix of the hidden state feature maps Indicates the first j The location of each hidden state feature map ( u , v The eigenvalue at position ) b j Indicates the first j The intermediate bias of a hidden state feature map.

[0062] The median score is a value calculated at each location (e.g., location u, v) in the feature map, representing the importance of the feature at that location.

[0063] S4033: Calculate the adaptive weight coefficients of each hidden state feature map after downsampling based on the intermediate scores:

[0064] Among them, among them, Indicates position ( u ,v )th hidden state feature map, j an adaptive weight coefficient of the n th hidden state feature map,

[0065] wherein the adaptive weight coefficient refers to the weight coefficient adjusted according to the importance of each hidden state feature map. These coefficients help the network automatically adjust the contribution of the feature maps in the final fusion process.

[0066] S4034: According to each adaptive weight coefficient, adaptively fuse each down-sampled hidden state feature map to obtain a fused feature map:

[0067] wherein, Y uv represents the fused feature value at position u , v ) of the fused feature map.

[0068] wherein the fused feature map is the final feature map obtained by adaptively fusing multiple hidden state feature maps, which combines the key information of multiple feature maps together to generate a more representative feature representation.

[0069] It should be noted that the down-sampling reduces the computational complexity while ensuring the consistency of the size of the feature maps, facilitating subsequent processing. The Softmax activation function ensures that the importance of features at each position in each feature map is effectively reflected, improving the rationality of feature selection. By calculating the adaptive weight coefficient, the contribution of each feature map is dynamically adjusted according to its importance, enhancing the sensitivity of the model to key features. Finally, through adaptive fusion, the feature information of multiple levels and perspectives can be combined to obtain a fused feature map with more expressive power, which enables the neural network to more accurately identify and predict water quality risks when processing complex water quality data.

[0070] S404: In the prediction layer of the artificial neural network model, according to the fused feature map, determine the water quality index prediction value:

[0071] wherein, represents the water quality index prediction value, σ 2 represents the prediction layer activation function, Y represents the fused feature map, b q represents the prediction layer bias term.

[0072] It should be noted that by inputting training samples into the constructed artificial neural network model, the network's hierarchical structure and nonlinear characteristics can be used to accurately predict groundwater quality indices. The input layer effectively transmits water quality parameters into the network, while the prediction layer makes a comprehensive evaluation based on the features extracted from the hidden layers.

[0073] S5: Based on the actual and predicted values ​​of the water quality index, the artificial neural network model is trained using the scaling conjugate gradient algorithm.

[0074] The scaling conjugate gradient algorithm is an optimization algorithm used to adjust the weights and biases in a neural network. It accelerates convergence by calculating the direction of the gradient and utilizing gradient information from the previous step, finding the minimum of the error function faster than the traditional gradient descent method.

[0075] It should be noted that by using the scaling conjugate gradient algorithm, the convergence speed of the training process is improved, avoiding the computational bottlenecks or slow convergence issues that may arise with traditional gradient descent. Through continuous iteration, not only is the model's prediction accuracy improved, but the training process is also accelerated, ultimately enabling the water quality risk identification model to perform water quality assessment tasks more efficiently and accurately, providing more reliable technical support for water quality monitoring.

[0076] In one possible implementation, S5 specifically includes: S501: Based on the error between the actual and predicted water quality index values, the adjustment direction of weights and biases in the artificial neural network model is determined through the backpropagation algorithm.

[0077] in, Indicates the first k Layer j Error term of each neuron, E Represents the error function. Indicates the first k Layer j The activation value of each neuron. Indicates the first k +1 floor j Error term of each neuron, l Indicates the first k Neuron index of layer +1, NT k+1 Indicates the first k The total number of neurons in layer +1 R Represents the input feature set, θ Indicates model parameters, qa Indicates the first a The true value of the water quality index for each sample predicates a predicted value of a water quality index of a a th sample, a =1,2,… A , A predicates a total number of samples, predicates a partial derivative symbol.

[0078] The backpropagation algorithm is an optimization algorithm commonly used to train neural networks. It calculates the error between the model output and the actual output, propagates the error back, adjusts the weights and biases of each layer in the network through the gradient descent algorithm, and finally minimizes the error to improve the accuracy of the model.

[0079] S502: According to the adjustment direction, update the weights and biases by scaling the conjugate gradient algorithm:

[0080] wherein, predicates a weight between the k th neuron in the r th layer and the j th neuron, predicates a weight between the k th neuron in the r th layer and the j th neuron, predicates a learning rate, predicates a gradient operator, predicates a bias of the k th neuron in the r th layer, predicates a bias of the k th neuron in the r th layer, α predicates a learning rate.

[0081] The scaled conjugate gradient algorithm is an optimization algorithm used to adjust the weights and biases in the neural network. It calculates the direction of the gradient and uses the gradient information from the previous step to speed up convergence, compared with the traditional gradient descent method, it can find the minimum value of the error function faster.

[0082] S503: Based on the artificial neural network model after updating the weights and biases, calculate the overfitting index.

[0083] where the overfitting index is an indicator of whether the model is overfitting. Overfitting refers to a model that performs well on the training set but poorly on the test set or new data. This is usually due to the model being too complex, overfitting the noise of the training data.

[0084] S504: Determine whether the overfitting index is greater than the overfitting threshold. If yes, go to step S505, otherwise, complete the training of the artificial neural network model.

[0085] S505: Introduce a Dropout layer between the fusion layer and the prediction layer of the artificial neural network model.

[0086] where the Dropout layer is a regularization technique that prevents the network from overfitting the training data by randomly dropping a portion of the connections of the neurons (i.e. temporarily disabling some neurons) during each training. This helps improve the generalization ability of the model.

[0087] S506: Initialize the parameters of the Dropout layer and freeze the network parameters of the input layer, hidden layer and fusion layer of the artificial neural network model.

[0088] S507: Update the parameters of the Dropout layer through the scaled conjugate gradient algorithm until the overfitting index is less than the overfitting threshold, completing the training of the artificial neural network model.

[0089] where the size of the overfitting threshold can be set by those skilled in the art according to actual conditions, and the present application does not limit it.

[0090] It should be noted that first, the back propagation algorithm helps to accurately adjust the weights and biases, so that the network can quickly learn and optimize the prediction ability. Then, the application of the scaled conjugate gradient algorithm greatly improves the training efficiency and avoids the computational redundancy in the traditional gradient descent method. By calculating the overfitting index and determining whether it exceeds the threshold, the overfitting problem is accurately identified and the generalization ability of the model is ensured. The introduced Dropout layer as a regularization technique prevents the network from overfitting the training data during the training process, enhancing the robustness of the model. By freezing the parameters of some network layers and optimizing the parameters of the Dropout layer, the model can ensure training efficiency while avoiding unnecessary calculations and parameter adjustments, ensuring the efficiency and stability of the training process. Overall, this series of steps realizes efficient training, effective avoidance of overfitting, and ensures the accuracy and robustness of the final model in practical applications.

[0091] S6: Obtain the set of water quality parameters of the groundwater to be identified.

[0092] S7: input the set of water quality parameters to be identified into the trained artificial neural network model to determine the predicted water quality index.

[0093] It should be noted that by inputting the set of water quality parameters to be identified into the already trained model, a fast and efficient way is provided to evaluate water quality without manual intervention or retraining the model. Since the neural network has been optimized through a large amount of historical data, it can fully utilize these existing knowledge to accurately predict the water quality of new samples.

[0094] S8: calculate the water quality risk confidence by combining the predicted water quality index and the water quality classification standard.

[0095] The water quality classification standard is a specification or standard for evaluating and classifying water quality according to different water quality indicators. For example, water quality may be classified as "excellent water quality", "good water quality", "medium water quality", "poor water quality" or "undrinkable water quality", etc. These standards are usually defined by environmental protection departments or relevant standard organizations, and classified according to water quality index. Water quality risk confidence refers to the confidence level of whether a certain water body meets safety standards or can meet the required use. It usually combines the predicted water quality index with the water quality classification standard to quantify the risk level of water quality, indicating the reliability and certainty of the prediction results.

[0096] It should be noted that by combining the predicted water quality index with the water quality classification standard, the risk confidence of water quality can be accurately evaluated, thereby providing quantitative evaluation and decision support for water quality conditions. The calculation of water quality risk confidence not only helps to judge whether the water quality meets certain standards, but also measures the reliability of the model prediction results, facilitating environmental monitoring and water resource management. In this way, the safety of water bodies can be more comprehensively and accurately evaluated to ensure the sustainable use of water resources and the protection of public health.

[0097] In one possible implementation, S8 specifically includes: S801: determine the grade interval and adjacent boundary threshold value of the predicted water quality index.

[0098] The grade interval refers to determining different water quality level intervals (such as excellent, good, poor, etc.) according to the numerical range of the water quality index. Each interval corresponds to a different water quality condition. The adjacent boundary threshold value refers to the boundary value between each grade interval, which is used to distinguish water quality of different grades.

[0099] S802: calculate the parameter variation coefficient of the water sample to be identified according to the grade interval and the adjacent boundary threshold value:

[0100] wherein, CVa parameter coefficient of variation, μ a mean of a water quality parameter set, σ a standard deviation of a water quality parameter set, x i a i-th water quality parameter, i a total number of water quality parameters. n

[0101] wherein the parameter coefficient of variation is a measure of the variability of the water quality parameter, reflecting the fluctuation of the water quality parameter set. The larger the coefficient of variation, the more significant the fluctuation of the water quality.

[0102] S803: According to the parameter coefficient of variation, calculate the water quality risk confidence:

[0103] wherein, WRC the water quality risk confidence, max represents the maximum value, a water quality index prediction value, Thresh a neighboring boundary threshold value, Range a total range of water quality index, Margin a safety margin, λ a correction factor.

[0104] It should be noted that by combining the grade interval of the water quality index with the variability of the water quality parameter, the risk confidence of the water quality can be more accurately evaluated. By calculating the coefficient of variation (CV) of the parameter, the volatility of the water quality data can be quantified, and the water quality risk can be evaluated to ensure the credibility of the prediction results. The introduction of the correction factor λ further improves the accuracy of the calculation, making the risk confidence more reliable and effective. Overall, this series of steps not only provides a quantitative evaluation tool for water quality monitoring, but also adjusts the confidence according to the actual water quality fluctuation, helping decision-makers better manage and protect water resources.

[0105] S9: According to the water quality risk confidence, determine the water quality risk level of the groundwater to be identified, and complete the identification of the groundwater water quality risk.

[0106] wherein the water quality risk level refers to the risk assessment of water quality according to the predicted water quality index and water quality classification standard. It represents the potential risk that water quality may pose to the environment or human health. A high risk level indicates poor water quality, which may need to be treated or warned; a low risk level indicates good water quality, which is suitable for use.

[0107] ​It is necessary to explain that the water quality risk level of groundwater is determined by the water quality risk confidence, which can accurately assess the pollution risk and safety of groundwater. Using water quality risk confidence, decision-makers can quickly identify potential water quality problems and take appropriate treatment or protection measures. This method provides a scientific and quantitative way to assess the risk of groundwater, ensuring the sustainable use of water resources and the protection of public health. In addition, the classification of water quality risk levels helps to differentiate management according to different risk levels, improving the efficiency and accuracy of water quality monitoring.

[0108] In one possible implementation, the water quality risk level specifically includes excellent water quality, good water quality, medium water quality, poor water quality, and non-drinkable water quality.

[0109] Among them, excellent water quality is the best level of water quality, meaning that the water quality meets or exceeds all standards, suitable for long-term drinking and ecological use, usually corresponding to the lowest or best range of water quality index.

[0110] Among them, good water quality means that the water quality meets most standards, only a few indicators may deviate slightly, but it is still safe to use, usually suitable for drinking and ecological needs.

[0111] Among them, medium water quality means that the water quality is ordinary, and some indicators may exceed the safety limit, but it can still meet some non-drinking purposes such as irrigation, etc., and may need to be treated to improve water quality.

[0112] Among them, poor water quality means that the water quality does not meet most standards, may have serious pollution, usually not suitable for human drinking, and may cause harm to the ecological environment, and needs to be treated immediately.

[0113] Among them, non-drinkable water quality means that the water is seriously polluted, the content of pollutants in the water exceeds the safety standard, and cannot be drunk or used for other important purposes, and must be treated urgently.

[0114] It is necessary to explain that by defining different water quality levels (excellent water quality, good water quality, medium water quality, poor water quality and non-drinkable water quality) in detail, and clearly defining the water quality index range corresponding to each level, the water quality evaluation is more standardized and scientific. The advantage of this classification method is that it provides a clear basis for rapid judgment of groundwater quality, helping environmental managers and decision-makers to understand the water quality situation in a timely manner and take appropriate measures. Different water quality levels provide different risk indications, so that the public and relevant departments can clearly understand whether the water quality meets the drinking or use standards. By associating the water quality index with specific risk levels, water quality management becomes more accurate and efficient, especially in areas where water resources are scarce or pollution threats are high. This evaluation method can help quickly identify and respond to potential water quality problems. In addition, clear classification enhances the transparency of water quality monitoring, making it easier for the public to understand and trust.

[0115] In the embodiment of the application, by obtaining a plurality of training samples and preprocessing each training sample, then constructing an artificial neural network model based on adaptive feature fusion, inputting the training samples into the artificial neural network model to determine the water quality index prediction value, and according to the water quality index true value and the water quality index prediction value of each training sample, the artificial neural network model is trained through the scaling conjugate gradient algorithm, thereby accelerating the training of the model. Finally, by obtaining the to-be-identified groundwater water quality parameter set and inputting the to-be-identified groundwater water quality parameter set into the trained artificial neural network model, the predicted water quality index is output, and according to the predicted water quality index, the water quality risk level is identified in combination with the water quality classification standard, real-time monitoring of water quality changes is realized, the monitoring cost is reduced, and through adaptive feature fusion and neural network model training, complex nonlinear relationships can be processed, thereby obtaining more accurate water quality index prediction, improving the efficiency and accuracy of water quality identification, and providing clear reference for decision-makers.

[0116] Reference is made to the accompanying drawings Figure 2 , which shows a structural schematic diagram of a groundwater water quality risk identification system for environmental safety provided by the application.

[0117] The application further provides a groundwater water quality risk identification system 20 for environmental safety, applied to the groundwater water quality risk identification method for environmental safety described above, comprising: a processor 201.

[0118] a memory 202, the memory 202 storing computer readable instructions, the computer readable instructions being executed by the processor 201 to realize the groundwater water quality risk identification method for environmental safety as in the method embodiment.

[0119] The groundwater quality risk identification system for environmental safety provided by the present application can execute the groundwater quality risk identification method for environmental safety, and achieve the same or similar technical effects. To avoid repetition, the present application will not be described again.

[0120] The present application also provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the groundwater quality risk identification method for environmental safety according to the method embodiment.

[0121] The computer readable storage medium provided by the present application can realize the steps and effects of the groundwater quality risk identification method for environmental safety according to the method embodiment. To avoid repetition, the present application will not be described again.

[0122] It should be understood that the processor in the embodiments of the present application can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0123] It should also be understood that the memory in the embodiments of the present application can be volatile or nonvolatile memory, or can include both volatile and nonvolatile memory. The nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be random access memory (RAM) used as external cache. By way of example, and not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0124] The above-described embodiments can be implemented in whole or in part by software, hardware (e.g., circuitry), firmware, or any combination thereof. When implemented in software, the above-described embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions according to the embodiments of the present application are entirely or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through wired (e.g., infrared, wireless, microwave, etc.) or wireless means. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.

[0125] It should be understood that the term "and / or" herein merely describes an association relationship of associated objects, which means that there can be three relationships, for example, A and / or B can represent three cases of A alone, A and B together, and B alone, where A and B can be singular or plural. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after it, but it can also represent an "and / or" relationship, which can be understood in the context before and after it.

[0126] In the present application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0127] It should be understood that in various embodiments of the present application, the size of the sequence number of the above-described processes does not mean the order of execution, and the execution order of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0128] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0129] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the devices, apparatuses and units described above can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0130] In several embodiments provided by the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0131] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0132] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit.

[0133] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the present application that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium that can store program codes.

[0134] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0135] The following points need to be explained: (1) The drawings of the embodiments of the present application only involve the structures involved in the embodiments of the present application, and other structures can refer to the usual design.

[0136] (2) For the sake of clarity, the thickness of the layers or regions is exaggerated or reduced in the drawings used to describe the embodiments of the present application, that is, the drawings are not drawn according to the actual proportion. It can be understood that when an element such as a layer, a film, a region or a substrate is referred to as being located "on" or "under" another element, the element can be "directly" located on or under another element or there can be an intermediate element.

[0137] (3) In the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other to obtain new embodiments.

[0138] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An environmental safety-oriented groundwater quality risk identification method, characterized by, The method comprises the following steps: S1: obtaining a plurality of training samples, wherein each training sample comprises a set of water quality parameters of groundwater in a historical period and a corresponding water quality index true value; S2: preprocessing each training sample; S3: constructing an artificial neural network model based on adaptive feature fusion; S4: inputting each preprocessed training sample into the artificial neural network model to determine a water quality index prediction value; S5: training the artificial neural network model by using a scaled conjugate gradient algorithm according to the water quality index true value and the water quality index prediction value; S6: obtaining a set of water quality parameters of groundwater to be identified; S7: inputting the set of water quality parameters of the groundwater to be identified into the trained artificial neural network model to determine a predicted water quality index; S8: combining the predicted water quality index and a water quality classification standard to calculate a water quality risk confidence; S9: determining a water quality risk level of the groundwater to be identified according to the water quality risk confidence, and completing the identification of the groundwater quality risk.

2. The environmental safety-oriented groundwater quality risk identification method according to claim 1, characterized by, The set of water quality parameters comprises a plurality of water quality parameters; The water quality parameters comprise pH value, dissolved oxygen content, conductivity, chloride content, ammonia content, fecal coliform content, alkalinity, and test results of the groundwater.

3. The environmental safety-oriented groundwater quality risk identification method according to claim 2, characterized by, The calculation process of the water quality index true value specifically comprises: S101: calculating the quality points of each water quality parameter; S102: calculating the unit weight of each water quality parameter according to the standard of the World Health Organization; S103: determining the water quality index true value by using a weighted arithmetic index method according to the quality points and the unit weight of each water quality parameter.

4. The environmental safety-oriented groundwater quality risk identification method according to claim 1, characterized by, The preprocessing comprises missing value filling processing, abnormal value processing, and normalization processing; The normalization processing is specifically minimum-maximum normalization processing.

5. The environmental safety-oriented groundwater quality risk identification method according to claim 1, characterized by, The S4 specifically comprises: S401: inputting water quality parameters in the input layer of the artificial neural network model; S402: extracting a plurality of hidden state feature maps in the water quality parameters in the hidden layer of the artificial neural network model, wherein the hidden layer comprises a plurality of hidden layer neurons; S403: adaptively fusing each hidden state feature map in the fusion layer of the artificial neural network model to obtain a fusion feature map; S404: determining the water quality index prediction value according to the fusion feature map in the prediction layer of the artificial neural network model.

6. The environmental safety-oriented groundwater quality risk identification method according to claim 5, characterized by, The S403 specifically comprises: S4031: downsampling each hidden state feature map to ensure that the sizes of each hidden state feature map are consistent; S4032: calculating intermediate scores of each downsampled hidden state feature map; S4033: calculating adaptive weight coefficients of each downsampled hidden state feature map according to each intermediate score; S4034: adaptively fusing each downsampled hidden state feature map according to each adaptive weight coefficient to obtain the fusion feature map.

7. The environmental safety-oriented groundwater quality risk identification method according to claim 1, characterized by, The S5 specifically comprises: S501: determining the adjustment direction of the weight and bias in the artificial neural network model according to the error between the water quality index true value and the water quality index predicted value through a back propagation algorithm; S502: updating the weight and the bias according to the adjustment direction through the scaled conjugate gradient algorithm; S503: calculating an overfitting index based on the artificial neural network model after the weight and bias are updated; S504: judging whether the overfitting index is greater than an overfitting threshold, if yes, entering step S505, otherwise, completing the training of the artificial neural network model; S505: introducing a Dropout layer between the fusion layer and the prediction layer of the artificial neural network model; S506: initializing the parameters of the Dropout layer and freezing the network parameters of the input layer, the hidden layer and the fusion layer of the artificial neural network model; S507: updating the parameters of the Dropout layer through the scaled conjugate gradient algorithm until the overfitting index is less than the overfitting threshold, and completing the training of the artificial neural network model.

8. The environmental safety-oriented groundwater quality risk identification method according to claim 1, characterized by, The S8 specifically comprises: S801: determining the grade interval and the adjacent boundary threshold value of the predicted water quality index; S802: calculating the parameter variation coefficient of the water sample to be identified according to the grade interval and the adjacent boundary threshold value; S803: calculating the water quality risk confidence according to the parameter variation coefficient.

9. The environmental safety-oriented groundwater quality risk identification method of claim 1, wherein, The water quality risk grade specifically comprises: excellent water quality, good water quality, medium water quality, poor water quality and undrinkable water quality.

10. An environmental safety-oriented groundwater quality risk identification system, characterized by, It comprises: a processor; a memory, the memory having computer readable instructions stored thereon, the computer readable instructions being executed by the processor to implement the environmental safety-oriented groundwater water quality risk identification method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Water quality system parameter identification method based on fuzzy fractional order neural network

    CN113139336A

  • Photovoltaic power generation power prediction method and device based on multi-input model

    CN116826734A

  • Method for training target segmentation model, target segmentation method and related device

    CN117237756A

  • Method for predicting outlet water quality of rural sewage treatment facility based on multi-path data source

    CN118760979A