CN115935276A - Environmental water quality monitoring system and monitoring method thereof - Google Patents

Environmental water quality monitoring system and monitoring method thereof Download PDF

Info

Publication number
CN115935276A
CN115935276A CN202211385215.0A CN202211385215A CN115935276A CN 115935276 A CN115935276 A CN 115935276A CN 202211385215 A CN202211385215 A CN 202211385215A CN 115935276 A CN115935276 A CN 115935276A
Authority
CN
China
Prior art keywords
water quality
matrix
feature
gaussian
detection data
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.)
Withdrawn
Application number
CN202211385215.0A
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.)
Ji'an Chuangcheng Environmental Protection Technology Co ltd
Original Assignee
Ji'an Chuangcheng Environmental Protection Technology 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 Ji'an Chuangcheng Environmental Protection Technology Co ltd filed Critical Ji'an Chuangcheng Environmental Protection Technology Co ltd
Priority to CN202211385215.0A priority Critical patent/CN115935276A/en
Publication of CN115935276A publication Critical patent/CN115935276A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to the field of water quality safety, and particularly discloses an environmental water quality monitoring system and a monitoring method thereof, wherein global high-dimensional semantic features based on water quality among various items of water quality detection data are extracted through a context encoder to be more suitable for representing the essential mode features of the water quality, and a convolutional neural network model and a time sequence encoder are used for extracting the dynamic change implicit rule of the water quality so as to perform feature fusion through a Gaussian density map and a Gaussian mixture model, and the situation that in the classification process, the feature distribution of the features in a feature space has position sensitivity relative to a tag value is considered, so that tag value scattering response factors of a first feature matrix and a second feature matrix are respectively calculated and are fused as weighting coefficients of the tag value scattering response factors, and the fusion effect of the first feature matrix and the second feature matrix is improved. Through such a mode, can carry out more comprehensive dynamic verification to quality of water, and then guarantee quality of water safety.

Description

