Incomplete water quality data complementation method and device based on tensor hidden feature analysis

By constructing a fourth-order water quality tensor based on tensor hidden feature analysis and iteratively optimized, the problem of inaccurate interpolation of incomplete water quality data is solved, and efficient and accurate completion of water quality data is achieved.

CN119577638AInactive Publication Date: 2025-03-07CHONGQING UNIV OF EDUCATION +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411627114.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to effectively process incomplete and discontinuous water quality data, resulting in the inability to accurately quantify the potential responses to water quality safety on different time scales.

Method used

Using a method based on tensor hidden feature analysis, the fourth-order water quality tensor and target loss function are constructed, and iterative optimization is performed to output complete water quality tensors to achieve accurate completion of incomplete water quality data.

Benefits of technology

The interpolation accuracy of high-dimensional incomplete water quality tensor data is improved, the characterization ability of the non-negative tensor hidden feature analysis model is enhanced, and the accuracy and reliability of the completion results are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577638A_ABST
    Figure CN119577638A_ABST
Patent Text Reader

Abstract

The invention relates to the field of water quality data processing methods, in particular to an incomplete water quality data complementing method and device based on tensor hidden feature analysis, and the method comprises the steps: receiving a complementing instruction of incomplete water quality monitoring data sent from a server, and obtaining and storing automatically monitored water quality data from sensors arranged at multiple sites; constructing water quality four-order tensors of incomplete variables, monitoring sites, monitoring time and water quality monitoring underwater layers according to the stored water quality data; and according to the incomplete water quality four-order tensor, constructing a target loss function complemented by a missing value, carrying out iterative optimization, and outputting a complete water quality tensor. According to the method, the incomplete water quality tensor data interpolation is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of water quality data processing methods, and in particular to a method and device for completing incomplete water quality data based on tensor latent feature analysis. Background Art

[0002] A high-quality water environment is the foundation for sustainable development of society and the ecological environment. The deterioration of water quality caused by human activities, global warming, and the discharge of domestic and industrial wastewater may lead to serious public health and economic consequences. In order to ensure a safe and effective water supply, continuous monitoring of changes in water quality has always been a priority for making informed decisions. Traditionally, discrete water samples are collected monthly or weekly for water quality assessment, which incurs a lot of cost and time for field sampling methods and sample transportation for laboratory analysis. This low-frequency data poses a challenge to the development of early warning models.

[0003] Currently, with the advancement of monitoring technology, sensor-based buoys and ships can now automatically collect real-time information related to water, including various physical, chemical and biological parameters. In addition, the use of sensor networks and GIS systems in large water bodies can collect high-resolution water quality data on site. This method provides rapid, cost-effective and high-resolution monitoring data, and also provides an opportunity to fully understand the spatiotemporal changes within aquatic ecosystems. However, discontinuous monitoring schemes with large monitoring intervals and inevitable data gaps due to equipment aging, regular maintenance, insufficient collection and occasional power outages of monitoring equipment fail to capture the necessary data to accurately quantify potential responses to water quality safety at different time scales. How to develop effective and appropriate strategies to estimate incomplete and discontinuous water quality data remains a challenge.

[0004] For the incomplete and discontinuous problems of water quality data, both single imputation and multivariate imputation are used. Single imputation replaces each missing value with a specific value, and multivariate imputation considers the conditional distribution of missing data in the observed data. Estimating large-scale water quality monitoring data is challenging due to the inherent fluctuations and nonlinear dynamics of water quality parameters. In addition, water quality data obtained from sensor network systems usually exhibit high dimensionality and incompleteness (HDI) properties. Although traditional interpolation methods are efficient in water quality data completion, they ignore the internal connections between different target variables and different spatiotemporal scales.

[0005] In practical applications, water quality data contain values ​​of multiple target variables across time and space, and it is necessary to develop an analysis model that can capture the interactions between different variables hidden in water quality data. Tensor-based latent feature analysis methods have received increasing attention because they fully retain the structure and spatiotemporal characteristics of incomplete tensors. Methods based on latent feature analysis are still rarely used in automatically monitored water quality data with high temporal resolution.

[0006] Models based on latent feature analysis obtain the required latent factor matrix based only on the known set of target tensors, thus naturally providing scalability and efficiency advantages in the analysis of high-dimensional incomplete tensors. Variable spatiotemporal water quality tensors can effectively preserve their temporal, spatial and structural patterns and capture the interactions between multidimensional water quality data. Latent feature analysis has demonstrated superior scalability and efficiency in the analysis of high-dimensional sparse tensors. For example, representative models based on latent feature analysis include CP decomposition and weighted optimization models, regularization-based tensor decomposition models, biased non-negative latent feature analysis models, etc. Despite their high efficiency, the above models cannot fully capture certain characteristics of water quality data. For example, the significant imbalance and complex behavior of existing data in high-dimensional incomplete water quality tensors limit their ability to effectively learn representations. However, typical latent feature analysis-based models currently rely on general regularization methods, such as the L2 scheme, which is tailored for problems involving complete data, while incomplete high-dimensional sparse data exhibit different data distributions and sparsity. Therefore, how to more accurately interpolate high-dimensional incomplete water quality tensor data has become a key issue that needs to be solved urgently. Summary of the invention

[0007] One of the purposes of the present invention is to provide an incomplete water quality data completion method based on tensor latent feature analysis to solve the problem of inaccurate interpolation of incomplete water quality tensor data.

[0008] The incomplete water quality data completion method and device based on tensor hidden feature analysis in this scheme include the following steps:

[0009] Step 1, receiving a completion instruction for incomplete water quality monitoring data sent from a server, obtaining automatically monitored water quality data from sensors deployed at multiple sites and storing the data;

