Analytical method and device for the influence of ultraviolet light intensity on water treatment effect
By using multi-level neural networks and deep confidence networks in water treatment technology, combining gradient accumulation and quantum encoding technology, the instability and accuracy of ultraviolet disinfection effect evaluation in the prior art has been solved, and a more efficient and accurate water treatment effect evaluation has been achieved.
Patent Information
- Application Number
- CN202411570946.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The prior art is difficult to evaluate the effect of ultraviolet light disinfection in real time and accurately, especially in environments with complex and dynamic changes in water quality, resulting in unstable model performance and classification accuracy that need to be improved.
Multi-level neural networks are used as feature extraction model, network parameters are optimized through gradient accumulation strategies, and dimensionality reduction is performed by combining activation functions and quantum encoding functions. Deep confidence networks are used as classification tools to adjust weights and structures through adaptive collaborative filtering.
It improves the learning stability and efficiency of the model in complex data environments, enhances the ability to capture the relationship between ultraviolet light intensity and water treatment effect, and improves classification accuracy and efficiency.
Smart Images

Figure CN119089177B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an analysis method and device for the influence of ultraviolet light intensity on water treatment effect. Background Art
[0002] Ultraviolet disinfection is a technology that uses ultraviolet light to irradiate water to destroy the DNA structure of microorganisms in the water, thereby achieving the purpose of disinfection. In the water treatment process, the intensity of ultraviolet light is one of the key factors affecting the disinfection effect. However, the penetration ability of ultraviolet light in water is affected by many factors, such as water quality, suspended particles, organic matter, etc., which makes the relationship between ultraviolet light intensity and water treatment effect complicated.
[0003] Traditional water treatment effect evaluation methods often rely on experimental determination and empirical judgment, lacking real-time and accuracy, and are difficult to meet the needs of modern water treatment automation and intelligence. With the development of sensor technology and data processing technology, it has become possible to accurately evaluate the effect of UV disinfection by real-time monitoring of UV light intensity and water quality parameters combined with advanced data analysis methods.
[0004] Among them, the existing technology proposes a solution to use water quality samples to build a sample set to train a water quality prediction model. However, the traditional solution usually uses conventional feature extraction methods. During the feature extraction process, the existing technology is easily affected by gradient problems and local optimal solutions, resulting in unstable model performance and difficulty in effectively capturing complex features in the data. Moreover, the classifier of the existing model may not be flexible enough when dealing with complex data relationships, especially in a dynamically changing data environment, and the classification accuracy and efficiency need to be improved. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide an analysis method and device for the influence of ultraviolet light intensity on water treatment effect, which can cope with the complexity of water body data and accurately capture the key features related to ultraviolet light intensity and water treatment effect from a large amount of data; and can effectively capture complex data relationships, more flexibly and accurately determine water treatment effects, and improve classification accuracy.
[0006] In the first aspect, an embodiment of the present invention provides an analysis method for the influence of ultraviolet light intensity on water treatment effect, the method comprising: collecting water sample data under preset ultraviolet light conditions; using a pre-constructed feature extraction model to extract key correlation features from the water sample data; wherein the feature extraction model comprises a multi-layer neural network, each layer of the neural network contains a linear transformation and a nonlinear activation function, and the network parameters of the neural network are obtained based on the accumulated network parameter gradient optimization; the key correlation features are reduced in dimension by means of activation functions and quantum coding functions; a pre-trained deep belief network is used as a classification tool to output the water treatment effect classification results of the key correlation features after the dimensionality reduction processing; the deep belief network uses an adaptive collaborative filtering strategy based on the input data to adjust the weights and structure; based on the water treatment effect classification results, the water quality of the water sample data under ultraviolet light conditions is determined.
[0007] In combination with the first aspect, an embodiment of the present invention also provides a first implementation manner of the first aspect, wherein the above-mentioned deep belief network is composed of multiple restricted Boltzmann machines, and the output layer simulated by quantum logic gates is used at the end of the deep belief network to output the final classification result; the training method of the deep belief network includes: obtaining a preset training sample set, and using the training sample set to pre-train each restricted Boltzmann machine layer by layer; in the layer-by-layer pre-training process, based on the output of the restricted Boltzmann machine, dynamically fine-tuning the weights of each layer of the deep belief network; and converting the visible layer state of the deep belief network into a quantum state, and updating the network parameters of the deep belief network based on the quantum state; until all restricted Boltzmann machine layers reach a predetermined iteration index, a trained deep belief network is obtained.
[0008] In combination with the first aspect, an embodiment of the present invention also provides a second implementation of the first aspect, wherein the above method also includes: using chaos theory to globally optimize the deep belief network.
[0009] In combination with the first aspect, an embodiment of the present invention also provides a third implementation method of the first aspect, wherein a method for constructing a feature extraction model comprises: inputting a preset training sample set through a multi-layer neural network of the feature extraction model to gradually extract correlation features between ultraviolet light intensity and water treatment effect; each layer comprises a linear transformation and a nonlinear activation function, and uses an attention mechanism to focus on key features; performing a gradient accumulation operation on the neural network, and updating parameters of the neural network based on the accumulated gradients; monitoring the performance indicators of the neural network until the neural network meets a preset iteration termination condition, and constructing a feature extraction model based on the multi-layer neural network.
[0010] In combination with the first aspect, an embodiment of the present invention also provides a fourth implementation method of the first aspect, wherein the step of reducing the dimension of the key correlation features through an activation function and a quantum coding function includes: inputting the key correlation features into an encoder of a preset autoencoder network, and converting the key correlation features into a low-dimensional quantum state representation through an activation function and a quantum coding function; based on the unitary matrix corresponding to the quantum gate operation, optimizing the low-dimensional quantum state representation using group theory principles; wherein the unitary matrix includes the Hamiltonian corresponding to the low-dimensional quantum state representation; using the decoder of the autoencoder network in combination with quantum computing to restore the low-dimensional quantum state representation to the original data, thereby obtaining the reduced-dimensional key correlation features.
[0011] In combination with the first aspect, an embodiment of the present invention also provides a fifth implementation of the first aspect, wherein the parameters of the encoder and the decoder are updated based on the gradient descent method and the loss function of the autoencoder network, and the loss function is calculated based on the reconstruction error and the regularization loss.
[0012] In combination with the first aspect, an embodiment of the present invention also provides a sixth implementation of the first aspect, wherein pre-collected water quality samples are obtained and the water quality samples are labeled; wherein the labeled labels are used to indicate the water treatment effects corresponding to the water quality samples; the water quality samples are collected from high-precision ultraviolet light intensity sensors and water quality monitoring equipment, and the water quality samples are water quality data under ultraviolet light source illumination; data expansion is performed on the water quality samples through a generative adversarial network to generate expanded samples; the noise vector of the generator of the generative adversarial network is dynamically adjusted based on the feedback of the discriminator; the expanded samples and the water quality samples are merged to construct a training sample set.
[0013] In combination with the first aspect, an embodiment of the present invention also provides a seventh implementation of the first aspect, wherein the step of dynamically adjusting the noise vector of the generator of the generative adversarial network based on the feedback of the discriminator includes: calculating the diversity loss and content loss of the expanded samples of the generative adversarial network based on the feedback of the discriminator of the generative adversarial network; generating a composite loss function based on the diversity loss and content loss; optimizing the generator parameters and discriminator parameters of the generative adversarial network based on the composite loss function, and adjusting the noise vector of the generator.
[0014] In a second aspect, an embodiment of the present invention provides an analysis device for the influence of ultraviolet light intensity on water treatment effect, the device comprising: a data acquisition module, used to collect water sample data under preset ultraviolet light conditions; a data processing module, used to extract key correlation features between ultraviolet light intensity and treatment effect from water sample data using a pre-built feature extraction model; wherein the feature extraction model comprises a multi-layer neural network, each layer of the neural network contains a linear transformation and a nonlinear activation function, and the network parameters of the neural network are obtained based on the accumulated network parameter gradient optimization; a dimensionality reduction module, used to perform dimensionality reduction processing on key correlation features through activation functions and quantum coding functions; an execution module, used to use a pre-trained deep belief network as a classification tool, and output a water treatment effect classification result corresponding to the key correlation features after dimensionality reduction processing; the deep belief network uses an adaptive collaborative filtering strategy based on the input data to adjust the weights and structure; an output module, used to determine the water quality of the water sample data under ultraviolet light conditions based on the water treatment effect classification results.
[0015] In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a storage device; a computer program is stored on the storage device, and the computer program executes the above method when executed by the processor.
[0016] The embodiments of the present invention bring the following beneficial effects: the present invention provides an analysis method and device for the influence of ultraviolet light intensity on water treatment effect, by obtaining water sample data under preset ultraviolet light conditions, and using the constructed feature extraction model to extract features from the data. The model updates network parameters based on the gradient accumulation strategy, which can enhance the stability and efficiency of model learning to cope with the complexity of water sample data. In addition, a deep belief network is also used to identify the data and determine its water treatment effect. The weights and structure of the deep belief network are adjusted based on the data, which can effectively capture complex data relationships. In addition, the embodiment of the present invention also reduces the dimension of the extracted key associated features through activation functions and quantum coding functions. After the data is processed by the activation function, the processed data is encoded in the quantum state to reduce the data dimension. This method not only compresses the data, but also retains key information. In summary, the embodiment of the present invention can accurately identify the characteristics of the data so as to accurately evaluate the water treatment effect of the water body under the corresponding ultraviolet light conditions.
[0017] 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 and the drawings.
[0018] 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
[0019] 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.
[0020] Figure 1 A flow chart of an analysis method for the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention;
[0021] Figure 2 A flow chart of another method for analyzing the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention;
[0022] Figure 3 A flowchart of a method for constructing a training sample set provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of the structure of a device for analyzing the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention;
[0024] Figure 5 A schematic structural diagram of another device for analyzing the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention;
[0025] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the following embodiments of the present invention are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0027] The embodiments of the present invention provide a method and device for analyzing the influence of ultraviolet light intensity on water treatment effect, which can improve the accuracy of data analysis.
[0028] To facilitate understanding of this embodiment, firstly, an analysis method for the influence of ultraviolet light intensity on water treatment effect disclosed in an embodiment of the present invention is described. Figure 1 FIG. 1 is a flow chart showing a method for analyzing the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0029] Step S102, collecting water sample data under preset ultraviolet light conditions.
[0030] The data of the present invention is collected from a high-precision ultraviolet light intensity sensor and a water quality monitoring device. After the data is collected, it is stored in a structured JSON format.
[0031] In one embodiment, the attributes of the data include: light intensity Indicates the real-time light intensity of the UV light source, measures the energy of the light during UV disinfection or photocatalysis, and directly affects the efficiency of disinfection or oxidation reactions. Indicates the temperature during water treatment, which affects factors such as chemical reaction rate, microbial activity and solubility, and is crucial to treatment efficiency and effect. Indicates the pH value of water, which affects the existence form of chemical substances in water, the activity of microorganisms and the effect of treatment agents. Indicates the turbidity of water, reflecting the content of suspended particles in the water. High turbidity will reduce light transmittance and affect photocatalysis and filtration efficiency. Indicates the conductivity of water, measures the total amount of soluble ions in water, and indirectly reflects the salt content, mineral content and pollution level of the water. Indicates the content of dissolved oxygen in water, which has a direct impact on the survival of aquatic organisms, redox reactions, etc. It indicates the content of ammonia nitrogen in water and is an important indicator for measuring the degree of nitrogen pollution in water. Indicates the total phosphorus content in water. Too high a level can lead to ecological problems such as algal blooms. Indicates the chemical oxygen demand in water and is an indicator for evaluating the degree of organic pollution in water. It indicates the penetration rate of ultraviolet rays in water, which is affected by factors such as turbidity and chromaticity, affecting the efficiency of ultraviolet disinfection.
[0032] It should be noted that this embodiment is only used to illustrate one data format and type of the present invention. In actual applications, the attributes of data are usually more than 10 attributes, and the number of attributes of data may reach dozens or even hundreds.
[0033] Step S104: extract key related features from the water body sample data using a pre-built feature extraction model.
[0034] Step S106, performing dimensionality reduction processing on the key correlation features through activation function and quantum coding function.
[0035] Step S108, using a pre-trained deep belief network as a classification tool, outputting the water treatment effect classification results corresponding to the key associated features after dimensionality reduction processing.
[0036] The embodiment of the present invention uses a trained feature extraction model, a data dimension reduction model and a classifier model to process the collected samples, and realizes an instant evaluation of the effect of ultraviolet light intensity on water treatment. Among them, the feature extraction model is constructed by applying the gradient accumulation neural network technology, and is implemented through a multi-level neural network. Each level contains linear transformation and nonlinear activation function, and gradually optimizes the network weights according to the accumulated gradient. The model can more accurately capture the key features related to ultraviolet light intensity and water treatment effect from a large amount of data. The deep belief network relies on an adaptive collaborative filtering strategy to dynamically adjust the weights and structures according to the input. The model can more flexibly and accurately determine the water treatment effect when processing the features after dimensionality reduction, reflecting a highly intelligent decision-making mechanism.
[0037] In addition, the embodiment of the present invention uses quantum bit encoding technology to perform dimensionality reduction processing on the extracted features. This method can not only reduce the computational complexity, but also improve the efficiency and accuracy of subsequent analysis while maintaining important information.
[0038] Step S110, based on the water treatment effect classification result, determine the water quality of the water sample data under ultraviolet light conditions.
[0039] In this embodiment, the classification categories of water treatment effects include: poor treatment effect, medium treatment effect, good treatment effect, and excellent treatment effect, a total of 4 categories.
[0040] Among them, after obtaining the four categories of poor treatment effect, medium treatment effect, good treatment effect and excellent treatment effect, the water quality of the water sample data under the corresponding ultraviolet light conditions can be determined.
[0041] Furthermore, based on the above classification results, guidance can be provided for water treatment methods. For example, for poor treatment effects, possible reasons for the poor treatment effects should be explored, such as insufficient UV intensity, UV resistance of specific pollutants in water quality, improper equipment maintenance, etc.; further, suggestions for improvement should be put forward, such as increasing UV intensity, improving the layout of UV lamps, replacing or cleaning filters, etc. For moderate treatment effects, it should be analyzed whether the performance of the current UV disinfection system meets expectations and whether it meets basic water quality standards; further, suggestions for optimizing the water treatment process should be provided, including adjusting UV intensity, improving water quality pretreatment steps, or adjusting other treatment parameters. For good treatment effects, it should be confirmed whether the current operating parameters and process settings are correct and can continuously produce good treatment effects; further, the current operating parameters and processes should be recorded as best practices for future operations and maintenance. For excellent treatment effects, the key factors leading to excellent treatment effects should be analyzed and recorded to ensure that these conditions can be sustained; further, it should be explored whether efficiency can be improved through further optimization, such as reducing energy consumption or reducing the use of chemicals.
[0042] In summary, an analysis method for the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention obtains water sample data under preset ultraviolet light conditions, and uses a constructed feature extraction model to extract features from the data. The model updates network parameters based on a gradient accumulation strategy, which can enhance the stability and efficiency of model learning to cope with the complexity of water sample data. In addition, a deep belief network is used to identify the data and determine its water treatment effect. The weights and structure of the deep belief network are adjusted based on the data, and can effectively capture complex data relationships. In addition, the embodiment of the present invention also reduces the dimension of the extracted key correlation features through activation functions and quantum coding functions. After the data is processed by the activation function, the processed data is encoded in a quantum state to reduce the data dimension. This method not only compresses the data, but also retains key information. In summary, the embodiment of the present invention can accurately identify the characteristics of the data so as to accurately evaluate the water treatment effect of the water body under the corresponding ultraviolet light conditions.
[0043] Based on the above embodiment, the embodiment of the present invention also provides another analysis method for the influence of ultraviolet light intensity on water treatment effect. Figure 2 FIG. 1 is a flow chart showing another method for analyzing the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention, such as Figure 2 As shown, the method comprises the following steps:
[0044] Step S202, collecting water sample data under preset ultraviolet light conditions.
[0045] Step S204: extract key related features from the water body sample data using a pre-built feature extraction model.
[0046] In the prior art, some solutions use neural networks for feature extraction. In some neural network structures, they may encounter problems such as gradient vanishing, gradient exploding, or falling into local optimal solutions, which will affect the stability of training and the performance of the model.
[0047] The embodiment of the present invention uses an 8-layer fully connected neural network for feature extraction. Specifically, a neural network algorithm based on gradient accumulation is used as a feature extraction model, the purpose of which is to extract effective features about the relationship between ultraviolet light intensity and water treatment effect from input data. In specific implementation, based on the back propagation algorithm, the embodiment of the present invention adopts a gradient accumulation strategy to allow the model to accumulate multiple batches of gradients before updating the weights, thereby enhancing the learning stability and efficiency of the model when there is less training data, so as to cope with the complexity of the analysis of the impact of ultraviolet light on water treatment effects.
[0048] The feature extraction model of the embodiment of the present invention is constructed by the following method:
[0049] 1) Input the preset training sample set through the multi-layer neural network of the feature extraction model to gradually extract the correlation features between UV light intensity and water treatment effect.
[0050] First, the parameters of the neural network are initialized, including the weights and biases of the neural network. In one embodiment, the initialization method is expressed as:
[0051]
[0052]
[0053] In the formula, Indicates compliance with a specific distribution; Represents the number of neurons in the input layer of the neural network; is the initial value of the neural network weight, is the initial value of the bias of the neural network; The mean is 0 and the standard deviation is Normal distribution of represents a normal distribution. Preferably, Set to 0.1.
[0054] Furthermore, the input feature data is passed through a multi-layer neural network, each layer including a linear transformation and a nonlinear activation function. In addition, in the embodiment of the present invention, the attention mechanism is used to focus on key features. The correlation features between the ultraviolet light intensity and the water treatment effect are gradually extracted, which are expressed as:
[0055]
[0056] In the formula, The neural network The output of the layer, The neural network The output of the layer; The neural network The weight of the layer, The neural network Bias of the layer; is the ReLU activation function; It is the element-wise multiplication operation, also known as the Hadamard product; is the attention augmentation vector for the hidden layer of the neural network.
[0057] In one embodiment, when faced with high-dimensional and high-correlation features, it is not enough to capture all key information. The present invention uses an attention mechanism to enhance the model's ability to learn the key relationship between ultraviolet light intensity and water treatment effect. Specifically, the calculation method of the attention enhancement vector of the hidden layer of the neural network is expressed as:
[0058]
[0059] In the formula, is the Softmax function; The neural network The weight of the layer, The neural network Bias of the layer; For the neural network Tier The feature attention score output by each neuron is a training parameter; For the neural network Tier The feature attention score output by each neuron is a training parameter.
[0060] 2) Perform gradient accumulation operations on the neural network and update the parameters of the neural network based on the accumulated gradients.
[0061] The data gradients of several batches are accumulated so that a more stable and accurate gradient direction can be estimated even when the amount of data is insufficient. Specifically, the calculation method of the accumulated gradient is expressed as:
[0062]
[0063]
[0064] In the formula, It is The gradient of the batch with respect to the weights of the neural network; It is The gradient of the bias of the neural network over the batches; is the batch quantity entered; Accumulate gradients for the weights of the neural network; Accumulate gradients for the bias of the neural network.
[0065] Furthermore, according to the accumulated network parameter gradients and the historical gradient information of the network parameters, the learning rate and optimization step size are dynamically adjusted to adapt to the needs of the model at different training stages. The update method of the network parameters of the neural network is expressed as:
[0066]
[0067]
[0068]
[0069]
[0070]
[0071] In the formula, It is the parameter update operation; is the learning rate of the neural network; is the first-order moment estimate of the neural network; is the second-order moment estimate of the neural network; is the first-order moment estimate of the bias-corrected neural network; is the second-order moment estimate of the bias-corrected neural network; is the first decay rate constant; is the second decay rate constant; It is The first decay rate constant of the iteration; It is The second decay rate constant of the iteration; is a small constant to prevent division by zero. Preferably, Set to 0.01, Set to 0.0001.
[0072] 3) Monitor the performance indicators of the neural network until the neural network meets the preset iteration termination conditions, and build a feature extraction model based on the multi-layer neural network.
[0073] In the training process of the neural network, the loss function is used to combine the actual water treatment effect and the network prediction output to calculate the error. The evaluation method of the water treatment effect is: the features after feature extraction are classified using the preset Softmax function to obtain the corresponding prediction labels. The calculation process of the loss function is expressed as:
[0074]
[0075] In the formula, is the loss function of the neural network; is the number of training samples; It is The true value of samples; It is The predicted value of a sample is obtained by classifying the features after feature extraction using the preset Softmax function; is the regularization coefficient of the neural network; is the L2 norm. Preferably, Set to 0.3.
[0076] In one embodiment, the regularization method of the weight matrix of the neural network is calculated using the Frobenius norm, which is expressed as:
[0077]
[0078] In the formula, The neural network The input dimension of the layer; The neural network The output dimension of the layer; The neural network The weight matrix of the layer elements.
[0079] 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 to reach a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times. In summary, the constructed feature extraction model can extract key correlation features, and in the extraction process, it can also cope with the complexity of the analysis of the influence of ultraviolet light on water treatment effect.
[0080] Furthermore, the feature is subjected to dimensionality reduction processing. The present invention adopts an autoencoder network based on quantum coding as a feature dimensionality reduction model. The autoencoder network includes an encoder and a decoder. The encoder compresses the high-dimensional input data into a low-dimensional representation, and the decoder restores the high-dimensional data from the low-dimensional representation. In this way, the model can learn the most important features in the data while removing noise and irrelevant information.
[0081] Furthermore, the present invention adopts qubit representation in the encoder part, allowing the model to effectively encode information in a very low dimension, utilizing the superposition and entanglement characteristics of qubits to improve the ability and efficiency of data compression, while ensuring that the network maintains the integrity and symmetry of the data structure during the feature conversion process. For details, refer to the following steps S206-S210.
[0082] Step S206, inputting the key correlation features into the encoder of the preset autoencoder network, and converting the key correlation features into a low-dimensional quantum state representation through an activation function and a quantum encoding function.
[0083] The input data passes through the encoder, and the activation function and quantum coding strategy are used to convert the data into a low-dimensional quantum state representation, which not only compresses the data but also retains the key information. Specifically, the nonlinear conversion of the input data of the autoencoder network through the activation function is expressed as:
[0084]
[0085] In the formula, is the input data of the autoencoder, that is, the feature vector obtained after feature extraction; It is a low-dimensional quantum state; are the weights of the encoder layer, is the bias of the encoder layer; is the quantum state conversion function; is a hyperbolic tangent activation function. Preferably, the quantum state conversion function is implemented using a quantum coding conversion operation based on a Pauli matrix. In one embodiment, the quantum state conversion function is implemented using a Hadamard gate to convert a quantum bit from a computational ground state to a superposition state.
[0086] Step S208, based on the unitary matrix corresponding to the quantum gate operation, the low-dimensional quantum state representation is optimized using the group theory principle.
[0087] In low-dimensional space, group theory principles are used to adjust and optimize feature representation to ensure the mathematical symmetry and geometric preservation of the features. The calculation method is expressed as:
[0088]
[0089] In the formula, is the quantum state after symmetry operation; It is the parameter that controls the strength and phase of the quantum gate operation, obtained through training; It is a quantum gate operation.
[0090] In one embodiment, the quantum gate operation depends on the parameter A unitary matrix is constructed to ensure the symmetry and entanglement of information between quantum bits. In the specific implementation, the embodiment of the present invention constructs the unitary matrix from the perspective of group theory, and the unitary matrix includes the Hamiltonian corresponding to the low-dimensional quantum state representation, and the construction method is expressed as:
[0091]
[0092] In the formula, is an imaginary unit, ensuring is a unitary matrix; is the Hamiltonian that characterizes the energy of the quantum system to which the data is mapped.
[0093] Furthermore, the Hamiltonian not only considers the behavior of a single qubit, but also includes the interaction between qubits. The calculation method is expressed as:
[0094]
[0095] In the formula, It is Pauli Operator; It is Pauli Operator.
[0096] Among them, since one of the core concepts in group theory is symmetry, it can be used to describe the invariance of quantum states under certain operations. In the present invention, the unitary matrix is constructed from the perspective of group theory principles. , ensuring that the quantum state maintains its symmetry after quantum gate operation.
[0097] In an embodiment of the present invention, the unitary matrix is through the exponential function Constructed, including Hamiltonian characterizes the energy of a quantum system. The construction of Hamiltonian also reflects the idea of group theory, which not only considers the behavior of a single qubit, but also the interaction between qubits. This construction method allows the quantum system to describe the complex interactions between qubits while maintaining its inherent symmetry.
[0098] Step S210, using the decoder of the autoencoder network combined with quantum computing to restore the low-dimensional quantum state representation to the original data, and obtain the key correlation features of the reduced dimension.
[0099] The embodiment of the present invention uses a quantum state conversion function during encoding to convert physical data features into a quantum state. During the decoding process, a decoder is used to restore the original data from a low-dimensional representation. Traditional dimensionality reduction techniques may lose important information when compressing data and cannot effectively balance the relationship between data compression and information retention. The decoder of the embodiment of the present invention combines the principles of quantum computing to decode data. The decoder uses quantum coding technology (quantum measurement function) to convert from quantum states back to physical data, ensuring that the data recovered from the compressed representation of the quantum state is as close to the original input as possible. Based on this, the relationship between data compression and information retention is effectively balanced. The data decoding is represented as:
[0100]
[0101] In the formula, is the quantum measurement function, used to convert quantum states back to physical data; It is the reconstructed data decoded from the quantum state; are the weights of the decoder layer; is the bias of the decoder layer.
[0102] Furthermore, the parameters of the encoder and decoder of the embodiment of the present invention are updated based on the gradient descent method and the loss function of the autoencoder network, and the loss function is calculated based on the reconstruction error and the regularization loss.
[0103] In a specific implementation, during the training process of the autoencoder network, the parameters of the autoencoder network are first initialized, including the weights and biases of the autoencoder network. In one embodiment, the initialization method is expressed as:
[0104]
[0105]
[0106] In the formula, is the weight of the autoencoder network; is the bias of the autoencoder network, which is initialized to 0 in this embodiment; is the number of neurons in the input layer of the autoencoder network.
[0107] Furthermore, the data is encoded and decoded according to the above steps. In the training process of the autoencoder, the reconstruction error and regularization loss are calculated to constrain the training process of the autoencoder. The calculation method is expressed as:
[0108]
[0109] In the formula, is the loss function of the autoencoder; is the reconstruction error of the autoencoder, which measures the difference between the original data and the reconstructed data by calculating the square of the L2 norm; is the regularization coefficient of the autoencoder to control overfitting; is the Frobenius norm, which is used to quantify the size of the weight. Preferably, Set to 0.3.
[0110] Furthermore, the calculation method of the reconstruction error is expressed as:
[0111]
[0112] In the formula, is the dimension of the feature input to the autoencoder; w jis the weight of the jth feature, which is adjusted according to the importance of the feature to ensure that the model pays more attention to important features during the reconstruction process; is the first input data of the autoencoder Features is the first reconstructed data of the autoencoder Features.
[0113] According to the loss function and gradient descent method, the parameters of the autoencoder network are updated. The update method is expressed as:
[0114]
[0115]
[0116] In the formula, is the learning rate of the autoencoder network; is the loss function of the autoencoder with respect to the first Gradients of layer weights; is the loss function of the autoencoder with respect to the first The gradient of the layer bias.
[0117] In one embodiment, the learning rate of the autoencoder network is calculated in an adaptive manner, expressed as:
[0118]
[0119] In the formula, It is The learning rate of the autoencoder network at this iteration; is the initial learning rate of the autoencoder network; is the current iteration number; is a small constant to avoid zero denominator. Preferably, Set to 0.00.
[0120] Further, the above steps are repeated 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.
[0121] Step S212, using a pre-trained deep belief network as a classification tool, outputs the water treatment effect classification results corresponding to the key associated features after dimensionality reduction processing.
[0122] Corresponding to the water sample data of the embodiment of the present invention, the present invention adopts a deep belief network algorithm as a classifier. The deep belief network is composed of multiple restricted Boltzmann machines to form a multi-layer hierarchical structure. Each layer learns the representation of different abstract levels of data. Each layer of the model can be pre-trained by unsupervised learning. The features learned in each layer are used as the input of the next layer, which can capture the complex statistical structure of the data and is particularly useful in the absence of labeled data, so as to determine the water treatment effect represented by the data after feature extraction and dimensionality reduction. The classification categories of water treatment effects include: poor treatment effect, medium treatment effect, good treatment effect, and excellent treatment effect, a total of 4 categories.
[0123] Compared with the traditional deep belief network, the embodiment of the present invention also uses an adaptive collaborative filtering mechanism to automatically adjust the network weights and connection methods according to the dynamic changes of the input data, so as to more effectively capture complex data relationships. Furthermore, the output layer simulated by quantum logic gates is used at the end of the deep belief network to output the final classification result.
[0124] Specifically, the training method of the deep belief network of the embodiment of the present invention is as follows:
[0125] 1) Obtain a preset training sample set, and use the training sample set to pre-train each restricted Boltzmann machine layer by layer.
[0126] The structure of the deep belief network algorithm is composed of multiple restricted Boltzmann machines, and the weights and biases of each restricted Boltzmann machine are initialized. Further, each restricted Boltzmann machine layer is pre-trained layer by layer. In one embodiment, the initialization is performed in a chaotic mapping-based manner, which is expressed as:
[0127] At this stage, the initial weights and biases Use. The initialization formula is:
[0128]
[0129]
[0130] In the formula, is the initial weight of the restricted Boltzmann machine; is the initial bias of the restricted Boltzmann machine; is the initialization standard deviation of the restricted Boltzmann machine; is pi; is the coefficient that controls the amplitude of the chaotic mapping; is a chaotic mapping function. Preferably, Set to 0.01, Set to 0.3.
[0131] In one embodiment, the calculation method of the chaos mapping function is expressed as:
[0132]
[0133] In the formula, is the chaotic mapping parameter, is the mapping value of the previous state input to the restricted Boltzmann machine; is the chaotic behavior influencing factor. Preferably, Set to 2 , Set to 0.3.
[0134] The embodiment of the present invention uses the output layer simulated by quantum logic gates at the end of the deep belief network for the final classification task. By simulating the quantum measurement process, the final classification result is accurately output. Among them, the use of quantum logic gates can simulate the superposition and entanglement phenomena in quantum computing, which helps to improve the classification accuracy of the model when processing complex data. Specific quantum gates (such as Hadamard gates, Pauli gates, etc.) can be used to operate quantum bits to achieve data conversion and processing. The final classification decision method is expressed as:
[0135]
[0136] In the formula, is the quantum logic gate function; is the quantum gate parameter, used to simulate the quantum measurement process; is the predicted label of the sample.
[0137] 2) In the layer-by-layer pre-training process, the weights of each layer of the deep belief network are dynamically fine-tuned based on the output of the restricted Boltzmann machine; and the visible layer state of the deep belief network is converted into a quantum state, and the hidden layer state of the deep belief network is updated based on the quantum state.
[0138] a-In the training of each layer of the restricted Boltzmann machine, the embodiment of the present invention dynamically adjusts the weights according to the features extracted by other layers and the output of the current layer, and implements collaborative filtering to better simulate the dependencies between the layers. In the specific implementation, considering the information of other layers, the weight adjustment method of the restricted Boltzmann machine is expressed as:
[0139]
[0140] In the formula, is the weight update rate of the restricted Boltzmann machine; It is The weight of the restricted Boltzmann machine at the iteration; It is The weight of the restricted Boltzmann machine at the iteration; is the influence coefficient of collaborative filtering; represents the collaborative filtering adjustment function; is the characteristic value of other layers of the deep belief network. Preferably, Set to 0.1, Set to 0.3.
[0141] In one embodiment, the collaborative filtering adjustment function adjusts the weights of the restricted Boltzmann machine by the correlation with the features of other layers, taking into account the information from different layers, and the calculation method is expressed as:
[0142]
[0143] in, It is the deep belief network The feature representation of the layer, is the inter-layer adjustment coefficient of the deep belief network, It is a deep belief network. The input features of the layer.
[0144] Furthermore, the embodiment of the present invention also uses a cross entropy loss with chaos adjustment to calculate the loss function of the deep belief network. In the specific implementation, a dynamic optimization strategy based on chaos theory is used to globally optimize the deep belief network, and the adjusted loss function is calculated using a cross entropy loss with chaos adjustment, which is expressed as:
[0145]
[0146] In the formula, is the loss function of the deep belief network; The number of samples entered for the current batch; is the first input to the deep belief network The true labels of samples, is the first input to the deep belief network The predicted labels of samples, is the chaos adjustment coefficient, is a weight adjustment term based on chaos theory. is the adjustment intensity parameter. Preferably, Set to 0.2, Set to 0.1.
[0147] In one embodiment, the weight adjustment term based on chaos theory enables the loss function to not only consider error minimization during the optimization process, but also adopts periodic adjustment based on weights, which increases the nonlinear characteristics of the training process. The calculation method is expressed as:
[0148]
[0149] in, is the first elements.
[0150] b-Furthermore, after each iteration, the embodiment of the present invention also uses quantum gate operations to update the hidden layer state, simulates the superposition and entanglement phenomena in quantum computing, and enhances the nonlinear processing capability of the model. Specifically, the calculation method of the update amount of the parameters of each restricted Boltzmann machine layer is expressed as:
[0151]
[0152]
[0153] In the formula, is the learning rate of the deep belief network; For the The weight update amount of the restricted Boltzmann machine layer at the iteration; For the The bias update amount of the restricted Boltzmann machine layer for the iteration; represents the expectation under the data distribution, represents the expectation under the model distribution; is the state of the visible layer of the deep belief network, is the state of the hidden layer of the deep belief network. Preferably, Set to 0.01.
[0154] In one embodiment, the state of the visible layer and the state of the hidden layer of the deep belief network are calculated as follows:
[0155]
[0156]
[0157] in, is the Sigmoid activation function; is the state amplitude parameter, is the quantum bit conversion threshold; is the function that converts the visible layer state into quantum bits; is the weight of the restricted Boltzmann machine; b u is the bias of the restricted Boltzmann machine. Preferably, Set to 2.
[0158] Furthermore, the function of converting the visible layer state into a quantum bit is calculated based on the superposition state of the quantum bit and is expressed as:
[0159]
[0160] In the formula, Is an imaginary unit.
[0161] Among them, the visible layer is the input layer of the deep belief network, which is in direct contact with the original data. It contains units that represent the input data, and each unit usually corresponds to a feature or dimension of the input data. The hidden layer is located after the visible layer and is responsible for capturing abstract features or patterns in the data. The embodiment of the present invention can enhance the nonlinear processing capability of the model by updating the network parameters by simulating the superposition and entanglement phenomena in quantum computing.
[0162] 3) Until all restricted Boltzmann machine layers reach the predetermined iteration index, a trained deep belief network is obtained.
[0163] 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.
[0164] Step S214, based on the water treatment effect classification result, determine the water quality of the water sample data under ultraviolet light conditions.
[0165] In summary, another analysis method for the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention adopts a neural network algorithm based on gradient accumulation, dynamically adjusts the learning rate and optimization step size, adapts to the needs of the model at different training stages, and then optimizes the network parameters of the feature extraction model. It can enhance the stability of the model, cope with the complex characteristics of water data under ultraviolet light conditions that are difficult to classify, solve the problems of gradient disappearance, gradient explosion or falling into local optimal solutions when the amount of data is small, and enhance the learning efficiency of the model.
[0166] Furthermore, the embodiment of the present invention also adopts an autoencoder network based on quantum coding, which encodes the processed data in a quantum state after processing the data through an activation function, and can encode data based on the superposition and entanglement characteristics of quantum bits. In addition, based on the unitary matrix corresponding to the quantum gate operation, the group theory principle is used to optimize the low-dimensional quantum state representation to ensure that the quantum state still maintains its symmetry after the quantum gate operation, thereby retaining key information. Based on this, the embodiment of the present invention can not only improve the ability and efficiency of data compression, but also solve the problem of high-dimensional data compression and key information retention.
[0167] The embodiment of the present invention also adopts a deep belief network algorithm, adjusts its weight and connection mode based on an adaptive collaborative filtering mechanism, and uses a dynamic optimization strategy based on chaos theory to globally optimize the deep belief network, so that the model can capture complex data relationships and improve classification accuracy.
[0168] Furthermore, based on the above embodiment, the embodiment of the present invention also provides another analysis method for the influence of ultraviolet light intensity on water treatment effect. The embodiment of the present invention mainly describes the method for constructing a training sample set. Figure 3 A flow chart of a method for constructing a training sample set provided by an embodiment of the present invention is shown. Figure 3 As shown, the method comprises the following steps:
[0169] Step S10, obtaining the pre-collected water quality samples and marking the water quality samples.
[0170] Water quality samples are collected from high-precision ultraviolet light intensity sensors and water quality monitoring equipment. Water quality samples are water quality data under ultraviolet light source illumination. For specific data, refer to the above embodiment. In addition, the labels marked in the embodiment of the present invention are used to indicate the water treatment effect corresponding to the water quality sample. The marking method of the present invention is manual marking. In one embodiment, the marked categories are different effects of water treatment, including: poor treatment effect, medium treatment effect, good treatment effect, and excellent treatment effect, a total of 4 categories.
[0171] Step S11, performing data expansion on the water quality sample by generating an adversarial network to generate an expanded sample.
[0172] 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 generalization ability of the model, while affecting the accuracy of the model. The generative adversarial network structure includes a generator and a discriminator. The goal of the generator is to generate synthetic data that is as close to the real data as possible, and the discriminator attempts to distinguish between the generated data and the real data. Through adversarial training between the two, the generator continuously learns how to improve the quality of the data it generates.
[0173] The prior art usually inputs random noise into the generator to generate data. This method often faces the problem of mode collapse, resulting in the lack of diversity and authenticity of the generated data, which is insufficient to support the generalization ability of the model. In response to this problem, the generation strategy of the generator of the generative adversarial network of the present invention is based on the feedback adjustment of the discriminator, wherein the method of dynamically adjusting the generation path is adopted so that the generator can adjust the potential random noise vector according to the feedback of the discriminator during the training process, and realize the data generation strategy of dynamic path adjustment, so as to avoid the common mode collapse problem in the training of the generative adversarial network.
[0174] Specifically, the training steps of the generative adversarial network in the embodiment of the present invention are as follows:
[0175] 1) Initialize the parameters of the generator and the discriminator. In one embodiment, the initialization method is random initialization, and all the parameters of the generator and the discriminator obey a normal distribution with a mean of 0 and a variance of a unit matrix.
[0176] 2) In the adversarial training cycle, the generator receives random noise as input and generates data samples according to the current model parameters, expressed as:
[0177]
[0178] In the formula, Represents fake samples generated by the generator; is a random noise vector; is the parameter of the generator; For the generator, is a generator function.
[0179] Furthermore, the discriminator evaluates the data samples from the generator and the real data samples, and outputs the probability that each sample is the real data, expressed as:
[0180]
[0181]
[0182] In the formula, represents the probability that a fake sample is judged as a real sample, Represents the probability that a real sample is judged as a real sample; represents the real sample; are the parameters of the discriminator; is the discriminator, is the discriminator function.
[0183] Furthermore, based on the content loss and diversity loss of the generated samples, the generator is guided to generate data with higher quality and diversity. The embodiment of the present invention also uses a composite loss function to constrain the training process of the generative adversarial network; the composite loss function is calculated based on the diversity loss and content loss of the expanded samples, and the calculation method is expressed as:
[0184]
[0185]
[0186]
[0187] In the formula, is the composite loss function; is the weight coefficient of diversity loss; Represents the standard deviation calculation function of sample data, which measures the diversity of generated samples; For content loss; for diversity loss; For the The probability that a real sample is judged as a real sample; For the The probability that a false sample is judged as a true sample. Preferably, Set to 0.3.
[0188] In one embodiment, considering the contribution of each dimension and how to introduce more independence between different generated samples, the calculation method of the standard deviation calculation function of the sample data for the fake samples generated by the generator is expressed as:
[0189]
[0190]
[0191] In the formula, represents the first fake sample generated by the generator elements, represents the mean of the fake samples generated by the generator, Represents the number of elements in the sample.
[0192] Furthermore, the gradient descent method is used to update the parameters of the generator and discriminator according to the composite loss function. The update method is expressed as:
[0193]
[0194]
[0195] In the formula, is the learning rate of the generator, is the learning rate of the discriminator; are the updated generator parameters, is the updated discriminator parameter. Preferably, Set to 0.03, Set to 0.05.
[0196] 3) According to the feedback from the discriminator, the generation strategy of the generator is dynamically adjusted to explore more data generation paths and prevent mode collapse. Specifically, dynamic path adjustment is achieved by adjusting the potential random noise vector, which is expressed as:
[0197]
[0198] In the formula, is the adjusted random noise vector; is the adjustment step size of the random noise vector; represents the gradient of the diversity loss with respect to the noise vector, which is used to guide the adjustment of the noise vector to avoid mode collapse. Preferably, Set to 0.3.
[0199] Furthermore, the gradient of the diversity loss with respect to the noise vector is calculated as:
[0200]
[0201]
[0202] In the formula, Compute the gradient of the function with respect to the noise vector for the standard deviation of the sample data.
[0203] 4) 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.
[0204] After the data expansion model training is completed, the trained data expansion model is used to increase the number of samples. In one embodiment, assuming that the original collected samples are 800, and the data expansion model expands and generates 200 samples, the expanded data set contains 1000 samples.
[0205] Step S12: merging the expanded samples and the water quality samples to construct a training sample set.
[0206] Another analysis method for the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention adopts a generative adversarial network algorithm based on a dynamic path. Through adversarial training of the generator and the discriminator, it solves the problems of poor model generalization ability and limited accuracy caused by insufficient training samples. The dynamic adjustment of the generation path effectively avoids the mode collapse problem and improves the quality and diversity of synthetic data.
[0207] Furthermore, based on the above method embodiment, the embodiment of the present invention also provides an analysis device for the influence of ultraviolet light intensity on water treatment effect. Figure 4 FIG. 1 is a schematic diagram showing a structural diagram of an analysis device for analyzing the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention. Figure 4As shown, the device includes: a data acquisition module 100, which is used to collect water sample data under preset ultraviolet light conditions; a data processing module 200, which is used to extract key correlation features between ultraviolet light intensity and treatment effect from water sample data using a pre-built feature extraction model; wherein the feature extraction model is implemented by a multi-level neural network, each level contains linear transformation and nonlinear activation function, and the network weights are gradually optimized according to the cumulative gradient; a dimensionality reduction module 300, which is used to reduce the dimension of key correlation features using quantum bit encoding technology; an execution module 400, which is used to use a pre-trained deep belief network as a classification tool to determine the water treatment effect corresponding to the key correlation features after dimensionality reduction processing; the deep belief network relies on an adaptive collaborative filtering strategy to dynamically adjust the weights and structures according to the input; an output module 500, which is used to evaluate and determine the specific impact of ultraviolet light intensity on water treatment effectiveness based on the water treatment effect.
[0208] An analysis device for the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention has the same technical features as the above-mentioned method embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0209] Based on the above embodiment, the embodiment of the present invention also provides another analysis device for the influence of ultraviolet light intensity on water treatment effect. Figure 5 The schematic diagram of the structure of another analysis device for the influence of ultraviolet light intensity on water treatment effect provided by an embodiment of the present invention is shown. In combination with the above embodiment, the above deep belief network is composed of multiple restricted Boltzmann machines, and the output layer simulated by quantum logic gates is used at the end of the deep belief network to output the final classification result; the above execution module 400 is also used to obtain a preset training sample set, and use the training sample set to pre-train each restricted Boltzmann machine layer by layer; in the layer-by-layer pre-training process, based on the output of the restricted Boltzmann machine, the weights of each layer of the deep belief network are dynamically fine-tuned; and the visible layer state of the deep belief network is converted into a quantum state, and the network parameters of the deep belief network are updated based on the quantum state; until all restricted Boltzmann machine layers reach the predetermined iteration index, a trained deep belief network is obtained.
[0210] The execution module 400 is also used to globally optimize the deep belief network using chaos theory.
[0211] The above-mentioned data processing module 200 is also used to input a preset training sample set through a multi-layer neural network of a feature extraction model to gradually extract the correlation features between ultraviolet light intensity and water treatment effect; each layer includes a linear transformation and a nonlinear activation function, and uses an attention mechanism to focus on key features; performs a gradient accumulation operation on the neural network, and updates the parameters of the neural network based on the accumulated gradient; monitors the performance indicators of the neural network until the neural network meets the preset iteration termination conditions, and constructs a feature extraction model based on the multi-layer neural network.
[0212] The above-mentioned dimensionality reduction module 300 is also used to input the key correlation features into the encoder of the preset autoencoder network, convert the key correlation features into low-dimensional quantum state representation through activation function and quantum coding function; based on the unitary matrix corresponding to the quantum gate operation, the low-dimensional quantum state representation is optimized by group theory principle; wherein the unitary matrix includes the Hamiltonian corresponding to the low-dimensional quantum state representation; the decoder of the autoencoder network is combined with quantum computing to restore the low-dimensional quantum state representation to the original data to obtain the key correlation features of reduced dimension. Furthermore, the parameters of the above-mentioned encoder and the above-mentioned decoder are updated based on the gradient descent method and the loss function of the autoencoder network, and the loss function is calculated based on the reconstruction error and the regularization loss.
[0213] Furthermore, the device also includes a construction module 600, which is used to obtain pre-collected water quality samples and label the water quality samples; wherein the labeled labels are used to indicate the water treatment effects corresponding to the water quality samples; the water quality samples are collected from high-precision ultraviolet light intensity sensors and water quality monitoring equipment, and the water quality samples are water quality data under ultraviolet light source illumination; the water quality samples are data expanded through a generative adversarial network to generate expanded samples; the noise vector of the generator of the generative adversarial network is dynamically adjusted based on the feedback of the discriminator; the expanded samples and the water quality samples are merged to construct a training sample set.
[0214] The above-mentioned building module 600 is also used to calculate the diversity loss and content loss of the expanded samples of the generative adversarial network based on the feedback of the discriminator of the generative adversarial network; generate a composite loss function based on the diversity loss and content loss; optimize the generator parameters and discriminator parameters of the generative adversarial network based on the composite loss function, and adjust the noise vector of the generator.
[0215] 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 embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to perform the above Figures 1 to 3 Any of the steps of the method shown.
[0216] The embodiment of the present invention also provides a schematic diagram of the structure 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 Any of the methods shown.
[0217] exist 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. The memory 60 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. 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, a wide area network, a local area network, a metropolitan area network, etc. may be used. The bus 62 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. It may also be an AMBA (Advanced Microcontroller Bus Architecture) bus, where AMBA defines three types of buses, including an APB (Advanced Peripheral Bus) bus, an AHB (Advanced High-performance Bus) bus, and an AXI (Advanced Xtensible Interface) bus. The bus 62 may 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.
[0218] 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.
[0219] An embodiment of the present invention provides a computer program product of an analysis method and device for the influence of ultraviolet light intensity on water treatment effect, including a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0220] If the functions are implemented in the form of software functional units and sold or used as independent products, they 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. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods 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., which can store program codes.
[0221] Finally, it should be noted that the above embodiments are only specific implementations 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 included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An analytical method for the influence of ultraviolet light intensity on water treatment effect, characterized in that: include: Collect water sample data under preset UV light conditions; Extracting key correlation features from the water sample data using a pre-built feature extraction model; wherein the feature extraction model includes a multi-layer neural network, each layer of the neural network contains a linear transformation and a non-linear activation function, and the network parameters of the neural network are obtained based on the accumulated network parameter gradient optimization; Performing dimensionality reduction processing on the key correlation features through activation functions and quantum coding functions; A pre-trained deep belief network is used as a classification tool to output the classification results of the water treatment effect of the key associated features after dimensionality reduction processing; the deep belief network uses an adaptive collaborative filtering strategy to adjust weights and structures based on input data; Based on the water treatment effect classification result, determining the water quality of the water sample data under the ultraviolet light conditions; The method for constructing the feature extraction model comprises: Input a preset training sample set through the multi-layer neural network of the feature extraction model to gradually extract the correlation features between the ultraviolet light intensity and the water treatment effect; each layer of the neural network includes a linear transformation and a nonlinear activation function, and uses an attention mechanism to focus on key features; Performing a gradient accumulation operation on the neural network, and adjusting a learning rate and an optimization step size of the neural network based on the accumulated gradients to update parameters of the neural network; Monitoring the performance indicators of the neural network until the neural network meets a preset iteration termination condition, and constructing a feature extraction model based on the multi-layer neural network; The correlation features between UV intensity and water treatment effect are gradually extracted and expressed as: In the formula, The neural network The output of the layer, The neural network The output of the layer; The neural network The weight of the layer, The neural network Bias of the layer; is the ReLU activation function; It is the element-wise multiplication operation, also known as the Hadamard product; is the attention augmentation vector for the hidden layer of the neural network.
2. The method according to claim 1, characterized in that The deep belief network is composed of a plurality of restricted Boltzmann machines, and an output layer simulated by a quantum logic gate is used at the end of the deep belief network to output a final classification result; The training method of the deep belief network comprises: Obtaining a preset training sample set, and using the training sample set to pre-train each restricted Boltzmann machine layer by layer; In the layer-by-layer pre-training process, based on the output of the restricted Boltzmann machine, the weights of each layer of the deep belief network are dynamically fine-tuned; and the visible layer state of the deep belief network is converted into a quantum state, and based on the quantum state, the network parameters of the deep belief network are updated; Until all restricted Boltzmann machine layers reach the predetermined iteration index, a trained deep belief network is obtained.
3. The method according to claim 2, characterized in that The method further comprises: Chaos theory is used to globally optimize the deep belief network.
4. The method according to claim 1, characterized in that: The step of performing dimensionality reduction processing on the key correlation features by using an activation function and a quantum coding function comprises: Inputting the key correlation features into an encoder of a preset autoencoder network, and converting the key correlation features into a low-dimensional quantum state representation through an activation function and a quantum encoding function; Based on the unitary matrix corresponding to the quantum gate operation, the low-dimensional quantum state representation is optimized using group theory principles; wherein the unitary matrix includes the Hamiltonian corresponding to the low-dimensional quantum state representation; The decoder of the autoencoder network is combined with quantum computing to restore the low-dimensional quantum state representation to the original data and obtain the key correlation features of the reduced dimension.
5. The method according to claim 4, characterized in that The parameters of the encoder and the decoder are updated based on the gradient descent method and the loss function of the autoencoder network, and the loss function is calculated based on the reconstruction error and the regularization loss.
6. The method according to any one of claims 2-3, characterized in that: The method further comprises: Obtain a pre-collected water quality sample and label the water quality sample; wherein the labeled label is used to indicate the water treatment effect corresponding to the water quality sample; the water quality sample is collected from a high-precision ultraviolet light intensity sensor and a water quality monitoring device, and the water quality sample is water quality data under ultraviolet light source illumination; Performing data expansion on the water quality sample through a generative adversarial network to generate an expanded sample; the noise vector of the generator of the generative adversarial network is dynamically adjusted based on feedback from the discriminator; The expanded samples and the water quality samples are combined to construct a training sample set.
7. The method according to claim 6, characterized in that The steps of dynamically adjusting the noise vector of the generator of the generative adversarial network based on the feedback of the discriminator include: Based on feedback from the discriminator of the generative adversarial network, calculating the diversity loss and content loss of the expanded samples of the generative adversarial network; Based on the diversity loss and the content loss, generating a composite loss function; Based on the composite loss function, the generator parameters and the discriminator parameters of the generative adversarial network are optimized, and the noise vector of the generator is adjusted.
8. An analysis device for the effect of ultraviolet light intensity on water treatment effect, characterized in that: The device comprises: A data acquisition module, used to collect water sample data under preset ultraviolet light conditions; A data processing module, used for extracting key correlation features between ultraviolet light intensity and treatment effect from the water sample data using a pre-built feature extraction model; wherein the feature extraction model includes a multi-layer neural network, each layer of the neural network contains a linear transformation and a nonlinear activation function, and the network parameters of the neural network are obtained based on the accumulated network parameter gradient optimization; A dimension reduction module, used for performing dimension reduction processing on the key correlation features through an activation function and a quantum coding function; An execution module is used to use a pre-trained deep belief network as a classification tool to output a water treatment effect classification result corresponding to the key associated features after dimensionality reduction processing; the deep belief network uses an adaptive collaborative filtering strategy to adjust weights and structures based on input data; An output module, used to determine the water quality of the water sample data under the ultraviolet light conditions based on the water treatment effect classification result; The data processing module is also used to input a preset training sample set through the multi-layer neural network of the feature extraction model to gradually extract the correlation features between the ultraviolet light intensity and the water treatment effect; each layer of the neural network includes a linear transformation and a nonlinear activation function, and uses an attention mechanism to focus on key features; perform a gradient accumulation operation on the neural network, adjust the learning rate and optimization step size of the neural network based on the accumulated gradient, so as to update the parameters of the neural network; monitor the performance indicators of the neural network until the neural network meets the preset iteration termination condition, and construct a feature extraction model based on the multi-layer neural network; The correlation features between UV intensity and water treatment effect are gradually extracted and expressed as: In the formula, The neural network The output of the layer, The neural network The output of the layer; The neural network The weight of the layer, The neural network Bias of the layer; is the ReLU activation function; It is the element-wise multiplication operation, also known as the Hadamard product; is the attention augmentation vector for the hidden layer of the neural network.
9. An electronic device, characterized in that: The electronic device comprises a processor and a storage device; the storage device stores a computer program, and the computer program executes the method according to any one of claims 1 to 7 when executed by the processor.
Citation Information
Patent Citations
Model training method and device and computer readable storage medium
CN110378480A
BERT improved model-based text sentiment analysis method
CN114781392A