Water pollution control sampling data analysis method and device based on machine learning

Through machine learning technology, using neural networks and quantum entanglement processing and combining deep belief networks, the time-consuming and labor-consuming problems of traditional water quality monitoring methods are solved, efficient feature extraction of water body data and accurate prediction of pollution degree, and improved water body Real-time and accuracy of pollution control.

CN118606794BActive Publication Date: 2024-11-26SHANDONG ZHENGYUAN YEDA TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411081028.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-11-26
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

Traditional water quality monitoring methods are time-consuming and labor-intensive, difficult to reflect water pollution status in real time, and difficult to process large-scale environmental data to accurately predict water pollution trends.

Method used

Using machine learning-based sampling data analysis method for water pollution control, feature extraction and data expansion are performed through neural networks and generative adversarial networks, and classification prediction is performed by combining quantum entanglement processing and deep belief networks to improve the accuracy and efficiency of data analysis.

Benefits of technology

It realizes effective feature extraction of water body data and accurate prediction of pollution degree, improves the real-time and accuracy of water body pollution control, and reduces the overfitting problem caused by insufficient data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118606794B_ABST
    Figure CN118606794B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for analyzing water pollution control sampling data based on machine learning, which relates to the field of data processing technology. After extracting features from water body data at water quality monitoring sites, the data is subjected to feature dimension reduction and quantum entanglement processing, and then the data is identified using a classifier model to analyze the corresponding control situation of the water body data. Among them, the model for feature extraction uses a neuroevolution fitness function to dynamically adjust the parameters of each layer of its neural network; the classifier model uses an improved deep belief network as the classifier algorithm, and the deep belief network is composed of a multi-layer restricted Boltzmann machine to learn different abstract levels of data. Moreover, the generative adversarial network used to construct a training sample set for water quality monitoring uses an intelligent agent collaboration strategy for parameter update. Based on this, even when faced with large-scale monitoring data, the data can be effectively identified based on the correlation between features to improve classification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for analyzing water pollution control sampling data based on machine learning. Background Art

[0002] Traditional water quality monitoring methods rely on regular water sampling and laboratory analysis, which are usually time-consuming and labor-intensive, and it is difficult to reflect the pollution status of water bodies in real time. In addition, due to the complexity and variability of environmental data, traditional data analysis methods often have difficulty processing large-scale monitoring data and accurately predicting the pollution trend of water bodies. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a water pollution control sampling data analysis method and device based on machine learning, which can effectively identify data based on the correlation between features and improve prediction accuracy.

[0004] In the first aspect, an embodiment of the present invention provides a method for analyzing water pollution control sampling data based on machine learning, the method comprising: obtaining water body data from a water quality monitoring site; extracting features from the water body data through a pre-constructed feature extraction model, and outputting key features in the water body data; wherein the feature extraction model extracts features through a neural network, and dynamically adjusts the parameters of each layer of the neural network using a neural evolution fitness function; a training sample set for water quality monitoring used to train the neural network is constructed after data expansion based on a generative adversarial network, and the generative adversarial network uses an intelligent agent collaboration strategy to update parameters; feature dimension reduction is performed on key features, and quantum entanglement processing is performed on the key features after dimension reduction to generate water quality monitoring samples to be tested; the water quality monitoring samples to be tested are input into a preset classifier model, and the classification results of the water quality monitoring samples to be tested are output; the classifier model uses an improved deep belief network as the classifier algorithm, and the deep belief network is composed of a multi-layer restricted Boltzmann machine, and each layer of restricted Boltzmann machine is used to learn different abstract levels of data; according to the classification results, the control situation corresponding to the water body data is analyzed.

[0005] In combination with the first aspect, an embodiment of the present invention provides a first implementation method of the first aspect, wherein the step of analyzing the treatment situation corresponding to the water body data according to the classification results includes: determining the classification category corresponding to the water body data based on the classification results; determining the treatment situation corresponding to the water body data according to the degree of water pollution represented by the classification category.

[0006] In combination with the first aspect, an embodiment of the present invention provides a second implementation of the first aspect, wherein the step of performing feature dimensionality reduction on key features, and performing quantum entanglement processing on the key features after dimensionality reduction to generate water quality monitoring samples to be tested includes: performing dimensionality reduction processing on the key features through the encoding layer of the autoencoder neural network to obtain reduced dimensionality features; simulating the entanglement of the quantum bits of the reduced dimensionality features through the quantum entanglement layer to generate quantum entangled features; and reconstructing the quantum entangled features through the decoding layer of the autoencoder neural network to generate water quality monitoring samples to be tested.

[0007] In combination with the first aspect, an embodiment of the present invention provides a third implementation of the first aspect, wherein the method also includes: during the training process of the autoencoder neural network, calculating the error gradient corresponding to the output of the decoding layer, and based on the error gradient, updating the network parameters of the autoencoder neural network through a back propagation algorithm.

[0008] In combination with the first aspect, an embodiment of the present invention provides a fourth implementation of the first aspect, wherein a method for constructing a feature extraction model includes: initializing a preset neural network based on predefined structural parameters; inputting a preset water quality monitoring training sample set into the neural network, performing forward propagation, and calculating a fitness score corresponding to the network state of the neural network; updating the network weights of the neural network based on the fitness score and the partial derivative of the cost function with respect to the network weights of the neural network; the fitness score is calculated based on the entropy of the output of the neural network, and the partial derivative includes the mutual information between the input and output of the neural network; until the neural network meets the preset training requirements, a feature extraction model is constructed based on the neural network.

[0009] In combination with the first aspect, an embodiment of the present invention provides a fifth implementation of the first aspect, wherein a method for constructing a classifier model includes: using a preset training sample set for water quality monitoring, and using a contrast divergence algorithm to pre-train multiple restricted Boltzmann machines respectively; superimposing multiple restricted Boltzmann machines after pre-training to form an initial deep belief network; using a back-propagation algorithm based on a loss function to fine-tune the initial deep belief network and update the network parameters of the initial deep belief network; converting the network parameters into states through a quantum measurement process as the network parameters of the initial deep belief network in the next iteration; until the initial deep belief network reaches the preset training conditions, a classifier model is constructed based on the initial deep belief network.

[0010] In combination with the first aspect, an embodiment of the present invention provides a sixth implementation of the first aspect, wherein the steps of pre-training multiple restricted Boltzmann machines respectively using a preset training sample set for water quality monitoring and a contrast divergence algorithm include: inputting the training sample set for water quality monitoring into the restricted Boltzmann machine, determining the state of the training sample set in the visible unit of the restricted Boltzmann machine, and the probability of the hidden unit of the restricted Boltzmann machine; based on the state and probability, calculating a first joint activation probability and a second joint activation probability; the first joint activation probability is used to characterize the joint activation probability of the visible unit and the hidden unit under the data distribution; the second joint activation probability is used to characterize the joint activation probability of the reconstructed distribution; based on the first joint activation probability and the second joint activation probability, updating the weights from the visible unit to the hidden unit of the restricted Boltzmann machine.

[0011] In combination with the first aspect, an embodiment of the present invention provides a seventh implementation method of the first aspect, wherein a method for constructing a training sample set for water quality monitoring includes: obtaining water body monitoring samples; the water body monitoring samples include water body samples from multiple water quality monitoring stations; labeling the water body monitoring samples to construct an initial water quality monitoring sample set; the labeled labels are used to characterize the degree of pollution of the water body monitoring samples; performing data expansion on the initial sample set through a preset generative adversarial network to generate expanded water quality monitoring samples; wherein the generator and discriminator of the generative adversarial network include an intelligent agent, and the generative adversarial network adopts an intelligent agent collaboration strategy to update parameters; the expanded water quality monitoring samples and the initial water quality monitoring sample set are merged to construct a training sample set for water quality monitoring.

[0012] In combination with the first aspect, an embodiment of the present invention provides an eighth implementation of the first aspect, wherein the method also includes: during the training process of the generative adversarial network, using an adaptive mechanism to dynamically adjust the discrimination threshold of the discriminator of the generative adversarial network; and dynamically interpolating the agent to update the network parameters of the generative adversarial network.