[0010] Step 2, construct a fourth-order water quality tensor based on the stored water quality data, including incomplete variables, monitoring sites, monitoring time, and the number of underwater layers for water quality monitoring;

[0011] Step 3: Construct the target loss function for missing value completion based on the incomplete fourth-order water quality tensor, perform iterative optimization, and output the complete water quality tensor.

[0012] The beneficial effects of this program are:

[0013] By constructing a fourth-order water quality tensor based on incomplete water quality monitoring data, iterative optimization is performed with the corresponding target loss function to output a complete water quality tensor, making the interpolation of incomplete water quality tensor data more accurate.

[0014] Furthermore, in step 2, all the quaternions Q=(I, J, L, P) in the water quality monitoring data storage unit are constructed into a fourth-order tensor data of I×J×L×P, where I represents the number of variables of the monitored water quality indicators, J represents the sites where the sensors are deployed for monitoring, L represents the number of time periods in the time set, and P represents the number of underwater layers for water quality monitoring, and the conditions satisfy 1≤i≤I, 1≤j≤J, 1≤l≤L, and 1≤p≤P; q ijlp It represents an element in the fourth-order tensor Q, that is, the monitoring value of the i-th monitoring indicator at the j-th monitoring point at the P-th layer at the l-th time.

[0015] The beneficial effect is that the representation of four-dimensional tensors can quantify multiple incomplete parameter indicators.

[0016] Furthermore, the output of the water quality tensor in step 3 includes the following sub-steps:

[0017] Sub-step 3.1, initializing the process parameters involved in the fourth-order tensor completion method in sub-steps 3.2 and 3.3, and initializing the parameters required in the calculation process according to the incomplete water quality data completion method based on tensor implicit feature analysis;

[0018] Sub-step 3.2, the process of constructing the target loss function of water quality monitoring data value based on the fourth-order water quality tensor and process parameters is:

[0019] Construct a loss function to quantify Q and Then, based on the known element set Φ in Q, the latent feature matrix U is obtained by iterative training to minimize the error. |I|×R , Z |J|×R , T |L|×R , C |P|×R , nonlinear swish regularization is introduced into the non-negative tensor latent feature analysis model to construct the target loss function ε, which is expressed as:

[0020]

[0021] Among them, u ir 、z jr ,t lr and c pr Denote the latent feature matrix U |I|×R , Z |J|×R , T |L|×R , C |P|×R A single element in d i , g j 、h l and p Represents a single element in the bias vectors d, g, h, and s respectively; (i, j, l, p) ∈ Φ represents the subscript set of known elements contained in the tensor Q; q ijlprepresents the monitoring value of the ith monitoring indicator at the jth monitoring point at the pth layer at the lth moment; R represents the latent feature dimension of the four latent feature matrices obtained by calculation, that is, the number of columns of the latent feature matrices U, Z, T and C; u ir represents the value of the i-th row and r-th column in the latent feature matrix U; z jr Represents the value of the jth row and rth column in the latent feature matrix Z; t lr represents the value of the lth row and rth column in the latent feature matrix T; p pr represents the value of the pth row and rth column in the latent feature matrix C; d i represents the value of the i-th column in the bias vector d; g j represents the value of the jth column in the bias vector g; h l Represents the value of the lth column in the bias vector h; s p represents the value of the pth column in the bias vector s; λ represents the training control parameters of the four latent feature matrices; γ represents the training control parameters of the four bias vectors; the constraint condition st j∈J,l∈L,p∈P,r∈{1,2,…,R}:u ir ≥0,z jr ≥0,t lr ≥0,c pr ≥0,d i ≥0,g j ≥0,h l ≥0,s p ≥0 means that each value in the latent feature matrix U, Z, T and C and the value in the bias vector must satisfy the non-negative condition during the calculation process. e represents the Euler number, which is a mathematical constant. β represents the hyperparameter of the nonlinear regularized swish function.

[0022] Sub-step 3.3, perform parameter optimization learning on the target loss function, use the multiplication update rule to iteratively optimize ε to minimize the value of ε, and the tensor's non-negative and multiplication update algorithm based on single element dependency is an efficient solver for constructing non-negative latent feature analysis models on high-dimensional incomplete tensors;

[0023] Sub-step 3.4, determine whether the iteration process of the target loss function reaches the iteration termination condition, if yes, terminate, if no, continue iterating;

[0024] Sub-step 3.5, calculate the missing water quality monitoring values.

[0025] The beneficial effect is: by completing incomplete water quality data according to the process of regularization and iteration, the solution space of the non-negative tensor latent feature analysis model can be enhanced, and its ability to represent nonlinear fluctuations and imbalances in the data can be improved, thereby improving its representation learning ability and the estimation accuracy of missing values, making the completion results more in line with the actual situation and ensuring the accuracy of the completed data.

[0026] Further, the sub-step 3.1 includes initializing the latent characteristic moments U of the four water quality monitoring data |I|×R , Z |J|×R 、T |L|×R , C |P|×R ;

[0027] Initialize the latent feature dimension R; initialize the one-dimensional bias vectors d, g, h, s; initialize the maximum number of training iterations M; initialize the iteration number control variable m during training; initialize the convergence termination threshold τ; initialize the latent feature control factors λ and γ.

[0028] The beneficial effect is that the initialization of each data can allow the data to have a better initial value during the completion operation.

[0029] Further, in the sub-step 3.1, the sizes of the latent feature matrices U, Z, T and C are determined by the corresponding variable, site, time, layer number tensor Q's each dimension value and the latent feature dimension R, that is, U is a latent feature matrix with |I| rows and R columns, Z is a latent feature matrix with |J| rows and R columns, T is a latent feature matrix with |L| rows and R columns, and C is a latent feature matrix with |P| rows and R columns, and the four latent feature matrices are initialized with small random positive numbers respectively; the sizes of the bias vectors d, g, h, s are determined by the corresponding variable, site, time, layer number fourth-order tensor Q's each dimension value |I|, |J|, |L| and |P|;

