CN117077075A - Water quality monitoring system and method for environmental protection - Google Patents

Water quality monitoring system and method for environmental protection Download PDF

Info

Publication number
CN117077075A
CN117077075A CN202310932351.5A CN202310932351A CN117077075A CN 117077075 A CN117077075 A CN 117077075A CN 202310932351 A CN202310932351 A CN 202310932351A CN 117077075 A CN117077075 A CN 117077075A
Authority
CN
China
Prior art keywords
water quality
feature vector
parameter
meteorological
time sequence
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
CN202310932351.5A
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.)
HUNAN SANLIAN ENVIRONMENTAL PROTECTION SCI-TECH CO LTD
Original Assignee
HUNAN SANLIAN ENVIRONMENTAL PROTECTION SCI-TECH 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 HUNAN SANLIAN ENVIRONMENTAL PROTECTION SCI-TECH CO LTD filed Critical HUNAN SANLIAN ENVIRONMENTAL PROTECTION SCI-TECH CO LTD
Priority to CN202310932351.5A priority Critical patent/CN117077075A/en
Publication of CN117077075A publication Critical patent/CN117077075A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Primary Health Care (AREA)
  • Marketing (AREA)
  • Human Resources & Organizations (AREA)
  • Computational Linguistics (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to the field of intelligent monitoring, and particularly discloses a water quality monitoring system and a water quality monitoring method for environmental protection.

Description

Water quality monitoring system and method for environmental protection
Technical Field
The application relates to the field of intelligent monitoring, and more particularly, to a water quality monitoring system for environmental protection and a method thereof.
Background
The water quality monitoring is an indispensable part of water pollution prevention and control, can assist and improve decision-making process, and ensures sustainable development of water resources. By monitoring the water quality change, effective treatment measures can be timely taken, diseases are prevented, the health of people is guaranteed, and social stability and sustainable development of economic environment are promoted. Because weather factors such as air temperature, sunshine hours and precipitation have obvious influence on water quality parameters such as ammonia nitrogen, nitrogen and phosphorus in sewage, the factors need to be considered in the water quality detection process. However, the current technology only depends on water quality data to judge whether sewage treatment and river treatment reach standards, and water quality cannot be monitored comprehensively.
Accordingly, an optimized water quality monitoring scheme for environmental protection is desired.
Disclosure of Invention
The present application has been made to solve the above-mentioned technical problems. The embodiment of the application provides a water quality monitoring system and a water quality monitoring method for environmental protection, which excavates the relevance characteristic distribution information of the time sequence dynamic change characteristics of gas data and the time sequence dynamic change characteristics of water quality parameter data by adopting a deep learning characteristic extractor, so as to accurately monitor the water quality in real time based on the time sequence collaborative relevance change characteristics of the two parameters, judge whether the water quality parameters of a water sample to be detected are abnormal or not, send early warning when abnormal water quality is detected, and effectively take treatment measures in time to protect the environment.
According to one aspect of the present application, there is provided a water quality monitoring method for environmental protection, comprising:
acquiring water quality parameters of detected water samples at a plurality of preset time points in a preset time period, and meteorological parameters at the preset time points;
arranging the water quality parameters of the detected water samples at a plurality of preset time points into water quality parameter input vectors according to the time dimension;
arranging the meteorological parameters of the plurality of preset time points into meteorological parameter input vectors according to a time dimension;
The water quality parameter input vector passes through a water quality parameter feature extractor comprising a first convolution layer and a second convolution layer to obtain a water quality parameter time sequence feature vector;
the meteorological parameter input vector passes through a meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a meteorological parameter time sequence feature vector;
fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector to obtain a classification feature vector; and
and the classification feature vector passes through a classifier to obtain a classification result, and the classification result is used for indicating whether the water quality parameter of the detected water sample is abnormal or not.
In the above water quality monitoring method for environmental protection, the step of passing the water quality parameter input vector through a water quality parameter feature extractor comprising a first convolution layer and a second convolution layer to obtain a water quality parameter time sequence feature vector comprises the following steps: inputting the water quality parameter input vector into a first convolution layer of the water quality parameter feature extractor to obtain a water quality parameter time sequence feature vector with a first neighborhood scale, wherein the first convolution layer is provided with a first one-dimensional convolution kernel with a first scale; inputting the water quality parameter input vector into a second convolution layer of the water quality parameter feature extractor to obtain a water quality parameter time sequence feature vector of a second neighborhood scale, wherein the second convolution layer is provided with a first one-dimensional convolution kernel of a second scale, and the first scale is different from the second scale; and cascading the first neighborhood scale water quality parameter time sequence feature vector and the second neighborhood scale water quality parameter time sequence feature vector to obtain the water quality parameter time sequence feature vector.
In the above water quality monitoring method for environmental protection, the step of passing the weather parameter input vector through a weather parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a weather parameter time sequence feature vector includes: inputting the meteorological parameter input vector into a third convolution layer of the meteorological parameter feature extractor to obtain a first neighborhood scale meteorological parameter time sequence feature vector, wherein the third convolution layer is provided with a second one-dimensional convolution kernel of a first scale; inputting the meteorological parameter input vector into a fourth convolution layer of the meteorological parameter feature extractor to obtain a second neighborhood scale meteorological parameter time sequence feature vector, wherein the second convolution layer is provided with a second one-dimensional convolution kernel of a second scale, and the first scale is different from the second scale; and cascading the first neighborhood scale weather parameter time sequence feature vector and the second neighborhood scale weather parameter time sequence feature vector to obtain the weather parameter time sequence feature vector.
In the above water quality monitoring method for environmental protection, fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector to obtain a classification feature vector comprises: fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector by using the following cascade formula to obtain the classification feature vector; wherein, the formula is:
V c =Concat[V 1 ,V 2 ]
Wherein V is 1 Representing the time sequence characteristic vector of the water quality parameter, V 2 Representing the timing characteristic vector of the meteorological parameters, concat [. Cndot.,. Cndot.)]Representing a cascade function, V c Representing the classification feature vector.
In the above water quality monitoring method for environmental protection, the classifying feature vector is passed through a classifier to obtain a classifying result, where the classifying result is used to indicate whether the water quality parameter of the detected water sample is abnormal, and the method includes: performing full-connection coding on the classification feature vectors by using a plurality of full-connection layers of the classifier to obtain coded classification feature vectors; and passing the coding classification feature vector through a Softmax classification function of the classifier to obtain the classification result.
The water quality monitoring method for environmental protection further comprises the training steps of: the water quality parameter feature extractor comprises a first convolution layer and a second convolution layer, the meteorological parameter feature extractor comprises a third convolution layer and a fourth convolution layer and the classifier is trained.
In the above water quality monitoring method for environmental protection, the training step includes: acquiring training data, wherein the training data comprises training water quality parameters of a detected water sample at a plurality of preset time points in a preset time period, training meteorological parameters at the preset time points and true values of whether the water quality parameters of the detected water sample are abnormal or not; arranging training water quality parameters of the detected water samples at a plurality of preset time points into training water quality parameter input vectors according to the time dimension; arranging the training meteorological parameters of the plurality of preset time points into training meteorological parameter input vectors according to a time dimension; the training water quality parameter input vector passes through the water quality parameter feature extractor comprising the first convolution layer and the second convolution layer to obtain a training water quality parameter time sequence feature vector; the training meteorological parameter input vector passes through the meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a training meteorological parameter time sequence feature vector; fusing the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector to obtain a training classification feature vector; passing the training classification feature vector through the classifier to obtain a classification loss function value; calculating the flow type refined loss function value of the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector; and training the water quality parameter feature extractor comprising the first and second convolution layers, the weather parameter feature extractor comprising the third and fourth convolution layers, and the classifier with a weighted sum of the classification loss function value and the stream refinement loss function value as a loss function value and by back propagation of gradient descent.
In the above water quality monitoring method for environmental protection, the step of passing the training classification feature vector through the classifier to obtain a classification loss function value includes: and calculating a cross entropy loss function value between the training classification result and a true value of whether the water quality parameter of the detected water sample is abnormal or not as the classification loss function value.
In the above water quality monitoring method for environmental protection, calculating the flow refinement loss function value of the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector includes: calculating the flow type refinement loss function value of the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector according to the following optimization formula; wherein, the optimization formula is:
wherein V is 1 Representing the time sequence characteristic vector of the training water quality parameter, V 2 Representing the time sequence feature vector of the training meteorological parameters,represents the square of the two norms of the vector, and +.>And +. >Representing the streaming refinement loss function value.
According to another aspect of the present application, there is provided a water quality monitoring system for environmental protection, comprising:
the water quality parameter acquisition module is used for acquiring water quality parameters of the detected water sample at a plurality of preset time points in a preset time period and meteorological parameters at the preset time points;
the first arrangement module is used for arranging the water quality parameters of the detected water samples at a plurality of preset time points into water quality parameter input vectors according to the time dimension;
the second arrangement module is used for arranging the meteorological parameters of the plurality of preset time points into meteorological parameter input vectors according to the time dimension;
the water quality parameter characteristic extraction module is used for enabling the water quality parameter input vector to pass through a water quality parameter characteristic extractor comprising a first convolution layer and a second convolution layer so as to obtain a water quality parameter time sequence characteristic vector;
the meteorological parameter characteristic extraction module is used for enabling the meteorological parameter input vector to pass through a meteorological parameter characteristic extractor comprising a third convolution layer and a fourth convolution layer to obtain a meteorological parameter time sequence characteristic vector;
the fusion module is used for fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector to obtain a classification feature vector; and
And the classification result generation module is used for enabling the classification feature vector to pass through a classifier to obtain a classification result, and the classification result is used for indicating whether the water quality parameter of the detected water sample is abnormal or not.
According to still another aspect of the present application, there is provided an electronic apparatus including: a processor; and a memory having stored therein computer program instructions that, when executed by the processor, cause the processor to perform the water quality monitoring method for environmental protection as described above.
According to a further aspect of the present application there is provided a computer readable medium having stored thereon computer program instructions which, when executed by a processor, cause the processor to perform a water quality monitoring method for environmental protection as described above.
Compared with the prior art, the water quality monitoring system and the water quality monitoring method for environmental protection provided by the application have the advantages that the correlation characteristic distribution information of the time sequence dynamic change characteristics of the air-phase data and the time sequence dynamic change characteristics of the water quality parameter data is mined by adopting the deep learning characteristic extractor, so that the water quality monitoring is accurately performed in real time based on the time sequence cooperative correlation change characteristics of the two parameters, whether the water quality parameters of the water sample to be detected are abnormal or not is judged, early warning is sent when abnormal water quality is detected, and treatment measures are effectively taken in time to protect the environment.
Drawings
The above and other objects, features and advantages of the present application will become more apparent by describing embodiments of the present application in more detail with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of embodiments of the application and are incorporated in and constitute a part of this specification, illustrate the application and together with the embodiments of the application, and not constitute a limitation to the application. In the drawings, like reference numerals generally refer to like parts or steps.
FIG. 1 is a flow chart of an inference phase in a water quality monitoring method for environmental protection according to an embodiment of the present application;
FIG. 2 is a flow chart of a training phase in a water quality monitoring method for environmental protection according to an embodiment of the present application;
FIG. 3 is a schematic diagram of the architecture of the inference phase in a water quality monitoring method for environmental protection according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a training phase of a water quality monitoring method for environmental protection according to an embodiment of the present application;
FIG. 5 is a flow chart of a water quality parameter feature extraction process in a water quality monitoring method for environmental protection according to an embodiment of the present application;
FIG. 6 is a flow chart of a classification process in a water quality monitoring method for environmental protection according to an embodiment of the present application;
FIG. 7 is a block diagram of a water quality monitoring system for environmental protection in accordance with an embodiment of the present application;
fig. 8 is a block diagram of an electronic device according to an embodiment of the application.
Detailed Description
Hereinafter, exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are only some embodiments of the present application and not all embodiments of the present application, and it should be understood that the present application is not limited by the example embodiments described herein.
Scene overview
As described in the foregoing background art, weather factors such as air temperature, sunshine hours and precipitation have significant influence on water quality parameters such as ammonia nitrogen, nitrogen and phosphorus in sewage, so that these factors need to be considered in the water quality detection process. However, the current technology only depends on water quality data to judge whether sewage treatment and river treatment reach standards, and water quality cannot be monitored comprehensively. Accordingly, an optimized water quality monitoring scheme for environmental protection is desired.
Accordingly, considering that weather factors have an important influence on water quality detection, in the technical scheme of the application, it is desirable to comprehensively perform water quality detection based on analysis of meteorological parameter data and water quality parameter data. However, since the water quality parameter and the meteorological parameter have dynamic change rules in the time dimension and the two parameters also influence each other, difficulty is brought to water quality monitoring. That is, in the process of actually performing water quality monitoring, the difficulty is how to mine the correlation characteristic distribution information of the time sequence dynamic change characteristics of the meteorological data and the time sequence dynamic change characteristics of the water quality parameter data, so as to accurately perform water quality monitoring in real time based on the time sequence cooperative correlation change characteristics of the two parameters, thereby judging whether the water quality parameters of the water sample to be detected are abnormal or not, sending out early warning when abnormal water quality is detected, and timely and effectively taking treatment measures to protect the environment.
In recent years, deep learning and neural networks have been widely used in the fields of computer vision, natural language processing, text signal processing, and the like. The development of deep learning and neural networks provides new solutions and schemes for mining the correlation characteristic distribution information of the time sequence dynamic change characteristics of the meteorological data and the time sequence dynamic change characteristics of the water quality parameter data.
Specifically, in the technical scheme of the application, firstly, the water quality parameters of the detected water sample at a plurality of preset time points in a preset time period and the meteorological parameters at the preset time points are obtained. Next, considering that since the water quality parameters of the detected water sample and the weather parameters have respective dynamic change regularity in the time dimension, in order to be able to monitor the water quality in real time, time sequence dynamic change characteristics of the two parameters need to be extracted, therefore, in the technical scheme of the application, the water quality parameters of the detected water sample at a plurality of preset time points are arranged as water quality parameter input vectors according to the time dimension so as to integrate distribution information of the water quality parameters of the detected water sample in time sequence; and arranging the meteorological parameters of the plurality of preset time points into meteorological parameter input vectors according to a time dimension so as to integrate the distribution information of the meteorological parameters on time sequence. Thus, the method is favorable for subsequent capturing and describing the time sequence dynamic change characteristics of the water quality parameter and the gas phase parameter.
Then, considering that for the water quality parameter and the meteorological parameter, since both parameter data have volatility and uncertainty in the time dimension, they exhibit different mode state change characteristics at different time period spans in time sequence. Therefore, in order to fully express the time sequence dynamic change characteristics of the water quality parameters and the meteorological parameters so as to improve the accuracy of water quality detection, in the technical scheme of the application, the water quality parameter input vector is passed through a water quality parameter characteristic extractor comprising a first convolution layer and a second convolution layer so as to obtain a water quality parameter time sequence characteristic vector. In particular, the first convolution layer and the second convolution layer adopt different one-dimensional convolution kernels to perform feature extraction of the water quality parameter, so as to extract multi-scale time sequence dynamic change feature information of the water quality parameter under different time spans.
Likewise, for the time sequence distribution information of the meteorological parameters, the meteorological parameter input vector is passed through a meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a meteorological parameter time sequence feature vector. In particular, the third convolution layer adopts a one-dimensional convolution kernel with a first scale, and the fourth convolution layer adopts a one-dimensional convolution kernel with a second scale, wherein the first scale is not equal to the second scale, so that multi-scale time sequence dynamic change characteristic information of the meteorological parameters under different time spans can be extracted.
Further, the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector are fused to fuse the time sequence multi-scale dynamic change feature of the water quality parameter and the time sequence multi-scale dynamic change feature of the meteorological parameter, so that a classification feature vector with relevance feature distribution information of the water quality parameter time sequence feature and the meteorological parameter time sequence feature is obtained, and then the classification feature vector is subjected to classification processing in a classifier to obtain a classification result used for indicating whether the water quality parameter of the detected water sample is abnormal.
That is, in the technical solution of the present application, the labels of the classifier include abnormality (first label) of the water quality parameter of the detected water sample, and no abnormality (second label) of the water quality parameter of the detected water sample, wherein the classifier determines to which classification label the classification feature vector belongs through a soft maximum function. It should be noted that the first tag p1 and the second tag p2 do not include a manually set concept, and in fact, during the training process, the computer model does not have a concept of "whether the water quality parameter of the detected water sample is abnormal", which is simply that there are two classification tags and the probability that the output feature is under the two classification tags, i.e. the sum of p1 and p2 is one. Therefore, the classification result of whether the water quality parameter of the detected water sample is abnormal is actually converted into the classified probability distribution conforming to the natural rule through the classification label, and the physical meaning of the natural probability distribution of the label is essentially used instead of the language text meaning of whether the water quality parameter of the detected water sample is abnormal. It should be understood that, in the technical scheme of the application, the classification label of the classifier is a detection judgment label for judging whether the water quality parameter of the detected water sample is abnormal, so that after the classification result is obtained, water quality detection can be performed based on the classification result, thereby giving out early warning when abnormal water quality is detected, and timely and effectively taking treatment measures to protect the environment.
In particular, in the technical scheme of the application, when the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector are fused to obtain the classification feature vector, the time sequence association feature of the water quality parameter expressed by the water quality parameter time sequence feature vector and the time sequence association feature of the meteorological parameter expressed by the meteorological parameter time sequence feature vector are mapped into a high-dimensional fusion feature space, so that if the correlation between the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector on the time sequence association feature expression and the fusion high-dimensional feature space expression can be improved, the expression effect of the classification feature vector can be improved.
Based on the above, the applicant of the present application further introduces a stream refinement loss function for the water quality parameter time series feature vector and the meteorological parameter time series feature vector in addition to the classification loss function based on the classification feature vector, expressed as:
wherein V is 1 And V 2 The water quality parameter time sequence characteristic vector and the meteorological parameter time sequence characteristic vector are respectively, andrepresenting the square of the two norms of the vector.
Here, the stream refinement loss function is based on the water quality parameter timing feature vector V 1 And the meteorological parameter time sequence feature vector V 2 In the conversion of time sequence streaming distribution to space distribution in high-dimensional fusion feature space, super-resolution improvement of space distribution in high-dimensional feature space is realized by interpolation under sequence distribution of vectors synchronously, so that finer alignment is provided for distribution difference in high-dimensional feature space by mutual probability relation under balanced sequence, and feature dimension are related in time sequenceAnd the cross dimension (cross-dimension) context correlation is jointly presented on the fused high-dimensional feature space dimension, so that the expression effect of the classification feature vector is improved, and the accuracy of the classification result obtained by the classification feature vector through the classifier is further improved. Therefore, the water quality monitoring can be performed in real time, so that whether the water quality parameters of the water sample to be detected are abnormal or not is judged, and early warning is sent out when the water quality is abnormal, and treatment measures are effectively taken in time to protect the environment.
Based on this, the application proposes a water quality monitoring method for environmental protection, comprising: acquiring water quality parameters of detected water samples at a plurality of preset time points in a preset time period, and meteorological parameters at the preset time points; arranging the water quality parameters of the detected water samples at a plurality of preset time points into water quality parameter input vectors according to the time dimension; arranging the meteorological parameters of the plurality of preset time points into meteorological parameter input vectors according to a time dimension; the water quality parameter input vector passes through a water quality parameter feature extractor comprising a first convolution layer and a second convolution layer to obtain a water quality parameter time sequence feature vector; the meteorological parameter input vector passes through a meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a meteorological parameter time sequence feature vector; fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector to obtain a classification feature vector; and the classification feature vector is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the water quality parameter of the detected water sample is abnormal or not.
Having described the basic principles of the present application, various non-limiting embodiments of the present application will now be described in detail with reference to the accompanying drawings.
Exemplary method
FIG. 1 is a flow chart of an inference phase in a water quality monitoring method for environmental protection according to an embodiment of the present application. As shown in fig. 1, a water quality monitoring method for environmental protection according to an embodiment of the present application includes: an inference phase comprising: s110, acquiring water quality parameters of detected water samples at a plurality of preset time points in a preset time period and meteorological parameters at the preset time points; s120, arranging the water quality parameters of the detected water samples at a plurality of preset time points into water quality parameter input vectors according to the time dimension; s130, arranging the meteorological parameters of the plurality of preset time points into meteorological parameter input vectors according to a time dimension; s140, the water quality parameter input vector passes through a water quality parameter feature extractor comprising a first convolution layer and a second convolution layer to obtain a water quality parameter time sequence feature vector; s150, passing the meteorological parameter input vector through a meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a meteorological parameter time sequence feature vector; s160, fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector to obtain a classification feature vector; and S170, the classification feature vector is passed through a classifier to obtain a classification result, and the classification result is used for indicating whether the water quality parameter of the detected water sample is abnormal or not.
FIG. 3 is a schematic diagram of the architecture of the inference phase in the water quality monitoring method for environmental protection according to an embodiment of the present application. As shown in fig. 3, in the inference phase, in the network structure, first, water quality parameters of the detected water sample at a plurality of predetermined time points within a predetermined period of time and weather parameters at the plurality of predetermined time points are acquired; then, arranging the water quality parameters of the detected water samples at a plurality of preset time points into water quality parameter input vectors according to the time dimension; arranging the meteorological parameters of the plurality of preset time points into meteorological parameter input vectors according to a time dimension; then, the water quality parameter input vector passes through a water quality parameter feature extractor comprising a first convolution layer and a second convolution layer to obtain a water quality parameter time sequence feature vector; the meteorological parameter input vector passes through a meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a meteorological parameter time sequence feature vector; then, fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector to obtain a classification feature vector; and then, the classification feature vector is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the water quality parameter of the detected water sample is abnormal or not.
Specifically, in step S110, water quality parameters of the detected water sample at a plurality of predetermined time points within a predetermined period of time and weather parameters at the plurality of predetermined time points are acquired. It should be appreciated that it is contemplated that weather factors have an important impact on water quality testing and therefore are desirable to incorporate the impact of weather factors during water quality testing. Therefore, in the technical scheme of the application, the water quality detection can be comprehensively carried out through analysis based on the meteorological parameter data and the water quality parameter data. In one example, first, water quality parameters of a detected water sample at a plurality of predetermined time points within a predetermined period of time are acquired, and weather parameters at the plurality of predetermined time points are acquired.
Specifically, in step S120 and step S130, the water quality parameters of the detected water samples at the plurality of predetermined time points are arranged as water quality parameter input vectors according to the time dimension; and arranging the meteorological parameters of the plurality of preset time points into meteorological parameter input vectors according to a time dimension. Considering that the water quality parameters of the detected water sample and the meteorological parameters have respective dynamic change regularity in the time dimension, in order to be capable of monitoring the water quality in real time, time sequence dynamic change characteristics of the parameters need to be extracted, therefore, in the technical scheme of the application, the water quality parameters of the detected water sample at a plurality of preset time points are arranged into water quality parameter input vectors according to the time dimension so as to integrate distribution information of the water quality parameters of the detected water sample in time sequence; and arranging the meteorological parameters of the plurality of preset time points into meteorological parameter input vectors according to a time dimension so as to integrate the distribution information of the meteorological parameters on time sequence. Thus, the method is favorable for subsequent capturing and describing the time sequence dynamic change characteristics of the water quality parameter and the gas phase parameter.
Specifically, in step S140, the water quality parameter input vector is passed through a water quality parameter feature extractor comprising a first convolution layer and a second convolution layer to obtain a water quality parameter time series feature vector. Considering that the water quality parameter has volatility and uncertainty in the time dimension, the water quality parameter presents different mode state change characteristics under different time period spans in time sequence. Therefore, in the technical scheme of the application, the water quality parameter input vector is passed through a water quality parameter feature extractor comprising a first convolution layer and a second convolution layer to obtain a water quality parameter time sequence feature vector. In particular, the first convolution layer and the second convolution layer adopt different one-dimensional convolution kernels to perform feature extraction of the water quality parameter, so as to extract multi-scale time sequence dynamic change feature information of the water quality parameter under different time spans.
Fig. 5 is a flowchart of a water quality parameter feature extraction process in a water quality monitoring method for environmental protection according to an embodiment of the present application. S210, inputting the water quality parameter input vector into a first convolution layer of the water quality parameter feature extractor to obtain a first neighborhood scale water quality parameter time sequence feature vector, wherein the first convolution layer is provided with a first one-dimensional convolution kernel of a first scale; s220, inputting the water quality parameter input vector into a second convolution layer of the water quality parameter feature extractor to obtain a water quality parameter time sequence feature vector with a second neighborhood scale, wherein the second convolution layer is provided with a first one-dimensional convolution kernel with a second scale, and the first scale is different from the second scale; and S230, cascading the first neighborhood scale water quality parameter time sequence feature vector and the second neighborhood scale water quality parameter time sequence feature vector to obtain the water quality parameter time sequence feature vector.
Specifically, in step S150, the weather parameter input vector is passed through a weather parameter feature extractor including a third convolution layer and a fourth convolution layer to obtain a weather parameter timing feature vector. Likewise, considering that meteorological parameters also have fluctuations and uncertainties in the time dimension, they exhibit different pattern state change characteristics over different time period spans in time sequence. Therefore, in order to improve the accuracy of water quality detection, in the technical scheme of the application, the meteorological parameter input vector is passed through a meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a meteorological parameter time sequence feature vector. In particular, the third convolution layer adopts a one-dimensional convolution kernel with a first scale, and the fourth convolution layer adopts a one-dimensional convolution kernel with a second scale, wherein the first scale is not equal to the second scale, so that multi-scale time sequence dynamic change characteristic information of the meteorological parameters under different time spans can be extracted. More specifically, inputting the meteorological parameter input vector into a third convolution layer of the meteorological parameter feature extractor to obtain a first neighborhood scale meteorological parameter time sequence feature vector, wherein the third convolution layer is provided with a second one-dimensional convolution kernel of a first scale; inputting the meteorological parameter input vector into a fourth convolution layer of the meteorological parameter feature extractor to obtain a second neighborhood scale meteorological parameter time sequence feature vector, wherein the second convolution layer is provided with a second one-dimensional convolution kernel of a second scale, and the first scale is different from the second scale; and cascading the first neighborhood scale weather parameter time sequence feature vector and the second neighborhood scale weather parameter time sequence feature vector to obtain the weather parameter time sequence feature vector.
Specifically, in step S160, the water quality parameter time sequence feature vector and the weather parameter time sequence feature vector are fused to obtain a classification feature vector. That is, after the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector are obtained, the water quality parameter time sequence multi-scale dynamic change feature and the meteorological parameter time sequence multi-scale dynamic change feature are fused by further carrying out feature fusion on the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector, so that the classification feature vector with the correlation feature distribution information of the water quality parameter time sequence feature and the meteorological parameter time sequence feature is obtained. In a specific example of the present application, the fusion may be performed in a cascade manner, more specifically, the water quality parameter time series feature vector and the meteorological parameter time series feature vector are fused in the following cascade formula to obtain the classification feature vector; wherein, the formula is: v (V) c =Concat[V 1 ,V 2 ]Wherein V is 1 Representing the time sequence characteristic vector of the water quality parameter, V 2 Representing the timing characteristic vector of the meteorological parameters, concat [. Cndot.,. Cndot.)]Representing a cascade function, V c Representing the classification feature vector.
Specifically, in step S170, the classification feature vector is passed through a classifier to obtain a classification result, where the classification result is used to indicate whether the water quality parameter of the detected water sample is abnormal. After the classification feature vector is obtained, the classification feature vector is further passed through a classifier to obtain a classification result for indicating whether the water quality parameter of the detected water sample is abnormal, specifically, the classifier comprises a plurality of full-connection layers and a Softmax layer cascaded with the last full-connection layer of the plurality of full-connection layers. In the classification processing of the classifier, multiple full-connection encoding is carried out on the classification feature vectors by using multiple full-connection layers of the classifier to obtain encoded classification feature vectors; further, the encoded classification feature vector is input to a Softmax layer of the classifier, i.e., the encoded classification feature vector is classified using the Softmax classification function to obtain a classification label. In the technical scheme of the application, the labels of the classifier comprise abnormality (first label) of the water quality parameters of the detected water sample and no abnormality (second label) of the water quality parameters of the detected water sample, wherein the classifier determines which classification label the classification feature vector belongs to through a soft maximum function. It should be noted that the first tag p1 and the second tag p2 do not include a manually set concept, and in fact, during the training process, the computer model does not have a concept of "whether the water quality parameter of the detected water sample is abnormal", which is simply that there are two classification tags and the probability that the output feature is under the two classification tags, i.e. the sum of p1 and p2 is one. Therefore, the classification result of whether the water quality parameter of the detected water sample is abnormal is actually converted into the classified probability distribution conforming to the natural rule through the classification label, and the physical meaning of the natural probability distribution of the label is essentially used instead of the language text meaning of whether the water quality parameter of the detected water sample is abnormal. It should be understood that, in the technical scheme of the application, the classification label of the classifier is a detection judgment label for judging whether the water quality parameter of the detected water sample is abnormal, so that after the classification result is obtained, water quality detection can be performed based on the classification result, thereby giving out early warning when abnormal water quality is detected, and timely and effectively taking treatment measures to protect the environment.
FIG. 6 is a flow chart of a classification process in a water quality monitoring method for environmental protection according to an embodiment of the present application. As shown in fig. 6, in the classification process, it includes: s310, performing full-connection coding on the classification feature vectors by using a plurality of full-connection layers of the classifier to obtain coded classification feature vectors; and S320, passing the coding classification feature vector through a Softmax classification function of the classifier to obtain the classification result.
It will be appreciated that the water quality parameter feature extractor comprising the first and second convolution layers, the weather parameter feature extractor comprising the third and fourth convolution layers, and the classifier may need to be trained prior to performing the inference using the neural network model described above. That is, in the water quality monitoring method for environmental protection of the present application, the water quality monitoring method further comprises a training module for training the water quality parameter feature extractor including the first convolution layer and the second convolution layer, the weather parameter feature extractor including the third convolution layer and the fourth convolution layer, and the classifier.
FIG. 2 is a flow chart of a training phase in a water quality monitoring method for environmental protection according to an embodiment of the present application. As shown in fig. 2, the water quality monitoring method for environmental protection according to the embodiment of the present application further includes a training phase, including the steps of: s1110, acquiring training data, wherein the training data comprises training water quality parameters of a detected water sample at a plurality of preset time points in a preset time period, training meteorological parameters at the preset time points and true values of whether the water quality parameters of the detected water sample are abnormal or not; s1120, arranging training water quality parameters of the detected water samples at a plurality of preset time points into training water quality parameter input vectors according to the time dimension; s1130, arranging the training meteorological parameters of the plurality of preset time points into training meteorological parameter input vectors according to a time dimension; s1140, passing the training water quality parameter input vector through the water quality parameter feature extractor comprising the first convolution layer and the second convolution layer to obtain a training water quality parameter time sequence feature vector; s1150, passing the training meteorological parameter input vector through the meteorological parameter feature extractor comprising the third convolution layer and the fourth convolution layer to obtain a training meteorological parameter time sequence feature vector; s1160, fusing the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector to obtain a training classification feature vector; s1170, passing the training classification feature vector through the classifier to obtain a classification loss function value; s1180, calculating a streaming refinement loss function value of the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector; and S1190, training the water quality parameter feature extractor comprising the first convolution layer and the second convolution layer, the weather parameter feature extractor comprising the third convolution layer and the fourth convolution layer, and the classifier by back propagation of gradient descent with a weighted sum of the classification loss function value and the stream refinement loss function value as a loss function value.
FIG. 4 is a schematic diagram of a training phase of a water quality monitoring method for environmental protection according to an embodiment of the present application. As shown in fig. 4, in the water quality monitoring method for environmental protection, in a training process, firstly, training data is acquired, wherein the training data comprises training water quality parameters of detected water samples at a plurality of preset time points in a preset time period, training meteorological parameters at the preset time points and true values of whether the water quality parameters of the detected water samples are abnormal or not; then, arranging training water quality parameters of the detected water samples at a plurality of preset time points into training water quality parameter input vectors according to the time dimension; arranging the training meteorological parameters of the plurality of preset time points into training meteorological parameter input vectors according to a time dimension; then, the training water quality parameter input vector passes through the water quality parameter feature extractor comprising the first convolution layer and the second convolution layer to obtain a training water quality parameter time sequence feature vector; the training meteorological parameter input vector passes through the meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a training meteorological parameter time sequence feature vector; fusing the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector to obtain a training classification feature vector; then, the training classification feature vector passes through the classifier to obtain a classification loss function value; calculating the flow type refined loss function value of the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector; further, the water quality parameter feature extractor including the first and second convolution layers, the weather parameter feature extractor including the third and fourth convolution layers, and the classifier are trained by back propagation of gradient descent with a weighted sum of the classification loss function value and the stream refinement loss function value as a loss function value.
In particular, in the technical scheme of the application, when the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector are fused to obtain the classification feature vector, the time sequence association feature of the water quality parameter expressed by the water quality parameter time sequence feature vector and the time sequence association feature of the meteorological parameter expressed by the meteorological parameter time sequence feature vector are mapped into a high-dimensional fusion feature space, so that if the correlation between the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector on the time sequence association feature expression and the fusion high-dimensional feature space expression can be improved, the expression effect of the classification feature vector can be improved. Based on the above, the applicant of the present application further introduces a stream refinement loss function for the water quality parameter time series feature vector and the meteorological parameter time series feature vector in addition to the classification loss function based on the classification feature vector, expressed as:
wherein V is 1 Representing the time sequence characteristic vector of the training water quality parameter, V 2 Representing the time sequence feature vector of the training meteorological parameters,represents the square of the two norms of the vector, and Θ and +.p represent the position-by-position subtraction and multiplication of the vector, respectively, exp (·) represents the exponential operation of the vector, which represents the calculation of the natural exponential function value raised to the power of the eigenvalue of each position in the vector, and- >Representing the streaming refinement loss function value. Here, the stream refinement loss function is based on the water quality parameter timing feature vector V 1 And the meteorological parameter time sequence feature vector V 2 In the conversion from time sequence stream distribution to space distribution in high-dimensional fusion feature space, super-resolution improvement of space distribution in the high-dimensional feature space is realized by interpolation under the sequence distribution of vectors synchronously, so that finer alignment is provided for distribution differences in the high-dimensional feature space through mutual probability relation under a balanced sequence, cross-dimension context correlation is jointly presented on time sequence correlation feature dimension and fusion high-dimensional feature space dimension, the expression effect of classification feature vectors is improved, and the accuracy of classification results obtained by classification feature vectors through a classifier is improved. Therefore, the water quality monitoring can be performed in real time, so that whether the water quality parameters of the water sample to be detected are abnormal or not is judged, and early warning is sent out when the water quality is abnormal, and treatment measures are effectively taken in time to protect the environment.
In summary, the water quality monitoring method for environmental protection according to the embodiment of the present application is explained, which uses a deep learning feature extractor to extract the correlation feature distribution information of the time sequence dynamic change feature of the air-phase data and the time sequence dynamic change feature of the water quality parameter data, so as to accurately monitor the water quality in real time based on the time sequence cooperative correlation change feature of the two parameters, thereby judging whether the water quality parameter of the water sample to be detected is abnormal, sending out early warning when abnormal water quality is detected, and effectively taking treatment measures in time to protect the environment.
Exemplary System
FIG. 7 is a block diagram of a water quality monitoring system for environmental protection in accordance with an embodiment of the present application. As shown in fig. 7, a water quality monitoring system 300 for environmental protection according to an embodiment of the present application includes: a water quality parameter acquisition module 310; a first alignment module 320; a second alignment module 330; a water quality parameter feature extraction module 340; a meteorological parameter feature extraction module 350; a fusion module 360; and a classification result generation module 370.
The water quality parameter collection module 310 is configured to obtain water quality parameters of the detected water sample at a plurality of predetermined time points within a predetermined time period, and meteorological parameters at the plurality of predetermined time points; the first arrangement module 320 is configured to arrange water quality parameters of the detected water samples at the plurality of predetermined time points into water quality parameter input vectors according to a time dimension; the second arrangement module 330 is configured to arrange the weather parameters at the plurality of predetermined time points into weather parameter input vectors according to a time dimension; the water quality parameter feature extraction module 340 is configured to pass the water quality parameter input vector through a water quality parameter feature extractor including a first convolution layer and a second convolution layer to obtain a water quality parameter time sequence feature vector; the weather parameter feature extraction module 350 is configured to pass the weather parameter input vector through a weather parameter feature extractor including a third convolution layer and a fourth convolution layer to obtain a weather parameter time sequence feature vector; the fusion module 360 is configured to fuse the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector to obtain a classification feature vector; and the classification result generating module 370 is configured to pass the classification feature vector through a classifier to obtain a classification result, where the classification result is used to indicate whether the water quality parameter of the detected water sample is abnormal.
In one example, in the water quality monitoring system 300 for environmental protection, the water quality parameter feature extraction module 340 is configured to: inputting the water quality parameter input vector into a first convolution layer of the water quality parameter feature extractor to obtain a water quality parameter time sequence feature vector with a first neighborhood scale, wherein the first convolution layer is provided with a first one-dimensional convolution kernel with a first scale; inputting the water quality parameter input vector into a second convolution layer of the water quality parameter feature extractor to obtain a water quality parameter time sequence feature vector of a second neighborhood scale, wherein the second convolution layer is provided with a first one-dimensional convolution kernel of a second scale, and the first scale is different from the second scale; and cascading the first neighborhood scale water quality parameter time sequence feature vector and the second neighborhood scale water quality parameter time sequence feature vector to obtain the water quality parameter time sequence feature vector.
In one example, in the water quality monitoring system 300 for environmental protection described above, the meteorological parameter feature extraction module 350 is configured to: inputting the meteorological parameter input vector into a third convolution layer of the meteorological parameter feature extractor to obtain a first neighborhood scale meteorological parameter time sequence feature vector, wherein the third convolution layer is provided with a second one-dimensional convolution kernel of a first scale; inputting the meteorological parameter input vector into a fourth convolution layer of the meteorological parameter feature extractor to obtain a second neighborhood scale meteorological parameter time sequence feature vector, wherein the second convolution layer is provided with a second one-dimensional convolution kernel of a second scale, and the first scale is different from the second scale; and cascading the first neighborhood scale weather parameter time sequence feature vector and the second neighborhood scale weather parameter time sequence feature vector to obtain the weather parameter time sequence feature vector.
In one example, in the above water quality monitoring system 300 for environmental protection, the fusion module 360 is configured to: fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector by using the following cascade formula to obtain the classification feature vector; wherein, the formula is:
V c =Concat[V 1 ,V 2 ]
wherein V is 1 Representing the time sequence characteristic vector of the water quality parameter, V 2 Representing the timing characteristic vector of the meteorological parameters, concat [. Cndot.,. Cndot.)]Representing a cascade function, V c Representing the classification feature vector.
In one example, in the water quality monitoring system 300 for environmental protection described above, the classification result generating module 370 is configured to: performing full-connection coding on the classification feature vectors by using a plurality of full-connection layers of the classifier to obtain coded classification feature vectors; and passing the coding classification feature vector through a Softmax classification function of the classifier to obtain the classification result.
In summary, the water quality monitoring system 300 for environmental protection according to the embodiment of the present application is illustrated, which uses a deep learning feature extractor to mine the correlation feature distribution information of the time sequence dynamic change feature of the air-phase data and the time sequence dynamic change feature of the water quality parameter data, so as to accurately monitor the water quality in real time based on the time sequence cooperative correlation change feature of the two parameters, thereby judging whether the water quality parameter of the water sample to be detected is abnormal, sending out early warning when abnormal water quality is detected, and timely and effectively taking the treatment measures to protect the environment.
As described above, the water quality monitoring system for environmental protection according to the embodiment of the present application can be implemented in various terminal devices. In one example, a water quality monitoring system for environmental protection according to an embodiment of the present application may be integrated into a terminal device as one software module and/or hardware module. For example, the water quality monitoring system for environmental protection 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 water quality monitoring system for environmental protection may also be one of the plurality of hardware modules of the terminal device.
Alternatively, in another example, the software performance testing system for banking and the terminal device may be separate devices, and the software performance testing system for banking may be connected to the terminal device through a wired and/or wireless network and transmit the interactive information in a agreed data format.
Exemplary electronic device
Next, an electronic device according to an embodiment of the present application is described with reference to fig. 8.
Fig. 8 illustrates a block diagram of an electronic device according to an embodiment of the application.
As shown in fig. 8, the electronic device 10 includes one or more processors 11 and a memory 12.
The processor 11 may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
Memory 12 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by the processor 11 to perform the functions in the water quality monitoring method for environmental protection and/or other desired functions of the various embodiments of the present application described above. Various contents such as classification feature vectors may also be stored in the computer-readable storage medium.
In one example, the electronic device 10 may further include: an input device 13 and an output device 14, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
The input means 13 may comprise, for example, a keyboard, a mouse, etc.
The output device 14 may output various information including the classification result and the like to the outside. The output means 14 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, etc.
Of course, only some of the components of the electronic device 10 that are relevant to the present application are shown in fig. 8 for simplicity, components such as buses, input/output interfaces, etc. are omitted. In addition, the electronic device 10 may include any other suitable components depending on the particular application.
Exemplary computer program product and computer readable storage Medium
In addition to the methods and apparatus described above, embodiments of the application may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the steps in the functions of the water quality monitoring method for environmental protection according to the various embodiments of the application described in the "exemplary methods" section of this specification.
The computer program product may write program code for performing operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present application may also be a computer-readable storage medium, on which computer program instructions are stored, which, when being executed by a processor, cause the processor to perform the steps in the functions of the water quality monitoring method for environmental protection according to the various embodiments of the present application described in the above-mentioned "exemplary method" section of the present specification.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The basic principles of the present application have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present application are merely examples and not intended to be limiting, and these advantages, benefits, effects, etc. are not to be considered as essential to the various embodiments of the present application. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, as the application is not necessarily limited to practice with the above described specific details.
The block diagrams of the devices, apparatuses, devices, systems referred to in the present application are only illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
It is also noted that in the apparatus, devices and methods of the present application, the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent aspects of the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the application to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (10)

