CN117849302A - Multi-parameter water quality on-line monitoring method - Google Patents

Multi-parameter water quality on-line monitoring method Download PDF

Info

Publication number
CN117849302A
CN117849302A CN202410265746.9A CN202410265746A CN117849302A CN 117849302 A CN117849302 A CN 117849302A CN 202410265746 A CN202410265746 A CN 202410265746A CN 117849302 A CN117849302 A CN 117849302A
Authority
CN
China
Prior art keywords
water sample
detection
water
matrix
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410265746.9A
Other languages
Chinese (zh)
Inventor
黄越
严百平
田鹏
程竣飞
张伟政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Labsun Bio Instrument Co ltd
Original Assignee
Shenzhen Labsun Bio Instrument Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Labsun Bio Instrument Co ltd filed Critical Shenzhen Labsun Bio Instrument Co ltd
Priority to CN202410265746.9A priority Critical patent/CN117849302A/en
Publication of CN117849302A publication Critical patent/CN117849302A/en
Pending legal-status Critical Current

Links

Landscapes

  • Sampling And Sample Adjustment (AREA)

Abstract

The invention relates to a multi-parameter water quality on-line monitoring method, which comprises the following steps: acquiring multiple parameters of a water sample acquired by an acquisition system and time stamps corresponding to the multiple parameters of the water sample, and acquiring a multivariate time sequence data matrix based on the multiple parameters of the water sample and the time stamps corresponding to the multiple parameters of the water sample; analyzing the multivariate time sequence data matrix through a preset CRNN model to obtain each analysis result of the water sample; inputting each analysis result of the water sample into a preset detection model for detection, correspondingly obtaining each detection result of the water sample, and judging whether each detection result of the water sample is in a preset range of a standard water sample result; if any detection result is not in the preset range of the standard water sample result, triggering an alarm system; the automatic processing flow from parameter analysis to alarm triggering is realized, manual intervention is reduced, and efficiency is improved.

Description