[0030] The maximum number of training iterations M determines the maximum number of training iterations in the iterative training process and is initialized with a large positive integer. The iteration control variable m is initialized with 0. The convergence termination threshold τ and the latent feature control factors λ and γ are initialized with a very small positive number and are initialized to positive numbers between 0 and 1.

[0031] The beneficial effect is that specific initialization parameter settings can reach the optimal solution more quickly.

[0032] Furthermore, in the sub-step 3.3, additive gradient descent is used for the latent factor matrix, and the formula for training iteration is:

[0033]

[0034] Among them, η ir ,η jr ,η lr and η pr represents the latent feature vector u ir 、z jr ,t lr and c pr The learning rate η i ,η j ,η l and η pDenotes the bias vector d i , g j 、h l and p learning rate; Φ(i), Φ(j), Φ(l), and Φ(p) are subsets of the known set Φ associated with nodes i∈I, j∈J, l∈L, p∈P;

[0035] By manipulating the learning rate, the negative term in the formula is offset by the initial state of the corresponding parameter, and the parameter η ir ,η jr ,η lr and η pr It is expressed as:

[0036]

[0037] η ir ,η jr ,η lr and η pr Substituting the parameter formula into the training iteration formula, we get the multiplication learning rule for each element in the latent feature matrix U, Z, T, C and the bias vectors d, g, h and s. The final parameter training iteration formula is expressed as:

[0038]

[0039] Among them, (i,j,l,p)∈Φ represents the subscript set of known elements contained in the tensor Q; q ijlp It means the monitoring value of the i-th monitoring indicator at the j-th monitoring point at the p-th layer at the l-th moment; u ir represents the value of the i-th row and r-th column in the latent feature matrix U; z jr Represents the value of the jth row and rth column in the latent feature matrix Z; t lr represents the value of the lth row and rth column in the latent feature matrix T; c pr represents the value of the pth row and rth column in the latent feature matrix C; d i represents the value of the i-th in the bias vector d; g j represents the jth value in the bias vector g; h l represents the lth value in the bias vector h; s p represents the pth value in the bias vector s; λ represents the training control parameters of the four latent feature matrices; γ represents the training control parameters of the four bias vectors; β represents the hyperparameter of the nonlinear regularized swish function; represents the estimated value of the numerical value in the fourth-order tensor of water quality monitoring data calculated according to the calculated latent eigenvalue; |Φ(i)|, |Φ(j)|, |Φ(l)| and |Φ(p)| respectively represent the number of elements contained in the slice matrix of each dimension in the tensor Q, and e represents the Euler number, which is a mathematical constant.

[0040] Furthermore, in the sub-step 3.4, the above training process is repeated on the known set Φ until ε converges on Φ. The convergence condition is that the training iteration round control variable m reaches the maximum training iteration round number M, or the absolute value of the difference between the ε value calculated after the end of this round of iteration and the ε value of the previous round is less than the convergence termination threshold τ. After ε converges, the latent feature matrices U, Z, T, C and the bias vectors d, g, h and s are obtained.

[0041] Further, in the sub-step 3.5, the predicted value in the tensor Q is calculated by the latent feature matrices U, Z, T, C and the bias vectors d, g, h, s;

[0042] For each element, the monitoring value q ijlp Indicates the monitoring indicator u i In z j The tth site l The cth moment p The predicted value of byu ir 、z jr ,t lr 、c pr and d i , g j 、h l 、s p come to a conclusion together;

[0043] When the target loss function value ε reaches the minimum value after iterative training on the known data set Φ, the highest prediction value is calculated using the latent feature matrix U, Z, T, C and the bias vector d, g, h, s that have been trained at this time The formula is:

[0044]

[0045] in, It represents the estimated value of the pth layer of the ith monitoring indicator at the lth time of the jth station; R represents the number of columns of the four latent feature matrices U, Z, T and C; and the calculated water quality monitoring data interpolation value is output to the water quality monitoring data completion value storage unit.

[0046] The second purpose of the present invention is to provide an incomplete water quality data completion device based on tensor latent feature analysis to accurately realize the interpolation of high-dimensional incomplete water quality tensor data.

[0047] The incomplete water quality data completion device based on tensor hidden feature analysis includes:

[0048] The water quality monitoring data receiving module is used to receive the completion instruction of the incomplete water quality monitoring data sent from the server, obtain the historical water quality data of automatic monitoring from the sensors deployed at multiple sites, and store it in the water quality monitoring data storage module;

[0049] A water quality data storage unit, used to store the automatically monitored water quality data collected by the received sensor in the form of a four-dimensional tensor, and to store the completed and complete water quality monitoring data;

[0050] A fourth-order tensor construction module for water quality monitoring data is used to construct the stored historical water quality monitoring data into fourth-order tensor data;

[0051] The tensor precise completion module for water quality monitoring data is used to accurately complete the fourth-order tensor of incomplete water quality monitoring data based on known historical multi-source water quality monitoring data, and store the complete water quality monitoring data in the water quality monitoring data storage module;

[0052] The water quality data storage module includes a water quality monitoring data storage unit and a complete water quality monitoring data completion value storage unit:

[0053] The water quality monitoring data storage unit is used to store and receive historical water quality monitoring data;

[0054] The water quality monitoring data completion value storage unit is used to store the completed water quality monitoring data;

[0055] The tensor precise completion module of water quality monitoring data includes an initialization unit, a training unit and a completion value calculation unit:

[0056] The initialization unit is used to initialize the latent feature matrix and related parameters in the optimization target involved in the process of water quality tensor completion;