1. A water quality monitoring method for environmental protection, comprising:
acquiring water quality parameters of detected water samples at a plurality of preset time points in a preset time period, and meteorological parameters at the preset time points;
Arranging the water quality parameters of the detected water samples at a plurality of preset time points into water quality parameter input vectors according to the time dimension;
arranging the meteorological parameters of the plurality of preset time points into meteorological parameter input vectors according to a time dimension;
the water quality parameter input vector passes through a water quality parameter feature extractor comprising a first convolution layer and a second convolution layer to obtain a water quality parameter time sequence feature vector;
the meteorological parameter input vector passes through a meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a meteorological parameter time sequence feature vector;
fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector to obtain a classification feature vector; and
and the classification feature vector passes through a classifier to obtain a classification result, and the classification result is used for indicating whether the water quality parameter of the detected water sample is abnormal or not.
2. The method of claim 1, wherein passing the water quality parameter input vector through a water quality parameter feature extractor comprising a first convolution layer and a second convolution layer to obtain a water quality parameter time series feature vector, comprises:
Inputting the water quality parameter input vector into a first convolution layer of the water quality parameter feature extractor to obtain a water quality parameter time sequence feature vector with a first neighborhood scale, wherein the first convolution layer is provided with a first one-dimensional convolution kernel with a first scale;
inputting the water quality parameter input vector into a second convolution layer of the water quality parameter feature extractor to obtain a water quality parameter time sequence feature vector of a second neighborhood scale, wherein the second convolution layer is provided with a first one-dimensional convolution kernel of a second scale, and the first scale is different from the second scale; and
cascading the first neighborhood scale water quality parameter time sequence feature vector and the second neighborhood scale water quality parameter time sequence feature vector to obtain the water quality parameter time sequence feature vector.
3. The method of claim 2, wherein passing the meteorological parameter input vector through a meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a meteorological parameter timing feature vector, comprises:
inputting the meteorological parameter input vector into a third convolution layer of the meteorological parameter feature extractor to obtain a first neighborhood scale meteorological parameter time sequence feature vector, wherein the third convolution layer is provided with a second one-dimensional convolution kernel of a first scale;
Inputting the meteorological parameter input vector into a fourth convolution layer of the meteorological parameter feature extractor to obtain a second neighborhood scale meteorological parameter time sequence feature vector, wherein the second convolution layer is provided with a second one-dimensional convolution kernel of a second scale, and the first scale is different from the second scale; and
and cascading the first neighborhood scale weather parameter time sequence feature vector and the second neighborhood scale weather parameter time sequence feature vector to obtain the weather parameter time sequence feature vector.
4. The method for environmental protection of water quality monitoring of claim 3 wherein fusing the water quality parameter timing feature vector and the meteorological parameter timing feature vector to obtain a classification feature vector comprises: fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector by using the following cascade formula to obtain the classification feature vector;
wherein, the formula is:
V c =Concat[V 1 ,V 2 ]
wherein V is 1 Representing the time sequence characteristic vector of the water quality parameter, V 2 Representing the timing characteristic vector of the meteorological parameters, concat [. Cndot.,. Cndot.)]Representing a cascade function, V c Representing the classification feature vector.
5. The method for environmental protection of water quality monitoring according to claim 4, wherein the classifying feature vector is passed through a classifier to obtain a classification result, the classification result being used for indicating whether the water quality parameter of the detected water sample is abnormal, comprising:
Performing full-connection coding on the classification feature vectors by using a plurality of full-connection layers of the classifier to obtain coded classification feature vectors; and
and the coding classification feature vector is passed through a Softmax classification function of the classifier to obtain the classification result.
6. The method for environmental protection of water quality monitoring of claim 5 further comprising the training step of: the water quality parameter feature extractor comprises a first convolution layer and a second convolution layer, the meteorological parameter feature extractor comprises a third convolution layer and a fourth convolution layer and the classifier is trained.
7. The method for environmental protection of water quality monitoring of claim 6 wherein the training step comprises:
acquiring training data, wherein the training data comprises training water quality parameters of a detected water sample at a plurality of preset time points in a preset time period, training meteorological parameters at the preset time points and true values of whether the water quality parameters of the detected water sample are abnormal or not;
arranging training water quality parameters of the detected water samples at a plurality of preset time points into training water quality parameter input vectors according to the time dimension;
Arranging the training meteorological parameters of the plurality of preset time points into training meteorological parameter input vectors according to a time dimension;
the training water quality parameter input vector passes through the water quality parameter feature extractor comprising the first convolution layer and the second convolution layer to obtain a training water quality parameter time sequence feature vector;
the training meteorological parameter input vector passes through the meteorological parameter feature extractor comprising a third convolution layer and a fourth convolution layer to obtain a training meteorological parameter time sequence feature vector;
fusing the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector to obtain a training classification feature vector;
passing the training classification feature vector through the classifier to obtain a classification loss function value;
calculating the flow type refined loss function value of the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector; and
and training the water quality parameter feature extractor comprising the first convolution layer and the second convolution layer, the weather parameter feature extractor comprising the third convolution layer and the fourth convolution layer and the classifier by taking the weighted sum of the classified loss function value and the streaming refinement loss function value as the loss function value and by back propagation of gradient descent.
8. The method of claim 7, wherein passing the training classification feature vector through the classifier to obtain a classification loss function value comprises:
processing the training classification feature vector using the classifier to obtain training classification results
And calculating a cross entropy loss function value between the training classification result and a true value of whether the water quality parameter of the detected water sample is abnormal or not as the classification loss function value.
9. The water quality monitoring method for environmental protection of claim 8, wherein calculating the stream refinement loss function value of the training water quality parameter timing feature vector and the training meteorological parameter timing feature vector comprises:
calculating the flow type refinement loss function value of the training water quality parameter time sequence feature vector and the training meteorological parameter time sequence feature vector according to the following optimization formula;
wherein, the optimization formula is:
wherein V is 1 Representing the time sequence characteristic vector of the training water quality parameter, V 2 Representing the time sequence feature vector of the training meteorological parameters,represents the square of the two norms of the vector, and +. >And +.>Representing the streaming refinement loss function value.
10. A water quality monitoring system for environmental protection, comprising:
the water quality parameter acquisition module is used for acquiring water quality parameters of the detected water sample at a plurality of preset time points in a preset time period and meteorological parameters at the preset time points;
the first arrangement module is used for arranging the water quality parameters of the detected water samples at a plurality of preset time points into water quality parameter input vectors according to the time dimension;
the second arrangement module is used for arranging the meteorological parameters of the plurality of preset time points into meteorological parameter input vectors according to the time dimension;
the water quality parameter characteristic extraction module is used for enabling the water quality parameter input vector to pass through a water quality parameter characteristic extractor comprising a first convolution layer and a second convolution layer so as to obtain a water quality parameter time sequence characteristic vector;
the meteorological parameter characteristic extraction module is used for enabling the meteorological parameter input vector to pass through a meteorological parameter characteristic extractor comprising a third convolution layer and a fourth convolution layer to obtain a meteorological parameter time sequence characteristic vector;
The fusion module is used for fusing the water quality parameter time sequence feature vector and the meteorological parameter time sequence feature vector to obtain a classification feature vector; and
and the classification result generation module is used for enabling the classification feature vector to pass through a classifier to obtain a classification result, and the classification result is used for indicating whether the water quality parameter of the detected water sample is abnormal or not.
CN202310932351.5A 2023-07-27 2023-07-27 Water quality monitoring system and method for environmental protection Pending CN117077075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310932351.5A CN117077075A (en) 2023-07-27 2023-07-27 Water quality monitoring system and method for environmental protection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310932351.5A CN117077075A (en) 2023-07-27 2023-07-27 Water quality monitoring system and method for environmental protection

