Sewage dosing effect prediction method and system based on big data
By using the reversible flow model and memristor model of affine transformation in the prediction of sewage dosing effect, the problem of excessive data dimensions and poor feature information capture ability is solved, and more efficient data reconstruction and feature information capture are achieved, improving The accuracy and reliability of predicting the effect of sewage dosing are improved.
Patent Information
- Application Number
- CN202411140332.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Existing sewage dosing effect prediction methods have too many original data dimensions, resulting in excessive calculations, loss of data reconstruction information, poor reconstruction accuracy, poor feature information capture capabilities, and a single activation function, resulting in insufficient model expressiveness and prediction capabilities.
A reversible flow model based on affine transformation is used to replace the mask layer with a learnable gating layer, and a memristor model is introduced to design an adaptive activation function. The intrinsic dimensions and redundant dimensions are determined through the output of the gating layer, combined with the heavy Structure loss, dimension factor and average interval of gate values are used to optimize data reconstruction; a memristor model is introduced to design an adaptive activation function, and the activation function is dynamically adjusted to capture multi-level and multi-scale feature information.
It improves the accuracy and optimization efficiency of data reconstruction, enhances the flexibility and adaptability of the model, can process multi-dimensional feature data more accurately, and improves the accuracy and reliability of sewage dosing effect prediction.
Smart Images