Environmental water quality monitoring system and monitoring method thereof
Technical Field
The invention relates to the field of water quality safety, in particular to an environmental water quality monitoring system and a monitoring method thereof.
Background
With the rapid development of economic society, environmental problems are more frequent and serious, particularly the problem of water pollution, a series of tension in drinking water situations and outbreaks of water pollution related diseases are caused, and the guarantee of water quality safety becomes a big project relating to the civil problem in China.
Therefore, it is necessary to periodically detect the water quality and study and analyze the water quality data. Some existing technical schemes for water quality detection have certain defects, for example, water quality detection only considers certain water quality components on one side, and dynamic requirements of water quality detection are not considered, that is, water quality can dynamically change along with time migration. Therefore, a new environmental water quality monitoring scheme is expected.
Disclosure of Invention
The present application is proposed to solve the above-mentioned technical problems. The embodiment of the application provides an environmental water quality monitoring system and a monitoring method thereof, wherein global high-dimensional semantic features among various water quality detection data are extracted through a context encoder to be more suitable for representing the essential mode features of water quality, a convolutional neural network model and a time sequence encoder are used for extracting the dynamic change implicit law of the water quality, the features are fused through a Gaussian density map and a Gaussian mixture model, the condition that the feature distribution of the features in a feature space has position sensitivity relative to a tag value in a classification process is considered, and therefore the tag value scattering response factors of a first feature matrix and a second feature matrix are respectively calculated and are fused as weighting coefficients of the tag value scattering response factors, and therefore the fusion effect of the first feature matrix and the second feature matrix is improved. Through such a mode, can carry out more comprehensive dynamic verification to quality of water, and then guarantee quality of water safety.
According to an aspect of the present application, there is provided an environmental water quality monitoring system, comprising:
a water quality detection data acquisition unit for acquiring multiple items of water quality detection data of water quality to be monitored at multiple preset time points, wherein the water quality detection data comprises total nitrogen content, ammonia nitrogen content, total phosphorus content, fecal escherichia coli content, dissolved oxygen content, chemical Oxygen Demand (COD) and Biochemical Oxygen Demand (BOD) 5 And electrical conductivity;
the global semantic coding unit is used for enabling a plurality of items of water quality detection data of all the preset time points to pass through a context coder comprising an embedded layer respectively to obtain a plurality of characteristic vectors, and cascading the plurality of characteristic vectors to obtain first characteristic vectors corresponding to all the preset time points;
the convolution coding unit is used for performing two-dimensional arrangement on the first characteristic vector of each preset time point to obtain a characteristic matrix through a first convolution neural network;
the time sequence coding unit is used for enabling the sequence of the water quality detection data at the preset time points to pass through a time sequence coder comprising a one-dimensional convolution layer and a full connection layer so as to obtain a second feature vector corresponding to the water quality detection data;
the water quality detection device comprises a Gaussian enhancement unit, a detection unit and a control unit, wherein the Gaussian enhancement unit is used for constructing a Gaussian density map of second eigenvectors of various items of water quality detection data, the mean vector of the Gaussian density map is the second eigenvector, and the value of each position in a covariance matrix of the Gaussian density map is the variance between the eigenvalues of each position in the second eigenvector;
the water quality detection device comprises a Gaussian mixing unit, a data acquisition unit and a data processing unit, wherein the Gaussian mixing unit is used for constructing a Gaussian mixture model of a Gaussian density map of each item of water quality detection data, a mean vector of the Gaussian mixture model is a position-weighted sum of mean vectors of each Gaussian density map, and a covariance matrix of the Gaussian mixture model is a position-weighted sum of covariance matrices of each Gaussian density map;
the Gaussian discretization unit is used for carrying out Gaussian discretization on the Gaussian mixture model to obtain a second feature matrix;
a feature matrix fusion unit, configured to perform fusion based on a label value scattering response weight on the first feature matrix and the second feature matrix to obtain a classification feature matrix; and
and the monitoring result generating unit is used for enabling the classification characteristic matrix to pass through a classifier to obtain a classification result, and the classification result is used for indicating whether the quality of the water quality to be monitored meets a preset requirement or not.
In the above environmental water quality monitoring system, the global semantic coding unit is further configured to: converting the multiple items of water quality detection data of each preset time point into input vectors by using the embedding layer of the context encoder model containing the embedding layer so as to obtain a sequence of the input vectors; performing global context-based semantic encoding on the sequence of input vectors using a converter of the context encoder model including an embedded layer to obtain the plurality of feature vectors; and concatenating the plurality of feature vectors to obtain the first feature vector corresponding to each of the predetermined time points.
In the above system for monitoring environmental water quality, the convolution coding unit is further configured to: two-dimensionally arranging the first eigenvectors of each preset time point into the eigenvector matrix; performing convolution processing, pooling along channel dimensions, and activation processing on input data in forward pass of layers using layers of the first convolutional neural network to generate the first feature matrix from a last layer of the first convolutional neural network, wherein an input of the first layer of the first convolutional neural network is the feature matrix.
In the above environmental water quality monitoring system, the time-series encoding unit is further configured to: arranging the sequence of the water quality detection data at the preset time points into a one-dimensional water quality input vector according to the time dimension; using a full-connection layer of the time sequence encoder to perform full-connection encoding on the water quality input vector according to the following formula so as to extract the characteristics of each position in the water quality input vectorA high-dimensional implicit characterization of the value, wherein the formula is:
Figure BDA0003929429370000031
wherein X is the input vector, Y is the output vector, W is a weight matrix, B is a bias vector, and>
Figure BDA0003929429370000032
represents a matrix multiplication; performing one-dimensional convolutional coding on the water quality input vector by using a one-dimensional convolutional layer of the time sequence encoder according to the following formula so as to extract high-dimensional implicit correlation characteristics among characteristic values of all positions in the water quality input vector, wherein the formula is as follows:
Figure BDA0003929429370000033
wherein, a is the width of the convolution kernel in the x direction, F is the parameter vector of the convolution kernel, G is the local vector matrix operated with the convolution kernel function, and w is the size of the convolution kernel.
In the above environmental water quality monitoring system, the gaussian enhancement unit is further configured to: constructing the Gaussian density map of the second eigenvector of each item of the water quality detection data by the following formula:
Figure BDA0003929429370000034
wherein μ is the second eigenvector, and Σ is a variance between the values of each position in the covariance matrix of each of the gaussian density maps being the eigenvalues of each position in the second eigenvector; the Gaussian mixing unit is further configured to: constructing the Gaussian mixture model of the Gaussian density map of the water quality detection data according to the following formula:
Figure BDA0003929429370000035
Figure BDA0003929429370000036
wherein x i A position-weighted sum, Σ, of the mean vectors for each of said Gaussian density maps i A position-wise weighted sum of covariance matrices for each of the Gaussian density maps.
In the above-mentioned environmental water quality monitoring system, the feature matrix fusion unit includes:
a first weighting coefficient determining subunit, configured to calculate a label value scattering response factor of the first feature matrix as a first weighting coefficient according to the following formula;
wherein the formula is:
Figure BDA0003929429370000041
wherein M is 1 Is the first feature matrix, f 1 Is the first feature matrix M 1 Characteristic value, p, of each position of 1 Is said first feature matrix M 1 Probability values under labels obtained by a classifier alone, j being the label value of the classifier, and w 1 Is the first weighting coefficient;
a second weighting coefficient determination subunit for calculating a label value scattering response factor of the second feature matrix as a first weighting coefficient by the following formula;
wherein the formula is:
Figure BDA0003929429370000042
wherein M is 2 Is the second feature matrix, f 2 Is the second feature matrix M 2 Characteristic value, p, of each position of 2 Is said second feature matrix M 2 Probability values under labels obtained by the classifier alone, j being theThe label value of the classifier, and w 2 Is the second weighting factor; and
and the fusion subunit is used for calculating the weighted sum of the first feature matrix and the second feature matrix according to the position by taking the first weighting coefficient and the second weighting coefficient as weighting coefficients to obtain the classification feature matrix.
In the above environmental water quality monitoring system, the monitoring result generating unit is further configured to: the classifier processes the classification feature matrix to generate a classification result according to the following formula, wherein the formula is as follows: softmax { (W) n ,B n ):…:(W 1 ,B 1 ) Project (F), where Project (F) represents projecting the classification feature matrix as a vector, W 1 To W n As a weight matrix for each fully connected layer, B 1 To B n A bias matrix representing the fully connected layers of each layer.
According to another aspect of the present application, a monitoring method of an environmental water quality monitoring system includes:
acquiring multiple items of water quality detection data of water quality to be monitored at multiple preset time points, wherein the water quality detection data comprise total nitrogen content, ammonia nitrogen content, total phosphorus content, fecal escherichia coli content, dissolved oxygen content, chemical Oxygen Demand (COD) 5 And electrical conductivity;
respectively enabling multiple items of water quality detection data of each preset time point to pass through a context encoder comprising an embedded layer to obtain multiple characteristic vectors, and cascading the multiple characteristic vectors to obtain first characteristic vectors corresponding to the preset time points;
the first characteristic vectors of all the preset time points are two-dimensionally arranged into a characteristic matrix and then pass through a first convolution neural network to obtain a first characteristic matrix;
passing the sequence of the water quality detection data at the preset time points through a time sequence encoder comprising a one-dimensional convolution layer and a full connection layer to obtain a second feature vector corresponding to the water quality detection data;
constructing a Gaussian density map of second eigenvectors of each item of water quality detection data, wherein a mean vector of the Gaussian density map is the second eigenvector, and values of all positions in a covariance matrix of the Gaussian density map are variances among eigenvalues of all positions in the second eigenvector;
constructing a Gaussian mixture model of the Gaussian density maps of the water quality detection data, wherein the mean vector of the Gaussian mixture model is the position-weighted sum of the mean vectors of the Gaussian density maps, and the covariance matrix of the Gaussian mixture model is the position-weighted sum of the covariance matrices of the Gaussian density maps;
performing Gaussian discretization on the Gaussian mixture model to obtain a second feature matrix;
fusing the first feature matrix and the second feature matrix based on a label value scattering response weight to obtain a classification feature matrix; and
and passing the classification characteristic matrix through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the quality of the water quality to be monitored meets a preset requirement or not.
In the monitoring method of the environmental water quality monitoring system, the step of passing the plurality of items of water quality detection data at each predetermined time point through a context encoder including an embedded layer to obtain a plurality of feature vectors, and cascading the plurality of feature vectors to obtain a first feature vector corresponding to each predetermined time point includes: converting the multiple items of water quality detection data of each preset time point into input vectors by using the embedding layer of the context encoder model containing the embedding layer so as to obtain a sequence of the input vectors; globally context-based semantic encoding the sequence of input vectors using a converter of the context encoder model including an embedding layer to obtain the plurality of feature vectors; and concatenating the plurality of feature vectors to obtain the first feature vector corresponding to each of the predetermined time points.
In the monitoring method of the environmental water quality monitoring system, after the first eigenvector of each predetermined time point is two-dimensionally arranged as an eigenvector matrix, the first eigenvector matrix is obtained by a first convolutional neural network, which includes: two-dimensionally arranging the first eigenvectors of each preset time point into the eigenvector matrix; performing convolution processing, pooling along channel dimensions, and activation processing on input data in forward pass of layers using layers of the first convolutional neural network to generate the first feature matrix from a last layer of the first convolutional neural network, wherein an input of the first layer of the first convolutional neural network is the feature matrix.
In the monitoring method of the environmental water quality monitoring system, passing a sequence of the water quality detection data at the predetermined time points through a time sequence encoder including a one-dimensional convolution layer and a full link layer to obtain a second eigenvector corresponding to each water quality detection data, includes: arranging the sequence of the water quality detection data at the preset time points into a one-dimensional water quality input vector according to the time dimension; using a full-connection layer of the time sequence encoder to perform full-connection encoding on the water quality input vector by using the following formula so as to extract high-dimensional implicit characteristics of characteristic values of all positions in the water quality input vector, wherein the formula is as follows:
Figure BDA0003929429370000061
wherein X is the input vector, Y is the output vector, W is the weight matrix, B is the offset vector, and B is the->
Figure BDA0003929429370000062
Represents a matrix multiplication; performing one-dimensional convolutional coding on the water quality input vector by using a one-dimensional convolutional layer of the time sequence encoder according to the following formula so as to extract high-dimensional implicit correlation characteristics among characteristic values of all positions in the water quality input vector, wherein the formula is as follows:
Figure BDA0003929429370000063
/>
wherein, a is the width of the convolution kernel in the x direction, F is the parameter vector of the convolution kernel, G is the local vector matrix operated with the convolution kernel function, and w is the size of the convolution kernel.
In the monitoring method of the environmental water quality monitoring system, constructing a gaussian density map of a second eigenvector of each item of the water quality detection data includes: constructing the Gaussian density map of the second eigenvector of each item of the water quality detection data by the following formula:
Figure BDA0003929429370000064
wherein μ is the second eigenvector, and Σ is a variance between the values of each position in the covariance matrix of each of the gaussian density maps being the eigenvalues of each position in the second eigenvector; constructing a Gaussian mixture model of a Gaussian density map of each item of the water quality detection data, comprising: constructing the Gaussian mixture model of the Gaussian density map of the water quality detection data according to the following formula:
Figure BDA0003929429370000065
Figure BDA0003929429370000071
wherein x i A position-weighted sum, Σ, of the mean vectors for each of said Gaussian density maps i A position-wise weighted sum of covariance matrices for each of the Gaussian density maps.
In the monitoring method of the environmental water quality monitoring system, the fusion of the first feature matrix and the second feature matrix based on the label value scattering response weight to obtain a classification feature matrix includes: calculating a label value scattering response factor of the first feature matrix as a first weighting coefficient according to the following formula;
wherein the formula is:
Figure BDA0003929429370000072
wherein M is 1 Is the first feature matrix, f 1 Is the first feature matrix M 1 Characteristic value, p, of each position of 1 Is said first feature matrix M 1 Probability values under labels obtained by a classifier alone, j being the label value of the classifier, and w 1 Is the first weighting coefficient;
calculating a label value scattering response factor of the second feature matrix as a first weighting coefficient according to the following formula;
wherein the formula is:
Figure BDA0003929429370000073
wherein, M 2 Is the second feature matrix, f 2 Is the second feature matrix M 2 Characteristic value, p, of each position of 2 Is said second feature matrix M 2 Probability values under labels obtained by a classifier alone, j is the label value of the classifier, and w 2 Is the second weighting factor; and
and calculating the position-weighted sum of the first feature matrix and the second feature matrix by taking the first weighting coefficient and the second weighting coefficient as weighting coefficients to obtain the classification feature matrix.
In the monitoring method of the environmental water quality monitoring system, the classifying feature matrix is used by a classifier to obtain a classification result, and the classification result is used for indicating whether the quality of the water quality to be monitored meets a preset requirement or not, and includes: the classifier processes the classification feature matrix to generate a classification result according to the following formula, wherein the formula is as follows: softmax { (W) n ,B n ):…:(W 1 ,B 1 ) L Project (F) }, where Project (F) denotes the projection of the classification feature matrix as a vector, W 1 To W n As a weight matrix for each fully connected layer, B 1 To B n A bias matrix representing the layers of the fully connected layer.
Compared with the prior art, the environmental water quality monitoring system and the monitoring method thereof extract global-based high-dimensional semantic features among various water quality detection data through the context encoder to be more suitable for representing the essential mode features of water quality, extract dynamic change implicit rules of the water quality by using the convolutional neural network model and the time sequence encoder, perform feature fusion through a Gaussian density map and a Gaussian mixture model, consider that feature distribution of features in a feature space has position sensitivity relative to a tag value in a classification process, calculate tag value scattering response factors of a first feature matrix and a second feature matrix respectively to perform fusion as weighting coefficients of the tag value scattering response factors, and accordingly improve the fusion effect of the first feature matrix and the second feature matrix. Through such a mode, can carry out more comprehensive dynamic verification to quality of water, and then guarantee quality of water safety.
Drawings
The above and other objects, features and advantages of the present application will become more apparent by describing in more detail embodiments of the present application with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the principles of the application. In the drawings, like reference numbers generally represent like parts or steps.
Fig. 1 is an application scenario diagram of an environmental water quality monitoring system according to an embodiment of the present application.
Fig. 2 is a block diagram of an environmental water quality monitoring system according to an embodiment of the present application.
Fig. 3 is a flowchart of a monitoring method of an environmental water quality monitoring system according to an embodiment of the present application.
Fig. 4 is a schematic configuration diagram of a monitoring method of an environmental water quality monitoring system according to an embodiment of the present application.
Detailed Description
Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be understood that the described embodiments are only some embodiments of the present application and not all embodiments of the present application, and that the present application is not limited by the example embodiments described herein.
Overview of a scene
As mentioned above, with the rapid development of economic society, environmental problems, especially water pollution problems, are increasing frequently and seriously, leading to a series of tension in drinking water situation and outbreaks of water pollution related diseases, and the guarantee of water quality safety becomes a big project related to civil problems in our country.
Therefore, it is necessary to periodically detect the water quality and study and analyze the water quality data. Some existing technical schemes for water quality detection have certain defects, for example, water quality detection only considers certain water quality components on one side, and dynamic requirements of water quality detection are not considered, that is, water quality can dynamically change along with time migration. Therefore, a new environmental water quality monitoring scheme is expected.
In the technical scheme of the application, the inventor tries to construct a water quality detection scheme from feature level fusion of multi-source data. Specifically, water quality detection data of a plurality of preset time points are extracted through a water quality detector, and the water quality detection data comprise total nitrogen, ammonia nitrogen, total phosphorus, fecal escherichia coli, dissolved oxygen, chemical oxygen demand and BOD 5 And electrical conductivity. Considering that the correlation exists among the water quality component data, the context encoder comprising the embedded layer is used for encoding the water quality detection data at each preset time point so as to extract high-dimensional semantic features based on the whole situation among the water quality detection data to be more suitable for characterizing the essential mode features of the water quality. In the encoding process of the context encoder, the context encoder firstly uses an embedding layer to map various items of water quality detection data into embedding vectors, namely, uses the embedding layer to map various items of water quality detection data into the same vector space. The context coding then performs global context-based semantic coding on the obtained sequence of embedded vectors using a transformer to generate the first feature vector.
Considering the law that the water quality has dynamics in the time dimension, further, a feature matrix obtained by two-dimensionally arranging the first feature vectors of the respective predetermined time points is encoded by using a convolutional neural network to extract the variation features of the water quality features in the time sequence dimension. It should be understood that the dynamic law of water quality in the time dimension not only exists in the global characteristic representation of water quality, but also exists in each item of water quality detection data. Therefore, in order to more fully extract the implicit law of the dynamic change of the water quality, the sequence of each item of water quality detection data at the plurality of preset time points passes through a time sequence encoder comprising a one-dimensional convolution layer and a full connection layer. In one example, the time sequence encoder is composed of full connection layers and one-dimensional convolution layers which are alternately arranged, and the correlation of each item of water quality detection data in a time sequence dimension is extracted through one-dimensional convolution coding, and high-dimensional implicit characteristics of each item of water quality data are extracted through full connection coding.
Considering that the second feature vector of each water quality detection data corresponds to a feature distribution manifold in a high-dimensional feature space, and the feature distribution manifolds are due to the irregular shapes and the scattering positions of the feature distribution manifolds, if the global feature representation of each item of water quality data is represented by cascading the feature vectors of each numerical detection data, the feature distribution manifolds are equivalent to simply overlapping the feature distribution manifolds according to the original positions and the shapes, so that the boundaries of the newly obtained feature distribution manifolds become very irregular and complicated, and when an optimal point is found through gradient descent, the newly obtained feature distribution manifolds easily fall into local extreme points and cannot obtain a global optimal point. Therefore, it is necessary to further perform appropriate fusion of the feature vectors of these water quality inspection data so that the respective feature distributions can be topographically converged with respect to each other.
The applicant of the present application considers that the gaussian density map is widely used for estimation based on a priori target posteriori in deep learning, and thus can be used to correct data distribution, thereby achieving the above-mentioned object. Specifically, in the technical scheme of the application, a gaussian density map of a second eigenvector of each item of water quality detection data is constructed based on Gao Sigao s, then a gaussian mixture model of the gaussian density map of each item of water quality detection data is constructed, and then the gaussian mixture model is reduced into a second eigenvector matrix through gaussian dispersion.
Further, the first feature matrix M 1 And the second feature matrix M 2 Performing fusion based on the label value scattering response weight, i.e. calculating the first feature matrix M respectively 1 And said second feature matrix M 2 As weights to fuse said first feature matrix M 1 And the second feature matrix M 2 The tag value scattering response factor is expressed as:
Figure BDA0003929429370000101
wherein j is a label value of the classifier, and f is the first feature matrix M 1 Or the second feature matrix M 2 And p is the probability value of the feature matrix M under the label.
In the application, considering the cross-dimension related expression of a first feature matrix to sample data and the Gaussian mixture model-based objective function enhanced expression of a second feature matrix to the sample data, the feature distribution of which has position sensitivity relative to a label value in the classification process, the feature distribution can be stacked into a depth structure in the solution space of the classification problem based on the feature value position and the label probability based on the scattering response of the feature value position relative to the label probability, so that the interpretability of the classification solution to the model feature extraction is expressed in a class response angle mode, and the first feature matrix M 1 And the second feature matrix M 2 The fusion effect of (2). And then, classifying the fused characteristic matrix as a classification characteristic matrix through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the quality of the water quality to be monitored meets the preset requirement.
Based on this, this application has provided an environmental water quality monitoring system, and it includes: a water quality detection data acquisition unit for acquiring water quality to be monitored at multiple preset timesThe multiple water quality detection data of the intermediate points comprise total nitrogen amount, ammonia nitrogen amount, total phosphorus amount, fecal colibacillus amount, dissolved oxygen amount, chemical oxygen demand and BOD 5 And electrical conductivity; the global semantic coding unit is used for enabling a plurality of items of water quality detection data of all the preset time points to pass through a context coder comprising an embedded layer respectively to obtain a plurality of characteristic vectors, and cascading the plurality of characteristic vectors to obtain first characteristic vectors corresponding to all the preset time points; the convolutional coding unit is used for performing two-dimensional arrangement on the first characteristic vectors of the preset time points to form a characteristic matrix and then obtaining the first characteristic matrix through a first convolutional neural network; the time sequence coding unit is used for enabling the sequence of the water quality detection data at the preset time points to pass through a time sequence coder comprising a one-dimensional convolution layer and a full connection layer so as to obtain second characteristic vectors corresponding to the water quality detection data; the water quality detection device comprises a Gaussian enhancement unit, a detection unit and a control unit, wherein the Gaussian enhancement unit is used for constructing a Gaussian density map of second eigenvectors of various items of water quality detection data, the mean vector of the Gaussian density map is the second eigenvector, and the value of each position in a covariance matrix of the Gaussian density map is the variance between the eigenvalues of each position in the second eigenvector; the water quality detection device comprises a Gaussian mixing unit, a data processing unit and a data processing unit, wherein the Gaussian mixing unit is used for constructing a Gaussian mixing model of a Gaussian density map of each item of water quality detection data, a mean vector of the Gaussian mixing model is a position-weighted sum of mean vectors of each Gaussian density map, and a covariance matrix of the Gaussian mixing model is a position-weighted sum of covariance matrices of each Gaussian density map; the Gaussian discretization unit is used for carrying out Gaussian discretization on the Gaussian mixture model to obtain a second feature matrix; a feature matrix fusion unit, configured to perform fusion based on a label value scattering response weight on the first feature matrix and the second feature matrix to obtain a classification feature matrix; and the monitoring result generating unit is used for enabling the classification characteristic matrix to pass through a classifier to obtain a classification result, and the classification result is used for indicating whether the quality of the water quality to be monitored meets a preset requirement or not.
FIG. 1 illustrates environmental water quality monitoring according to an embodiment of the present applicationAnd (5) an application scene diagram of the system. As shown in fig. 1, in this application scenario, first, a plurality of water quality detection data of water quality to be monitored at a plurality of predetermined time points are obtained through a water quality detector (e.g., T as illustrated in fig. 1) disposed in the water quality to be monitored (e.g., W as illustrated in fig. 1), the water quality detection data including total nitrogen amount, ammonia nitrogen amount, total phosphorus amount, fecal coliform amount, dissolved oxygen amount, chemical oxygen demand, BOD 5 And electrical conductivity. Then, the acquired multiple items of water quality detection data of the water quality to be monitored at multiple predetermined time points are input into a server (for example, a server S as illustrated in fig. 1) deployed with an environmental water quality monitoring algorithm, wherein the server can process the multiple items of water quality detection data of the water quality to be monitored at multiple predetermined time points by the environmental water quality monitoring algorithm to generate a classification result for indicating whether the quality of the water quality to be monitored meets preset requirements.
Having described the general principles of the present application, various non-limiting embodiments of the present application will now be described with reference to the accompanying drawings.
Exemplary System
Fig. 2 illustrates a block diagram of an environmental water quality monitoring system according to an embodiment of the application. As shown in fig. 2, an environmental water quality monitoring system 200 according to an embodiment of the present application includes: a water quality detection data acquisition unit 210 for acquiring multiple items of water quality detection data of water quality to be monitored at multiple predetermined time points, wherein the water quality detection data includes total nitrogen content, ammonia nitrogen content, total phosphorus content, fecal escherichia coli content, dissolved oxygen content, chemical oxygen demand, BOD 5 And electrical conductivity; a global semantic encoding unit 220, configured to pass multiple items of water quality detection data at each predetermined time point through a context encoder including an embedded layer to obtain multiple feature vectors, and cascade the multiple feature vectors to obtain a first feature vector corresponding to each predetermined time point; the convolutional encoding unit 230 is configured to perform two-dimensional arrangement on the first eigenvectors at each predetermined time point to obtain an eigenvector matrix, and then obtain a first eigenvector matrix through a first convolutional neural network; a time sequence encoding unit 240 for encoding the time sequenceA sequence of the water quality detection data at the preset time points passes through a time sequence encoder comprising a one-dimensional convolution layer and a full connection layer to obtain a second feature vector corresponding to the water quality detection data; a gaussian enhancement unit 250, configured to construct a gaussian density map of second eigenvectors of each item of the water quality detection data, where a mean vector of the gaussian density map is the second eigenvector, and a value of each position in a covariance matrix of the gaussian density map is a variance between eigenvalues of each position in the second eigenvector; the gaussian mixing unit 260 is configured to construct a gaussian mixture model of a gaussian density map of each item of the water quality detection data, a mean vector of the gaussian mixture model is a position-weighted sum of mean vectors of each gaussian density map, and a covariance matrix of the gaussian mixture model is a position-weighted sum of covariance matrices of each gaussian density map; a gaussian discretization unit 270, configured to perform gaussian discretization on the gaussian mixture model to obtain a second feature matrix; a feature matrix fusion unit 280, configured to perform fusion based on the label value scattering response weight on the first feature matrix and the second feature matrix to obtain a classification feature matrix; and a monitoring result generating unit 290, configured to pass the classification feature matrix through a classifier to obtain a classification result, where the classification result is used to indicate whether the quality of the water quality to be monitored meets a preset requirement.
Specifically, in this application embodiment, water quality testing data acquisition unit 210 with global semantic coding unit 220 for acquire the multinomial water quality testing data of quality of water at a plurality of predetermined time points of waiting to monitor, water quality testing data includes total nitrogen volume, ammonia nitrogen volume, total phosphorus volume, excrement escherichia coli volume, dissolved oxygen volume, chemical oxygen demand, BOD5 and conductivity, and will each the multinomial water quality testing data of predetermined time point is respectively through the context encoder that contains the embedding layer in order to obtain a plurality of eigenvectors, and will a plurality of eigenvectors cascade in order to obtain and correspond to each the first eigenvector of predetermined time point. As described above, some technical solutions for water quality detection exist, but these technical solutions have some defects, for example, the water quality detection only considers some water quality components on one side, and does not consider the dynamic requirements of the water quality detection, that is, the water quality can dynamically change along with the time shift. Therefore, in the technical scheme of this application, expect to construct the water quality testing scheme from the characteristic level fusion of multiple source data to carry out more comprehensive dynamic verification to quality of water, and then guarantee the safety of quality of water.
That is, specifically, in the technical scheme of this application, at first through the water quality testing data of the water quality detector who disposes in treating monitoring quality of water extraction a plurality of predetermined time points, water quality testing data include total nitrogen, ammonia nitrogen, total phosphorus, excrement escherichia coli, dissolved oxygen, chemical oxygen demand, BOD 5 And electrical conductivity. It should be understood that, considering the existence of the correlation between the various items of water quality composition data, the context encoder comprising the embedded layer is further used for encoding the water quality detection data of the various preset time points so as to extract the high-dimensional semantic features based on the whole situation among the various items of water quality detection data so as to be more suitable for the intrinsic mode features for representing the water quality. In a specific example, in the encoding process of the context encoder, it first uses an embedding layer to map the items of water quality detection data into embedding vectors, that is, uses the embedding layer to map the items of water quality detection data into the same vector space. Then, the context coding uses a converter to perform global context semantic-based coding on the obtained sequence of embedded vectors to generate the first feature vector.
More specifically, in an embodiment of the present application, the global semantic encoding unit is further configured to: converting the multiple items of water quality detection data of each preset time point into input vectors by using the embedding layer of the context encoder model containing the embedding layer so as to obtain a sequence of the input vectors; performing global context-based semantic encoding on the sequence of input vectors using a converter of the context encoder model including an embedded layer to obtain the plurality of feature vectors; and concatenating the plurality of feature vectors to obtain the first feature vector corresponding to each of the predetermined time points.
Specifically, in this embodiment of the application, the convolutional encoding unit 230 and the time-series encoding unit 240 are configured to two-dimensionally arrange the first eigenvectors of each of the predetermined time points into an eigenvector matrix, and then pass through a first convolutional neural network to obtain a first eigenvector matrix, and pass through a time-series encoder including a one-dimensional convolutional layer and a full link layer in a sequence of the plurality of predetermined time points to obtain a second eigenvector corresponding to each item of the water quality testing data. It should be understood that, in consideration of the law that water quality has dynamics in the time dimension, in the technical solution of the present application, further, a convolutional neural network is used to encode a feature matrix obtained by two-dimensionally arranging the first feature vectors of the respective predetermined time points to extract the variation feature of the water quality feature in the time sequence dimension. Accordingly, in one particular example, input data is convolved, pooled along a channel dimension, and activated in forward pass of layers with layers of the first convolutional neural network to generate the first feature matrix from a last layer of the first convolutional neural network, wherein an input of the first layer of the first convolutional neural network is the feature matrix.
It should be understood that the dynamic law of water quality in the time dimension exists not only in the global characteristic representation of the water quality, but also in each item of water quality detection data. Therefore, in the technical scheme of the application, in order to more fully extract the implicit law of the dynamic change of the water quality, the sequence of each item of water quality detection data at the plurality of preset time points passes through a time sequence encoder comprising a one-dimensional convolution layer and a full connection layer. Accordingly, in a specific example, the time-series encoder is composed of a full-connection layer and a one-dimensional convolution layer which are alternately arranged, and the correlation of each item of water quality detection data in a time-series dimension is extracted through the one-dimensional convolution coding, and the high-dimensional implicit characteristics of each item of water quality data are extracted through the full-connection coding.
More specifically, in the embodiment of the present application, the time-series encoding unit is further used for: arranging the sequence of the water quality detection data at the preset time points into a one-dimensional water quality input vector according to the time dimension; using a full-connection layer of the time sequence encoder to perform full-connection encoding on the water quality input vector by using the following formula so as to extract high-dimensional implicit characteristics of characteristic values of all positions in the water quality input vector, wherein the formula is as follows:
Figure BDA0003929429370000141
wherein X is the input vector, Y is the output vector, W is the weight matrix, B is the offset vector, and B is the->
Figure BDA0003929429370000142
Represents a matrix multiplication; performing one-dimensional convolutional coding on the water quality input vector by using a one-dimensional convolutional layer of the time sequence encoder according to the following formula so as to extract high-dimensional implicit correlation characteristics among characteristic values of all positions in the water quality input vector, wherein the formula is as follows:
Figure BDA0003929429370000143
wherein, a is the width of the convolution kernel in the x direction, F is the parameter vector of the convolution kernel, G is the local vector matrix operated with the convolution kernel function, and w is the size of the convolution kernel.
Specifically, in this embodiment of the application, the gaussian enhancement unit 250, the gaussian mixture unit 260 and the gaussian discrete unit 270 are used for constructing each item the gaussian density map of the second eigenvector of the water quality testing data, the mean vector of the gaussian density map is the second eigenvector, the value of each position in the covariance matrix of the gaussian density map is the variance between the eigenvalues of each position in the second eigenvector, and each item is constructed the gaussian mixture model of the gaussian density map of the water quality testing data, the mean vector of the gaussian mixture model is each the position-weighted sum of the mean vector of the gaussian density map, the covariance matrix of the gaussian mixture model is each the position-weighted sum of the covariance matrix of the gaussian density map, and then the gaussian mixture model is subjected to gaussian discretization to obtain the second eigenvector. It should be understood that, considering that the second feature vector of each of the water quality detection data corresponds to a feature distribution manifold in the high-dimensional feature space, and these feature distribution manifolds correspond to irregular shapes and scattering positions of themselves, if the global feature representation of each item of water quality data is represented by cascading only the feature vectors of each item of numerical detection data, it would be equivalent to simply superimposing these feature distribution manifolds in the original positions and shapes, so that the boundaries of the newly obtained feature distribution manifolds become very irregular and complex, and when an optimal point is found by gradient descent, it is very easy to fall into a local extreme point and a global optimal point cannot be obtained. Therefore, in the technical solution of the present application, it is further necessary to appropriately fuse the feature vectors of the water quality detection data so that the respective feature distributions can be converged on the profile with respect to each other.
And the Gaussian density map is widely used for estimation based on a priori target posterior in deep learning, so that the Gaussian density map can be used for correcting data distribution, and the purpose is achieved. Specifically, in the technical scheme of the application, firstly, a gaussian density map of a second feature vector of each item of water quality detection data is constructed based on Gao Sigao s
Figure BDA0003929429370000151
Where μ is the second eigenvector and Σ is the variance between the values of each position in the covariance matrix of each of the gaussian density maps being the eigenvalues of each position in the second eigenvector. And then constructing a Gaussian mixture model of a Gaussian density map of each item of water quality detection data, and then reducing the dimension of the Gaussian mixture model into a second feature matrix through Gaussian dispersion.
More specifically, in this embodiment of the present application, the gaussian mixing unit is further configured to: constructing the Gaussian mixture model of the Gaussian density map of the water quality detection data according to the following formula:
Figure BDA0003929429370000152
Figure BDA0003929429370000153
wherein x i A position-weighted sum, Σ, of the mean vectors for each of said Gaussian density maps i A position-wise weighted sum of covariance matrices for each of the Gaussian density maps.
Specifically, in this embodiment of the application, the feature matrix fusion unit 280 is configured to perform fusion on the first feature matrix and the second feature matrix based on a label value scattering response weight to obtain a classification feature matrix. It should be appreciated that, further, the classification determination may be made by fusing the first feature matrix and the second feature matrix. However, considering that the feature distribution of the features in the feature space has position sensitivity relative to the label value in the classification process, the label value scattering response factors of the first feature matrix and the second feature matrix are respectively calculated and fused as the weighting coefficients of the label value scattering response factors.
More specifically, in this embodiment of the present application, the feature matrix fusion unit includes:
a first weighting coefficient determining subunit, configured to calculate a label value scattering response factor of the first feature matrix as a first weighting coefficient according to the following formula;
wherein the formula is:
Figure BDA0003929429370000161
wherein, M 1 Is the first feature matrix, f 1 Is the first feature matrix M 1 Characteristic value, p, of each position of 1 Is said first feature matrix M 1 Probability value under label obtained by classifier alone, j is the classifierA tag value of, and w 1 Is the first weighting coefficient;
a second weighting coefficient determination subunit for calculating a label value scattering response factor of the second feature matrix as a first weighting coefficient by the following formula;
wherein the formula is:
Figure BDA0003929429370000162
wherein M is 2 Is the second feature matrix, f 2 Is the second feature matrix M 2 Characteristic value, p, of each position of 2 Is said second feature matrix M 2 Probability values under labels obtained by a classifier alone, j being the label value of the classifier, and w 2 Is the second weighting factor; and
and the fusion subunit is used for calculating the weighted sum of the first feature matrix and the second feature matrix according to the position by taking the first weighting coefficient and the second weighting coefficient as weighting coefficients to obtain the classification feature matrix. It should be understood that, considering the cross-dimension related expression of the first feature matrix to the sample data and the objective function enhanced expression of the second feature matrix to the sample data based on the gaussian mixture model, the feature distribution of which has position sensitivity relative to the label value in the classification process, the feature distribution can be stacked as a depth structure in the solution space of the classification problem based on the feature value position relative to the label probability based on the scattering response of the feature value position relative to the label probability, so as to represent the interpretability of the classification solution to the model feature extraction in the form of a class response angle, thereby promoting the first feature matrix M 1 And the second feature matrix M 2 The fusion effect of (1).
Specifically, in the embodiment of the present application, the monitoring result generating unit 290 is configured to pass the classification feature matrix through a classifier to obtain a classification result, where the classification result is used to indicate whether the quality of the water quality to be monitored meets a preset requirement. That is, in the solution of the present application, then, by combiningAnd the third characteristic matrix is used as a classification characteristic matrix to be classified through a classifier so as to obtain a classification result for indicating whether the quality of the water quality to be monitored meets the preset requirement. Accordingly, in one specific example, the classifier processes the classification feature matrix to generate a classification result according to the following formula: softmax { (W) n ,B n ):…:(W 1 ,B 1 ) L Project (F) }, where Project (F) denotes the projection of the classification feature matrix as a vector, W 1 To W n As a weight matrix for each fully connected layer, B 1 To B n A bias matrix representing the fully connected layers of each layer.
In summary, the environmental water quality monitoring system 200 according to the embodiment of the present application is illustrated, which extracts global-based high-dimensional semantic features among various items of water quality detection data through a context encoder to better characterize the intrinsic mode features of the water quality, and extracts the implicit laws of dynamic changes of the water quality by using a convolutional neural network model and a time sequence encoder, so as to perform feature fusion through a gaussian density map and a gaussian mixture model, and considering that the feature distribution of features in a feature space has position sensitivity relative to a tag value in a classification process, tag value scattering response factors of a first feature matrix and a second feature matrix are respectively calculated and are used as weighting coefficients of the first feature matrix and the second feature matrix for fusion, thereby improving the fusion effect of the first feature matrix and the second feature matrix. Through such a mode, can carry out more comprehensive dynamic verification to quality of water, and then guarantee quality of water safety.
As described above, the environmental water quality monitoring system 200 according to the embodiment of the present application can be implemented in various terminal devices, such as a server of an environmental water quality monitoring algorithm. In one example, the environmental water quality monitoring system 200 according to the embodiment of the present application may be integrated into a terminal device as a software module and/or a hardware module. For example, the environmental water quality monitoring system 200 may be a software module in the operating system of the terminal device, or may be an application developed for the terminal device; of course, the environmental water quality monitoring system 200 may also be one of many hardware modules of the terminal device.
Alternatively, in another example, the environmental water quality monitoring system 200 and the terminal device may be separate devices, and the environmental water quality monitoring system 200 may be connected to the terminal device through a wired and/or wireless network and transmit the interactive information according to an agreed data format.
Exemplary method
Fig. 3 illustrates a flow chart of a monitoring method of the environmental water quality monitoring system. As shown in fig. 3, the monitoring method of the environmental water quality monitoring system according to the embodiment of the present application includes the steps of: s110, acquiring multiple water quality detection data of water quality to be monitored at multiple preset time points, wherein the water quality detection data comprise total nitrogen content, ammonia nitrogen content, total phosphorus content, fecal colibacillus content, dissolved oxygen content, chemical oxygen demand and BOD 5 And electrical conductivity; s120, enabling the multiple items of water quality detection data of the preset time points to pass through a context encoder comprising an embedded layer to obtain multiple characteristic vectors, and cascading the multiple characteristic vectors to obtain first characteristic vectors corresponding to the preset time points; s130, two-dimensionally arranging the first eigenvectors of the preset time points into an eigenvector matrix, and then obtaining a first eigenvector matrix through a first convolutional neural network; s140, enabling the sequence of the water quality detection data at the preset time points to pass through a time sequence encoder comprising a one-dimensional convolution layer and a full connection layer to obtain second feature vectors corresponding to the water quality detection data; s150, constructing a Gaussian density map of second characteristic vectors of all the water quality detection data, wherein the mean vector of the Gaussian density map is the second characteristic vector, and the value of each position in a covariance matrix of the Gaussian density map is the variance between the characteristic values of each position in the second characteristic vector; s160, constructing a Gaussian mixture model of the Gaussian density map of each item of water quality detection data, wherein the mean vector of the Gaussian mixture model is the position-weighted sum of the mean vectors of the Gaussian density maps, and the covariance matrix of the Gaussian mixture model is the covariance of the Gaussian density mapsA position-weighted sum of the variance matrices; s170, carrying out Gaussian discretization on the Gaussian mixture model to obtain a second feature matrix; s180, fusing the first feature matrix and the second feature matrix based on a label value scattering response weight to obtain a classification feature matrix; and S190, enabling the classification characteristic matrix to pass through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the quality of the water quality to be monitored meets a preset requirement.
Fig. 4 illustrates an architecture diagram of a monitoring method of an environmental water quality monitoring system according to an embodiment of the present application. As shown in fig. 4, in the network architecture of the monitoring method of the environmental water quality monitoring system, first, a plurality of items of water quality detection data (for example, P1 as illustrated in fig. 4) at each of the predetermined time points are respectively passed through a context encoder (for example, E1 as illustrated in fig. 4) including an embedded layer to obtain a plurality of eigenvectors (for example, VF1 as illustrated in fig. 4), and the plurality of eigenvectors are concatenated to obtain a first eigenvector (for example, VF2 as illustrated in fig. 4) corresponding to each of the predetermined time points; then, two-dimensionally arranging the first eigenvectors of each predetermined time point into an eigenvector matrix (e.g., MF as illustrated in fig. 4) and then passing through a first convolutional neural network (e.g., CNN as illustrated in fig. 4) to obtain a first eigenvector matrix (e.g., MF1 as illustrated in fig. 4); then, passing the sequence of the water quality detection data at the predetermined time points through a time-sequence encoder (e.g., E2 as illustrated in fig. 4) including a one-dimensional convolutional layer and a fully-connected layer to obtain a second eigenvector (e.g., VF3 as illustrated in fig. 4) corresponding to each of the water quality detection data; then, constructing a gaussian density map (for example, GD as illustrated in fig. 4) of second eigenvectors of each item of the water quality detection data; then, constructing a gaussian mixture model (e.g., GMM as illustrated in fig. 4) of a gaussian density map of each item of the water quality detection data; then, gaussian discretizing the gaussian mixture model to obtain a second feature matrix (e.g., MF2 as illustrated in fig. 4); then, performing label-value-based fusion of scattering response weights on the first feature matrix and the second feature matrix to obtain a classification feature matrix (e.g., M as illustrated in fig. 4); and finally, passing the classification feature matrix through a classifier (e.g., a classifier as illustrated in fig. 4) to obtain a classification result, wherein the classification result is used for indicating whether the quality of the water quality to be monitored meets a preset requirement.
In summary, the monitoring method of the environmental water quality monitoring system according to the embodiment of the present application is clarified, which extracts global-based high-dimensional semantic features among various items of water quality detection data through a context encoder to better characterize the intrinsic mode features of the water quality, and extracts the dynamic change implicit law of the water quality by using a convolutional neural network model and a time sequence encoder, so as to perform feature fusion through a gaussian density map and a gaussian mixture model, and considering that the feature distribution of features in a feature space has position sensitivity relative to a tag value in a classification process, tag value scattering response factors of a first feature matrix and a second feature matrix are respectively calculated and fused as weighting coefficients thereof, thereby improving the fusion effect of the first feature matrix and the second feature matrix. Through such a mode, can carry out more comprehensive dynamic verification to quality of water, and then guarantee quality of water safety.
The foregoing describes the general principles of the present application in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present application are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present application. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the foregoing disclosure is not intended to be exhaustive or to limit the disclosure to the precise details disclosed.
The block diagrams of devices, apparatuses, systems referred to in this application are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
It should also be noted that in the devices, apparatuses, and methods of the present application, the components or steps may be decomposed and/or recombined. These decompositions and/or recombinations should be considered as equivalents of the present application.