Publications (1)

Publication Number Publication Date
CN117077075A true CN117077075A (en) 2023-11-17

Family

ID=88705247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310932351.5A Pending CN117077075A (en) 2023-07-27 2023-07-27 Water quality monitoring system and method for environmental protection

Country Status (1)

Country Link
CN (1) CN117077075A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117309067A (en) * 2023-11-30 2023-12-29 长春职业技术学院 Water resource real-time monitoring method, system and electronic equipment
CN117388893A (en) * 2023-12-11 2024-01-12 深圳市移联通信技术有限责任公司 Multi-device positioning system based on GPS
CN117530684A (en) * 2024-01-09 2024-02-09 深圳市双佳医疗科技有限公司 Blood glucose abnormality detection and early warning system and method based on health big data
CN117575485A (en) * 2024-01-12 2024-02-20 深圳比特耐特信息技术股份有限公司 Intelligent scheduling method, system and storage medium based on visualization

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117309067A (en) * 2023-11-30 2023-12-29 长春职业技术学院 Water resource real-time monitoring method, system and electronic equipment
CN117309067B (en) * 2023-11-30 2024-02-09 长春职业技术学院 Water resource real-time monitoring method, system and electronic equipment
CN117388893A (en) * 2023-12-11 2024-01-12 深圳市移联通信技术有限责任公司 Multi-device positioning system based on GPS
CN117388893B (en) * 2023-12-11 2024-03-12 深圳市移联通信技术有限责任公司 Multi-device positioning system based on GPS
CN117530684A (en) * 2024-01-09 2024-02-09 深圳市双佳医疗科技有限公司 Blood glucose abnormality detection and early warning system and method based on health big data
CN117530684B (en) * 2024-01-09 2024-04-16 深圳市双佳医疗科技有限公司 Blood glucose abnormality detection and early warning system and method based on health big data
CN117575485A (en) * 2024-01-12 2024-02-20 深圳比特耐特信息技术股份有限公司 Intelligent scheduling method, system and storage medium based on visualization
CN117575485B (en) * 2024-01-12 2024-05-03 深圳比特耐特信息技术股份有限公司 Intelligent scheduling method, system and storage medium based on visualization