[0013] In a second aspect, an embodiment of the present invention further provides a water pollution control sampling data analysis device based on machine learning, wherein the device includes: a data acquisition module, used to acquire water body data from a water quality monitoring site; a feature extraction module, used to extract features from the water body data through a pre-built feature extraction model, and output key features in the water body data; wherein the feature extraction model extracts features through a neural network, and dynamically adjusts the parameters of each layer of the neural network using a neural evolution fitness function; a training sample set for water quality monitoring used to train the neural network is constructed after data expansion based on a generative adversarial network, and the generative adversarial network The network adopts the intelligent agent collaboration strategy to update parameters; the data processing module is used to reduce the dimension of key features, and perform quantum entanglement processing on the key features after dimension reduction to generate water quality monitoring samples to be tested; the execution module is used to input the water quality monitoring samples to be tested into the preset classifier model, and output the classification results of the water quality monitoring samples to be tested; the classifier model adopts the improved deep belief network as the classifier algorithm, and the deep belief network is composed of multiple layers of restricted Boltzmann machines, and each layer of restricted Boltzmann machines is used to learn different abstract levels of data; the output module is used to analyze the governance situation corresponding to the water body data according to the classification results.

[0014] The embodiment of the present invention provides the following beneficial effects: the present invention provides a method and device for analyzing water pollution control sampling data based on machine learning, and extracts features from sampled water body data through a pre-trained feature extraction model, and can extract effective key features; the training sample set for water quality monitoring used to train the neural network is constructed after data expansion based on the generative adversarial network, and the generative adversarial network adopts an intelligent agent collaboration strategy to update parameters, which can improve the data generation quality of the generative adversarial network and the discrimination accuracy of the expanded samples, and reduce the overfitting problem caused by insufficient data. Moreover, the extracted key features are classified and predicted after dimensionality reduction and quantum entanglement, and the classifier model adopts an improved deep belief network as the classifier algorithm, and the deep belief network is composed of a multi-layer restricted Boltzmann machine, and each layer of the restricted Boltzmann machine is used to learn different abstract levels of data, which provides a powerful feature extraction capability for complex classification tasks; the sample to be tested obtained by combining quantum entanglement enhances the correlation between features, and the feature dimensionality reduction is combined with the quantum mechanism to improve the ability of feature compression and reconstruction. Even in the face of large-scale monitoring data, the data can be effectively identified based on the correlation between features to improve the classification accuracy.

[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A flow chart of a method for analyzing water pollution control sampling data based on machine learning provided in an embodiment of the present invention;

[0019] Figure 2 A flowchart of another method for analyzing water pollution control sampling data based on machine learning provided by an embodiment of the present invention;

[0020] Figure 3 A flow chart of a method for constructing a training sample set for water quality monitoring provided by an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of the structure of a water pollution control sampling data analysis device based on machine learning provided in an embodiment of the present invention;

[0022] Figure 5 A schematic diagram of the structure of another water pollution control sampling data analysis device based on machine learning provided in an embodiment of the present invention;

[0023] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] The present invention provides a method and device for analyzing water pollution control sampling data based on machine learning. Even if limited data is collected, the corresponding key features can be extracted to improve the evaluation accuracy.

[0026] To facilitate understanding of this embodiment, firstly, a method for analyzing water pollution control sampling data based on machine learning disclosed in an embodiment of the present invention is described in detail. Figure 1 A flow chart of a method for analyzing water pollution control sampling data based on machine learning is shown, and the method may include the following steps:

[0027] Step S102, obtaining water body data from water quality monitoring sites.

[0028] Step S104, extracting features from the water body data using a pre-built feature extraction model, and outputting key features in the water body data.

[0029] In a specific implementation, the embodiment of the present invention monitors the water body at the water quality monitoring site, obtains its water body data, and extracts the key features of the water body data by a pre-built feature extraction model. Specifically, the water quality monitoring site includes rivers, lakes and industrial discharge outlets, and the collected data is stored in the form of a spreadsheet. In one embodiment, the attributes of the data include: for water temperature; is the pH value; is the dissolved oxygen content; is the conductivity; is turbidity; is the chemical oxygen demand; is the ammonia nitrogen content; is the total phosphorus content; is the total nitrogen content; It should be emphasized that this embodiment is only used to illustrate a data format and type of the present invention. In practical applications, the attributes of data are usually more than 10 attributes, and the number of attributes of data may reach dozens or even hundreds.

[0030] The feature extraction model uses a neural network to extract features, and uses a neuroevolution fitness function to dynamically adjust the parameters of each layer of the neural network. This method can effectively solve the problem of gradient disappearance, explosion, or falling into a local optimal solution, and enhance the stability of the model. In addition, the training sample set for water quality monitoring used to train the neural network is constructed after data expansion based on the generative adversarial network, and the generative adversarial network uses an intelligent agent collaboration strategy to update parameters. This method can improve the data generation quality of the generative adversarial network and the discrimination accuracy of the expanded samples, and reduce the overfitting problem caused by insufficient data.

[0031] Step S106, performing feature dimensionality reduction on the key features, and performing quantum entanglement processing on the key features after dimensionality reduction to generate water quality monitoring samples to be tested.

[0032] After extracting the key features, the embodiment of the present invention also performs feature dimensionality reduction on the data, and performs quantum entanglement processing on the reduced features. In quantum mechanics, when several particles interact with each other, the properties of each particle have been integrated into the overall properties, and the properties of each particle cannot be described separately. Only the properties of the overall system can be described. This phenomenon is called quantum entanglement or quantum entanglement. The algorithm enhances the correlation between features by simulating the entanglement of quantum bits, and improves the ability to compress and reconstruct features through quantum mechanisms.

[0033] Step S108, inputting the water quality monitoring sample to be tested into a preset classifier model, and outputting the classification result of the water quality monitoring sample to be tested.

[0034] Step S110, analyzing the management status corresponding to the water body data according to the classification result.

[0035] Furthermore, the obtained samples to be tested are classified by the classifier model, and the classification results corresponding to the water body data are output. In one embodiment, the classification results include "mild pollution", "moderate pollution" and "heavy pollution". Based on this, the governance status of the water body data is analyzed.

[0036] Among them, traditional classifiers may not be able to achieve ideal classification accuracy and adaptability when processing complex or high-dimensional data. The classifier model of the embodiment of the present invention adopts an improved deep belief network as the classifier algorithm. The deep belief network is composed of multiple layers of restricted Boltzmann machines. Each layer of restricted Boltzmann machines is used to learn different abstract levels of data, providing powerful feature extraction capabilities for complex classification tasks. In summary, even when faced with large-scale monitoring data, the embodiment of the present invention can effectively identify data based on the correlation between features and improve classification accuracy.

[0037] Furthermore, based on the above embodiment, the embodiment of the present invention also provides another method for analyzing water pollution control sampling data based on machine learning. Figure 2 FIG. 4 is a flowchart of another method for analyzing water pollution control sampling data based on machine learning provided by an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0038] Step S202, obtaining water body data from water quality monitoring sites.

[0039] Step S204: extract features from the water body data using a pre-built feature extraction model, and output key features in the water body data.

[0040] Among them, based on the above embodiments, the feature extraction model of the embodiment of the present invention extracts features through a neural network, and uses a neural evolution fitness function to dynamically adjust the parameters of each layer of the neural network. In the specific implementation, the present invention uses a 3-layer fully connected neural network for feature extraction. In the prior art, some solutions use neural networks for feature extraction. In some neural network structures, they may encounter problems such as gradient disappearance, gradient explosion, or falling into a local optimal solution, which affects the stability of training and the performance of the model.

[0041] The present invention adopts a neural network based on a joint entropy optimization algorithm as a feature extraction model, and uses a neural evolution fitness function to dynamically adjust the parameters of each layer of the neural network so that it can better maintain the integrity of data features.

[0042] In the specific implementation, the feature extraction model is constructed through the following steps:

[0043] 1) Initialize the preset neural network based on the predefined structural parameters.

[0044] In one embodiment, the weights of each layer of the network are initialized using small-scale random numbers, and the network weights from the i-th neuron to the j-th neuron in the l-th layer are The initialization method can be expressed as:

[0045]

[0046] In the formula, Represents the neural network Tier Neuron to The network weights of neurons; is the mean of the normal distribution; is the standard deviation of the normal distribution; is a random value function, is at the mean , standard deviation is Take a random value from the normal distribution of ; The neural network The number of neurons in the layer. Preferably, and Set to 0.0001 and 0.01.

[0047] 2) Input the preset water quality monitoring training sample set into the neural network, perform forward propagation, and calculate the fitness score corresponding to the network state of the neural network.

[0048] This forward propagation is the forward propagation of data, that is, the data including water temperature, pH value, dissolved oxygen, conductivity and other attributes are used as the input of the neural network, and the neurons in the input layer receive several attribute values ​​of the data. After the input layer receives the input data, the data is processed by the forward propagation of the network layer. The calculation method of the feature activation function of the forward propagation can be expressed as:

[0049]

[0050] In the formula, It is the activation output of the ith neuron in the lth layer of the neural network. That is, when the attribute value of a data is calculated by the activation function, another attribute value is obtained through nonlinear mapping. For example, when the attribute value of water temperature is 37 and is input into the neuron, the attribute value of water temperature may become 59 through nonlinear mapping using the activation function. is the activation output of the i-th neuron in the l-1th layer of the neural network; is the ReLU activation function; is the bias term of the i-th neuron in the l-th layer of the neural network; It represents the weight from the ith neuron to the jth neuron in the l-1th layer of the neural network, indicating that specific attributes are not connected through one-to-one connections between neurons, but are connected in a many-to-many manner between neural network layers, thereby realizing data transformation. For example, the pH value is 7 at the input of the neurons in the first layer of the neural network, and it may correspond to the output of two neurons in the second layer of the neural network. The output weight parameters of these two neurons are different, so the output values ​​of the neurons are also different, which may be 15 and 26 respectively.

[0051] 3) Based on the fitness score and the partial derivative of the cost function with respect to the network weights of the neural network, the network weights of the neural network are updated.

[0052] a-After each forward propagation, calculate the fitness score of the current network state. The fitness score is calculated based on the entropy of the output of the neural network. Specifically, the fitness score is calculated by the fitness function, which can be expressed as:

[0053]

[0054] In the formula, is the entropy of the network output, which can be calculated as:

[0055]

[0056] In the formula, is the fitness function, is the output of the current iteration The probability distribution of is the output of the current iteration, Indicates that xm belongs to the output set. The input data includes water temperature, pH value, dissolved oxygen, conductivity and other attributes. By calculating the entropy value, the uncertainty degree of the input batch of data can be obtained. The uncertainty degree is the degree of distribution difference of the data. For example, in an input batch of data, the water temperature values ​​are 37, 37, 33, and 32, respectively, indicating that the uncertainty degree is small. For another example, the pH values ​​are 7, 15, 38, and 22, respectively. Compared with the water temperature, its uncertainty degree is large.

[0057] Further, the Taking a category as an example, the probability distribution of its output is calculated by the preset Softmax function and can be expressed as:

[0058]

[0059] In the formula, p(xm k ) is the probability distribution of the output of the kth category of the current iteration of the neural network, is the probability distribution function, xm k is the output corresponding to the kth category of the neural network, represents an exponential function with the natural constant e as the base, is the original output of the last layer of the neural network for the kth category, It is the original output of the last layer of the neural network for the jth category. The Softmax function ensures that the sum of all output values ​​is 1, which is used to represent the probability distribution. For example, for the task of water quality detection, the water quality monitoring data is given and extracted by the neural network, and then input into the preset Softmax function to obtain the probabilities of the three categories of light pollution, moderate pollution, and severe pollution. For example, the probabilities of light pollution, moderate pollution, and severe pollution are 0.3, 0.5, and 0.2 respectively, and the sum of the probabilities of these three categories is equal to 1.

[0060] b-Cost Function The partial derivatives with respect to the weights can be calculated as follows, where the partial derivatives include the mutual information between the input and output of the neural network:

[0061]

[0062] In the formula, is the cost function The partial derivative with respect to the weights is, is the symbol of partial derivative, is the cost function, is the original output of the neural network layer l-1 for the jth category; is the error term of the ith neuron in the lth layer of the neural network. For the water quality detection task, this error term represents the contribution of each neuron to the error of the final classification result. The calculation method can be expressed as:

[0063]

[0064] In the formula, is the coefficient of the trade-off error term; is the error term of the kth neuron in the l+1th layer of the neural network; For the neural network The input of the layer, For the neural network The output of the layer; Represents the network weights from the i-th neuron to the k-th neuron in the l+1th layer of the neural network; For the neural network Layer Input and Output of the layer The mutual information between them can be used in neural networks to ensure that important features are not lost during the training process. For example, in water quality detection tasks, mutual information can help maintain the information transmission of key features such as water temperature, pH value, dissolved oxygen, etc., and avoid the loss of these important features during the training process. is the neural network activation function exist The derivative of a point, is the input of the i-th neuron in the l-th layer, and the input of this neuron may be one of the characteristic values ​​of key features such as water temperature, pH value, dissolved oxygen, etc.

[0065] Specifically, define mutual information The calculation method can be expressed as:

[0066]

[0067] In the formula, is the entropy of the input, is the entropy of the output, is the joint entropy. In one embodiment, the value of the above entropy is approximately calculated by the probability distribution of the network layer output, which can be expressed as:

[0068]

[0069]

[0070]

[0071] In the formula, The neural network The input of the layer, The neural network The output of the layer, is a probability distribution function. Preferably, Set to 0.1.

[0072] Furthermore, for is the activation function The input of this neuron may be one of the characteristic values ​​of key features such as water temperature, pH value, dissolved oxygen, etc. The calculation method can be expressed as:

[0073]

[0074] In the formula, Represents the network weights from the i-th neuron to the j-th neuron in the l-1th layer of the neural network; is the activation output of the jth neuron in the l-1th layer of the neural network; is the bias term of the i-th neuron in the l-th layer of the neural network.

[0075] c-Adjust the network weights according to the results of the fitness function. The weight update method can be expressed as:

[0076]

[0077] In the formula, is the symbol of parameter update, is the learning rate of the neural network; is the cost function; is the partial derivative of the cost function with respect to the weights, is the fitness function. Preferably, Set to 0.03.

[0078] 4) Until the neural network meets the preset training requirements, a feature extraction model is built based on the neural network.

[0079] Repeat the above steps until the preset stop iteration condition is met, indicating that the neural network model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 800 times.

[0080] Step S206, performing dimensionality reduction processing on the key features through the encoding layer of the autoencoder neural network to obtain dimensionality reduction features.

[0081] The embodiment of the present invention reduces the dimension of data through a dimensionality reduction model, wherein the existing feature dimensionality reduction technology may not be able to effectively maintain the key information of the data, limiting the performance of the model. The present invention adopts a quantum state entangled autoencoder neural network as a feature dimensionality reduction model, and enhances the ability of the autoencoder in the feature compression and reconstruction process by utilizing a quantum state entanglement strategy.

[0082] In the specific implementation, the input features first pass through a series of encoding layers, which gradually reduce the dimension of the data while retaining key information. For water quality monitoring data, such as water temperature, pH value, dissolved oxygen and other attributes, after feature extraction, the dimension becomes 500 dimensions. Then the 500-dimensional data is gradually reduced through the encoding layer while retaining the information of these key attributes. In the forward propagation process of the autoencoder, the calculation method of the activation function can be expressed as:

[0083]

[0084] In the formula, is the activation value of the xth neuron in the lth layer of the autoencoder, is the Sigmoid activation function, is the activation value of the yth neuron in the l-1th layer of the autoencoder, is the connection weight between the xth neuron and the yth neuron in the lth layer of the autoencoder, is the bias of the xth neuron in the lth layer of the autoencoder.

[0085] Step S208, simulating the entanglement of the quantum bits of the dimension reduction feature through the quantum entanglement layer to generate quantum entanglement features.

[0086] After reaching the minimum dimension, the data is processed through the quantum entanglement layer, which enhances the correlation between features by simulating the entanglement of quantum bits, which can be expressed as:

[0087]

[0088] In the formula, represents the output of the quantum entanglement layer of the autoencoder, is the weight parameter of the quantum entanglement layer of the autoencoder, For the autoencoder Tier The activation value of each neuron. For water quality monitoring data, such as water temperature, pH value, dissolved oxygen, conductivity, turbidity, etc., after feature extraction, the features are input into the quantum entanglement layer. The quantum entanglement layer enhances the correlation between these reduced-dimensional features by simulating the entanglement of quantum bits. For example, the relationship between water temperature and pH value may be more accurately modeled through the quantum entanglement layer, thereby better representing the water pollution situation.

[0089] The calculation method of the weight parameters of the quantum entanglement layer can be expressed as:

[0090]

[0091] In the formula, is the Euclidean distance between the xth and yth features, is the square of the Euclidean distance; is the Euclidean distance between the xth and zth features, is the square of the Euclidean distance; is the temperature parameter of the quantum entanglement layer of the autoencoder, and the smaller Make the weight more concentrated on the features with closer distance. Preferably, Set to 0.3.

[0092] Step S210, reconstructing the quantum entanglement features through the decoding layer of the autoencoder neural network to generate a water quality monitoring sample to be tested.

[0093] Furthermore, the entangled data is gradually restored to the dimension of the original data through the decoding layer, and the original input is attempted to be reconstructed. For water quality monitoring data, such as water temperature, pH value, dissolved oxygen and other features, after feature extraction, it is processed by the quantum entanglement layer and then gradually restored to the dimension of the original data through the decoding layer, and these original input features are attempted to be reconstructed. Among them, in the training process of the autoencoder neural network, the embodiment of the present invention calculates the error gradient corresponding to the output of the decoding layer, and based on the error gradient, updates the network parameters of the autoencoder neural network through the back propagation algorithm.

[0094] In specific implementation, the embodiment of the present invention first initializes the neural network during the training process. Specifically, all weights and bias parameters of the quantum state entangled autoencoder neural network are initialized. In one embodiment, the weights and biases in the autoencoder are initialized by small-scale random numbers. The initialization method can be expressed as:

[0095]

[0096]

[0097] In the formula, Represents the connection weight from the xth neuron to the yth neuron in the lth layer of the autoencoder; Represents the bias of the xth neuron in the lth layer of the autoencoder; It means that the mean is 0 and the standard deviation is Take a random value from the normal distribution of ; represents the number of neurons in the l-1th layer. Preferably, Set to 0.1.

[0098] In this embodiment, the layer sizes of the encoder and decoder are set to: input layer 200 nodes, first hidden layer 150 nodes, quantum entanglement layer 100 nodes, first decoding layer 150 nodes, output layer 200 nodes.

[0099] Furthermore, the autoencoder neural network is trained using a preset training sample set of water quality monitoring. The training process corresponds to the above steps S206-S210.

[0100] Furthermore, the error gradient is calculated according to the loss function, and the weights and bias parameters of the network are updated through the back propagation algorithm. For example, after feature extraction of input features such as water temperature and pH value in the water quality monitoring task, the high-dimensional feature vector is obtained and input into the feature dimensionality reduction model for training.

[0101] During the training process, the loss function is obtained by calculating the error between the output of the decoding layer and the actual input, and the parameters of the autoencoder are updated through the loss function, which can be expressed as:

[0102]

[0103]

[0104] In the formula, is the connection weight from the xth neuron to the yth neuron in the lth layer of the autoencoder before updating, is the bias of the xth neuron in the lth layer of the autoencoder before updating, is the updated connection weight from the xth neuron to the yth neuron in the lth layer of the autoencoder, is the bias of the xth neuron in the lth layer of the updated autoencoder; is the learning rate of the autoencoder; and is the partial derivative of the loss function with respect to weights and biases; is the loss function of the autoencoder; For the autoencoder Preferably, Set to 0.04.

[0105] Furthermore, the error term of the autoencoder layer l is Characterize the error of the x-th neuron in the l-th layer, and its calculation method can be expressed as:

[0106]

[0107] In the formula, The encoder is The layer input is The derivative of the Sigmoid activation function; It is The true label value of each sample.

[0108] Furthermore, the loss function of the autoencoder includes reconstruction error and regularization terms to promote sparsity and effective data representation. In the water quality monitoring task, the reconstruction error part measures the difference between the original input and the output of the autoencoder, such as the difference between the actual value of the water temperature after feature extraction and the reconstructed value. The regularization term helps prevent overfitting and ensure the generalization ability of the model. The calculation method is:

[0109]

[0110] In the formula, yes and The square of the L2 norm measures the input of the encoder in the autoencoder. Reconstructed output from the decoder in the autoencoder The difference between is the regularization coefficient of the loss function of the autoencoder; The autoencoder before updating Layer from Neuron to The L1 norm of the connection weights of neurons. Preferably, Set to 0.5.

[0111] Repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0112] Step S212: input the water quality monitoring sample to be tested into a preset classifier model, and output the classification result of the water quality monitoring sample to be tested.

[0113] Step S214: analyzing the management status of the water body data according to the classification results.

[0114] In a specific implementation, the classification result output by the classifier model of the embodiment of the present invention is used to characterize the classification category of the water body data. After determining the classification category corresponding to the water body data based on the classification result, the embodiment of the present invention determines the treatment situation corresponding to the water body data according to the degree of water pollution characterized by the classification category. In one embodiment, the classification categories include "mild pollution", "moderate pollution" and "severe pollution", a total of 3 categories.

[0115] Based on the above embodiments, the classifier model of the embodiment of the present invention adopts an improved deep belief network as the classifier algorithm. The deep belief network is composed of multiple layers of restricted Boltzmann machines, and each layer of restricted Boltzmann machines is used to learn different abstract levels of data. Among them, the present invention adopts an improved deep belief network as the classifier algorithm, and improves the classification accuracy and adaptability by adopting a micro-adjustment strategy. The deep belief network is composed of multiple layers of restricted Boltzmann machines, and each layer of restricted Boltzmann machines learns different abstract levels of data, providing powerful feature extraction capabilities for complex classification tasks. Traditional deep belief networks usually use simple back propagation for fine-tuning after pre-training. The present invention adopts a fine-tuning strategy based on loss term decoupling, so that the learning rate and update rule of each layer are dynamically adjusted according to its contribution to the final classification result, thereby optimizing the learning process of the entire network.

[0116] For ease of understanding, the method for constructing the classifier model of the embodiment of the present invention is as follows:

[0117] 1) Using a preset training sample set of water quality monitoring, multiple restricted Boltzmann machines are pre-trained using the contrastive divergence algorithm.

[0118] In a specific implementation, an embodiment of the present invention inputs a training sample set for water quality monitoring into a restricted Boltzmann machine, determines the state of the training sample set for water quality monitoring in the visible unit of the restricted Boltzmann machine, and the probability of the hidden unit of the restricted Boltzmann machine. Further, based on the state and probability, a first joint activation probability and a second joint activation probability are calculated. Further, based on the first joint activation probability and the second joint activation probability, the weights from the visible unit to the hidden unit of the restricted Boltzmann machine are updated. Among them, the first joint activation probability is used to characterize the joint activation probability of the visible unit and the hidden unit under the data distribution; the second joint activation probability is used to characterize the joint activation probability of the reconstructed distribution.

[0119] Specifically, first initialize the deep belief network structure. Preferably, the deep belief network is set to include three hidden layers, each layer having 200 neurons. The number of input layer nodes is based on the number of output layer nodes of the autoencoder. In one embodiment, the output layer of the autoencoder has 200 nodes, and the number of input layer nodes is 200 nodes.

[0120] Furthermore, each restricted Boltzmann machine is pre-trained using the contrastive divergence algorithm to build and fine-tune the representation of latent features layer by layer, and the update increment of the weight is calculated as:

[0121]

[0122] In the formula, is the update increment of the weights of the restricted Boltzmann machine in the deep belief network, represents the weight from the xth visible unit to the yth hidden unit in the qth layer; is the learning rate of the deep belief network; is the joint activation probability symbol of the visible unit and the hidden unit under the data distribution, v x is the state of the xth visible unit, h y is a given visible state v x The probability of the yth hidden unit when ; is the symbol of the joint activation probability under the reconstructed distribution. Preferably, Set to 0.01.

[0123] Furthermore, the calculation method of the joint activation probability of data distribution can be expressed as:

[0124]

[0125] In the formula, It is Among the water quality monitoring samples The state of the visible units; It is The state of the visible units; Is a given visible state At that time, Water quality monitoring samples The probability of hidden units; is the total number of water quality monitoring samples.

[0126] Further, The calculation method can be expressed as:

[0127]

[0128] In the formula, is the Sigmoid activation function, represents the weight from the xth visible unit to the yth hidden unit, Indicates The bias of the hidden unit. is the state of the xth visible unit in the nth water quality monitoring sample.

[0129] Furthermore, the calculation method of the joint activation probability of the reconstructed distribution can be expressed as:

[0130]

[0131] In the formula, is the state of the xth visible unit in the nth sample reconstructed from the hidden state; is the state of the nth visible unit reconstructed from the hidden state; is a given hidden state The probability of the yth hidden unit of the nth sample when .

[0132] 2) Multiple pre-trained restricted Boltzmann machines are superimposed to form an initial deep belief network.

[0133] 3) Use the back-propagation algorithm based on the loss function to fine-tune the initial deep belief network and update the network parameters of the initial deep belief network.

[0134] The pre-trained restricted Boltzmann machine layers are superimposed to form the initial deep belief network, and the layers are connected by weight matrices. Furthermore, the back propagation algorithm based on the loss function is used to fine-tune the entire network, refine the feature representation and optimize the classification performance. The calculation method of the loss function can be expressed as:

[0135]

[0136] In the formula, is the loss function of the deep belief network, is the total number of categories, It is a deep belief network. The sample The predicted labels of target categories, It is a deep belief network. The sample The true label of the target category is the category of the water pollution sampling data, including "mild pollution", "moderate pollution" and "heavy pollution", corresponding to the label values ​​0, 1 and 2 respectively; The model predicts Samples are categories The probability of is the regularization coefficient of the loss function of the deep belief network; Represents the qth layer of the deep belief network from the visible unit x to the hidden unit The weight of represents the square of the weight. Preferably, Set to 0.3.

[0137] For water quality monitoring data, assuming that the input data includes attributes such as water temperature, pH value, dissolved oxygen, etc., after feature extraction and feature dimensionality reduction, the target categories for classification are light pollution, moderate pollution, and heavy pollution. The loss function calculates the error between the predicted category and the true category of each sample, and combines the L2 regularization term of the weight to prevent overfitting. Furthermore, for the water quality monitoring task, the weights of the deep belief network are updated using the gradient descent method, which can be expressed as:

[0138]

[0139] In the formula, is the weight of the updated deep belief network layer q from the visible unit x to the hidden unit y, is the loss function Weight The partial derivative of is the learning rate for the deep belief network update. Preferably, Set to 0.01.

[0140] Further, The calculation method can be expressed as:

[0141]

[0142] In the formula, It is The sample in the deep belief network Layer The activation of a neuron.

[0143] 4) The network parameters are converted into states through the quantum measurement process and used as the network parameters of the initial deep belief network in the next iteration.

[0144] 5) Until the initial deep belief network reaches the preset training conditions, a classifier model is built based on the initial deep belief network.

[0145] Updated weight parameters The state is converted through the quantum measurement process, which can be expressed as:

[0146]

[0147] In the formula, is a trace operation, is the deep belief network after the conversion state Layer from visible unit To hidden unit The weight of It is the observed quantity of the current water quality monitoring data characteristics.

[0148] Furthermore, the calculation method of the observation quantity of the current water quality monitoring data characteristics can be expressed as:

[0149]

[0150] In the formula, is the characteristic value of the water quality monitoring data observation of the kth category, It is a deep belief network. The quantum measured state of the weights of the layer from the visible unit x to the hidden unit y.

[0151] Further, The calculation method can be expressed as:

[0152]

[0153] In the formula, yes The corresponding parameterized quantum logic gate, is the initial state of the quantum bit. Further, The calculation method can be expressed as:

[0154]

[0155] In the formula, is the quantum Hamiltonian, In the upper right corner Is an imaginary unit.

[0156] In summary, As the weight parameter for the next iteration. Repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is to reach a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0157] In summary, a trained classifier model is obtained, through which the samples of water body data to be tested are identified, so as to analyze the governance status of the water body data.

[0158] Among them, another method for analyzing water pollution control sampling data based on machine learning provided by an embodiment of the present invention improves the classifier model, uses an improved deep belief network and fine-tuning strategy, allows the network to dynamically adjust the learning rate and update rules according to the contribution of each layer, optimizes the learning process and improves the classification accuracy. In addition, the feature extraction model is improved, and a neural network optimization algorithm based on the black hole information paradox is proposed. The optimization strategy based on the analysis of the black hole information paradox is used to dynamically adjust the neural network parameters, effectively solve the problem of gradient disappearance, explosion or falling into the local optimal solution, and enhance the stability of training. Furthermore, the embodiment of the present invention also designs an autoencoder algorithm and proposes a quantum state entangled autoencoder neural network to perform feature dimensionality reduction and quantum entanglement processing on the data. The algorithm enhances the correlation between features by simulating the entanglement of quantum bits, and improves the ability of feature compression and reconstruction through quantum mechanisms.

[0159] In summary, the embodiments of the present invention achieve more effective feature representation and dimensionality reduction through quantum state entanglement autoencoder neural network and improved deep belief network, which helps to improve the performance of the classifier. In addition, by adopting multi-agent collaboration, black hole information optimization algorithm and quantum state entanglement, the model's processing ability for complex water quality data and the accuracy of prediction are significantly improved.

[0160] Furthermore, based on the above-mentioned embodiments, the embodiments of the present invention also provide another method for analyzing water pollution control sampling data based on machine learning, which mainly illustrates the method for constructing a training sample set for water quality monitoring. Figure 3 A schematic diagram of a method for constructing a training sample set for water quality monitoring provided by an embodiment of the present invention is shown. Figure 3 As shown, the method comprises the following steps:

[0161] Step S10, obtaining water body monitoring samples.

[0162] Step S11, annotate water body monitoring samples and construct an initial water quality monitoring sample set.

[0163] The water body monitoring samples include water body samples from multiple water quality monitoring stations. In the specific implementation, the water body data of the above embodiment can be referred to. The labels annotated in the embodiment of the present invention are used to characterize the pollution degree of the water body monitoring samples. Among them, the labeling method of the embodiment of the present invention is manual labeling. In one embodiment, the annotated categories include "mild pollution", "moderate pollution" and "severe pollution", a total of 3 categories.

[0164] Step S12, performing data expansion on the initial water quality monitoring sample set through a preset generative adversarial network to generate expanded water quality monitoring samples.

[0165] It is understandable that in the task of the present invention, the collection, acquisition, labeling and preprocessing of training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor model generalization ability and affect the accuracy of the model. Traditional technologies are often limited by the number and diversity of samples in data collection and processing, resulting in weak model generalization ability.

[0166] The present invention adopts a generative adversarial network algorithm based on multi-agent collaboration to generate samples, thereby realizing data expansion, wherein the generator and discriminator of the generative adversarial network include agents, and the generative adversarial network adopts an agent collaboration strategy to update parameters.

[0167] Specifically, the generative adversarial network algorithm based on multi-agent collaboration of the embodiment of the present invention includes two parts: a generator and a discriminator. The generator is responsible for generating realistic water pollution data samples, and the discriminator attempts to distinguish these generated samples from real samples. The present invention adopts an agent setting strategy in the generator and the discriminator, and each agent can learn independently and share learning results with other agents to form a collaborative network, thereby improving the model's ability to process complex water quality data.

[0168] The specific implementation includes the following steps:

[0169] 1) Initialize multiple agents in the generator and discriminator, each agent is responsible for a specific attribute, such as The first agent is responsible for the water temperature attribute of the water quality monitoring data, and the second agent is responsible for the pH value attribute of the water quality monitoring data. Agents set parameter vectors and , corresponding to the generator and the discriminator.

[0170]

[0171]

[0172] In the formula, randz(d g ) indicates the generation of d g dimensional normally distributed random vector; randz(d d ) indicates the generation of d d dimensional normally distributed random vector; d g Indicates the parameter dimension of the generator. For example, if the attribute value of water quality monitoring data is 10, then the parameter dimension of the generator is 10; d d Represents the parameter dimension of the discriminator; Represents the parameter vector of the i-th generator agent. For example, for the water temperature attribute, its parameter vector value can be 35; represents the parameter vector of the i-th discriminator agent.

[0173] 2) During the training process of the generative adversarial network, an adaptive mechanism is used to dynamically adjust the discrimination threshold of the discriminator of the generative adversarial network. Each agent can focus on data generation and discrimination tasks of specific attributes. Through multi-agent collaboration, complex water quality data can be better processed, and the fidelity of generated data and the discrimination ability of the discriminator can be improved.

[0174] Specifically, during the training process, the generator agent tries to generate data, and the discriminator agent tries to distinguish between generated data and real data. Each discriminator agent is responsible for distinguishing a data sample with a specific attribute. For example, the first agent distinguishes water temperature data, and the second agent distinguishes pH value data. The generator agent tries to deceive the discriminator agent, while the discriminator agent tries to correctly distinguish between real data and generated data. The constraints of the generator during the training process are:

[0175]

[0176] Moreover, the constraints of the discriminator during training are:

[0177]

[0178] In the formula, represents the generating function of the i-th generator agent; represents the discriminant function of the i-th discriminator agent; zg is derived from the prior distribution The noise obtained by sampling in is the dynamic threshold of the tth iteration; xg is the real data sample. min is the minimization function; The function that is minimized corresponds to Parameter; max To maximize the function, The function corresponding to the maximization parameter.

[0179] In the training process of traditional generative adversarial networks, the discriminator outputs a probability value between 0 and 1, indicating the possibility that the input sample is considered true. The traditional method prefers 0.5 as the threshold for distinguishing true from false. This invention adopts an adaptive mechanism to dynamically adjust the threshold to cope with the capabilities of the generator at different stages. Specifically, the dynamic threshold of the discriminator is defined for:

[0180]

[0181] In the formula, is the dynamic threshold of the t-1th iteration, is the adjustment rate parameter, is the accuracy of the discriminator at the t-1th iteration. Through this adaptive mechanism, the discriminator can dynamically adjust the threshold for distinguishing true from false to cope with changes in the generator's generation ability, thereby enhancing the robustness and adaptability of the generative adversarial network in processing complex water quality data.

[0182] Further, The calculation method can be expressed as:

[0183]

[0184] In the formula, , , , They represent the number of true positive examples, true negative examples, false positive examples, and false negative examples in the t-1th iteration respectively. Assume that in the water quality monitoring task, the generator agent is responsible for generating water temperature data, and the discriminator agent is responsible for judging the authenticity of the water temperature data. In the 100th iteration, the attribute value of the water temperature data sample generated by the generator is 16, and the discrimination probability output by the discriminator is 30%.

[0185] 3) Dynamically interpolate the agent to update the network parameters of the generative adversarial network.

[0186] Specifically, the dynamic feature interpolation method is used to update the generator parameters. In the specific implementation, define The feature vector generated by the agent is , the way in which the dynamic feature interpolation method updates the feature vector can be expressed as:

[0187]

[0188] In the formula, is the updated feature vector of the ith agent, For the The feature vector generated by the agent, The feature vector generated for the i-th agent; It is from Agent to The interpolation weight of each agent can be calculated as:

[0189]

[0190] In the formula, Represents the feature vector and The square of the Euclidean distance between them, that is, the square of the L2 norm; Represents the feature vector and The square of the Euclidean distance between them; For the The feature vector generated by the generator agent. In the water quality monitoring task, the feature vector generated by the generator agent may include attributes such as water temperature and pH value. Through the dynamic feature interpolation method, the feature vector of the agent will be updated according to the distance between it and other agents, enhancing the diversity and authenticity of the generated samples. At the same time, the generator and discriminator agents adjust their respective strategies through the information exchange protocol function to enhance the overall generation quality and discrimination accuracy.

[0191] 4) Among them, the agents exchange information through the defined communication protocol to assist each other in completing the task better. In one embodiment, the agents adjust their respective strategies through the information exchange protocol function to enhance the overall generation quality and discrimination accuracy. The parameter update method of the i-th generator agent can be expressed as:

[0192]

[0193] Moreover, the parameter update method of the i-th discriminator agent can be expressed as:

[0194]

[0195] In the formula, is the updated parameter of the agent of the i-th generator, which is used as the parameter of the next iteration; is the updated parameter of the i-th discriminator agent, which is also used as the parameter of the next iteration; is the learning rate of the generator; is the learning rate of the discriminator; is the information exchange protocol function; Characterize the strategic impact of the agent of the j-th generator on the agent of the i-th generator; Characterizes the influence of the agent of the j-th discriminator on the strategy of the agent of the i-th discriminator. Preferably, and Set to 0.01 and 0.05 respectively.

[0196] Among them, for the strategy exchange between the generator agents, the calculation method can be expressed as:

[0197]

[0198] In the formula, represents the parameter vector of the i-th generator agent, represents the parameter vector of the j-th generator agent, represents the parameter vector of the k-th generator agent; is the generator agent coordination factor; It represents the similarity of the parameter vectors between the jth agent and the ith agent of the generator by calculating through the dot product operation; Characterizes the similarity of the parameter vectors between the kth agent and the ith agent of the generator. Preferably, Set to 0.3.

[0199] Similarly, for the strategy exchange between discriminator agents, the calculation method is as follows:

[0200]

[0201] In the formula, represents the parameter vector of the i-th discriminator agent, represents the parameter vector of the j-th discriminator agent, represents the parameter vector of the k-th discriminator agent; It represents the similarity of the parameter vector between the j-th agent and the i-th agent of the discriminator by calculating through the dot product operation; Characterizes the similarity of the parameter vector between the k-th agent and the i-th agent of the discriminator; is the discriminator agent coordination factor. Preferably, Set to 0.7.

[0202] 5) Furthermore, the embodiment of the present invention also uses a loss function to constrain the training process. Specifically, the present invention uses a probability distribution-based method to calculate the loss and optimize the similarity between the generated data and the real data. The calculation method of the loss function can be expressed as:

[0203]

[0204] In the formula, is the loss function of the generative adversarial network, represents the parameter vector of the generator agent, represents the parameter vector of the discriminator agent; is the Sigmoid activation function; and Represent the logarithmic probability of the discriminator's discrimination results for real data and generated data respectively. In the water quality monitoring task, assuming that the water temperature data sample generated by the generator is As1, the discrimination probability output by the discriminator is 50%, which means that the input sample As1 has a 50% chance of being regarded as real data and a 50% chance of being regarded as generated data. represents the generating function of the i-th generator agent; represents the discriminant function of the i-th discriminator agent; zg is derived from the prior distribution p zg The noise sampled in is xg, and xg is the real data sample.

[0205] 6) Repeat the above steps until the preset stop iteration condition is met, indicating that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0206] Step S13, merging the expanded water quality monitoring samples and the initial water quality monitoring sample set to construct a training sample set for water quality monitoring.

[0207] Another method for analyzing water pollution control sampling data based on machine learning provided by an embodiment of the present invention designs a generative adversarial network for data expansion, wherein the generative adversarial network of multi-agent collaboration in an embodiment of the present invention enables each agent to focus on a specific attribute of the data, and increases the diversity and quality of training data through intelligent sample generation. And through the collaboration between agents, the generation quality and discrimination accuracy of the overall network can be improved, and the overfitting problem caused by insufficient data can be reduced.

[0208] Furthermore, based on the above embodiments, the present invention also provides a water pollution control sampling data analysis device based on machine learning. Figure 4 FIG. 1 shows a schematic diagram of a water pollution control sampling data analysis device based on machine learning provided by an embodiment of the present invention. Figure 4 As shown, the device includes: a data acquisition module 100, used to acquire water body data of a water quality monitoring site; a feature extraction module 200, used to extract features from the water body data through a pre-built feature extraction model, and output key features in the water body data; wherein the feature extraction model extracts features through a neural network, and a neural evolution fitness function is used to dynamically adjust the parameters of each layer of the neural network; a training sample set for water quality monitoring used to train the neural network is constructed after data expansion based on a generative adversarial network, and the generative adversarial network uses an intelligent agent collaboration strategy to update parameters; data processing The processing module 300 is used to perform feature dimensionality reduction on key features, and to perform quantum entanglement processing on the key features after dimensionality reduction to generate water quality monitoring samples to be tested; the execution module 400 is used to input the water quality monitoring samples to be tested into a preset classifier model, and output the classification results of the water quality monitoring samples to be tested; the classifier model adopts an improved deep belief network as the classifier algorithm, and the deep belief network is composed of a multi-layer restricted Boltzmann machine, and each layer of restricted Boltzmann machine is used to learn different abstract levels of data; the output module 500 is used to analyze the governance status corresponding to the water body data according to the classification results.

[0209] An embodiment of the present invention provides a water pollution control sampling data analysis device based on machine learning, and its implementation principle and technical effects are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference can be made to the corresponding contents in the aforementioned method embodiment.

[0210] Furthermore, based on the above embodiment, the embodiment of the present invention also provides another water pollution control sampling data analysis device based on machine learning. Figure 5 A structural schematic diagram of another water pollution control sampling data analysis device based on machine learning provided by an embodiment of the present invention is shown, wherein the above-mentioned output module 500 is used to determine the classification category corresponding to the water body data based on the classification result; and determine the control situation corresponding to the water body data according to the water body pollution degree represented by the classification category.

[0211] The above-mentioned data processing module 300 is also used to perform dimensionality reduction processing on key features through the encoding layer of the autoencoder neural network to obtain reduced-dimensional features; simulate the entanglement of the quantum bits of the reduced-dimensional features through the quantum entanglement layer to generate quantum entangled features; and reconstruct the quantum entangled features through the decoding layer of the autoencoder neural network to generate water quality monitoring samples to be tested.

[0212] The above-mentioned data processing module 300 is also used to calculate the error gradient corresponding to the output of the decoding layer during the training process of the autoencoder neural network, and based on the error gradient, update the network parameters of the autoencoder neural network through the back propagation algorithm.

[0213] The feature extraction module 200 is also used to initialize a preset neural network based on predefined structural parameters; input a preset water quality monitoring training sample set into the neural network, perform forward propagation, and calculate the fitness score corresponding to the network state of the neural network; based on the fitness score and the partial derivative of the cost function with respect to the network weight of the neural network, update the network weight of the neural network; the fitness score is calculated based on the entropy of the output of the neural network, and the partial derivative includes the mutual information between the input and output of the neural network; until the neural network meets the preset training requirements, a feature extraction model is constructed based on the neural network.

[0214] The above-mentioned execution module 400 is also used to use a preset training sample set for water quality monitoring, and use a contrast divergence algorithm to pre-train multiple restricted Boltzmann machines respectively; superimpose multiple restricted Boltzmann machines after pre-training to form an initial deep belief network; use a back-propagation algorithm based on a loss function to fine-tune the initial deep belief network and update the network parameters of the initial deep belief network; convert the network parameters into states through a quantum measurement process, which serve as the network parameters of the initial deep belief network in the next iteration; until the initial deep belief network reaches the preset training conditions, a classifier model is constructed based on the initial deep belief network.

[0215] The above-mentioned execution module 400 is also used to input the training sample set of water quality monitoring into the restricted Boltzmann machine, determine the state of the training sample set in the visible unit of the restricted Boltzmann machine, and the probability of the hidden unit of the restricted Boltzmann machine; based on the state and probability, calculate the first joint activation probability and the second joint activation probability; the first joint activation probability is used to characterize the joint activation probability of the visible unit and the hidden unit under the data distribution; the second joint activation probability is used to characterize the joint activation probability of the reconstructed distribution; based on the first joint activation probability and the second joint activation probability, update the weights from the visible unit to the hidden unit of the restricted Boltzmann machine.

[0216] Furthermore, the device also includes a construction module 600, which is used to obtain water body monitoring samples; the water body monitoring samples include water body samples from multiple water quality monitoring stations; the water body monitoring samples are labeled to construct an initial water quality monitoring sample set; the labeled labels are used to characterize the degree of pollution of the water body monitoring samples; the initial water quality monitoring sample set is data expanded through a preset generative adversarial network to generate expanded water quality monitoring samples; wherein the generator and discriminator of the generative adversarial network include intelligent agents, and the generative adversarial network adopts an intelligent agent collaboration strategy to update parameters; the expanded water quality monitoring samples and the initial water quality monitoring sample set are merged to construct a training sample set for water quality monitoring.

[0217] The above-mentioned building module 600 is also used to dynamically adjust the discrimination threshold of the discriminator of the generative adversarial network using an adaptive mechanism during the training process of the generative adversarial network; and to dynamically interpolate the intelligent agent to update the network parameters of the generative adversarial network.

[0218] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above Figures 1 to 3 The steps of the method are shown.

[0219] The embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor. Figures 1 to 3 The embodiment of the present invention also provides a structural diagram of an electronic device, such as Figure 6 FIG. 1 is a schematic diagram of the structure of the electronic device, wherein the electronic device includes a processor 61 and a memory 60, the memory 60 stores computer executable instructions that can be executed by the processor 61, and the processor 61 executes the computer executable instructions to implement the above Figures 1 to 3 The method shown. Figure 6 In the illustrated embodiment, the electronic device further includes a bus 62 and a communication interface 63 , wherein the processor 61 , the communication interface 63 and the memory 60 are connected via the bus 62 .

[0220] Among them, the memory 60 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 62 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc., and can also be an AMBA (Advanced Microcontroller Bus Architecture, on-chip bus standard) bus, wherein AMBA defines three types of buses, including APB (Advanced Peripheral Bus) bus, AHB (Advanced High-performance Bus) bus and AXI (Advanced eXtensible Interface) bus. The bus 62 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0221] The processor 61 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 61. The above processor 61 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 61 reads the information in the memory and combines its hardware to complete the above Figures 1 to 3 Any of the methods shown.

[0222] A computer program product of a water pollution control sampling data analysis method and device based on machine learning provided by an embodiment of the present invention includes a computer-readable storage medium storing a program code, and the instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can refer to the method embodiment, which will not be repeated here. A person skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system described above can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here. In addition, in the description of the embodiment of the present invention, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For those skilled in the art, the specific meaning of the above terms in the present invention can be understood in specific circumstances. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0223] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. Finally, it should be noted that the above embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A water pollution control sampling data analysis method based on machine learning, characterized in that: The method comprises: Obtain water body data from water quality monitoring sites; the water body data includes water temperature, pH value, dissolved oxygen content, conductivity, turbidity, and heavy metal content of the water body; The water body data is subjected to feature extraction through a pre-constructed feature extraction model, and key features in the water body data are output; wherein the feature extraction model extracts features through a neural network, and the parameters of each layer of the neural network are dynamically adjusted using a neural evolution fitness function; a training sample set for water quality monitoring used to train the neural network is constructed after data expansion based on a generative adversarial network, and the generative adversarial network uses an intelligent agent collaboration strategy to update parameters; Performing feature dimensionality reduction on the key features, and performing quantum entanglement processing on the key features after dimensionality reduction to generate water quality monitoring samples to be tested; The water quality monitoring sample to be tested is input into a preset classifier model, and the classification result of the water quality monitoring sample to be tested is output; the classifier model adopts an improved deep belief network as a classifier algorithm, and the deep belief network is composed of multiple layers of restricted Boltzmann machines, and each layer of the restricted Boltzmann machine is used to learn different abstract levels of data; Analyze the treatment status corresponding to the water body data according to the classification results; The step of performing feature dimensionality reduction on the key features and performing quantum entanglement processing on the key features after dimensionality reduction to generate a water quality monitoring sample to be tested includes: Performing dimensionality reduction processing on the key features through the encoding layer of the autoencoder neural network to obtain dimensionality reduction features; Simulating the entanglement of the quantum bits of the dimension reduction feature through the quantum entanglement layer to generate a quantum entanglement feature; Reconstructing the quantum entanglement feature through the decoding layer of the autoencoder neural network to generate a water quality monitoring sample to be tested; The quantum entanglement layer simulates the entanglement of the quantum bits of the dimensionality reduction feature as follows: In the formula, represents the output of the quantum entanglement layer of the autoencoder, is the weight parameter of the quantum entanglement layer of the autoencoder, For the autoencoder Tier The activation value of a neuron; The calculation method of the weight parameters of the quantum entanglement layer is expressed as: In the formula, is the Euclidean distance between the xth and yth features, is the square of the Euclidean distance; is the Euclidean distance between the xth and zth features, is the square of the Euclidean distance; is the temperature parameter of the quantum entanglement layer of the autoencoder, and the smaller This makes the weights more concentrated on features that are closer.

2. The method according to claim 1, characterized in that The step of analyzing the treatment status corresponding to the water body data according to the classification result includes: Based on the classification result, determining the classification category corresponding to the water body data; The treatment situation corresponding to the water body data is determined according to the water body pollution degree represented by the classification category.

3. The method according to claim 1, characterized in that The method further comprises: During the training process of the autoencoder neural network, the error gradient corresponding to the output of the decoding layer is calculated, and based on the error gradient, the network parameters of the autoencoder neural network are updated through a back propagation algorithm.

4. The method according to claim 1, characterized in that: The method for constructing the feature extraction model comprises: Initialize the preset neural network based on predefined structural parameters; Inputting a preset water quality monitoring training sample set into the neural network, performing forward propagation, and calculating a fitness score corresponding to a network state of the neural network; updating the network weights of the neural network based on the fitness score and a partial derivative of a cost function with respect to the network weights of the neural network; the fitness score is calculated based on the entropy of the output of the neural network, the partial derivative comprising mutual information between the input and output of the neural network; Until the neural network meets the preset training requirements, a feature extraction model is constructed based on the neural network.

5. The method according to claim 1, characterized in that The method for constructing the classifier model comprises: Using a preset water quality monitoring training sample set, and using the contrast divergence algorithm to pre-train multiple restricted Boltzmann machines respectively; Superimposing the plurality of restricted Boltzmann machines after pre-training to form an initial deep belief network; Fine-tune the initial deep belief network using a back-propagation algorithm based on a loss function to update network parameters of the initial deep belief network; Converting the network parameters into states through a quantum measurement process as network parameters of the initial deep belief network in the next iteration; Until the initial deep belief network reaches a preset training condition, a classifier model is constructed based on the initial deep belief network.

6. The method according to claim 5, characterized in that The step of using a preset water quality monitoring training sample set and using a contrast divergence algorithm to pre-train multiple restricted Boltzmann machines comprises: Inputting a training sample set for water quality monitoring into a restricted Boltzmann machine, determining the state of the visible unit of the restricted Boltzmann machine and the probability of the hidden unit of the restricted Boltzmann machine; Based on the state and probability, a first joint activation probability and a second joint activation probability are calculated; the first joint activation probability is used to characterize the joint activation probability of visible units and hidden units under the data distribution; the second joint activation probability is used to characterize the joint activation probability of the reconstructed distribution; Based on the first joint activation probability and the second joint activation probability, weights from visible units to hidden units of the restricted Boltzmann machine are updated.

7. The method according to claim 1, characterized in that The method for constructing the training sample set for water quality monitoring includes: Obtaining water body monitoring samples; the water body monitoring samples include water body samples from multiple water quality monitoring stations; The water body monitoring samples are labeled to construct an initial water quality monitoring sample set; the labeled labels are used to characterize the pollution degree of the water body monitoring samples; The initial water quality monitoring sample set is expanded by using a preset generative adversarial network to generate expanded water quality monitoring samples; wherein the generator and the discriminator of the generative adversarial network include agents, and the generative adversarial network adopts an agent collaboration strategy to update parameters; The expanded water quality monitoring samples and the initial water quality monitoring sample set are combined to construct a training sample set for water quality monitoring.

8. The method according to claim 7, characterized in that The method further comprises: During the training process of the generative adversarial network, an adaptive mechanism is used to dynamically adjust the discrimination threshold of the discriminator of the generative adversarial network; and The agent is dynamically interpolated to update the network parameters of the generative adversarial network.

9. A water pollution control sampling data analysis device based on machine learning, characterized in that: The device comprises: A data acquisition module is used to acquire water body data from a water quality monitoring site; the water body data includes water temperature, pH value, dissolved oxygen content, conductivity, turbidity, and heavy metal content of the water body; A feature extraction module is used to extract features from the water body data through a pre-built feature extraction model and output key features in the water body data; wherein the feature extraction model extracts features through a neural network, and dynamically adjusts the parameters of each layer of the neural network using a neural evolution fitness function; a training sample set for water quality monitoring used to train the neural network is constructed after data expansion based on a generative adversarial network, and the generative adversarial network uses an intelligent agent collaboration strategy to update parameters; A data processing module is used to perform feature dimensionality reduction on the key features, and to perform quantum entanglement processing on the key features after dimensionality reduction to generate water quality monitoring samples to be tested; An execution module is used to input the water quality monitoring sample to be tested into a preset classifier model, and output the classification result of the water quality monitoring sample to be tested; the classifier model adopts an improved deep belief network as a classifier algorithm, and the deep belief network is composed of multiple layers of restricted Boltzmann machines, and each layer of the restricted Boltzmann machine is used to learn different abstract levels of data; An output module, used for analyzing the treatment status corresponding to the water body data according to the classification result; The data processing module is further used to perform dimensionality reduction processing on the key features through the encoding layer of the autoencoder neural network to obtain dimensionality reduction features; simulate the entanglement of the quantum bits of the dimensionality reduction features through the quantum entanglement layer to generate quantum entanglement features; perform feature reconstruction on the quantum entanglement features through the decoding layer of the autoencoder neural network to generate water quality monitoring samples to be tested; The quantum entanglement layer simulates the entanglement of the quantum bits of the dimensionality reduction feature as follows: In the formula, represents the output of the quantum entanglement layer of the autoencoder, is the weight parameter of the quantum entanglement layer of the autoencoder, For the autoencoder Tier The activation value of a neuron; The calculation method of the weight parameters of the quantum entanglement layer is expressed as: In the formula, is the Euclidean distance between the xth and yth features, is the square of the Euclidean distance; is the Euclidean distance between the xth and zth features, is the square of the Euclidean distance; is the temperature parameter of the quantum entanglement layer of the autoencoder, and the smaller This makes the weights more concentrated on features that are closer.

Citation Information

Patent Citations

  • Membrane component membrane pollution detection method based on multi-feature information fusion

    CN115147645A

  • Quantum credit card fraud detector-based prediction method and related equipment

    CN117788142A

  • Intelligent equipment lubrication monitoring method and device based on artificial intelligence

    CN118032327A

  • Water environment quality remote sensing analysis method and system, electronic equipment and storage medium

    CN118365192A

  • UWB positioning antenna

    CN221262689U