[0057] The training unit is used to optimize the latent feature matrix and related parameters involved in the optimization target in the process of optimizing the initialization of the water quality tensor completion, and obtain the latent feature matrix of the water quality monitoring data according to the historical water quality monitoring data training;

[0058] The completion value calculation unit is used to obtain the latent feature matrix of the water quality data obtained by the training unit, calculate the completion value of the missing data in the water quality monitoring tensor, and then store the calculated water quality monitoring data completion value into the water quality monitoring data completion value storage unit;

[0059] The training unit includes a parameter optimization unit, which is used to calculate the information of the optimization target latent feature matrix during the training process. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a schematic block diagram of an embodiment of the incomplete water quality data completion method based on tensor latent feature analysis of the present invention;

[0061] Figure 2 It is a principle block diagram of an embodiment of the incomplete water quality data completion device based on tensor latent feature analysis of the present invention. DETAILED DESCRIPTION

[0062] The following is further explained in detail through specific implementation methods.

[0063] Example

[0064] Incomplete water quality data completion device based on tensor hidden feature analysis, such as Figure 2 As shown, including:

[0065] The water quality monitoring data receiving module is used to receive the completion instruction of the incomplete water quality monitoring data sent from the server, obtain the historical water quality data of automatic monitoring from the sensors deployed at multiple sites, and store it in the water quality monitoring data storage module;

[0066] A water quality data storage unit, used to store the automatically monitored water quality data collected by the received sensor in the form of a four-dimensional tensor, and to store the completed and complete water quality monitoring data;

[0067] A fourth-order tensor construction module for water quality monitoring data is used to construct the stored historical water quality monitoring data into fourth-order tensor data;

[0068] The tensor precise completion module for water quality monitoring data is used to accurately complete the fourth-order tensor of incomplete water quality monitoring data based on known historical multi-source water quality monitoring data, and store the complete water quality monitoring data in the water quality monitoring data storage module;

[0069] The water quality data storage module includes a water quality monitoring data storage unit and a complete water quality monitoring data completion value storage unit:

[0070] The water quality monitoring data storage unit is used to store and receive historical water quality monitoring data;

[0071] The water quality monitoring data completion value storage unit is used to store the completed water quality monitoring data;

[0072] The tensor precise completion module of water quality monitoring data includes an initialization unit, a training unit and a completion value calculation unit:

[0073] The initialization unit is used to initialize the latent feature matrix and related parameters in the optimization target involved in the process of water quality tensor completion;

[0074] The training unit is used to optimize the latent feature matrix and related parameters involved in the optimization target in the process of optimizing the initialization of the water quality tensor completion, and obtain the latent feature matrix of the water quality monitoring data according to the historical water quality monitoring data training;

[0075] The completion value calculation unit is used to obtain the latent feature matrix of the water quality data obtained by the training unit, calculate the completion value of the missing data in the water quality monitoring tensor, and then store the calculated water quality monitoring data completion value into the water quality monitoring data completion value storage unit;

[0076] The training unit includes a parameter optimization unit, which is used to calculate the information of the optimization target latent feature matrix during the training process.

[0077] Based on the incomplete water quality data completion device based on tensor hidden feature analysis, the incomplete water quality data completion method based on tensor hidden feature analysis of this embodiment is as follows: Figure 1 As shown, the following steps are included:

[0078] Step 1, receiving the completion instruction of the incomplete water quality monitoring data sent from the server, obtaining the automatically monitored water quality data from the sensors deployed at multiple sites and storing it.

[0079] Step 2: construct a fourth-order water quality tensor of incomplete variables, monitoring sites, monitoring time, and number of underwater layers of water quality monitoring based on the stored water quality data. The water quality data is stored by a water quality data storage unit. The received automatically monitored water quality data is stored in the form of a four-dimensional tensor. The representation of the four-dimensional tensor is:

[0080] Q = (I, J, L, P);

[0081] Among them, the set of incomplete variables contained in Q is I, the incomplete variables are monitoring indicators, the set of monitoring sites is J, the set of monitoring time is L, and the number of underwater layers for water quality monitoring is P. The quaternary group Q is constructed into a fourth-order tensor data of I×J×L×P, and satisfies 1≤i≤I, 1≤j≤J, 1≤l≤L, 1≤p≤P, and Φ is the set of known elements contained in the water quality monitoring tensor data Q, that is,:

[0082]

[0083] Among them, |I| represents the number of monitored water quality indicator variables, |J| represents the sites where sensors are deployed for monitoring, |L| represents the number of time periods in the time set, and |P| represents the number of underwater monitoring layers in the set;

[0084] An element in the fourth-order tensor Q is denoted as q ijlp , represents the monitoring value of the i-th incomplete variable at the j-th monitoring point at the p-th layer at the l-th time. Due to the sudden power failure of the sensor or the different monitoring frequencies between different monitoring indicators, the monitoring data obtained has the characteristics of missing or different frequencies. Therefore, the tensor Q is a high-dimensional incomplete tensor containing a large number of missing values. Φ is used to represent the set of elements in the tensor Q.

[0085] Step 3: Construct the target loss function for missing value completion based on the incomplete fourth-order water quality tensor, perform iterative optimization, and output the complete water quality tensor.

[0086] The output of the water quality tensor consists of the following sub-steps:

[0087] Sub-step 3.1, initialize the process parameters involved in the fourth-order tensor completion method in sub-steps 3.2 and 3.3, and according to the preferred scheme of the incomplete water quality data completion method based on tensor latent feature analysis, initialize the relevant parameters and temporary variables required in the calculation process, such as monitoring indicators, number of monitoring sites, monitoring time, number of monitoring layers and other temporary variables.

[0088] Initialize the latent characteristic moments U of the four water quality monitoring data |I|×R , Z |J|×R , T |L|×R , C |P|×R ; Water quality monitoring data are process parameters.