Multi-parameter water quality on-line monitoring method
Technical Field
The invention relates to the technical field of water quality detection, in particular to a multi-parameter water quality on-line monitoring method, a device, equipment and a storage medium.
Background
The quality requirements of the current society on water resources are higher and higher, and the monitoring of water quality becomes an important environmental protection measure. Traditional water quality detection methods generally rely on laboratory chemistry, which is time consuming and laborious and does not provide real-time water quality information. However, with rapid development of information technology, especially application and popularization of the internet of things technology, it is possible to realize online monitoring of water quality. The online monitoring can accurately monitor the water quality change in real time, and has important significance for protecting water resources and preventing water pollution accidents. In the prior art, although some online monitoring systems exist, the online monitoring systems still have some defects, such as low accuracy, insufficient real-time performance, incapability of comprehensively judging complex parameters and the like.
Disclosure of Invention
The invention mainly aims to provide a multi-parameter water quality on-line monitoring method, a device, equipment and a storage medium, which enable complex parameter analysis to be more accurate through deep learning of CRNN model application.
In order to achieve the above purpose, the invention provides a multi-parameter water quality on-line monitoring method, which comprises the following steps:
acquiring multiple parameters of a water sample acquired by an acquisition system and time stamps corresponding to the multiple parameters of the water sample, and acquiring a multivariate time sequence data matrix based on the multiple parameters of the water sample and the time stamps corresponding to the multiple parameters of the water sample;
analyzing the multivariate time sequence data matrix through a preset CRNN model to obtain each analysis result of the water sample; wherein the CRNN model comprises a CNN layer and a GRU layer; the CNN layer comprises a double-layer one-dimensional convolution cyclic neural network and an activation function; the activation function is respectively connected with a plurality of GRU modules in the single GRU layer;
inputting each analysis result of the water sample into a preset detection model for detection, correspondingly obtaining each detection result of the water sample, and judging whether each detection result of the water sample is in a preset range of a standard water sample result;
and if any detection result is not in the preset range of the standard water sample result, triggering an alarm system.
As a further scheme of the invention, a plurality of parameters of a water sample collected by a collection system are obtained, and a multivariate time sequence data matrix is obtained based on the plurality of parameters of the water sample and time stamps corresponding to the plurality of parameters of the water sample, and the method comprises the following steps:
collecting various parameters of the water sample and corresponding time stamps of the various parameters of the water sample by adopting a preset collecting system; wherein, the various parameters of the water sample comprise the temperature, pH, dissolved oxygen and turbidity of the water sample; the time stamps corresponding to various parameters of the water sample comprise a temperature time stamp, a pH time stamp, a dissolved oxygen time stamp and a turbidity time stamp;
mapping and aligning the temperature, pH, dissolved oxygen and turbidity of the water sample with a temperature time stamp, a pH value time stamp, a dissolved oxygen time stamp and a turbidity time stamp of the water sample to obtain an initial multivariable time sequence data matrix;
inputting the initial multi-variable time sequence data matrix into a preset time window model for division to obtain a first target multi-variable time sequence data matrix;
matrix judgment is carried out on the first target multi-variable time sequence data matrix, and whether elements lack in the first target multi-variable time sequence data matrix or not is judged; if the first target multivariable time sequence data matrix lacks elements, performing median calculation on various parameters of the water sample and timestamps corresponding to the various parameters of the water sample to obtain elements to be supplemented, and supplementing the elements to be supplemented to the positions lacking the elements to obtain a second target multivariable time sequence data matrix; wherein the second target multivariate time series data matrix is used as a multivariate time series data matrix.
As a further scheme of the invention, the multivariate time series data matrix is analyzed through a preset CRNN model to obtain each analysis result of the water sample, which comprises the following steps:
performing data preprocessing on the multivariate time series data matrix through an input layer in a CRNN model to obtain a preprocessing matrix;
performing data compression on the preprocessing matrix through a double-layer one-dimensional convolution cyclic neural network to obtain a compression matrix;
extracting data features of the compression matrix to obtain a compression extraction matrix;
nonlinear change is carried out on the compression extraction matrix through an activation function, and a target matrix of water quality is obtained;
and performing matrix analysis on the target matrix of the water quality through a plurality of GRU modules to obtain each analysis result of the water sample.
As a further scheme of the invention, each analysis result of the water sample is input into a preset detection model for detection, and each detection result of the water sample is correspondingly obtained, and the method comprises the following steps:
inputting each analysis result of the water sample into a preset detection model for detection to obtain a detection value of each corresponding water sample;
respectively calculating the detection values of the water samples to obtain classification weights corresponding to the water samples;
carrying out weighted summation on the classification weights corresponding to the water samples through an attention mechanism to obtain a preliminary target detection result;
judging whether the preliminary target detection result has a repeated target detection result or not;
and if the preliminary target detection result contains a repeated target detection result, rejecting the repeated target detection result by adopting an NMS algorithm to obtain a standard target detection result.
As a further scheme of the present invention, each analysis result of the water sample is respectively input into a preset detection model for detection, and corresponding detection values of each water sample are obtained correspondingly, including:
respectively extracting the characteristics of each analysis result of the water sample to obtain each characteristic data of the water sample; wherein, each characteristic data of the water sample comprises a temperature value, a pH value, a dissolved oxygen value and a turbidity value of the water sample;
inputting each characteristic data of the water sample into a preset detection model for detection, and judging whether each characteristic data of the water sample has abnormal data or not; wherein the abnormal data comprise abnormal characteristic data of the water sample and missing characteristic data;
if abnormal data exist in each characteristic data of the water sample, replacing the abnormal data to obtain standard detection data;
sequencing the standard detection data through a preset detection value sequence model to obtain a detection value sequence of each corresponding water sample; wherein the detection value sequence of each water sample is each detection result of the water sample.
The invention also provides a multi-parameter water quality on-line monitoring device, which comprises:
the acquisition module is used for acquiring various parameters of the water sample acquired by the acquisition system and time stamps corresponding to the various parameters of the water sample, and acquiring a multivariate time sequence data matrix based on the various parameters of the water sample and the time stamps corresponding to the various parameters of the water sample;
the analysis module is used for analyzing the multivariate time sequence data matrix through a preset CRNN model to obtain each analysis result of the water sample; wherein the CRNN model comprises a CNN layer and a GRU layer; the CNN layer comprises a double-layer one-dimensional convolution cyclic neural network and an activation function; the activation function is respectively connected with a plurality of GRU modules in the single GRU layer;
the detection module is used for respectively inputting each analysis result of the water sample into a preset detection model for detection, correspondingly obtaining each detection result of the water sample, and judging whether each detection result of the water sample is in a preset range of a standard water sample result;
and the judging module is used for triggering the alarm system if any detection result is not in the preset range of the standard water sample result.
The invention also provides a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of any of the methods described above when the computer program is executed.
The invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the preceding claims.
The invention provides a multiparameter water quality on-line monitoring method, a multiparameter water quality on-line monitoring device, computer equipment and a storage medium, which comprise the following steps: acquiring multiple parameters of a water sample acquired by an acquisition system and time stamps corresponding to the multiple parameters of the water sample, and acquiring a multivariate time sequence data matrix based on the multiple parameters of the water sample and the time stamps corresponding to the multiple parameters of the water sample; analyzing the multivariate time sequence data matrix through a preset CRNN model to obtain each analysis result of the water sample; wherein the CRNN model comprises a CNN layer and a GRU layer; the CNN layer comprises a double-layer one-dimensional convolution cyclic neural network and an activation function; the activation function is respectively connected with a plurality of GRU modules in the single GRU layer; inputting each analysis result of the water sample into a preset detection model for detection, correspondingly obtaining each detection result of the water sample, and judging whether each detection result of the water sample is in a preset range of a standard water sample result; if any detection result is not in the preset range of the standard water sample result, triggering an alarm system; the collected parameters are analyzed by utilizing a preset deep learning CRNN model, so that an accurate multi-parameter analysis result is obtained, the technical problems of low accuracy and insufficient instantaneity are solved, real-time analysis of a continuously collected water sample is realized, and the water quality condition is fed back rapidly. The application of the deep learning CRNN model ensures that the complex parameter analysis is more accurate, realizes the automatic processing flow from the parameter analysis to the alarm triggering, reduces the manual intervention and improves the efficiency.
Drawings
FIG. 1 is a schematic diagram showing steps of a multi-parameter water quality online monitoring method according to an embodiment of the invention;
FIG. 2 is a block diagram of a multi-parameter on-line water quality monitoring device according to an embodiment of the present invention;
fig. 3 is a block diagram schematically illustrating a structure of a computer device according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating steps of a multi-parameter water quality online monitoring method according to an embodiment of the invention;
the embodiment of the invention provides a multi-parameter water quality on-line monitoring method, which comprises the following steps:
in step S1, a plurality of parameters of a water sample collected by a collection system and time stamps corresponding to the plurality of parameters of the water sample are obtained, and a multivariate time series data matrix is obtained based on the plurality of parameters of the water sample and the time stamps corresponding to the plurality of parameters of the water sample.
Specifically, a sensor or other collection device is used to collect a water sample from a particular body of water. Various water quality parameters such as temperature, pH, dissolved oxygen, turbidity, chemical Oxygen Demand (COD), biological Oxygen Demand (BOD), heavy metal content, etc. are measured and recorded. And when data are collected each time, recording the specific time of data collection, and associating a time stamp for each parameter value. Checking the integrity and accuracy of the data, and eliminating errors or outliers. And (3) carrying out normalization processing on parameters with different dimensions or orders of magnitude so that the parameters are on the same scale, and facilitating subsequent analysis. Ensuring that the time stamps of all parameters are aligned, the missing values or interpolation is processed to fill in the gaps in the time series. The time series data of each parameter are aligned according to the time stamp to construct a matrix, wherein each row represents a time point, and each column represents a parameter. If there are N parameters and T time points, the resulting matrix dimension will be T N. Multivariate time series data is analyzed using statistical methods or machine learning algorithms to identify patterns, trends, and periodicity in the data. Based on the time series data training model, the change of the future water quality parameter is predicted. Monitoring the change of the water quality parameters in real time, and finding out abnormal conditions such as pollution events in time; wherein, the acquisition system is a real-time online acquisition system.
The following technical effects can be obtained through the steps: accurately monitors the quality state of the water body in real time and discovers the water quality problem in time. Data support is provided for water resource management and decision making, and water quality trends are predicted based on historical and real-time data. By early detection of pollution and abnormal events, measures are taken to reduce environmental damage. Optimizing the use and treatment process of water resources, and improving the water treatment efficiency and sustainable utilization of water resources. The multi-variable time series data matrix obtained by the acquisition system not only can be used for monitoring and evaluating the water quality condition, but also can support wider water resource management and environmental protection activities.
In step S2, analyzing the multivariate time series data matrix through a preset CRNN model to obtain each analysis result of the water sample; wherein the CRNN model comprises a CNN layer and a GRU layer; the CNN layer comprises a double-layer one-dimensional convolution cyclic neural network and an activation function; the activation function is respectively connected with a plurality of GRU modules in the single GRU layer.
Specifically, the preset CRNN model is trained in advance and is specifically used for analyzing time series data. The CRNN model combines the advantages of Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs). The multivariate time series data matrix is first passed through a two-layer one-dimensional convolutional neural network. The CNN layer can effectively extract spatial features (such as correlations between different parameters) in the time series data. The convolutional layer is typically followed by an activation function, such as ReLU or Sigmoid, to increase the nonlinearity of the network, helping the model learn complex data patterns. The CNN processed data is then passed into a single layer of GRU (gated loop unit) layers. The GRU is an RNN, is very suitable for processing time series data, and can capture dynamic change of the data along with time. The spatial features extracted by the CNN layer and the time features captured by the GRU layer are combined, and the CRNN model comprehensively analyzes the information and outputs each analysis result of the water sample.
The following technical effects can be obtained through the steps: by combining the CNN and the GRU, the preset CRNN model can efficiently extract the space and time characteristics in the water quality data, the analysis accuracy is improved, the GRU layer is particularly suitable for processing time sequence data, and the data mode changing along with time, such as the periodic change of water quality, can be better understood and predicted. The combination of spatial and temporal feature analysis enables the model to more accurately predict future changes in water quality, which is very helpful for early warning and risk assessment. The CRNN model is capable of processing multiple variables and large amounts of data, and is suitable for complex and high-dimensional environmental monitoring data. In general, in step S2, the CRNN model is used to analyze the multivariate time series data matrix, which can improve accuracy and efficiency of water quality analysis, and has important significance for environmental monitoring and management.
In step S3, each analysis result of the water sample is respectively input into a preset detection model for detection, each detection result of the water sample is correspondingly obtained, and whether each detection result of the water sample is within a preset range of a standard water sample result is judged.
Specifically, each analysis result (such as a water quality parameter obtained by CRNN model analysis) of the water sample obtained in step S2 is input into one or more preset detection models. The preset detection model is obtained based on training of different machine learning algorithms and aims at a specific water quality assessment task. The detection model processes and analyzes the input data and outputs a corresponding detection result. Including classification problems as to whether the water quality parameters meet standards or multi-classification or regression analysis of specific pollution levels. And judging whether each analysis result falls within the preset standard water sample result range according to the detection result. The above ranges are set based on regulations, industry standards or experience. And (5) integrating all detection results to evaluate the whole water quality. If the detection result shows that the parameters are not in the standard range, the reasons can be further analyzed, and corresponding improvement measures can be adopted.
The following technical effects can be obtained through the steps: the quality of the water sample can be accurately evaluated and monitored, and the water quality safety is ensured and meets the standard. By automating the analysis and detection processes, the error of manual operation is reduced, the processing efficiency is improved, and the standardization of the analysis process is realized. If the detection result shows that the water quality parameter does not reach the standard, measures such as warning related personnel, adjusting the treatment process and the like can be taken in time, so that the water quality risk is effectively managed. Through this series of steps, it can play an important role in maintaining public health and environmental quality, especially in the fields of water resource management, drinking water safety monitoring and environmental protection.
In step S4, if any one of the detection results is not within the preset range of the standard water sample result, triggering an alarm system.
Specifically, the results of all water sample detection are comprehensively evaluated and compared with a preset water quality standard range to judge whether the conditions exceed the standard range or not. If any of the detection results is found to be outside the range of the predetermined standard water sample results, the system will automatically trigger an alarm. The above process is automated, ensuring an immediate response without human intervention. Once the alarm is triggered, the alarm system immediately gives an alarm through a preset communication channel (such as a short message, an email, an application program notice and the like), and provides information about which item or items exceed the standard in detail. The alarm notification contains preliminary response guidance or advice, and indicates the receiver to take corresponding preliminary measures according to specific situations, such as suspending water source use, increasing detection frequency, and the like. All alarm events and corresponding detection results are recorded for subsequent analysis and problem tracking.
The following technical effects can be obtained through the steps: the systematic automatic alarm mechanism can ensure that potential water quality problems are identified and responded in the first time, and delay of relying on manual detection and judgment is reduced. By means of immediate warning and preliminary crisis management measures, the possible health risks and environmental damage caused by water quality problems can be effectively reduced. The data recorded by the system provides basis for subsequent analysis and decision making, and is beneficial to identifying the root cause and the improvement direction of the water quality problem. A reliable water quality monitoring and alarming system can improve the confidence of public on water quality safety management and enhance the trust of the public on water supply institutions. In summary, by setting an automatic alarm system to respond to the abnormality of the detection result, the water quality problem can be found and treated in time, thereby protecting public health, reducing environmental risk and supporting scientific decision process.
In a specific embodiment, acquiring multiple parameters of a water sample acquired by an acquisition system, and obtaining a multivariate time series data matrix based on the multiple parameters of the water sample and time stamps corresponding to the multiple parameters of the water sample, wherein the method comprises the following steps:
collecting various parameters of the water sample and corresponding time stamps of the various parameters of the water sample by adopting a preset collecting system; wherein, the various parameters of the water sample comprise the temperature, pH, dissolved oxygen and turbidity of the water sample; the time stamps corresponding to various parameters of the water sample comprise a temperature time stamp, a pH time stamp, a dissolved oxygen time stamp and a turbidity time stamp;
mapping and aligning the temperature, pH, dissolved oxygen and turbidity of the water sample with a temperature time stamp, a pH value time stamp, a dissolved oxygen time stamp and a turbidity time stamp of the water sample to obtain an initial multivariable time sequence data matrix;
inputting the initial multi-variable time sequence data matrix into a preset time window model for division to obtain a first target multi-variable time sequence data matrix;
matrix judgment is carried out on the first target multi-variable time sequence data matrix, and whether elements lack in the first target multi-variable time sequence data matrix or not is judged; if the first target multivariable time sequence data matrix lacks elements, performing median calculation on various parameters of the water sample and timestamps corresponding to the various parameters of the water sample to obtain elements to be supplemented, and supplementing the elements to be supplemented to the positions lacking the elements to obtain a second target multivariable time sequence data matrix; wherein the second target multivariate time series data matrix is used as a multivariate time series data matrix.
Specifically, a preset collection system is used for collecting various parameters (temperature, pH, dissolved oxygen and turbidity) and corresponding time stamps of the water sample. And mapping and aligning the collected water sample parameters with the corresponding time stamps to form an initial multivariable time sequence data matrix. The above steps ensure a time dependence of each parameter. And inputting the initial data matrix into a preset time window model for division to form a first target multi-variable time sequence data matrix. The time window model facilitates capturing dynamic changes in time series data. It is checked whether the first target data matrix has missing elements. If so, calculating the median of each parameter, and supplementing missing elements to form a second target multi-variable time sequence data matrix. The above steps may improve data integrity.
The following technical effects can be obtained through the steps: by supplementing the missing data, the integrity of the data matrix is ensured, which is important for subsequent analysis and model training. Features of time series data, such as periodicity and trend, can be better captured by using a time window model, which is important for understanding the water quality change mode. The processing of the mapping alignment and missing data improves the data quality, providing a more reliable basis for subsequent analysis. The high-quality multi-variable time series data matrix is a basis for complex analysis and accurate prediction model construction, and is very important for water quality monitoring and management. In summary, the data processing steps in this embodiment aim to ensure the integrity, accuracy and availability of the collected water quality data, which lays a solid foundation for further analysis and modeling applications.
In a specific embodiment, the multivariate time series data matrix is analyzed by a preset CRNN model to obtain each analysis result of the water sample, including:
performing data preprocessing on the multivariate time series data matrix through an input layer in a CRNN model to obtain a preprocessing matrix;
performing data compression on the preprocessing matrix through a double-layer one-dimensional convolution cyclic neural network to obtain a compression matrix;
extracting data features of the compression matrix to obtain a compression extraction matrix;
nonlinear change is carried out on the compression extraction matrix through an activation function, and a target matrix of water quality is obtained;
and performing matrix analysis on the target matrix of the water quality through a plurality of GRU modules to obtain each analysis result of the water sample.
Specifically, the multivariate time series data matrix is preprocessed through an input layer of the CRNN model, and a preprocessing matrix suitable for further analysis is obtained. The above steps typically include normalization, etc. to ensure that the data is within the proper range. The preprocessing matrix is processed by using a double-layer one-dimensional convolution layer, so that the dimension of data is reduced, key information is extracted, and a compression matrix is obtained. The above steps contribute to a reduction in the amount of calculation and an improvement in the processing efficiency. And extracting the characteristics of the compressed matrix to obtain a compressed extraction matrix containing water quality key index characteristics. The key to the above steps is to identify and extract the most important information for water quality analysis. And performing nonlinear transformation on the compressed extraction matrix through an activation function (such as ReLU or Sigmoid) to obtain a water quality target matrix which is more suitable for complex analysis. The above steps increase the ability of the model to process complex data. And analyzing the target matrix of the water quality by using a plurality of GRU modules, and finally obtaining each analysis result of the water sample. The GRU module can capture long-term dependency in time series data, and is very effective for understanding and predicting water quality change.
The following technical effects can be obtained through the steps: through the steps of data compression and feature extraction, the CRNN model can rapidly identify the most important information from a large amount of time series data, and the data processing efficiency is remarkably improved. After nonlinear transformation is adopted, the CRNN model can capture and express more complex data modes, and the accuracy and reliability of analysis are improved. The use of the GRU module makes the model particularly good at processing time series data, and can effectively capture dynamic changes of water quality along with time, thereby providing more accurate water quality analysis results. The analysis result obtained by the CRNN model can help related personnel to understand the current state and possible trend of the water quality, and provide scientific basis for water quality management and decision making. In summary, the CRNN model exhibits high efficiency and high accuracy in processing and analyzing multivariate time series data, and is particularly suitable for complex environmental monitoring and analysis tasks that require consideration of time dependence, such as water quality analysis.
In a specific embodiment, inputting each analysis result of the water sample into a preset detection model for detection, and correspondingly obtaining each detection result of the water sample, wherein the steps include:
inputting each analysis result of the water sample into a preset detection model for detection to obtain a detection value of each corresponding water sample;
respectively calculating the detection values of the water samples to obtain classification weights corresponding to the water samples;
carrying out weighted summation on the classification weights corresponding to the water samples through an attention mechanism to obtain a preliminary target detection result;
judging whether the preliminary target detection result has a repeated target detection result or not;
and if the preliminary target detection result contains a repeated target detection result, rejecting the repeated target detection result by adopting an NMS algorithm to obtain a standard target detection result.
Specifically, a plurality of analysis results (such as temperature, pH value, dissolved oxygen content, etc.) of each water sample are input into a machine learning/deep learning model trained in advance, so as to obtain detection values of each water sample. The detection value obtained by each water sample is further used for calculating the corresponding classification weight value, and the classification weight value reflects the possibility or importance of the water sample belonging to a certain class. And weighting and summing according to the classification weight of each water sample by using an attention mechanism to obtain a preliminary target detection result. The attention mechanism here helps the model focus on more informative features, improving the accuracy of the detection. And checking whether repeated detection results exist in the preliminary target detection results. In the context of water quality testing, problems such as repeated identification of similar contaminants may be involved. If duplicate target detection results are present, non-maximum suppression (NMS) algorithms are used to suppress or reject those duplicate results. The NMS algorithm ensures the accuracy and uniqueness of the final detection result by retaining higher weighted detection results while deleting other low weighted (or low confidence) duplicate results.
The following technical effects can be obtained through the steps: by combining an attention mechanism and an NMS algorithm, false detection and repetition can be effectively reduced, and key indexes and pollutants in a water sample can be more accurately identified and analyzed. The automated process reduces the need for manual detection while improving the speed and efficiency of data processing by rapidly eliminating duplicate results. The attention mechanism is used, so that the model can be better suitable for various different water quality detection scenes and complexity, and the recognition and classification capability of the model on unknown water samples is improved. The finally obtained standardized target detection result can provide more accurate data support for water quality management and help to make more scientific decisions. In summary, the embodiment shows an advanced data processing flow applied in the field of water quality detection by combining the modern machine learning technology, and shows obvious technical effects of improving accuracy, optimizing efficiency, enhancing model generalization capability and the like.
In a specific embodiment, each analysis result of the water sample is respectively input into a preset detection model for detection, and corresponding detection values of each corresponding water sample are obtained, including:
respectively extracting the characteristics of each analysis result of the water sample to obtain each characteristic data of the water sample; wherein, each characteristic data of the water sample comprises a temperature value, a pH value, a dissolved oxygen value and a turbidity value of the water sample;
inputting each characteristic data of the water sample into a preset detection model for detection, and judging whether each characteristic data of the water sample has abnormal data or not; wherein the abnormal data comprise abnormal characteristic data of the water sample and missing characteristic data;
if abnormal data exist in each characteristic data of the water sample, replacing the abnormal data to obtain standard detection data;
sequencing the standard detection data through a preset detection value sequence model to obtain a detection value sequence of each corresponding water sample; wherein the detection value sequence of each water sample is each detection result of the water sample.
Specifically, key characteristic data including temperature, pH value, dissolved oxygen content, turbidity and the like are extracted from the analysis result of each water sample. The temperature, the pH value, the content of dissolved oxygen, the turbidity and the like are common indexes for measuring the water quality, and can reflect the basic physical and chemical states of water. And inputting the extracted characteristic data into a preset detection model. The detection model can judge whether the water sample accords with the normal water quality range based on the characteristic data, and recognize abnormal characteristic data, wherein the abnormal characteristic data is index numerical value abnormality or data missing. For the detected abnormal data, some method (such as replacing with average, median or estimated value based on prediction model) is adopted to correct, so as to ensure that each index has a reasonable data value, and the subsequent processing can be smoothly carried out. And sequencing the processed standard detection data through a preset detection value sequence model to generate a detection value sequence capable of reflecting the water quality state of each water sample.
The following technical effects can be obtained through the steps: by the advanced data processing method, abnormal data can be effectively identified and corrected, and the accuracy of water quality detection data is ensured, so that the reliability of water quality detection is improved. The automatic feature extraction and abnormal data processing not only improve the data processing speed, but also reduce the occurrence probability of human errors, so that large-scale water quality monitoring is possible. By comprehensively considering a plurality of water quality indexes, the water quality condition can be more comprehensively estimated, the accurate recognition of the water quality problem is facilitated, and more scientific guidance is provided for water treatment. The generated water sample detection value sequence can intuitively reflect the overall condition of water quality, provide scientific basis for water quality management and control, and support decision making based on data. In conclusion, the embodiment can effectively improve the efficiency and accuracy of water quality detection through a scientific data processing flow and an advanced technical method, and has important technical values in the aspects of guaranteeing the safety of water resources and guiding water treatment.
The method for online monitoring of multi-parameter water quality in the embodiment of the present invention is described above, and the device for online monitoring of multi-parameter water quality in the embodiment of the present invention is described below, referring to fig. 2, one embodiment of the device for online monitoring of multi-parameter water quality in the embodiment of the present invention includes:
the acquisition module 21 is configured to acquire multiple parameters of the water sample acquired by the acquisition system and time stamps corresponding to the multiple parameters of the water sample, and obtain a multivariate time sequence data matrix based on the multiple parameters of the water sample and the time stamps corresponding to the multiple parameters of the water sample;
the analysis module 22 is configured to analyze the multivariate time series data matrix through a preset CRNN model, so as to obtain each analysis result of the water sample; wherein the CRNN model comprises a CNN layer and a GRU layer; the CNN layer comprises a double-layer one-dimensional convolution cyclic neural network and an activation function; the activation function is respectively connected with a plurality of GRU modules in the single GRU layer;
the detection module 23 is configured to input each analysis result of the water sample into a preset detection model for detection, obtain each detection result of the water sample correspondingly, and determine whether each detection result of the water sample is within a preset range of a standard water sample result;
and the judging module 24 is used for triggering the alarm system if any detection result is not within the preset range of the standard water sample result.
In this embodiment, for specific implementation of each unit in the above embodiment of the apparatus, please refer to the description in the above embodiment of the method, and no further description is given here.
Referring to fig. 3, a computer device is further provided in an embodiment of the present invention, and the internal structure of the computer device may be as shown in fig. 3. The computer device includes a processor, a memory, a display screen, an input device, a network interface, and a database connected by a system bus. Wherein the computer is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used for communicating with an external terminal through a network connection. Which computer program, when being executed by a processor, carries out the above-mentioned method.
It will be appreciated by those skilled in the art that the architecture shown in fig. 3 is merely a block diagram of a portion of the architecture in connection with the present inventive arrangements and is not intended to limit the computer devices to which the present inventive arrangements are applicable.
An embodiment of the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above method. It is understood that the computer readable storage medium in this embodiment may be a volatile readable storage medium or a nonvolatile readable storage medium.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided by the present invention and used in embodiments may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, among others.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes using the descriptions and drawings of the present invention or direct or indirect application in other related technical fields are included in the scope of the present invention.