Claims (10)

1. An environmental water quality monitoring system, its characterized in that includes:
a water quality detection data acquisition unit for acquiring multiple items of water quality detection data of water quality to be monitored at multiple preset time points, wherein the water quality detection data comprises total nitrogen content, ammonia nitrogen content, total phosphorus content, fecal escherichia coli content, dissolved oxygen content, chemical Oxygen Demand (COD) and Biochemical Oxygen Demand (BOD) 5 And electrical conductivity;
the global semantic coding unit is used for enabling a plurality of items of water quality detection data of all the preset time points to pass through a context coder comprising an embedded layer respectively to obtain a plurality of characteristic vectors, and cascading the plurality of characteristic vectors to obtain first characteristic vectors corresponding to all the preset time points;
the convolutional coding unit is used for performing two-dimensional arrangement on the first characteristic vectors of the preset time points to form a characteristic matrix and then obtaining the first characteristic matrix through a first convolutional neural network;
the time sequence coding unit is used for enabling the sequence of the water quality detection data at the preset time points to pass through a time sequence coder comprising a one-dimensional convolution layer and a full connection layer so as to obtain second characteristic vectors corresponding to the water quality detection data;
the water quality detection device comprises a Gaussian enhancement unit, a detection unit and a control unit, wherein the Gaussian enhancement unit is used for constructing a Gaussian density map of second eigenvectors of various items of water quality detection data, the mean vector of the Gaussian density map is the second eigenvector, and the value of each position in a covariance matrix of the Gaussian density map is the variance between the eigenvalues of each position in the second eigenvector;
the water quality detection device comprises a Gaussian mixing unit, a data processing unit and a data processing unit, wherein the Gaussian mixing unit is used for constructing a Gaussian mixing model of a Gaussian density map of each item of water quality detection data, a mean vector of the Gaussian mixing model is a position-weighted sum of mean vectors of each Gaussian density map, and a covariance matrix of the Gaussian mixing model is a position-weighted sum of covariance matrices of each Gaussian density map;
the Gaussian discretization unit is used for carrying out Gaussian discretization on the Gaussian mixture model to obtain a second feature matrix;
a feature matrix fusion unit, configured to perform fusion based on a label value scattering response weight on the first feature matrix and the second feature matrix to obtain a classification feature matrix; and
and the monitoring result generating unit is used for enabling the classification characteristic matrix to pass through a classifier to obtain a classification result, and the classification result is used for indicating whether the quality of the water quality to be monitored meets a preset requirement or not.
2. The environmental water quality monitoring system according to claim 1, wherein the global semantic coding unit is further configured to:
converting the multiple items of water quality detection data of each preset time point into input vectors by using the embedding layer of the context encoder model containing the embedding layer so as to obtain a sequence of the input vectors; performing global context-based semantic encoding on the sequence of input vectors using a converter of the context encoder model including an embedded layer to obtain the plurality of feature vectors; and concatenating the plurality of feature vectors to obtain the first feature vector corresponding to each of the predetermined time points.
3. The ambient water quality monitoring system according to claim 2, wherein the convolutional encoding unit is further configured to: two-dimensionally arranging the first eigenvectors of each preset time point into the eigenvector matrix; performing convolution processing, pooling along channel dimensions, and activation processing on input data in forward pass of layers using layers of the first convolutional neural network to generate the first feature matrix from a last layer of the first convolutional neural network, wherein an input of the first layer of the first convolutional neural network is the feature matrix.
4. The environmental water quality monitoring system of claim 3, wherein the time-series encoding unit is further configured to: arranging the sequence of the water quality detection data at the preset time points into a one-dimensional water quality input vector according to the time dimension; using a full-connection layer of the time sequence encoder to perform full-connection encoding on the water quality input vector by using the following formula so as to extract high-dimensional implicit characteristics of characteristic values of all positions in the water quality input vector, wherein the formula is as follows:
Figure FDA0003929429360000021
wherein X is the input vector, Y is the output vector, W is the weight matrix, B is the offset vector, and B is the->
Figure FDA0003929429360000022
Represents a matrix multiplication; performing one-dimensional convolutional coding on the water quality input vector by using a one-dimensional convolutional layer of the time sequence encoder according to the following formula so as to extract high-dimensional implicit correlation characteristics among characteristic values of all positions in the water quality input vector, wherein the formula is as follows:
Figure FDA0003929429360000023
wherein, a is the width of the convolution kernel in the x direction, F is the parameter vector of the convolution kernel, G is the local vector matrix operated with the convolution kernel function, and w is the size of the convolution kernel.
5. The ambient water quality monitoring system according to claim 4,
the Gaussian enhancement unit is further used for: constructing the Gaussian density map of the second eigenvector of each item of the water quality detection data by the following formula:
Figure FDA0003929429360000024
wherein μ is the second eigenvector, and Σ is a variance between the values of each position in the covariance matrix of each of the gaussian density maps being the eigenvalues of each position in the second eigenvector;
the Gaussian mixture unit is further configured to: constructing the Gaussian mixture model of the Gaussian density map of the water quality detection data according to the following formula:
Figure FDA0003929429360000031
Figure FDA0003929429360000032
wherein x i A position-wise weighted sum, Σ, of the mean vectors of the respective said Gaussian density maps i A position-wise weighted sum of covariance matrices for each of the Gaussian density maps.
6. The environmental water quality monitoring system according to claim 5, wherein the feature matrix fusion unit includes:
a first weighting coefficient determining subunit, configured to calculate a label value scattering response factor of the first feature matrix as a first weighting coefficient according to the following formula;
wherein the formula is:
Figure FDA0003929429360000033
wherein M is 1 Is the first feature matrix, f 1 Is the first feature matrix M 1 Characteristic value, p, of each position of 1 Is said first feature matrix M 1 Probability values under labels obtained by a classifier alone, j being the label value of the classifier, and w 1 Is the first weighting coefficient;
a second weighting coefficient determining subunit, configured to calculate a label value scattering response factor of the second feature matrix as a first weighting coefficient according to the following formula;
wherein the formula is:
Figure FDA0003929429360000034
wherein M is 2 Is the second feature matrix, f 2 Is the second feature matrix M 2 Characteristic value, p, of each position of 2 Is said second feature matrix M 2 Probability values under labels obtained by a classifier alone, j being the label value of the classifier, and w 2 Is the second weighting factor; and
and the fusion subunit is used for calculating the weighted sum of the first feature matrix and the second feature matrix according to the position by taking the first weighting coefficient and the second weighting coefficient as weighting coefficients to obtain the classification feature matrix.
7. The ambient water quality monitoring system according to claim 6, wherein the monitoring result generating unit is further configured to: the classifier processes the classification feature matrix to generate a classification result according to the following formula, wherein the formula is as follows: softmax { (W) n ,B n ):…:(W 1 ,B 1 ) L Project (F) }, where Project (F) denotes the projection of the classification feature matrix as a vector, W 1 To W n As a weight matrix for each fully connected layer, B 1 To B n Indicating deviation of all connected layers of each layerAnd (5) arranging a matrix.
8. A monitoring method of an environmental water quality monitoring system is characterized by comprising the following steps:
acquiring multiple items of water quality detection data of water quality to be monitored at multiple preset time points, wherein the water quality detection data comprise total nitrogen content, ammonia nitrogen content, total phosphorus content, fecal colibacillus content, dissolved oxygen content, chemical oxygen demand and BOD (biochemical oxygen demand) 5 And electrical conductivity;
respectively passing the multiple items of water quality detection data of each preset time point through a context encoder comprising an embedded layer to obtain multiple characteristic vectors, and cascading the multiple characteristic vectors to obtain first characteristic vectors corresponding to each preset time point;
after the first eigenvectors of the preset time points are two-dimensionally arranged into an eigenvector matrix, a first characteristic matrix is obtained through a first convolution neural network;
enabling the sequence of the water quality detection data at the preset time points to pass through a time sequence encoder comprising a one-dimensional convolution layer and a full connection layer to obtain a second feature vector corresponding to the water quality detection data;
constructing a Gaussian density map of second eigenvectors of each item of water quality detection data, wherein a mean vector of the Gaussian density map is the second eigenvector, and values of all positions in a covariance matrix of the Gaussian density map are variances among eigenvalues of all positions in the second eigenvector;
constructing a Gaussian mixture model of the Gaussian density maps of the water quality detection data, wherein the mean vector of the Gaussian mixture model is the position-weighted sum of the mean vectors of the Gaussian density maps, and the covariance matrix of the Gaussian mixture model is the position-weighted sum of the covariance matrices of the Gaussian density maps;
performing Gaussian discretization on the Gaussian mixture model to obtain a second feature matrix;
fusing the first characteristic matrix and the second characteristic matrix based on a label value scattering response weight to obtain a classification characteristic matrix; and
and passing the classification characteristic matrix through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the quality of the water quality to be monitored meets a preset requirement or not.
9. The method for monitoring the environmental water quality monitoring system according to claim 8, wherein the step of passing the plurality of items of water quality detection data of each predetermined time point through a context encoder comprising an embedded layer to obtain a plurality of feature vectors, and cascading the plurality of feature vectors to obtain a first feature vector corresponding to each predetermined time point comprises the steps of:
converting the multiple items of water quality detection data of each preset time point into input vectors by using the embedding layer of the context encoder model containing the embedding layer so as to obtain a sequence of the input vectors;
performing global context-based semantic encoding on the sequence of input vectors using a converter of the context encoder model including an embedded layer to obtain the plurality of feature vectors; and
concatenating the plurality of feature vectors to obtain the first feature vector corresponding to each of the predetermined time points.
10. The monitoring method of the environmental water quality monitoring system according to claim 9, wherein the two-dimensionally arranging the first eigenvector of each of the predetermined time points into an eigenvector matrix and then obtaining the first eigenvector matrix through a first convolutional neural network comprises:
two-dimensionally arranging the first eigenvectors of each preset time point into the eigenvector matrix;
performing convolution processing, pooling along channel dimensions, and activation processing on input data in forward pass of layers using layers of the first convolutional neural network to generate the first feature matrix from a last layer of the first convolutional neural network, wherein an input of the first layer of the first convolutional neural network is the feature matrix.
CN202211385215.0A 2022-11-07 2022-11-07 Environmental water quality monitoring system and monitoring method thereof Withdrawn CN115935276A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211385215.0A CN115935276A (en) 2022-11-07 2022-11-07 Environmental water quality monitoring system and monitoring method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211385215.0A CN115935276A (en) 2022-11-07 2022-11-07 Environmental water quality monitoring system and monitoring method thereof

Publications (1)

Publication Number Publication Date
CN115935276A true CN115935276A (en) 2023-04-07

Family

ID=86698429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211385215.0A Withdrawn CN115935276A (en) 2022-11-07 2022-11-07 Environmental water quality monitoring system and monitoring method thereof

Country Status (1)

Country Link
CN (1) CN115935276A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116321620A (en) * 2023-05-11 2023-06-23 杭州行至云起科技有限公司 Intelligent lighting switch control system and method thereof
CN117612110A (en) * 2023-12-13 2024-02-27 安徽省川佰科技有限公司 Hearth flame intelligent monitoring system and method based on computer vision technology

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116321620A (en) * 2023-05-11 2023-06-23 杭州行至云起科技有限公司 Intelligent lighting switch control system and method thereof
CN116321620B (en) * 2023-05-11 2023-08-11 杭州行至云起科技有限公司 Intelligent lighting switch control system and method thereof
CN117612110A (en) * 2023-12-13 2024-02-27 安徽省川佰科技有限公司 Hearth flame intelligent monitoring system and method based on computer vision technology
CN117612110B (en) * 2023-12-13 2024-05-14 安徽省川佰科技有限公司 Hearth flame intelligent monitoring system and method based on computer vision technology

Similar Documents

Publication Publication Date Title
CN112116030B (en) Image classification method based on vector standardization and knowledge distillation
CN115935276A (en) Environmental water quality monitoring system and monitoring method thereof
CN115564203B (en) Equipment real-time performance evaluation system and method based on multidimensional data collaboration
CN115618296B (en) Dam monitoring time sequence data anomaly detection method based on graph attention network
CN115147655A (en) Oil gas gathering and transportation monitoring system and method thereof
CN115456789B (en) Abnormal transaction detection method and system based on transaction pattern recognition
CN113778894B (en) Method, device, equipment and storage medium for constructing test cases
CN116245513A (en) Automatic operation and maintenance system and method based on rule base
CN113723070A (en) Text similarity model training method, text similarity detection method and text similarity detection device
CN116151845A (en) Product full life cycle management system and method based on industrial Internet of things technology
CN116482524A (en) Power transmission and distribution switch state detection method and system
CN115219845A (en) Power grid fault diagnosis system and method
CN109617864B (en) Website identification method and website identification system
CN116402777B (en) Power equipment detection method and system based on machine vision
CN117231590A (en) Fault prediction system and method for hydraulic system
CN115456176B (en) Text matching method and system based on knowledge enhancement
CN115090200B (en) Automatic batching system for preparing electronic grade hydrofluoric acid and batching method thereof
CN116502705A (en) Knowledge distillation method and computer equipment for dual-purpose data set inside and outside domain
CN116722992A (en) Fraud website identification method and device based on multi-mode fusion
CN115588169A (en) Vehicle overweight running monitoring method and system based on axle data
CN115754199A (en) Water quality detection method based on membership function and principal component analysis
CN115788793A (en) Global monitoring and early warning method and system thereof
CN115309895A (en) Progress management system based on research and development project text description and management method thereof
CN115456259A (en) Wind power plant site selection optimization system and method based on mesoscale data
CN113392278A (en) Industrial internet-based equipment liquid pipeline flow detection method

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20230407

WW01 Invention patent application withdrawn after publication