[0089] Initialize the latent feature dimension R; initialize the one-dimensional bias vectors d, g, h, s; initialize the maximum number of training iterations M; initialize the number of iterations control variable m during training; initialize the convergence termination threshold τ; initialize the latent feature control factors μ1 and μ2. The latent feature dimension R determines the latent feature space dimension of the latent feature matrices U, Z, T and C of the calculated water quality monitoring data, that is, the number of columns of the latent feature matrices U, Z, T and C. It is initialized to a positive integer, and the specific value is set according to actual needs.

[0090] The sizes of the latent feature matrices U, Z, T, and C are determined by the corresponding variable, site, time, and layer tensor Q's each dimension value and the latent feature dimension R, that is, U is a latent feature matrix with |I| rows and R columns, Z is a latent feature matrix with |J| rows and R columns, T is a latent feature matrix with |L| rows and R columns, and C is a latent feature matrix with |P| rows and R columns. The four latent feature matrices are initialized with small random positive numbers respectively; the sizes of the bias vectors d, g, h, and s are determined by the corresponding variable, site, time, and layer fourth-order tensor Q's each dimension value |I|, |J|, |L|, and |P|.

[0091] The maximum number of training iterations M determines the maximum number of training iterations during the iterative training process and is initialized with a large positive integer. The iteration control variable m is initialized with 0. The convergence termination threshold τ is initialized with a very small positive number, such as 10. -6 , which is used to determine whether the iterative process has reached the convergence condition. The latent feature control factor λ controls the parameters of the corresponding elements of the latent feature matrices U, Z, T, and C during the training iteration. γ controls the parameters of the corresponding elements of the bias vectors d, g, h, and s during the training iteration. The latent feature control factors λ and γ are initialized to positive numbers between 0 and 1.

[0092] Sub-step 3.2, the process of constructing the target loss function of water quality monitoring data value based on the fourth-order water quality tensor and process parameters is:

[0093] Construct a loss function to quantify Q and Then, based on the known element set Φ in Q, the latent feature matrix U is obtained by iterative training to minimize the error. |I|×R , Z |J|×R , T |L|×R , C |P|×R Swish is an activation function widely used in deep neural networks, defined as x·σ(βx), where σ(a)=(1+exp(-a))-1 is a sigmoid function, and the calculation formula is:

[0094]

[0095] Where β is a trainable hyperparameter that controls the decay rate of the output. As shown in the above formula, the swish function shows a one-sided boundary close to zero and is non-monotonic. In addition, its parameter β allows adaptive behavior, balancing linear and nonlinear characteristics, which ultimately improves the accuracy and robustness of the model. The nonlinear swish-based regularization scheme integrates the principles of Tikhonov regularization and nonlinear activation in neural networks. The method is to replace the L2 norm of each latent feature vector in non-negative latent feature analysis with the L2 norm of its mapping vector through an exchange function. The sum of the squares of the latent feature matrix in non-negative tensor latent feature analysis is replaced by the sum of the squares of the swish function values ​​of each individual latent feature matrix.

[0096] Near-zero one-sided boundary and is non-monotonic. In addition, its parameter β allows adaptive behavior, balancing linear and nonlinear characteristics, which ultimately improves the accuracy and robustness of the model. The nonlinear swish-based regularization scheme integrates the principles of Tikhonov regularization and nonlinear activation in neural networks. The method is to replace the L2 norm of each latent feature vector in non-negative latent feature analysis with the L2 norm of its mapping vector through an exchange function. The sum of the squares of the latent feature matrix in non-negative tensor latent feature analysis is replaced by the sum of the squares of the swish function values ​​of each individual latent feature matrix.

[0097] The principle of nonlinear activation and nonlinearity. This method replaces the L2 norm of each latent feature vector in non-negative latent feature analysis with the L2 norm of its mapping vector through an exchange function. The sum of squares of latent feature matrices in non-negative tensor latent feature analysis is replaced by the sum of squares of the swish function values ​​of each individual latent feature matrix.

[0098] The nonlinear swish regularization is introduced into the non-negative tensor latent feature analysis model to construct the target loss function ε, which is expressed as:

[0099]

[0100] Among them, u ir 、z jr ,t lr and c pr Denote the latent feature matrix U |I|×R , Z |J|×R 、T |L|×R , C |P|×R A single element in d i , g j 、h l and p Represents a single element in the bias vectors d, g, h, and s respectively; (i, j, l, p) ∈ Φ represents the subscript set of known elements contained in the tensor Q; q ijlp represents the monitoring value of the ith monitoring indicator at the jth monitoring point at the pth layer at the lth moment; R represents the latent feature dimension of the four latent feature matrices obtained by calculation, that is, the number of columns of the latent feature matrices U, Z, T and C; u ir represents the value of the i-th row and r-th column in the latent feature matrix U; z jr Represents the value of the jth row and rth column in the latent feature matrix Z; t lr represents the value of the lth row and rth column in the latent feature matrix T; p pr represents the value of the pth row and rth column in the latent feature matrix C; d i represents the value of the i-th column in the bias vector d; g j represents the value of the jth column in the bias vector g; h l Represents the value of the lth column in the bias vector h; s p represents the value of the pth column in the bias vector s; λ represents the training control parameters of the four latent feature matrices; γ represents the training control parameters of the four bias vectors; the constraint condition st j∈J,l∈L,p∈P,r∈{1,2,…,R}:u ir ≥0,z jr ≥0,t lr ≥0,c pr ≥0,d i ≥0,g j ≥0,h l ≥0,s p ≥0 means that each value in the latent feature matrix U, Z, T and C and the value in the bias vector must satisfy the non-negative condition during the calculation process. e represents the Euler number, which is a mathematical constant. β represents the hyperparameter of the nonlinear regularized swish function.