Claims (8)

1. A multi-parameter water quality on-line monitoring method is characterized in that: the method comprises the following steps:
acquiring multiple parameters of a water sample acquired by an acquisition system and time stamps corresponding to the multiple parameters of the water sample, and acquiring a multivariate time sequence data matrix based on the multiple parameters of the water sample and the time stamps corresponding to the multiple parameters of the water sample;
analyzing the multivariate time sequence data matrix through a preset CRNN model to obtain each analysis result of the water sample; wherein the CRNN model comprises a CNN layer and a GRU layer; the CNN layer comprises a double-layer one-dimensional convolution cyclic neural network and an activation function; the activation function is respectively connected with a plurality of GRU modules in the single GRU layer;
inputting each analysis result of the water sample into a preset detection model for detection, correspondingly obtaining each detection result of the water sample, and judging whether each detection result of the water sample is in a preset range of a standard water sample result;
and if any detection result is not in the preset range of the standard water sample result, triggering an alarm system.
2. The multi-parameter water quality on-line monitoring method according to claim 1, wherein: acquiring multiple parameters of a water sample acquired by an acquisition system, and acquiring a multivariate time sequence data matrix based on the multiple parameters of the water sample and timestamps corresponding to the multiple parameters of the water sample, wherein the multivariate time sequence data matrix comprises the following components:
collecting various parameters of the water sample and corresponding time stamps of the various parameters of the water sample by adopting a preset collecting system; wherein, the various parameters of the water sample comprise the temperature, pH, dissolved oxygen and turbidity of the water sample; the time stamps corresponding to various parameters of the water sample comprise a temperature time stamp, a pH time stamp, a dissolved oxygen time stamp and a turbidity time stamp;
mapping and aligning the temperature, pH, dissolved oxygen and turbidity of the water sample with a temperature time stamp, a pH value time stamp, a dissolved oxygen time stamp and a turbidity time stamp of the water sample to obtain an initial multivariable time sequence data matrix;
inputting the initial multi-variable time sequence data matrix into a preset time window model for division to obtain a first target multi-variable time sequence data matrix;
matrix judgment is carried out on the first target multi-variable time sequence data matrix, and whether elements lack in the first target multi-variable time sequence data matrix or not is judged; if the first target multivariable time sequence data matrix lacks elements, performing median calculation on various parameters of the water sample and timestamps corresponding to the various parameters of the water sample to obtain elements to be supplemented, and supplementing the elements to be supplemented to the positions lacking the elements to obtain a second target multivariable time sequence data matrix; wherein the second target multivariate time series data matrix is used as a multivariate time series data matrix.
3. The multi-parameter water quality on-line monitoring method according to claim 1, wherein: analyzing the multivariate time sequence data matrix through a preset CRNN model to obtain each analysis result of the water sample, wherein the analysis result comprises the following steps:
performing data preprocessing on the multivariate time series data matrix through an input layer in a CRNN model to obtain a preprocessing matrix;
performing data compression on the preprocessing matrix through a double-layer one-dimensional convolution cyclic neural network to obtain a compression matrix;
extracting data features of the compression matrix to obtain a compression extraction matrix;
nonlinear change is carried out on the compression extraction matrix through an activation function, and a target matrix of water quality is obtained;
and performing matrix analysis on the target matrix of the water quality through a plurality of GRU modules to obtain each analysis result of the water sample.
4. The multi-parameter water quality on-line monitoring method according to claim 1, wherein: inputting each analysis result of the water sample into a preset detection model for detection, and correspondingly obtaining each detection result of the water sample, wherein the detection method comprises the following steps of:
inputting each analysis result of the water sample into a preset detection model for detection to obtain a detection value of each corresponding water sample;
respectively calculating the detection values of the water samples to obtain classification weights corresponding to the water samples;
carrying out weighted summation on the classification weights corresponding to the water samples through an attention mechanism to obtain a preliminary target detection result;
judging whether the preliminary target detection result has a repeated target detection result or not;
and if the preliminary target detection result contains a repeated target detection result, rejecting the repeated target detection result by adopting an NMS algorithm to obtain a standard target detection result.
5. The multi-parameter on-line monitoring method of water quality according to claim 4, wherein: inputting each analysis result of the water sample into a preset detection model for detection, correspondingly obtaining detection values of each corresponding water sample, wherein the detection values comprise:
respectively extracting the characteristics of each analysis result of the water sample to obtain each characteristic data of the water sample; wherein, each characteristic data of the water sample comprises a temperature value, a pH value, a dissolved oxygen value and a turbidity value of the water sample;
inputting each characteristic data of the water sample into a preset detection model for detection, and judging whether each characteristic data of the water sample has abnormal data or not; wherein the abnormal data comprise abnormal characteristic data of the water sample and missing characteristic data;
if abnormal data exist in each characteristic data of the water sample, replacing the abnormal data to obtain standard detection data;
sequencing the standard detection data through a preset detection value sequence model to obtain a detection value sequence of each corresponding water sample; wherein the detection value sequence of each water sample is each detection result of the water sample.
6. The utility model provides a multiparameter quality of water on-line monitoring device which characterized in that includes:
the acquisition module is used for acquiring various parameters of the water sample acquired by the acquisition system and time stamps corresponding to the various parameters of the water sample, and acquiring a multivariate time sequence data matrix based on the various parameters of the water sample and the time stamps corresponding to the various parameters of the water sample;
the analysis module is used for analyzing the multivariate time sequence data matrix through a preset CRNN model to obtain each analysis result of the water sample; wherein the CRNN model comprises a CNN layer and a GRU layer; the CNN layer comprises a double-layer one-dimensional convolution cyclic neural network and an activation function; the activation function is respectively connected with a plurality of GRU modules in the single GRU layer;
the detection module is used for respectively inputting each analysis result of the water sample into a preset detection model for detection, correspondingly obtaining each detection result of the water sample, and judging whether each detection result of the water sample is in a preset range of a standard water sample result;
and the judging module is used for triggering the alarm system if any detection result is not in the preset range of the standard water sample result.
7. A computer device comprising a memory and a processor, the memory having stored therein a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 5.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 5.
CN202410265746.9A 2024-03-08 2024-03-08 Multi-parameter water quality on-line monitoring method Pending CN117849302A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410265746.9A CN117849302A (en) 2024-03-08 2024-03-08 Multi-parameter water quality on-line monitoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410265746.9A CN117849302A (en) 2024-03-08 2024-03-08 Multi-parameter water quality on-line monitoring method