Similar Documents

Publication Publication Date Title
CN117077075A (en) Water quality monitoring system and method for environmental protection
CN105426356B (en) A kind of target information recognition methods and device
CN112270196B (en) Entity relationship identification method and device and electronic equipment
CN115529166A (en) Network security scanning risk management and control system and method based on multi-source data
CN115783923B (en) Elevator fault mode identification system based on big data
CN116015837A (en) Intrusion detection method and system for computer network information security
CN116247824B (en) Control method and system for power equipment
CN115471216B (en) Data management method of intelligent laboratory management platform
CN115759658A (en) Enterprise energy consumption data management system suitable for smart city
Chen et al. Process monitoring based on multivariate causality analysis and probability inference
CN116257406A (en) Gateway data management method and system for smart city
CN115731513B (en) Intelligent park management system based on digital twinning
CN116759053A (en) Medical system prevention and control method and system based on Internet of things system
CN116665086A (en) Teaching method and system based on intelligent analysis of learning behaviors
CN116486323A (en) Coal conveying gallery monitoring management system and method based on artificial intelligence
CN116151845A (en) Product full life cycle management system and method based on industrial Internet of things technology
Tang et al. Self-supervised anomaly pattern detection for large scale industrial data
CN117011609A (en) Automatic tracking system and method for textile processing progress
CN117094651A (en) Integrated energy storage management system and energy management method
CN116486622A (en) Traffic intelligent planning system and method based on road data
CN116216234A (en) Intelligent monitoring system and method for coal conveying system based on video
Tang et al. Association Analysis of Abnormal Behavior of Electronic Invoice Based on K-Means and Skip-Gram
CN113240646A (en) Distributed photovoltaic power generation management method based on cloud computing
CN112417886A (en) Intention entity information extraction method and device, computer equipment and storage medium
Zhang et al. MTSCANet: Multi temporal resolution temporal semantic context aggregation network

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