[0101] Sub-step 3.3, in order to ensure the non-negativity of the latent feature matrix elements during the calculation process of the latent feature matrix, the multiplication update rule is used to iteratively optimize ε to minimize the value of ε. The tensor non-negative and multiplication update algorithm based on single element dependency is an efficient solver for constructing non-negative latent feature analysis models on high-dimensional incomplete tensors.

[0102] The objective loss function is parameter optimized and learned, and ε is iteratively optimized using the multiplication update rule to minimize the value of ε. The tensor's non-negative and multiplication update algorithm based on single-element dependency is an efficient solver for constructing non-negative latent feature analysis models on high-dimensional incomplete tensors.

[0103] Additive gradient descent is used on the latent factor matrix, and the formula for training iteration is:

[0104]

[0105] Among them, η ir ,η jr ,η lr and η pr represents the latent feature vector u ir 、z jr ,t lr and c pr The learning rate η i ,η j ,η l and η p Denotes the bias vector d i , g j 、h l and p learning rate; Φ(i), Φ(j), Φ(l), and Φ(p) are subsets of the known set Φ associated with nodes i∈I, j∈J, l∈L, p∈P;

[0106] The above formula clearly identifies the negative component in the learning rule of each parameter, which may make the training result negative. By manipulating the learning rate, the negative term in the formula is offset by the initial state of the corresponding parameter, and the parameter η ir ,η jr ,η lr and η pr It is expressed as:

[0107]

[0108] η ir ,η jr ,η lr and η prSubstituting the parameter formula into the training iteration formula, we get the multiplication learning rule for each element in the latent feature matrix U, Z, T, C and the bias vectors d, g, h and s. The final parameter training iteration formula is expressed as:

[0109]

[0110] Among them, q ijlp represents the monitoring value of the i-th monitoring indicator at the j-th monitoring point at the p-th layer at the l-th moment; (i,j,l,p)∈Φ represents the subscript set of known elements contained in the tensor Q; u ir represents the value of the i-th row and r-th column in the latent feature matrix U; z jr Represents the value of the jth row and rth column in the latent feature matrix Z; t lr represents the value of the lth row and rth column in the latent feature matrix T; c pr represents the value of the pth row and rth column in the latent feature matrix C; d i represents the value of the i-th in the bias vector d; g j represents the jth value in the bias vector g; h l represents the lth value in the bias vector h; s p represents the pth value in the bias vector s; λ represents the training control parameters of the four latent feature matrices; γ represents the training control parameters of the four bias vectors; β represents the hyperparameter of the nonlinear regularized swish function; represents the estimated value of the numerical value in the fourth-order tensor of water quality monitoring data calculated according to the calculated latent eigenvalue; |Φ(i)|, |Φ(j)|, |Φ(l)| and |Φ(p)| respectively represent the number of elements contained in the slice matrix of each dimension in the tensor Q, and e represents the Euler number, which is a mathematical constant.

[0111] Sub-step 3.4, determine whether the iterative process of the target loss function reaches the iteration termination condition. If so, terminate; otherwise, continue to iterate and repeat the above training process on the known set Φ until ε converges on Φ. The convergence judgment condition is that the control variable m of the number of training iterations reaches the maximum number of training iterations M, or the absolute value of the difference between the ε value calculated after the end of this round of iteration and the ε value of the previous round is less than the convergence termination threshold τ. After ε converges, the latent feature matrices U, Z, T, C and bias vectors d, g, h and s are obtained.

[0112] Sub-step 3.5, calculate the missing water quality monitoring values. The predicted values ​​in the tensor Q are calculated by the latent feature matrices U, Z, T, C and the bias vectors d, g, h, s;

[0113] For each element, the monitoring value q ijlp Indicates the monitoring indicator u i In z j The tth sitel The cth moment p The predicted value of byu ir 、z jr ,t lr 、c pr and d i , g j 、h l 、s p come to a conclusion together;

[0114] When the target loss function value ε reaches the minimum value after iterative training on the known data set Φ, the highest prediction value is calculated using the latent feature matrix U, Z, T, C and the bias vector d, g, h, s that have been trained at this time The formula is:

[0115]

[0116] in, It represents the estimated value of the pth layer obtained for the ith monitoring indicator at the lth time at the jth station, and the estimated value of the numerical value in the fourth-order tensor of water quality monitoring data calculated according to the calculated latent eigenvalue; R represents the number of columns of the four latent feature matrices U, Z, T and C; and the calculated interpolation value of water quality monitoring data is output to the water quality monitoring data completion value storage unit.

[0117] The method of this embodiment is used for water quality monitoring data. By focusing on a small number of known data items for the incomplete water quality data obtained through monitoring, the time series pattern characterization of the incomplete water quality data is achieved, and the time series latent features are accurately extracted to achieve the missing value completion of the incomplete water quality monitoring data. The method of this embodiment constructs a fourth-order incomplete tensor to describe the incomplete water quality monitoring data. By introducing nonlinear regularization to construct a learning objective function, the accurate characterization of fluctuating and unstable water quality data can be improved. Then, the target loss function is optimized based on known single element dependencies to improve the computational efficiency and reduce the space storage complexity. The solution performs the corresponding completion operation, and can complete the water quality monitoring data in accordance with statistical laws and with high accuracy, so as to complete the missing multi-source water quality monitoring data. It can be widely used in the fields of multi-source water quality monitoring, water ecological environment monitoring, etc.

[0118] The above is only an embodiment of the present invention, and the common knowledge such as the known specific structure and characteristics in the scheme is not described in detail here. It should be pointed out that for those skilled in the art, several deformations and improvements can be made without departing from the structure of the present invention, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.

Claims

1. The incomplete water quality data completion method based on tensor hidden feature analysis is characterized by: The following steps are involved: Step 1, receiving a completion instruction for incomplete water quality monitoring data sent from a server, obtaining automatically monitored water quality data from sensors deployed at multiple sites and storing the data; Step 2, construct a fourth-order water quality tensor based on the stored water quality data, including incomplete variables, monitoring sites, monitoring time, and the number of underwater layers for water quality monitoring; Step 3: Construct the target loss function for missing value completion based on the incomplete fourth-order water quality tensor, perform iterative optimization, and output the complete water quality tensor.

2. The method for completing incomplete water quality data based on tensor latent feature analysis according to claim 1, characterized in that: In the step 2, the received automatically monitored water quality data is stored in the form of a four-dimensional tensor, and all the quaternions Q=(I, J, L, P) in the water quality monitoring data storage unit are constructed into a fourth-order tensor data of I×J×L×P, where I is the number of variables representing the monitored water quality indicators, J is the site where the sensor monitoring is deployed, L is the number of time periods in the time set, and P is the number of underwater layers for water quality monitoring, and it satisfies 1≤i≤I, 1≤j≤J, 1≤l≤L, and 1≤p≤P; An element in the fourth-order tensor Q is denoted as q ijlp , which represents the monitoring value of the i-th incomplete monitoring indicator variable at the j-th monitoring point at the p-th layer at the l-th time.

3. The method for completing incomplete water quality data based on tensor latent feature analysis according to claim 2 is characterized in that: The output of the water quality tensor in step 3 includes the following sub-steps: Sub-step 3.1, initializing the process parameters involved in the fourth-order tensor completion method in sub-steps 3.2 and 3.3, and initializing the parameters required in the calculation process according to the incomplete water quality data completion method based on tensor implicit feature analysis; Sub-step 3.2, the process of constructing the target loss function of water quality monitoring data value based on the fourth-order water quality tensor and process parameters is: Construct a loss function to quantify Q and Then, based on the known element set Φ in Q, the latent feature matrix U is obtained by iterative training to minimize the error. |I|×R , Z |J|×R , T |L|×R , C |P|×R , nonlinear swish regularization is introduced into the non-negative tensor latent feature analysis model to construct the target loss function ε, which is expressed as: Among them, u ir 、z jr ,t lr and c pr Denote the latent feature matrix U |I|×R , Z |J|×R , T |L|×R , C |P|×R A single element in d i , g j 、h l and p Represents a single element in the bias vectors d, g, h, and s respectively; (i, j, l, p) ∈ Φ represents the subscript set of known elements contained in the tensor Q; q ijlp represents the monitoring value of the ith monitoring indicator at the jth monitoring point at the pth layer at the lth moment; R represents the latent feature dimension of the four latent feature matrices obtained by calculation, that is, the number of columns of the latent feature matrices U, Z, T and C; u ir represents the value of the i-th row and r-th column in the latent feature matrix U; z jr Represents the value of the jth row and rth column in the latent feature matrix Z; t lr represents the value of the lth row and rth column in the latent feature matrix T; c pr represents the value of the pth row and rth column in the latent feature matrix C; d i represents the value of the i-th column in the bias vector d; g j represents the value of the jth column in the bias vector g; h l Represents the value of the lth column in the bias vector h; s p represents the value of the pth column in the bias vector s; λ represents the training control parameters of the four latent feature matrices; γ represents the training control parameters of the four bias vectors; the constraint condition st j∈J,l∈L,p∈P,r∈{1,2,…,R}:u ir ≥0,z jr ≥0,t lr ≥0,c pr ≥0,d i ≥0,g j ≥0,h l ≥0,s p ≥0 means that each value in the latent feature matrix U, Z, T and C and the value in the bias vector must satisfy the non-negative condition during the calculation process. e represents the Euler number, which is a mathematical constant. β represents the hyperparameter of the nonlinear regularized swish function. Sub-step 3.3, perform parameter optimization learning on the target loss function, use the multiplication update rule to iteratively optimize ε to minimize the value of ε, and the tensor's non-negative and multiplication update algorithm based on single element dependency is an efficient solver for constructing non-negative latent feature analysis models on high-dimensional incomplete tensors; Sub-step 3.4, determine whether the iteration process of the target loss function reaches the iteration termination condition, if yes, terminate, if no, continue iterating; Sub-step 3.5, calculate the missing water quality monitoring values.

4. The method for completing incomplete water quality data based on tensor latent feature analysis according to claim 3 is characterized in that: The sub-step 3.1 includes initializing the latent characteristic moments U of the four water quality monitoring data. |I|×R , Z |J|×R , T |L|×R , C |P|×R ; Initialize the latent feature dimension R; Initialize the one-dimensional bias vectors d, g, h, s; initialize the maximum number of training iterations M; initialize the iteration number control variable m during training; initialize the convergence termination threshold τ; initialize the latent feature control factors λ, γ.

5. The method for completing incomplete water quality data based on tensor latent feature analysis according to claim 4 is characterized in that: In the sub-step 3.1, the sizes of the latent feature matrices U, Z, T and C are determined by the corresponding variable, site, time, layer number tensor Q's each dimension value and the latent feature dimension R, that is, U is a latent feature matrix with |I| rows and R columns, Z is a latent feature matrix with |J| rows and R columns, T is a latent feature matrix with |L| rows and R columns, and C is a latent feature matrix with |P| rows and R columns. The four latent feature matrices are initialized with small random positive numbers respectively; the sizes of the bias vectors d, g, h, s are determined by the corresponding variable, site, time, layer number fourth-order tensor Q's each dimension value |I|, |J|, |L| and |P|. The maximum number of training iterations M determines the maximum number of training iterations in the iterative training process and is initialized with a large positive integer. The iteration control variable m is initialized with 0. The convergence termination threshold τ and the latent feature control factors λ and γ are initialized with a very small positive number and are initialized with positive numbers between 0 and 1.

6. The method for completing incomplete water quality data based on tensor latent feature analysis according to claim 3 is characterized in that: In the sub-step 3.3, additive gradient descent is used for the latent factor matrix, and the formula for training iteration is: Among them, η ir ,η jr ,η lr and η pr represents the latent feature vector u ir 、z jr ,t lr and c pr The learning rate η i ,η j ,η l and η p Denotes the bias vector d i , g j 、h l and p learning rate; Φ(i), Φ(j), Φ(l), and Φ(p) are subsets of the known set Φ associated with nodes i∈I, j∈J, l∈L, p∈P; By manipulating the learning rate, the negative term in the formula is offset by the initial state of the corresponding parameter, and the parameter η ir ,η jr ,η lr and η pr It is expressed as: η ir ,η jr ,η lr and η pr Substituting the parameter formula into the training iteration formula, we get the multiplication learning rule for each element in the latent feature matrix U, Z, T, C and the bias vectors d, g, h and s. The final parameter training iteration formula is expressed as: Among them, (i,j,l,p)∈Φ represents the subscript set of known elements contained in the tensor Q; q ijlp It means the monitoring value of the i-th monitoring indicator at the j-th monitoring point at the p-th layer at the l-th moment; u ir represents the value of the i-th row and r-th column in the latent feature matrix U; z jr Represents the value of the jth row and rth column in the latent feature matrix Z; t lr represents the value of the lth row and rth column in the latent feature matrix T; c pr represents the value of the pth row and rth column in the latent feature matrix C; d i represents the value of the i-th column in the bias vector d; g j represents the jth column value in the bias vector g; h l Represents the lth column value in the bias vector h; s p represents the value of the pth column in the bias vector s; λ represents the training control parameters of the four latent feature matrices; γ represents the training control parameters of the four bias vectors; β represents the hyperparameter of the nonlinear regularized swish function; represents the estimated value of the numerical value in the fourth-order tensor of water quality monitoring data calculated according to the calculated latent eigenvalue; |Φ(i)|, |Φ(j)|, |Φ(l)| and |Φ(p)| respectively represent the number of elements contained in the slice matrix of each dimension in the tensor Q, and e represents the Euler number, which is a mathematical constant.

7. The method for completing incomplete water quality data based on tensor latent feature analysis according to claim 3 is characterized in that: In the sub-step 3.4, the above training process is repeated on the known set Φ until ε converges on Φ. The convergence condition is that the training iteration round control variable m reaches the maximum training iteration round number M, or the absolute value of the difference between the ε value calculated after the end of this round of iteration and the ε value of the previous round is less than the convergence termination threshold τ. After ε converges, the latent feature matrices U, Z, T, C and the bias vectors d, g, h and s are obtained.

8. The method for completing incomplete water quality data based on tensor latent feature analysis according to claim 3 is characterized in that: In the sub-step 3.5, the predicted value in the tensor Q is calculated by the latent feature matrices U, Z, T, C and the bias vectors d, g, h, s; For each element, the monitoring value q ijlp Indicates the monitoring indicator u i In z j The tth site l The cth moment p The predicted value of byu ir 、z jr ,t lr 、c pr and d i , g j 、h l 、s p come to a conclusion together; When the target loss function value ε reaches the minimum value after iterative training on the known data set Φ, the highest prediction value is calculated using the latent feature matrix U, Z, T, C and the bias vector d, g, h, s that have been trained at this time The formula is: in, It represents the estimated value of the pth layer of the ith monitoring indicator at the lth time of the jth station; R represents the number of columns of the four latent feature matrices U, Z, T and C; and the calculated water quality monitoring data interpolation value is output to the water quality monitoring data completion value storage unit.

9. An incomplete water quality data completion device based on tensor hidden feature analysis, including: The water quality monitoring data receiving module is used to receive the completion instruction of the incomplete water quality monitoring data sent from the server, obtain the historical water quality data of automatic monitoring from the sensors deployed at multiple sites, and store it in the water quality monitoring data storage module; A water quality data storage unit, used to store the automatically monitored water quality data collected by the received sensor in the form of a four-dimensional tensor, and to store the completed and complete water quality monitoring data; A fourth-order tensor construction module for water quality monitoring data is used to construct the stored historical water quality monitoring data into fourth-order tensor data; The tensor precise completion module for water quality monitoring data is used to accurately complete the fourth-order tensor of incomplete water quality monitoring data based on known historical multi-source water quality monitoring data, and store the complete water quality monitoring data in the water quality monitoring data storage module; The water quality data storage module includes a water quality monitoring data storage unit and a complete water quality monitoring data completion value storage unit: The water quality monitoring data storage unit is used to store and receive historical water quality monitoring data; The water quality monitoring data completion value storage unit is used to store the completed water quality monitoring data; The tensor precise completion module of water quality monitoring data includes an initialization unit, a training unit and a completion value calculation unit: The initialization unit is used to initialize the latent feature matrix and related parameters in the optimization target involved in the process of water quality tensor completion; The training unit is used to optimize the latent feature matrix and related parameters involved in the optimization target in the process of optimizing the initialization of the water quality tensor completion, and obtain the latent feature matrix of the water quality monitoring data according to the historical water quality monitoring data training; The completion value calculation unit is used to obtain the latent feature matrix of the water quality data obtained by the training unit, calculate the completion value of the missing data in the water quality monitoring tensor, and then store the calculated water quality monitoring data completion value into the water quality monitoring data completion value storage unit; The training unit includes a parameter optimization unit, which is used to calculate the information of the optimization target latent feature matrix during the training process.