Publications (1)

Publication Number Publication Date
CN117849302A true CN117849302A (en) 2024-04-09

Family

ID=90548464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410265746.9A Pending CN117849302A (en) 2024-03-08 2024-03-08 Multi-parameter water quality on-line monitoring method

Country Status (1)

Country Link
CN (1) CN117849302A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070233397A1 (en) * 2006-03-20 2007-10-04 Sensis Corporation System for detection and prediction of water quality events
CN111582608A (en) * 2020-05-29 2020-08-25 华润电力技术研究院有限公司 Fly ash carbon content prediction method, device, equipment and readable storage medium
CN112116080A (en) * 2020-09-24 2020-12-22 中国科学院沈阳计算技术研究所有限公司 CNN-GRU water quality prediction method integrated with attention mechanism
CN112699547A (en) * 2020-12-25 2021-04-23 朗坤智慧科技股份有限公司 Sliding window type multivariate time sequence missing value filling method based on 5G network
CN113672607A (en) * 2021-08-19 2021-11-19 吉林大学 Medical time series data missing value processing method
KR102414640B1 (en) * 2020-12-24 2022-06-30 주식회사 더로드 Apparatus and method for predicting concentration of algal
CN116307232A (en) * 2023-03-30 2023-06-23 河北科技师范学院 Watershed water quality prediction method based on OVMD-GAT-GRU
CN116937559A (en) * 2023-07-21 2023-10-24 东南大学 Power system load prediction system and method based on cyclic neural network and tensor decomposition
CN116956120A (en) * 2023-06-27 2023-10-27 河海大学 Prediction method for water quality non-stationary time sequence based on improved TFT model
CN117171624A (en) * 2023-09-28 2023-12-05 扬州大学 Waterfowl cultivation water quality prediction method
CN117252285A (en) * 2023-03-27 2023-12-19 长春理工大学 Multi-index sewage water quality prediction method based on parallel CNN-GRU network

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070233397A1 (en) * 2006-03-20 2007-10-04 Sensis Corporation System for detection and prediction of water quality events
CN111582608A (en) * 2020-05-29 2020-08-25 华润电力技术研究院有限公司 Fly ash carbon content prediction method, device, equipment and readable storage medium
CN112116080A (en) * 2020-09-24 2020-12-22 中国科学院沈阳计算技术研究所有限公司 CNN-GRU water quality prediction method integrated with attention mechanism
KR102414640B1 (en) * 2020-12-24 2022-06-30 주식회사 더로드 Apparatus and method for predicting concentration of algal
CN112699547A (en) * 2020-12-25 2021-04-23 朗坤智慧科技股份有限公司 Sliding window type multivariate time sequence missing value filling method based on 5G network
CN113672607A (en) * 2021-08-19 2021-11-19 吉林大学 Medical time series data missing value processing method
CN117252285A (en) * 2023-03-27 2023-12-19 长春理工大学 Multi-index sewage water quality prediction method based on parallel CNN-GRU network
CN116307232A (en) * 2023-03-30 2023-06-23 河北科技师范学院 Watershed water quality prediction method based on OVMD-GAT-GRU
CN116956120A (en) * 2023-06-27 2023-10-27 河海大学 Prediction method for water quality non-stationary time sequence based on improved TFT model
CN116937559A (en) * 2023-07-21 2023-10-24 东南大学 Power system load prediction system and method based on cyclic neural network and tensor decomposition
CN117171624A (en) * 2023-09-28 2023-12-05 扬州大学 Waterfowl cultivation water quality prediction method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JICHANG TU 等: "Water Quality Prediction Model Based on CNN-GRU hybrid network", 2019 CHINESE AUTOMATION CONGRESS(CAC), 31 December 2020 (2020-12-31), pages 1893 - 1898 *
JUNCHAO YANG等: "Prediction and control of water quality in Recirculating Aquaculture System based on hybrid neural network", ENGINEERING APPLICATIONS OF ARTIFICIAL INTELLIGENCE, vol. 121, 31 March 2023 (2023-03-31), pages 1 - 15, XP087296803, DOI: 10.1016/j.engappai.2023.106002 *
MOHAMMAD EHTERA 等: "An advanced deep learning model for predicting water quality index", ECOLOGICAL INDICATORS, vol. 160, 29 February 2024 (2024-02-29), pages 1 - 24 *