Figure CN118675658B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of effect prediction technology, and specifically to a method and system for predicting the effect of sewage dosing based on big data. Background Art
[0002] The sewage dosing effect prediction method refers to the use of various technical means and models to predict the effect of adding chemical agents in the sewage treatment process. The purpose of these methods is to optimize the dosage of agents, improve sewage treatment efficiency, reduce operating costs, and ensure that the treated water quality meets the discharge standards. However, the general sewage dosing effect prediction method has the problem of too many dimensions of original data resulting in excessive calculation, and the data reconstruction will result in information loss and poor reconstruction accuracy; the general sewage dosing effect prediction method has the problem of poor ability to capture the characteristic information of sewage dosing effect and single activation function, which leads to poor model expression and prediction ability. Summary of the invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a method and system for predicting the effect of sewage dosing based on big data. In view of the problems that the general method for predicting the effect of sewage dosing has too many dimensions of original data, resulting in excessive calculation, and information loss and poor reconstruction accuracy, this scheme is based on the reversible flow model of affine transformation, and replaces the mask layer with a learnable gating layer, so that the reconstruction method has stronger adaptability and flexibility; the intrinsic dimension and redundant dimension are determined based on the output of the gating layer, which is helpful to identify and retain the features that have the greatest impact on model prediction; the reconstruction loss function combines the reconstruction loss, the dimensionality factor and the average interval of the gating value, and comprehensively considers the accuracy of data reconstruction, the effectiveness of feature selection and the gating The determinism of the layer reduces the redundancy of data reconstruction, improves the reconstruction accuracy and optimization efficiency; in view of the problems that the general sewage dosing effect prediction method has poor ability to capture the characteristic information of sewage dosing effect and a single activation function, which leads to poor expressiveness and prediction ability of the model, this scheme introduces a memristor model to design an adaptive activation function. By introducing a memristor, it can be dynamically adjusted according to the different characteristics of the input data to improve the flexibility and adaptability of the model; and based on the adaptive activation function, a hybrid adaptive activation function is obtained, which can capture multi-level and multi-scale feature information, so that the model can better process multi-dimensional feature data; so that the model has higher accuracy and reliability when dealing with complex data in the sewage dosing effect.
[0004] The technical solution adopted by the present invention is as follows: The method for predicting the effect of sewage dosing based on big data provided by the present invention comprises the following steps:
[0005] Step S1: data collection;
[0006] Step S2: data preprocessing;
[0007] Step S3: data optimization;
[0008] Step S4: Establishing a sewage dosing effect prediction model;
[0009] Step S5: Prediction of sewage dosing effect.
[0010] Furthermore, in step S1, the data collection is to collect historical sewage dosing effect data; the sewage dosing effect data includes water quality parameter data, dosing parameter data, process parameter data, environmental parameter data and dosing effect evaluation level; the dosing effect evaluation level is used as a data label.
[0011] Furthermore, in step S2, the data preprocessing is to clean the collected data, normalize the data and divide the data set; the data cleaning is to process missing values, duplicate values and outliers; the data normalization is to convert the data into vector form and perform standardized processing to obtain the original data set; the data set division is to divide the original data set into a quasi-test set and a quasi-training set.
[0012] Furthermore, in step S3, the data optimization specifically includes the following steps:
[0013] Step S31: initialization; constructing a reversible flow model based on affine transformation;
[0014] Step S32: define a gating layer; replace the mask layer of the reversible flow model with a learnable gating layer g; the gating layer is represented as follows:
[0015] ;
[0016] In the formula, m i is the gate value of the i-th feature; sigmoid(·) is the sigmoid activation function; η is the amplification factor; is the learnable parameter of the gating layer;
[0017] Step S33: encoding process; encoding the input data x through the flow model to obtain z; using the gating layer g to perform Hadamard operation on z to obtain feature u; the formula used is as follows:
[0018] ;
[0019] ;
[0020] Where z is the encoding representation obtained through the flow model T; is the Hadamard operation;
[0021] Step S34: Decoding: Decoding feature u through the flow model to obtain reconstructed data ; The formula used is as follows:
[0022] ;
[0023] In the formula, is the inverse transformation of the flow model;
[0024] Step S35: Determine the intrinsic dimension; distinguish the intrinsic dimension from the redundant dimension based on the output of the gating layer; expressed as follows:
[0025] ;
[0026] Where d is the number of intrinsic dimensions; n is the total number of features; For values greater than 0.5 Perform summation;
[0027] Step S36: Calculate the average interval; improve the certainty of the gating layer for dimension selection by maximizing the interval; the formula used is as follows:
[0028] ;
[0029] In the formula, is the gate value m i The average interval with 0.5;
[0030] Step S37: construct a loss function; reconstruct the loss function based on the mean square error and finally optimize it; the formula used is as follows:
[0031] ;
[0032] Where L is the total loss value; F is the reconstruction loss function; is the dimension factor; MSE(·) is the mean square error; and are the i1th input data and the reconstructed data respectively; N is the total number of input data;
[0033] Step S38: data optimization; pre-set a loss threshold; train the reversible flow model optimized in steps S32 to S34 based on the quasi-training set; if the total loss function value of the converged reversible flow model for the test set is lower than the loss threshold, the reversible flow model is established, and the original data set is subjected to dimensionality reduction processing based on the reversible flow model to obtain an optimized data set; and the optimized data set is divided into a test set and a training set.
[0034] Furthermore, in step S4, the establishment of the sewage dosing effect prediction model specifically includes the following steps:
[0035] Step S41: design a memristor model; a memristor is a resistor with nonlinear characteristics, and the model is defined as follows:
[0036] ;
[0037] In the formula, i2 is the current; v is the voltage; is the state variable of the memristor; a and b are the internal parameters of the memristor;
[0038] Step S42: design an adaptive activation function; introduce a memristor to construct the activation function; the formula used is as follows:
[0039] ;
[0040] Where MU(·) is the adaptive activation function; is the activation function input;
[0041] Step S43: construct a hybrid adaptive activation function; establish an activation function of the sewage dosing effect prediction model based on the adaptive activation function; the formula used is as follows:
[0042] ;
[0043] In the formula, , , and They are the activation outputs of the 1st, 2nd, 3rd, and 4th neurons to their own inputs; , , and are the inputs of the 1st, 2nd, 3rd, and 4th neurons respectively; , and They are the synaptic weights between the first neuron, the second neuron, and the third neuron and themselves; and are the synaptic weights of the first neuron with the second and third neurons respectively; and are the synaptic weights of the second neuron with the first and third neurons respectively; and are the synaptic weights of the third neuron with the first and second neurons respectively;
[0044] Step S44: Determination of the sewage dosing effect prediction model; the sewage dosing effect prediction model adopts a cross entropy loss function; a precision threshold is set in advance; if the loss of the sewage dosing effect prediction model for the training set converges, the training of the sewage dosing effect prediction model is completed; if the prediction accuracy of the trained sewage dosing effect prediction model for the test set is higher than the precision threshold, the sewage dosing effect prediction model is established; otherwise, the data set is re-divided and the parameters are adjusted to re-train the sewage dosing effect prediction model.
[0045] Furthermore, in step S5, the sewage dosing effect prediction is based on the established sewage dosing effect prediction model; water quality parameter data, dosing parameter data, process parameter data and environmental parameter data are collected in real time, and input into the sewage dosing effect prediction model after data preprocessing and data optimization, and the output of the sewage dosing effect prediction model is used as the sewage dosing effect prediction result; a level threshold is set in advance, and if the dosing effect evaluation level is lower than the level threshold, early warning processing is performed.
[0046] The sewage dosing effect prediction system based on big data provided by the present invention includes a data acquisition module, a data preprocessing module, a data optimization module, a sewage dosing effect prediction model establishment module and a sewage dosing effect prediction module;
[0047] The data acquisition module collects historical sewage dosing effect data and sends the data to the data preprocessing module;
[0048] The data preprocessing module performs data cleaning, data normalization and data set division on the collected data, and sends the data to the data optimization module;
[0049] The data optimization module replaces the mask layer with a learnable gating layer based on the reversible flow model of affine transformation; determines the intrinsic dimension and redundant dimension based on the output of the gating layer; combines the reconstruction loss, dimensionality factor and the average interval reconstruction loss function of the gating value to achieve data optimization; and sends the data to the sewage dosing effect prediction model establishment module;
[0050] The sewage dosing effect prediction model establishment module introduces a memristor model to design an adaptive activation function; and obtains a hybrid adaptive activation function based on the adaptive activation function; and then completes the establishment of the sewage dosing effect prediction model; and sends the data to the sewage dosing effect prediction module;
[0051] The sewage dosing effect prediction module realizes sewage dosing effect prediction based on the established sewage dosing effect prediction model.
[0052] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0053] (1) In view of the problems of too many dimensions of original data leading to excessive calculation in general sewage dosing effect prediction methods, information loss and poor reconstruction accuracy in data reconstruction, this scheme is based on the reversible flow model of affine transformation, replacing the mask layer with a learnable gating layer, making the reconstruction method more adaptable and flexible; determining the intrinsic dimension and redundant dimension based on the output of the gating layer helps to identify and retain the features that have the greatest impact on model prediction; the reconstruction loss function combines the reconstruction loss, dimensionality factor and the average interval of the gating value, and comprehensively considers the accuracy of data reconstruction, the effectiveness of feature selection and the certainty of the gating layer, so that data reconstruction reduces redundancy, improves reconstruction accuracy and optimization efficiency.
[0054] (2) In view of the problems that the general sewage dosing effect prediction method has poor ability to capture the characteristic information of sewage dosing effect and a single activation function, which leads to poor model expressiveness and prediction ability, this scheme introduces a memristor model to design an adaptive activation function. By introducing a memristor, it can be dynamically adjusted according to the different characteristics of the input data, thereby improving the flexibility and adaptability of the model; and based on the adaptive activation function, a hybrid adaptive activation function is obtained, which can capture multi-level and multi-scale characteristic information, so that the model can better process multi-dimensional characteristic data; so that the model has higher accuracy and reliability when dealing with complex data in sewage dosing effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A schematic diagram of the process of the sewage dosing effect prediction method based on big data provided by the present invention;
[0056] Figure 2 A schematic diagram of a sewage dosing effect prediction system based on big data provided by the present invention;
[0057] Figure 3 is a schematic flow chart of step S3;
[0058] Figure 4 It is a schematic diagram of the process of step S4.
[0059] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0061] In the description of the present invention, it is necessary to understand that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred system or element must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.
[0062] Example 1, see Figure 1 The invention provides a method for predicting the effect of sewage dosing based on big data, the method comprising the following steps:
[0063] Step S1: Data collection: Collect historical sewage dosing effect data;
[0064] Step S2: data preprocessing: data cleaning, data normalization and data set division of the collected data;
[0065] Step S3: data optimization; based on the reversible flow model of affine transformation, the mask layer is replaced by a learnable gating layer; the intrinsic dimension and redundant dimension are determined based on the output of the gating layer; the reconstruction loss function combining the reconstruction loss, the dimensionality factor and the average interval of the gating value is reconstructed to achieve data optimization;
[0066] Step S4: Establishing a sewage dosing effect prediction model; introducing a memristor model to design an adaptive activation function; and obtaining a hybrid adaptive activation function based on the adaptive activation function; and then completing the establishment of the sewage dosing effect prediction model;
[0067] Step S5: Prediction of sewage dosing effect.
[0068] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, the sewage dosing effect data includes water quality parameter data, dosing parameter data, process parameter data, environmental parameter data and dosing effect evaluation level; the dosing effect evaluation level is used as a data label.
[0069] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, data cleaning is to process missing values, duplicate values and outliers; data normalization is to convert the data into vector form and perform standardization processing to obtain the original data set; data set partitioning is to divide the original data set into a quasi-test set and a quasi-training set.
[0070] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S3, data optimization specifically includes the following steps:
[0071] Step S31: initialization; constructing a reversible flow model based on affine transformation;
[0072] Step S32: define a gating layer; replace the mask layer of the reversible flow model with a learnable gating layer g; the gating layer is represented as follows:
[0073] ;
[0074] In the formula, m i is the gate value of the i-th feature; sigmoid(·) is the sigmoid activation function; η is the amplification factor; is the learnable parameter of the gating layer;
[0075] Step S33: encoding process; encoding the input data x through the flow model to obtain z; using the gating layer g to perform Hadamard operation on z to obtain feature u; the formula used is as follows:
[0076] ;
[0077] ;
[0078] Where z is the encoding representation obtained through the flow model T; is the Hadamard operation;
[0079] Step S34: Decoding: Decoding feature u through the flow model to obtain reconstructed data ; The formula used is as follows:
[0080] ;
[0081] In the formula, is the inverse transformation of the flow model;
[0082] Step S35: Determine the intrinsic dimension; distinguish the intrinsic dimension from the redundant dimension based on the output of the gating layer; expressed as follows:
[0083] ;
[0084] Where d is the number of intrinsic dimensions; n is the total number of features; For values greater than 0.5 Perform summation;
[0085] Step S36: Calculate the average interval; improve the certainty of the gating layer for dimension selection by maximizing the interval; the formula used is as follows:
[0086] ;
[0087] In the formula, is the gate value mi The average interval with 0.5;
[0088] Step S37: construct a loss function; reconstruct the loss function based on the mean square error and finally optimize it; the formula used is as follows:
[0089] ;
[0090] ;
[0091] Where L is the total loss value; F is the reconstruction loss function; is the dimension factor; MSE(·) is the mean square error; and are the i1th input data and the reconstructed data respectively; N is the total number of input data;
[0092] Step S38: data optimization; pre-set a loss threshold; train the reversible flow model optimized in steps S32 to S34 based on the quasi-training set; if the total loss function value of the converged reversible flow model for the test set is lower than the loss threshold, the reversible flow model is established, and the original data set is subjected to dimensionality reduction processing based on the reversible flow model to obtain an optimized data set; and the optimized data set is divided into a test set and a training set.
[0093] By performing the above operations, the general sewage dosing effect prediction method has the problems of too many dimensions of original data resulting in excessive calculation, information loss in data reconstruction, and poor reconstruction accuracy. This scheme is based on the reversible flow model of affine transformation, and replaces the mask layer with a learnable gating layer, so that the reconstruction method has stronger adaptability and flexibility; determining the intrinsic dimension and redundant dimension based on the output of the gating layer is helpful to identify and retain the features that have the greatest impact on model prediction; the reconstruction loss function combines the reconstruction loss, dimensionality factor and the average interval of the gating value, and comprehensively considers the accuracy of data reconstruction, the effectiveness of feature selection and the certainty of the gating layer, so that data reconstruction reduces redundancy, improves reconstruction accuracy and optimization efficiency.
[0094] Example 5, see Figure 1 and Figure 4 Based on the above embodiment, in step S4, the sewage dosing effect prediction model is established, which specifically includes the following steps:
[0095] Step S41: design a memristor model; a memristor is a resistor with nonlinear characteristics, and the model is defined as follows:
[0096] ;
[0097] In the formula, i2 is the current; v is the voltage; is the state variable of the memristor; a and b are the internal parameters of the memristor;
[0098] Step S42: design an adaptive activation function; introduce a memristor to construct the activation function; the formula used is as follows:
[0099] ;
[0100] Where MU(·) is the adaptive activation function; is the activation function input;
[0101] Step S43: construct a hybrid adaptive activation function; establish an activation function of the sewage dosing effect prediction model based on the adaptive activation function; the formula used is as follows:
[0102] ;
[0103] In the formula, , , and They are the activation outputs of the 1st, 2nd, 3rd, and 4th neurons to their own inputs; , , and are the inputs of the 1st, 2nd, 3rd, and 4th neurons respectively; , and They are the synaptic weights between the first neuron, the second neuron, and the third neuron and themselves; and are the synaptic weights of the first neuron with the second and third neurons respectively; and are the synaptic weights of the second neuron with the first and third neurons respectively; and are the synaptic weights of the third neuron with the first and second neurons respectively;
[0104] Step S44: Determination of the sewage dosing effect prediction model; the sewage dosing effect prediction model adopts a cross entropy loss function; a precision threshold is set in advance; if the loss of the sewage dosing effect prediction model for the training set converges, the training of the sewage dosing effect prediction model is completed; if the prediction accuracy of the trained sewage dosing effect prediction model for the test set is higher than the precision threshold, the sewage dosing effect prediction model is established; otherwise, the data set is re-divided and the parameters are adjusted to re-train the sewage dosing effect prediction model.
[0105] By performing the above operations, in view of the problems that the general sewage dosing effect prediction method has poor ability to capture the characteristic information of sewage dosing effect and a single activation function, which leads to poor expressiveness and prediction ability of the model, this scheme introduces a memristor model to design an adaptive activation function. By introducing a memristor, it can be dynamically adjusted according to the different characteristics of the input data to improve the flexibility and adaptability of the model; and based on the adaptive activation function, a hybrid adaptive activation function is obtained, which can capture multi-level and multi-scale characteristic information, so that the model can better process multi-dimensional characteristic data; so that the model has higher accuracy and reliability when dealing with complex data in the sewage dosing effect.
[0106] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S5, the sewage dosing effect prediction is based on the established sewage dosing effect prediction model; water quality parameter data, dosing parameter data, process parameter data and environmental parameter data are collected in real time, and input into the sewage dosing effect prediction model after data preprocessing and data optimization, and the output of the sewage dosing effect prediction model is used as the sewage dosing effect prediction result; a level threshold is set in advance, and if the dosing effect evaluation level is lower than the level threshold, an early warning process is performed.
[0107] Embodiment 7, see Figure 2 , this embodiment is based on the above embodiment, and the sewage dosing effect prediction system based on big data provided by the present invention includes a data acquisition module, a data preprocessing module, a data optimization module, a sewage dosing effect prediction model establishment module and a sewage dosing effect prediction module;
[0108] The data acquisition module collects historical sewage dosing effect data and sends the data to the data preprocessing module;
[0109] The data preprocessing module performs data cleaning, data normalization and data set division on the collected data, and sends the data to the data optimization module;
[0110] The data optimization module replaces the mask layer with a learnable gating layer based on the reversible flow model of affine transformation; determines the intrinsic dimension and redundant dimension based on the output of the gating layer; combines the reconstruction loss, dimensionality factor and the average interval reconstruction loss function of the gating value to achieve data optimization; and sends the data to the sewage dosing effect prediction model establishment module;
[0111] The sewage dosing effect prediction model establishment module introduces a memristor model to design an adaptive activation function; and obtains a hybrid adaptive activation function based on the adaptive activation function; and then completes the establishment of the sewage dosing effect prediction model; and sends the data to the sewage dosing effect prediction module;
[0112] The sewage dosing effect prediction module realizes sewage dosing effect prediction based on the established sewage dosing effect prediction model.
[0113] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0114] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.
[0115] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A method for predicting the effect of sewage dosing based on big data, characterized in that: The method comprises the following steps: Step S1: data collection; Step S2: data preprocessing; Step S3: Based on the reversible flow model of affine transformation, the mask layer is replaced with a learnable gating layer; the intrinsic dimension and the redundant dimension are distinguished based on the output of the gating layer; the reconstruction loss function is reconstructed by combining the reconstruction loss, the dimensionality factor and the average interval of the gating value to achieve data optimization; Step S4: introducing a memristor model to design an adaptive activation function; and obtaining a hybrid adaptive activation function based on the adaptive activation function; and then completing the establishment of a sewage dosing effect prediction model; Step S5: Prediction of sewage dosing effect; In step S1, the data collection is to collect historical sewage dosing effect data; the sewage dosing effect data includes water quality parameter data, dosing parameter data, process parameter data, environmental parameter data and dosing effect evaluation level; the dosing effect evaluation level is used as a data label; In step S5, the sewage dosing effect prediction is based on the established sewage dosing effect prediction model; water quality parameter data, dosing parameter data, process parameter data and environmental parameter data are collected in real time, and input into the sewage dosing effect prediction model after data preprocessing and data optimization, and the output of the sewage dosing effect prediction model is used as the sewage dosing effect prediction result; a level threshold is set in advance, and if the dosing effect evaluation level is lower than the level threshold, an early warning process is performed; in step S4, the following steps are specifically included: Step S41: design a memristor model; a memristor is a resistor with nonlinear characteristics, and the model is defined as follows: ; In the formula, i2 is the current; v is the voltage; is the state variable of the memristor; a and b are the internal parameters of the memristor; Step S42: design an adaptive activation function; introduce a memristor to construct the activation function; the formula used is as follows: ; Where MU(·) is the adaptive activation function; is the activation function input; Step S43: construct a hybrid adaptive activation function; establish an activation function of the sewage dosing effect prediction model based on the adaptive activation function; the formula used is as follows: ; In the formula, , , and They are the activation outputs of the 1st, 2nd, 3rd, and 4th neurons to their own inputs; , , and are the inputs of the 1st, 2nd, 3rd, and 4th neurons respectively; , and They are the synaptic weights between the first neuron, the second neuron, and the third neuron and themselves; and are the synaptic weights of the first neuron with the second and third neurons respectively; and are the synaptic weights of the second neuron with the first and third neurons respectively; and are the synaptic weights of the third neuron with the first and second neurons respectively; a and b are the internal parameters of the memristor; MU(·) is the adaptive activation function; Step S44: Determination of the sewage dosing effect prediction model; the sewage dosing effect prediction model adopts a cross entropy loss function; a precision threshold is set in advance; if the loss of the sewage dosing effect prediction model for the training set converges, the training of the sewage dosing effect prediction model is completed; if the prediction accuracy of the trained sewage dosing effect prediction model for the test set is higher than the precision threshold, the sewage dosing effect prediction model is established; otherwise, the data set is re-divided and the parameters are adjusted to re-train the sewage dosing effect prediction model.
2. The method for predicting the effect of sewage dosing based on big data according to claim 1 is characterized in that: In step S3, the following steps are specifically included: Step S31: initialization; constructing a reversible flow model based on affine transformation; Step S32: define a gating layer; replace the mask layer of the reversible flow model with a learnable gating layer g; the gating layer is represented as follows: ; In the formula, m i is the gate value of the i-th feature; sigmoid(·) is the sigmoid activation function; η is the amplification factor; is the learnable parameter of the gating layer; Step S33: encoding process; encoding the input data x through the reversible flow model to obtain z; using the gating layer g to perform Hadamard operation on z to obtain feature u; the formula used is as follows: ; ; Where z is the encoding representation obtained by the reversible flow model T(·); is the Hadamard operation; Step S34: Decoding: Decoding feature u through the reversible flow model to obtain reconstructed data ; The formula used is as follows: ; In the formula, It is the inverse transformation of the reversible flow model; Step S35: Determine the intrinsic dimension; distinguish the intrinsic dimension from the redundant dimension based on the output of the gating layer; expressed as follows: ; Where d is the number of intrinsic dimensions; n is the total number of features; For values greater than 0.5 Perform summation; Step S36: Calculate the average interval; improve the certainty of the gating layer for dimension selection by maximizing the interval; the formula used is as follows: ; In the formula, is the gate value m i The average interval with 0.5; Step S37: construct a loss function; reconstruct the loss function based on the mean square error and finally optimize it; the formula used is as follows: ; Where L is the total loss value; F is the reconstruction loss function; is the dimension factor; MSE(·) is the mean square error; and are the i1th input data and the reconstructed data respectively; N is the total number of input data; Step S38: data optimization; pre-set a loss threshold; train the reversible flow model optimized in steps S32 to S34 based on the quasi-training set; if the total loss function value of the converged reversible flow model for the test set is lower than the loss threshold, the reversible flow model is established, and the original data set is subjected to dimensionality reduction processing based on the reversible flow model to obtain an optimized data set; and the optimized data set is divided into a test set and a training set.
3. The method for predicting the effect of sewage dosing based on big data according to claim 1 is characterized in that: In step S2, the data preprocessing is to clean the collected data, normalize the data and divide the data set; the data cleaning is to process missing values, duplicate values and outliers; the data normalization is to convert the data into vector form and perform standardized processing to obtain the original data set; the data set division is to divide the original data set into a quasi-test set and a quasi-training set.
4. A sewage dosing effect prediction system based on big data, used to implement the sewage dosing effect prediction method based on big data as described in any one of claims 1 to 3, characterized in that: It includes data acquisition module, data preprocessing module, data optimization module, sewage dosing effect prediction model establishment module and sewage dosing effect prediction module; The data acquisition module collects historical sewage dosing effect data and sends the data to the data preprocessing module; The data preprocessing module performs data cleaning, data normalization and data set division on the collected data, and sends the data to the data optimization module; The data optimization module replaces the coding layer with a learnable gating layer based on the reversible flow model of affine transformation; determines the intrinsic dimension and redundant dimension based on the output of the gating layer; combines the reconstruction loss, dimensionality factor and the average interval reconstruction loss function of the gating value to achieve data optimization; and sends the data to the sewage dosing effect prediction model establishment module; The sewage dosing effect prediction model establishment module introduces a memristor model to design an adaptive activation function; and obtains a hybrid adaptive activation function based on the adaptive activation function; and then completes the establishment of the sewage dosing effect prediction model; and sends the data to the sewage dosing effect prediction module; The sewage dosing effect prediction module realizes sewage dosing effect prediction based on the established sewage dosing effect prediction model.
Citation Information
Patent Citations
Image title generation method based on memristor module array
CN111695678A
Internet-of-Things equipment fingerprint identification method based on deep learning
CN112564974A