Similar Documents

Publication Publication Date Title
Song et al. Identifying performance anomalies in fluctuating cloud environments: A robust correlative-GNN-based explainable approach
WO2020049087A1 (en) Computer-implemented method, computer program product and system for anomaly detection and/or predictive maintenance
CN113518011B (en) Abnormality detection method and apparatus, electronic device, and computer-readable storage medium
CN114023399A (en) Air particulate matter analysis early warning method and device based on artificial intelligence
Doshi et al. Reward once, penalize once: Rectifying time series anomaly detection
Doshi et al. Tisat: Time series anomaly transformer
CN114138601A (en) Service alarm method, device, equipment and storage medium
CN111314110B (en) Fault early warning method for distributed system
CN113947076A (en) Policy data detection method and device, computer equipment and storage medium
CN117849302A (en) Multi-parameter water quality on-line monitoring method
CN116910674A (en) Water management monitoring method, device, equipment and medium based on data fusion inspection
CN111931798B (en) Method for classifying and detecting cold head state and predicting service life
CN117783769B (en) Power distribution network fault positioning method, system, equipment and storage medium based on visual platform
CN117726241B (en) Building structure quality detection method, equipment and storage medium
US20230385838A1 (en) Computerized-method and data-analysis system for analyzing financial data to improve performance of a concept drift detector that is providing alerts of drift to an update component of a machine learning model for fraud prediction and detection
CN117708602B (en) Building safety monitoring method and system based on Internet of things
CN117668481A (en) Non-invasive coal chemical industry carbon capture efficiency evaluation method and system
US20240168444A1 (en) Method and system for hybrid data augmentation for estimating performance degradation in industrial plant
CN117909819A (en) Trusted adaptation method, device, equipment and medium of situation awareness system
CN117952318A (en) Industrial garden carbon emission data management system and method based on big data
CN118094417A (en) CTD data quality monitoring method and device, electronic equipment and medium
CN118071140A (en) Data processing method and device, electronic equipment and storage medium
CN116594833A (en) Equipment detection and evaluation method and device, computer equipment and storage medium
CN116383751A (en) Data-driven park management service Qos monitoring method and system
CN117240541A (en) Network security situation awareness method and device for multi-source data fusion

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination