A genetic-ant colony coupling water quality mechanism equation mining method and system based on residual correlation guidance

By combining genetic algorithms and ant colony algorithms and utilizing residual correlation guidance strategies, we have achieved efficient mining of water quality mechanism equations. This solves the problems of computational complexity in traditional models and poor interpretability in deep learning models, thereby improving the efficiency and reliability of water quality mechanism research.

CN122451246APending Publication Date: 2026-07-24HOHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HOHAI UNIV
Filing Date
2026-06-24
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In water quality mechanism research, existing technologies have limited efficiency. Traditional models require a large number of physicochemical parameters and have poor simulation results, while deep learning models have poor interpretability. Genetic algorithms have high computational complexity, and ant colony algorithms have a huge search space and high evaluation costs, resulting in low efficiency in water quality equation mining.

Method used

By combining genetic algorithms and ant colony algorithms, the search space is narrowed by genetic algorithms, and the optimal equation is searched precisely by ant colony algorithms. Furthermore, a dynamic heuristic strategy based on residual correlation is introduced into the ant colony algorithm to achieve efficient mining of water quality mechanism equations.

Benefits of technology

It improves the efficiency of equation mining, ensures that the mined equations have both high accuracy and structural stability, and can intuitively show the relationship between water quality variables, guiding water pollution prevention and water environment protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122451246A_ABST
    Figure CN122451246A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of water quality mechanism discovery, and discloses a genetic-ant colony coupling water quality mechanism equation mining method and system based on residual correlation guidance, which comprises the following steps: firstly, a binary tree equation structure population is constructed based on water quality variables and operators, coefficients are estimated by sequential threshold ridge regression, and AIC index is used for evaluation and ranking, and the first 10 optimal structures are extracted as ant colony algorithm operators through iteration optimization of cross, mutation and replacement operations; the ant colony algorithm introduces a residual correlation dynamic heuristic degree strategy, searches for the optimal equation structure through a random window, and finally estimates coefficients on global data to determine the water quality relationship equation. The application is mainly used for water quality mechanism discovery, and can efficiently mine water quality mechanism equations from water quality data by combining genetic algorithm and ant colony algorithm and introducing a residual correlation dynamic heuristic degree strategy, which is helpful for understanding the water quality relationship mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of water quality mechanism discovery technology, specifically involving a method and system for mining water quality mechanism equations based on residual correlation-guided genetic-ant colony coupling. Background Technology

[0002] Water quality mechanism discovery refers to methods that extract information representing water quality relationships from water quality data in the form of equations. With the rapid development of artificial intelligence, equation mining technology has been applied in fields such as oil exploration and soil moisture content analysis, demonstrating good results. Equation mining technology allows for a more intuitive understanding of the relationships between system variables, deepening our understanding of mechanisms.

[0003] Research on water quality mechanisms is beneficial for deepening our understanding of watershed water quality systems and is of great significance for watershed water pollution prevention and control and sustainable water resource development. Currently, most research primarily uses traditional water quality models or deep learning models to model watershed water quality and analyzes water quality relationships based on the modeling results. Traditional water quality models often require a large number of physicochemical parameters to construct the model and perform poorly on non-stationary and nonlinear water quality simulation tasks. While deep learning models have shown good simulation results, as "black box" models, their interpretability is poor, and the reliability of the simulation results is often questioned. Equation mining techniques can clearly characterize water quality relationships in the form of equations, deepening our understanding of water quality mechanisms.

[0004] Symbolic regression is a cutting-edge method in equation mining, capable of automatically discovering equations without requiring predefined equation structures. Genetic algorithms, by applying genetic operations to equation representations, facilitate the discovery of diverse equation structures and are often used in symbolic regression for equation mining. However, each iteration of a genetic algorithm involves crossover, mutation, and substitution operations on a large number of equations, resulting in high computational costs during equation mining, with computational complexity increasing dramatically with the number of variables. Furthermore, different binary trees may represent equivalent equations, leading to redundant searches. Ant colony optimization (ACO) is an optimization algorithm that simulates the foraging behavior of ants in nature, possessing powerful global search capabilities thanks to the positive feedback mechanism of pheromones. However, in the scenario of discovering water quality relationship equations, ACO faces challenges: solution space explosion: the equation structure grows exponentially with the combination of variables and operators, resulting in a huge search space; high evaluation costs: each candidate equation requires data substitution for ridge regression and AIC calculation, and fitness evaluation is time-consuming. Summary of the Invention

[0005] To address the problems of existing technologies, this invention provides a genetic-ant colony coupled method and system for mining water quality mechanism equations based on residual correlation guidance. This method combines genetic algorithms and ant colony algorithms for the field of water quality mechanism discovery. First, a genetic algorithm is used to discover high-quality equation operators, narrowing the search space. Then, an ant colony algorithm is used to refine the search for the optimal equation. Simultaneously, a dynamic heuristic strategy based on residual correlation is introduced into the ant colony algorithm to guide the ant colony to prioritize capturing key variables that can significantly eliminate equation errors, thus achieving efficient mining of water quality mechanism equations.

[0006] To achieve the above objectives, the present invention provides the following solution: A method for mining genetic-ant colony coupled water quality mechanism equations based on residual correlation guidance, the method comprising: S1: Construct a binary tree representation of the dissolved oxygen mechanism prediction equation based on water quality variables and operators that affect dissolved oxygen content, and initialize the structure population and semantic fingerprint database of the dissolved oxygen mechanism prediction equation; S2: Substitute water quality data into the dissolved oxygen mechanism prediction equation structure and use an adaptive improved threshold ordinal threshold ridge regression algorithm to estimate the coefficients of the dissolved oxygen mechanism prediction equation; evaluate the dissolved oxygen mechanism prediction equation based on the AIC index and rank the initial dissolved oxygen mechanism prediction equation population. S3: Perform crossover, mutation, and substitution operations on the previous generation of dissolved oxygen mechanism prediction equation population to generate a new equation population, and introduce semantic equivalence detection and retry mechanism to guide equation generation, then repeat S2; S4: When the AIC index of the dissolved oxygen mechanism prediction equation is lower than the preset threshold, stop the genetic iteration, extract the structure of the top 10 dissolved oxygen mechanism prediction equations as the water quality operator of the subsequent ant colony algorithm, and introduce a dynamic heuristic strategy based on residual correlation into the ant colony algorithm. S5: The ant colony algorithm is applied to search for the optimal dissolved oxygen mechanism prediction equation structure based on a random window. The coefficients of the optimal dissolved oxygen mechanism prediction equation structure are estimated on global data to determine the final dissolved oxygen mechanism prediction equation.

[0007] Preferably, in step S1, the method for constructing a binary tree representation of the dissolved oxygen mechanism prediction equation based on water quality variables affecting dissolved oxygen content and operators includes: ; in, Representing the The equation terms corresponding to the binary trees For the input water quality variables, The coefficients of each equation term, The number of water quality variables. The number of binary trees.

[0008] Preferably, in step S2, the method of substituting water quality data into the dissolved oxygen mechanism prediction equation structure and using an adaptive improved threshold-order threshold ridge regression algorithm to estimate the coefficients of the dissolved oxygen mechanism prediction equation includes: By reading the historical time series of water quality data from the monitoring station Substituting these variables as leaf node variables into the dissolved oxygen mechanism prediction equation structure yields the candidate library matrix. : ; in This represents the corresponding water quality variable vector. This represents the mapping function of the equation terms in the corresponding binary tree representation. The number of time points; Based on the candidate library matrix Ridge regression was used to obtain initial estimates of the coefficients of the dissolved oxygen mechanism prediction equation: ; in It is a regularization parameter; This is the candidate library matrix, i.e., the matrix of the independent variable terms of the equation; This is the coefficient vector, i.e., the sparse coefficient vector to be estimated; This is the dependent variable vector of the equation, which is the target variable of the regression equation. The square of the L2 norm; To and Identity matrices of the same dimension; The initial estimated values ​​of the coefficients of the dissolved oxygen mechanism prediction equation are obtained by iterative thresholding.

[0009] Preferably, in step S2, the method for ranking the initial population of dissolved oxygen mechanism prediction equations based on the AIC index includes: The optimal dissolved oxygen mechanism prediction equation was selected from multiple candidate equations. ; in, The mean square error of the equation; The number of equation terms; This is a hyperparameter used to balance the accuracy and simplicity of the dissolved oxygen mechanism prediction equation; The equations were ranked according to the AIC index of the optimal dissolved oxygen mechanism prediction equation in the initial population, as follows: Time series data of water quality variables The dissolved oxygen prediction value calculated by substituting into the candidate dissolved oxygen mechanism prediction equation : ; in For the first coefficients of each equation term, For the first Equation terms, For the first Each equation term corresponds to water quality variable data. for A vector of size These are the corresponding time sampling points; Based on dissolved oxygen observation values and dissolved oxygen prediction values Calculation equation and the corresponding AIC indicator : ; ; in, Indicates the first Dissolved oxygen observation values, This represents the first result calculated based on the candidate dissolved oxygen mechanism prediction equation. One predicted dissolved oxygen value, Indicates the number of water quality sampling times at the testing station; AIC index based on each candidate dissolved oxygen mechanism prediction equation Sort by size from smallest to largest.

[0010] Preferably, in step S4, the method of introducing a dynamic heuristic strategy based on residual correlation in the ant colony algorithm includes: In each iteration of the dissolved oxygen mechanism prediction equation search, the heuristics of all water quality operators are determined at the initial moment. Initialize to preset values; based on the pheromone concentration of the variable operator in the current iteration. and initial heuristic values The first equation term of the water quality operator is constructed by searching according to the probability transition formula. ; The equation terms are constructed with The probability is directly taken from the water quality operator. As a term in the equation, we have The probability is obtained by combining water quality operators. Constructing the predictive equation for the mechanism of compound dissolved oxygen ; ; Where P represents the trigger probability. For the ant colony algorithm water quality operator, For the prediction equation of simple complex dissolved oxygen mechanism; The selection of water quality operators based on probability selection formulas includes: ; in Indicates the selection operator The probability of; , For operators , j The concentration of pheromones on the surface; , For operators , j The level of inspiration on; It is an important factor of pheromones; As an important factor in heuristics; Finally, we obtain the equation structure for the first stage: ; In each subsequent step of the ant colony's equation-building path, the residual vector between the currently constructed partial equation and the true value is calculated. Then, the mutual information values ​​between each water quality variable node in the candidate set and the residual vector are calculated, specifically: No. The step-time equation structure is as follows: ; in, Indicates the first One equation term; Water quality variable time series data Substitute the first The step-time equation structure can yield the corresponding characteristic matrix. : ; Then, the coefficients of the equation are estimated using order threshold ridge regression. : ; in, It is a regularization parameter; This is the candidate library matrix, i.e., the matrix of the independent variable terms of the equation; The coefficient vector is the sparse coefficient vector to be estimated, which corresponds to the equation coefficient vector at step j. This is the vector of the dependent variable in the equation, i.e., the true value of dissolved oxygen; The square of the L2 norm; To and Identity matrices of the same dimension; Calculate the residual vector between the actual value and the true value. : ; Calculate the mutual information values ​​between each water quality variable node in the candidate set and the residual vector. : ; in For joint probability density, and For marginal probability density, For ant colony algorithm water quality operators; Heuristics of water quality variable nodes Updated to the calculated mutual information value ; Based on the variable operator pheromone concentration in the current iteration Dynamic heuristics of the current step The next new dissolved oxygen mechanism prediction equation term is selected according to the probability selection formula.

[0011] Preferably, in step S5, the method for estimating the coefficients of the optimal dissolved oxygen mechanism prediction equation structure on global data and determining the final dissolved oxygen mechanism prediction equation includes: ; in, Indicates dissolved oxygen; Indicates water temperature; Indicates pH level; Indicates electrical conductivity; Indicates turbidity. Indicates total nitrogen, This indicates the permanganate index.

[0012] This invention also provides a genetic-ant colony coupled water quality mechanism equation mining system based on residual correlation guidance. The system is used to implement the aforementioned method and includes: a binary tree encoding and population initialization module, a coefficient estimation and AIC fitness evaluation module, a genetic evolution iterative optimization module, a genetic convergence and ant colony initialization module, and an ant colony global optimization and equation determination module. The binary tree encoding and population initialization module is used to construct a binary tree representation of the dissolved oxygen mechanism prediction equation based on water quality variables and operators that affect dissolved oxygen content, and to initialize the dissolved oxygen mechanism prediction equation structure population and equation semantic fingerprint library. The coefficient estimation and AIC fitness assessment module is used to substitute water quality data into the dissolved oxygen mechanism prediction equation structure and use an adaptive improved threshold ordinal threshold ridge regression algorithm to estimate the coefficients of the dissolved oxygen mechanism prediction equation; evaluate the dissolved oxygen mechanism prediction equation based on the AIC index, and rank the initial dissolved oxygen mechanism prediction equation population. The genetic evolution iterative optimization module is used to perform crossover, mutation, and substitution operations on the previous generation of dissolved oxygen mechanism prediction equation population to generate a new equation population and introduce semantic equivalence detection and retry mechanism to guide equation generation. Then, the repetition coefficient estimation and AIC fitness evaluation module is used. The genetic convergence and ant colony initialization module is used to stop the genetic iteration when the AIC index of the dissolved oxygen mechanism prediction equation is lower than a preset threshold, extract the structure of the first 10 dissolved oxygen mechanism prediction equations as the water quality operator of the subsequent ant colony algorithm, and introduce a dynamic heuristic strategy based on residual correlation into the ant colony algorithm. The ant colony global optimization and equation determination module is used to apply the ant colony algorithm to search for the optimal dissolved oxygen mechanism prediction equation structure based on a random window, estimate the coefficients of the optimal dissolved oxygen mechanism prediction equation structure on global data, and determine the final dissolved oxygen mechanism prediction equation.

[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention utilizes equation mining technology to extract the relationships between water quality variables from water quality data in the form of equations. This provides a clear and intuitive representation of water quality mechanisms, offering strong interpretability. It contributes to research on water quality mechanisms and guides water pollution prevention and control and water environment protection practices.

[0014] 2. This invention combines genetic algorithm and ant colony algorithm in the equation mining process. First, the genetic algorithm is used to discover high-quality equation operators and narrow down the search space; then, the ant colony algorithm is used to finely search for the optimal equation, which can effectively improve the efficiency of equation mining.

[0015] 3. This invention uses a random window evaluation index to evaluate the equations, which ensures both the simulation accuracy and the stability of the equation terms, so that the extracted equations have both high accuracy and structural stability, thus ensuring the reliability of the equations.

[0016] 4. This invention introduces a dynamic heuristic strategy based on residual correlation into the ant colony algorithm, guiding the ant colony to prioritize capturing key variables that can significantly eliminate equation errors, thus realizing the transformation from blind random search to statistically guided search. Attached Figure Description

[0017] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a general technical roadmap of the embodiments of the present invention; Figure 2This is a schematic diagram illustrating the construction of a binary tree representation of equations according to an embodiment of the present invention; Figure 3 This is a scatter plot of the dissolved oxygen simulated by the mining equation in an embodiment of the present invention and the actual dissolved oxygen value. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] Example 1 like Figure 1 As shown, this invention provides a method for mining water quality mechanism equations based on residual correlation-guided genetic-ant colony coupling, comprising the following steps: S1: Construct a binary tree representation of the dissolved oxygen mechanism prediction equation based on water quality variables and operators that affect dissolved oxygen content, and initialize the structure population and semantic fingerprint database of the dissolved oxygen mechanism prediction equation; Water quality parameters affecting dissolved oxygen levels in the watershed, such as water temperature, pH, conductivity, turbidity, permanganate index, total phosphorus, total nitrogen, and algal density, are used as independent variables. These parameters, along with operators, are used to construct a dissolved oxygen mechanism prediction equation based on a binary tree structure. For example... Figure 2 As shown.

[0022] Each binary tree represents a term in a dissolved oxygen mechanism prediction equation, and multiple trees together represent the structure of a single dissolved oxygen mechanism prediction equation. Each binary tree has an operator as its parent node (degree 2 or 1). Operators include "×", " / ", "-", "+", "^2", and "^3" (where ×, / , -, and + nodes have a degree of 2, and the exponentiation operator has a degree of 1). Multiplication and division operators characterize the synergistic or antagonistic effects between various water quality factors, and exponentiation operators characterize the nonlinear constraints of water quality factors on dissolved oxygen content. Water quality variables affecting dissolved oxygen content are child nodes (degree 1). Specifically: The structure of the dissolved oxygen mechanism prediction equation is derived from The additive model, composed of equation sub-terms generated by binary trees, allows for flexible combination of water quality variables and operators, overcoming the limitations of traditional regression analysis which requires pre-setting the function form. It can automatically capture higher-order, nonlinear antagonistic or synergistic effects among water quality factors. The final expression is as follows:

[0023] in Representing the The equation terms corresponding to the binary trees For input water quality variables (such as water temperature WT, total phosphorus P, etc.). The coefficients of each equation term, The number of water quality variables. The number of binary trees.

[0024] As attached Figure 2 As shown, the example dissolved oxygen mechanism prediction equation structure consists of two binary trees.

[0025] The root node of the first tree is "×", and its child nodes are water quality variables such as water temperature. The + operator. The child node corresponding to the + operator is the water quality variable total nitrogen. and total phosphorus The equation corresponding to this binary tree is:

[0026] The root node of the second tree is " / ", and its child nodes are the operators "-" and "^3". The child node corresponding to the operator "-" is the water quality variable total phosphorus. and total nitrogen The child node corresponding to the operator "^3" is the water quality variable water temperature. The equation corresponding to this binary tree is:

[0027] The structure of this example equation is as follows: .

[0028] The construction process of a binary tree follows these rules: a. Each leaf node represents a water quality variable that affects dissolved oxygen levels, while internal nodes must be operators; b. The number of child nodes of an internal node must be consistent with the degree of its operator, so internal nodes must be full-degree nodes; c. The root node of the tree must not contain addition or subtraction operators (to avoid treating two dissolved oxygen mechanism prediction equations as a single unit, so that the coefficients of each dissolved oxygen mechanism prediction equation can be estimated separately later, and the contribution of different water quality factors to dissolved oxygen changes can be intuitively shown). d. The depth of any branch must not exceed the given maximum depth (to avoid overly complex nested structures). e. The number of randomly generated binary trees should be less than the given maximum width (to avoid generating too many redundant dissolved oxygen mechanism prediction equations).

[0029] This implementation sets the maximum depth to 4 and the maximum width to 8.

[0030] A semantic fingerprint database of equations was constructed for the initial dissolved oxygen mechanism prediction equation structure population, as follows: a. Generate the probe point matrix Based on the monitoring data ranges of all water quality parameters affecting dissolved oxygen content in the watershed, the Latin hypercube sampling method is used to generate n sampling points uniformly distributed within the variable domain, forming a detection point matrix. Each sampling point corresponds to a set of variable values, which are used for subsequent semantic fingerprint calculation.

[0031]

[0032] in This is a vector of water quality variable sampling data. n This represents the number of sampling points for the Latin hypercube sampling method.

[0033] b. Extract and store the semantic fingerprint of the structure population of the initial dissolved oxygen mechanism prediction equation. Each dissolved oxygen mechanism prediction equation consists of m equation terms. The composition is as follows:

[0034] in Representing the The equation terms, internal This indicates the water quality variables included in the equation term.

[0035] Detection point matrix Substitute the internal water quality variable data into the equation structure The calculation is performed inside, and the resulting output vector is the semantic fingerprint of the corresponding equation. .

[0036]

[0037]

[0038] in Indicates the first Detection points Substitute into the equation structure The calculation results express The semantic fingerprint vector of the equation is obtained by substituting the probe points into the equation.

[0039] Finally, the semantic fingerprint vectors of all equations in the initial population are used. Stored in the initial semantic fingerprint database.

[0040] S2: Substitute water quality data into the dissolved oxygen mechanism prediction equation structure and use the adaptive-stridge algorithm to estimate the coefficients of the dissolved oxygen mechanism prediction equation. Evaluate the dissolved oxygen mechanism prediction equation based on the AIC index and rank the initial dissolved oxygen mechanism prediction equation population. First, the method of substituting water quality data into the dissolved oxygen mechanism prediction equation structure and using an adaptive improved threshold-order threshold ridge regression algorithm to estimate the coefficients of the dissolved oxygen mechanism prediction equation includes: Each binary forest generated in step S1 constitutes a dissolved oxygen mechanism prediction equation structure. This embodiment uses historical water quality time series data from monitoring stations. Substituting these variables as leaf node variables into the dissolved oxygen mechanism prediction equation structure yields the candidate library matrix. Used for subsequent estimation of equation coefficients based on order threshold ridge regression. Specifically:

[0041] in For the corresponding time sampling points, This represents the number of water quality variables.

[0042] The structure of the dissolved oxygen mechanism prediction equation is as follows: An additive model consisting of equation terms generated by binary trees. Each binary tree represents an equation term. Essentially a function mapping Mapping water quality variables to specific mechanistic values:

[0043] in The water quality variable operator is included in the equation term.

[0044] By Substituting the time series of water quality variables at each time point into the equation structure The candidate library matrix can eventually be obtained from the binary tree. :

[0045] in This represents the corresponding water quality variable vector. This represents the mapping function of the equation terms in the corresponding binary tree representation. In the matrix... Each column represents a physical interaction term defined by the equation terms.

[0046] The Adaptive-STRidge algorithm is a sparse regression method that improves upon sequential threshold ridge regression (STRidge). The method flow is as follows: 1. Feature complexity calculation Traverse the expression tree corresponding to each candidate equation term, and count the total number of nodes in each tree as a measure of the complexity of the feature. .

[0047] 2. Mutual Information Calculation Mutual information is used to measure each equation term. With the goal Nonlinear correlation between Mutual information can capture any type of dependency, outperforming linear correlation coefficients.

[0048]

[0049]

[0050] in, For joint probability density, and This represents the marginal probability density.

[0051] 3. Estimate the initial ridge regression coefficients and record the optimal AIC and optimal coefficients. In regularization parameters Solving the ridge regression problem yields the initial coefficient vector:

[0052] in It is a regularization parameter; This is the candidate library matrix, i.e., the matrix of the independent variable terms of the equation; This is the coefficient vector, i.e., the sparse coefficient vector to be estimated; This is the dependent variable vector of the equation, which is the target variable of the regression equation. The square of the L2 norm; To and Identity matrices of the same dimension; Based on the current coefficients Calculate the mean square error The initial AIC value is used as the initial value for optimal AIC. At the same time, record the corresponding optimal coefficients. .

[0053]

[0054]

[0055] in, The number of equation terms; These are hyperparameters used to balance the accuracy and simplification of equations. 4. Iterative sparsification Set the base sparsity strength Maximum number of iterations Numerical stability constant and the initial sparsification intensity adjustment step size For each iteration to Perform the following sub-steps: 4.1 Dynamic threshold calculation: According to the formula:

[0056] For each equation term Generate independent dynamic thresholds Among them, complexity The larger the threshold, the higher the threshold (suppressing complex features); mutual information The larger the value, the lower the threshold (protecting important features).

[0057] 4.2 Size coefficient identification: Compare the current coefficient With the corresponding threshold , will satisfy < The feature is labeled as "small coefficient", and the rest are labeled as "large coefficient".

[0058] 4.3 Convergence Judgment: If the set of large coefficients in the current iteration is exactly the same as that in the previous iteration, or if all coefficients are set to zero, then the current iteration is terminated and the next iteration begins.

[0059] 4.4 Sparsification: Set all small coefficients to zero.

[0060] 4.5 Large coefficient reestimation: Only retain the features corresponding to the large coefficients, perform ridge regression estimation again, and update the values ​​of the large coefficients.

[0061] 4.6 Output the results and calculate AIC At the end of each iteration, a sparse coefficient vector is returned. And based on the sparsified coefficient vector The AIC index is calculated using sparse equation structures.

[0062] 4.7 Adjust the basic sparsification intensity according to AIC changes

[0063] Compare the current Best in history : like This indicates that the current base threshold has generated better coefficients and a sparse equation structure, prompting an update operation and an expansion of the search range.

[0064] .

[0065] like If the current threshold causes the model to deteriorate, a backtracking adjustment is performed, and the step size is dynamically reduced for a finer search. Then, the base threshold is readjusted.

[0066]

[0067] .

[0068] This represents the current iteration number. This represents the maximum number of iterations. 5. Termination of judgment If the number of iterations has reached... If the condition is met, the loop terminates. The optimal coefficient vector is returned. Optimal AIC value .

[0069] Then, based on the AIC (Akaike Information Criterion) evaluation equation, the initial dissolved oxygen mechanism prediction equation structure population was ranked. The AIC is an information-theoretic model selection criterion used to select the optimal dissolved oxygen mechanism prediction equation from multiple candidate equations.

[0070]

[0071] in, The mean square error of the equation; The number of equation terms; This is a hyperparameter used to balance the accuracy and parsimony of the dissolved oxygen mechanism prediction equation, achieving a balance between the interpretability and reliability of water quality mechanisms (settings in this implementation). ).

[0072]

[0073] in, The number of water quality monitoring data samples. This refers to the observed dissolved oxygen value. This is the predicted dissolved oxygen value calculated by the equation.

[0074] Time series data of water quality variables Substitute the candidate dissolved oxygen mechanism prediction equations into the equations and calculate the AIC index for each equation based on the AIC criterion. Finally, rank the equations according to the AIC index of each candidate equation in the initial population. Specifically: The expression for each candidate dissolved oxygen mechanism prediction equation is as follows:

[0075] Where the coefficient and the included water quality variables All have been determined. Coefficients This is the optimal coefficient vector estimated by the Adaptive-STRidge algorithm. The Each coefficient.

[0076] Time series data of water quality variables Substituting into the equation, we obtain the predicted dissolved oxygen value. :

[0077] in For the first coefficients of each equation term, For the first Equation terms, For the first Each equation term corresponds to water quality variable data. for( A vector of size ).

[0078] Next, based on the dissolved oxygen observation values That is, the historical time series of dissolved oxygen and the predicted dissolved oxygen value of the monitoring station. Calculation equation and the corresponding AIC indicator :

[0079]

[0080]

[0081] in Indicates the first Dissolved oxygen observation values, This represents the first result calculated based on the candidate dissolved oxygen mechanism prediction equation. One predicted dissolved oxygen value, This indicates the number of times the water quality was sampled at the testing station.

[0082] Finally, the AIC index was used based on the prediction equation for each candidate dissolved oxygen mechanism. Sorted from smallest to largest, the smaller the AIC index, the fewer physical terms the equation uses while ensuring prediction accuracy, and the more it represents the true evolution of dissolved oxygen.

[0083] S3: Perform crossover, mutation, and substitution operations on the previous generation of dissolved oxygen mechanism prediction equation population to generate a new equation population, and introduce semantic equivalence detection and retry mechanism to guide equation generation, then repeat S2; The crossover, mutation, and substitution operations are as follows: Crossover: Assuming the initial population of dissolved oxygen mechanism prediction equations is 2N, the top 50% of equation structures are selected, and equation pairs are randomly formed and swapped using a binary tree operation to generate m new equation structures. Then, the AIC coefficients of the generated new equation structures are evaluated and added to the previous generation of equation structures, resulting in a total of (2N+m) equation structures. The top 2N dissolved oxygen mechanism prediction equation structures are retained.

[0084] Mutation: Assuming an initial population of 2N dissolved oxygen mechanism prediction equations, the top-ranked equation structure is retained. The binary tree equation terms of the (2N-1) equation structures are subjected to binary tree node mutation operations with a certain probability, directly replacing a node in the original tree. Operators and water quality variable operators can only be mutated to operators of the same category, producing m new equation structures. The AIC coefficients of the generated new equation structures are then evaluated and added to the previous generation of equation structures, resulting in a total of (2N+m) equation structures. The top 2N dissolved oxygen mechanism prediction equation structures are retained.

[0085] Replacement: Assuming the initial population of dissolved oxygen mechanism prediction equations is 2N, retain the top-ranked equation structure. Replace (2N-1) equation structures with a certain probability, directly generating a new binary tree to replace one term in the equation, producing m new equation structures. Then, evaluate the AIC coefficient of the generated new equation structures and add them to the previous generation of equation structures, resulting in a total of (2N+m) equation structures. Retain the top 2N dissolved oxygen mechanism prediction equation structures.

[0086] The semantic equivalence detection and retry mechanism is as follows: 1. Genetic manipulation and semantic equivalence testing For each individual in the population with the equation in each generation, perform crossover, mutation, and substitution genetic operations to generate new candidate progeny dissolved oxygen mechanism prediction equations, and then examine their semantic novelty: 1.1 Performing genetic operations: Select parent equation individuals from the current population and generate candidate progeny dissolved oxygen mechanism prediction equations through crossover, mutation, or substitution operations.

[0087] 1.2 Extracting semantic fingerprints of candidate offspring equations: Detection point matrix Substituting the internal water quality variable data into the offspring dissolved oxygen mechanism prediction equation structure The calculation is performed inside, and the resulting output vector is the semantic fingerprint of the corresponding equation. .

[0088]

[0089]

[0090] in Indicates the first Detection points Substitute into the structure of the progeny dissolved oxygen mechanism prediction equation The calculation results express The semantic fingerprint vector of the equation is obtained by substituting the probe points into the equation.

[0091] 1.3 Semantic equivalence detection: Calculate the semantic fingerprint of candidate offspring equations With each existing fingerprint in the semantic fingerprint database Pearson correlation coefficient ;

[0092] in and These are the means of the two fingerprint vectors, respectively. and The second fingerprint vector One value, This represents the number of sampling points for the Latin hypercube sampling method.

[0093] If a correlation coefficient exists If the value is greater than a preset threshold θ (e.g., 0.99), it is determined to be semantically equivalent and proceeds to step 1.4; otherwise, the candidate sub-equation is added as a valid sub-equation to the next generation of dissolved oxygen mechanism prediction equation population, and its semantic fingerprint is added to the fingerprint database.

[0094] 1.4 Retry Mechanism: If semantic equivalence is determined, a retry operation is initiated: a. Record the current number of retries. If the maximum number of retries has not been reached, return to step 1.1 and re-execute the genetic operation to generate new candidate offspring equations; b. If the maximum number of retries is reached and a semantically novel individual still cannot be generated, then the child equation is abandoned and the parent equation is directly copied.

[0095] 2. Iterative optimization Repeat step 1 until the termination condition is met (such as reaching the maximum number of retries or finding a novel candidate sub-equation).

[0096] A new generation of dissolved oxygen mechanism prediction equation structure population was generated after crossover, mutation, and substitution operations guided by semantic equivalence detection and retry mechanism. Then, S2 was repeated to continuously optimize the dissolved oxygen mechanism prediction equation structure population.

[0097] S4: When the AIC index of the dissolved oxygen mechanism prediction equation falls below a preset threshold, the genetic iteration is stopped. The structures of the top 10 dissolved oxygen mechanism prediction equations are extracted as water quality operators for subsequent ant colony algorithms. At the same time, a dynamic heuristic strategy based on residual correlation is introduced into the ant colony algorithm. When the AIC index of the generated dissolved oxygen mechanism prediction equation is lower than the preset threshold (set to 0 in this implementation), it is considered that the genetic algorithm has discovered most of the equation terms that can guarantee the high accuracy of the mechanism equation, and the genetic iteration stops. These equation terms characterize the specific influence mechanism of water quality factors on the change of dissolved oxygen content, which is beneficial to improving the efficiency of the ant colony algorithm in searching for high-quality dissolved oxygen mechanism prediction equation structures.

[0098] Then, the dissolved oxygen mechanism prediction equation structures of the top 10 from the last generation are extracted. Considering that directly using the equation terms from the top 10 structures of the genetic algorithm as operators might limit the diversity of ant colony exploration, this method extracts the dissolved oxygen mechanism prediction equation terms contained within these 10 equation structures. It also extracted relevant simple water quality variables. Directly used as the water quality operator in subsequent ant colony algorithms This ensures the exploratory nature of the ant colony algorithm and avoids entering local optima.

[0099] Simultaneously, a dynamic heuristic strategy based on residual correlation is introduced into the ant colony algorithm, including: a. In each iteration of the dissolved oxygen mechanism prediction equation, search for the heuristics of all water quality operators at the initial moment. Initialize to preset values; based on the pheromone concentration of the variable operator in the current iteration. and initial heuristic values The first equation term of the water quality operator is constructed by searching according to the probability transition formula. .

[0100] Equation terms Build The probability is directly taken from the water quality operator. As a term in the equation, we have The probability is obtained by combining water quality operators. Constructing simple compound dissolved oxygen mechanism prediction equations .

[0101]

[0102] Where P represents the trigger probability. For the ant colony algorithm water quality operator, This is a prediction equation for a simple complex dissolved oxygen mechanism.

[0103] Therefore, the water quality operator must be selected based on the probability selection formula regardless of the circumstances.

[0104] in Indicates the selection operator The probability of; , For operators , j The concentration of pheromones on the surface; , For operators , j The level of inspiration on; It is an important factor of pheromones; As a key factor for heuristics, this implementation sets... =1、 =2, The number of operators; the probability of selection each time. The largest operator.

[0105] Finally, we obtain the equation structure for the first stage:

[0106] b. Dynamic Heuristic Calculation: In each step of the ant colony's equation-building path, calculate the residual vector between the currently constructed partial equation and the true value. Then, the mutual information values ​​between each water quality variable node in the candidate set and the residual vector are calculated, specifically: No. The step-time equation structure is as follows:

[0107] in Indicates the first Equation terms.

[0108] Water quality variable time series data Substitute the first The step-time equation structure can yield the corresponding characteristic matrix. :

[0109] Then, the coefficients of the equation are estimated using order threshold ridge regression. :

[0110] in It is a regularization parameter; This is the candidate library matrix, i.e., the matrix of the independent variable terms of the equation; The coefficient vector is the sparse coefficient vector to be estimated, which corresponds to the equation coefficient vector at step j. This is the vector of the dependent variable in the equation, i.e., the true value of dissolved oxygen; The square of the L2 norm; To and Identity matrices of the same dimension; Calculate the residual vector between the actual value and the true value. :

[0111] Calculate the mutual information values ​​between each water quality variable node in the candidate set and the residual vector. :

[0112] in For joint probability density, and This represents the marginal probability density. This is a water quality operator for the ant colony algorithm.

[0113] c. Heuristic Mapping: Mapping the heuristics of water quality variable nodes. Updated to the calculated mutual information value ; d. Pheromones based on the variable operator concentration in the current iteration Dynamic heuristics of the current step The next new dissolved oxygen mechanism prediction equation term is selected according to the probability selection formula, where the variable with the higher mutual information value with the current residual is selected with a higher probability. The larger.

[0114]

[0115] in Indicates the selection operator The probability of; , For operators , j The concentration of pheromones on the surface; , For operators , j The level of inspiration on; It is an important factor of pheromones; As a key factor for heuristics, this implementation sets... =1、 =2, The number of operators.

[0116] The ant colony algorithm used in this implementation is as follows: Ant colony optimization is an optimization algorithm that simulates the foraging behavior of ants in nature. This method includes: a. Extract the structural terms of the dissolved oxygen mechanism prediction equation and related simple water quality variables Ant colony algorithm water quality operator As food for ant colonies By assigning pheromones and heuristics, equation terms can be combined using the "×" and " / " operators based on probability to generate simple compound dissolved oxygen mechanism prediction equations. Candidate variables are the food that the ant colony can search for. ;

[0117] in The operator selected for ant colony probability. and This is a water quality operator for the ant colony algorithm.

[0118] b. The initial pheromone value for each operator is 0.5, and it is updated in each subsequent search iteration. Heuristics are used to assist pheromone selection of operators; a residual correlation guidance mechanism is introduced during the ant colony search phase. The algorithm calculates water quality operators in real time. The mutual information value between the residual sequence of the current provisional equation and the statistical index is dynamically mapped to a heuristic factor, thereby guiding the ant colony to preferentially capture key water quality variables that can significantly eliminate the error of the dissolved oxygen mechanism prediction equation, realizing the transformation from blind random search to statistically guided search; c. The ant colony generates and searches for dissolved oxygen mechanism prediction equation terms based on pheromone concentration and heuristics. Water quality operators with higher pheromone concentrations are more likely to be selected. The formula for calculating the selection probability of water quality operators is:

[0119] in Indicates the selection operator The probability of; , For operators , j The concentration of pheromones on the surface; , For operators , j The level of inspiration on; It is an important factor of pheromones; As a key factor for heuristics, this implementation sets... =1、 =2, The number of operators; d. Duplicate dissolved oxygen mechanism prediction equation terms are not allowed to be searched. Each search path contains multiple equation terms to form a dissolved oxygen mechanism prediction equation structure, and the number of equation terms cannot exceed the maximum number of equation terms. In this implementation, the maximum number of equation terms is set to 5. e. In each iteration, 30 dissolved oxygen mechanism prediction equation structures are searched and ranked according to equation evaluation metrics to determine the optimal equation structure. The pheromone concentration of predefined water quality operators appearing in the optimal dissolved oxygen mechanism prediction equation structure is increased, and the pheromone concentration of all water quality operators is updated by volatilization and multiplied by a volatilization rate. Finally, all water quality operator pheromone concentrations are pruned to ensure they remain within a reasonable range of (0.1, 1), specifically, values ​​less than 0.1 are changed to 0.1, and values ​​greater than 1.0 are changed to 1.0. This method is set... ; f. After a specified number of iterations, the optimal equation obtained is the final structure of the dissolved oxygen mechanism prediction equation. The expression for this equation structure is:

[0120] Where m is the number of equation terms, and each equation term Selected from candidate set .

[0121]

[0122] in, These are the structural terms of the dissolved oxygen mechanism prediction equation extracted in the previous step. For relevant simple water quality variables, The simple complex dissolved oxygen mechanism prediction equation is generated for probability.

[0123] S5: An ant colony algorithm based on a dynamic heuristic strategy using residual correlation is applied to search for the optimal dissolved oxygen mechanism prediction equation structure using a random window. Finally, the coefficients of the optimal equation structure are estimated on global data to determine the final dissolved oxygen mechanism prediction equation. a. Within multiple randomly sampled time windows, the time series data of water quality variables are substituted into the corresponding water quality variable nodes in the dissolved oxygen mechanism prediction equation structure searched by the ant colony algorithm. Equation coefficients are estimated and equation errors are calculated based on sequential threshold ridge regression. Finally, for each random window, the corresponding equation error MSE and equation term coefficients are obtained. In this implementation, the random window size is set to 80% of the global dataset, and the number of random windows is 10. b. Considering both the accuracy and stability of the dissolved oxygen mechanism prediction equation, the average value of the equation error MSE is calculated separately. ), the coefficient of variation (cv) of the equation error MSE ( ) and the average value of the coefficients of variation of the equation terms ( The specific calculation formula is as follows:

[0124] in Indicates the first The mean square error (MSE) of estimating the equation within a random window. This indicates that n random windows were sampled.

[0125]

[0126] in The standard deviation of the mean squared error (MSE) of the random window. Let MSE be the mean of the mean squared error of the random window, i.e. .

[0127]

[0128] in For the first The standard deviation of each coefficient For the first The mean of the coefficients, This indicates the number of coefficients in the equation.

[0129] c. Finally, evaluate the structure of each dissolved oxygen mechanism prediction equation. The optimal dissolved oxygen mechanism prediction equation structure was searched using the equation evaluation index. These are hyperparameters used to balance the accuracy of the equations with the stability of the equation terms. This implementation sets them as follows: .

[0130] Finally, based on the optimal dissolved oxygen mechanism prediction equation structure obtained from random window evaluation, the equation coefficients are estimated using order threshold ridge regression on all data to obtain the final dissolved oxygen mechanism prediction equation. Specifically: The optimal dissolved oxygen mechanism prediction equation structure was obtained through random window evaluation:

[0131] in,

[0132] The structural term of the dissolved oxygen mechanism prediction equation extracted in the previous step and simple complex dissolved oxygen mechanism prediction equations The variables are actually all simple water quality variables. It is composed of operators.

[0133] Therefore, we then processed all the time series data of water quality variables. Substituting the optimal dissolved oxygen mechanism prediction equation structure into the equation yields the corresponding full feature matrix. :

[0134] Finally, across the entire dataset, the coefficient vector of the equation is estimated using sequential threshold ridge regression. :

[0135] in It is a regularization parameter; This is the candidate library matrix, i.e., the matrix of the independent variable terms of the equation; This is the coefficient vector, i.e., the sparse coefficient vector to be estimated; This is the vector of the dependent variable in the equation, i.e., the true value of dissolved oxygen; The square of the L2 norm; To and Identity matrices of the same dimension; The final equation for predicting the dissolved oxygen mechanism is obtained as follows:

[0136] in This represents the estimation of the coefficient vector of the equation using sequential threshold ridge regression across the entire data set. The The coefficient corresponds to the first... Equation terms The coefficient.

[0137] This embodiment selects water quality data recorded at a water quality monitoring station as the research object, involving nine water quality variables, including water temperature, dissolved oxygen, pH, conductivity, turbidity, permanganate index, total phosphorus, total nitrogen, and algal density. Dissolved oxygen is used as the dependent variable, and other water quality variables affecting dissolved oxygen content are used to construct a dissolved oxygen mechanism prediction equation. The dataset contains 905 data samples (i.e., 905 days of water quality records). The aim is to explore the relationship between water quality variables affecting dissolved oxygen content and dissolved oxygen.

[0138] Ultimately, the dissolved oxygen mechanism prediction equation discovered in this embodiment is:

[0139] in Indicates dissolved oxygen; Indicates water temperature; Indicates pH level; Indicates electrical conductivity; Indicates turbidity. Indicates the permanganate index, This indicates total nitrogen.

[0140] In the equation The data reflects the interactive effects of total nitrogen and turbidity on dissolved oxygen content. This item reflects the complex coupling relationship between dissolved oxygen and water quality variables such as temperature, pH, permanganate index, and conductivity. and The term characterizes the nonlinear constraint relationship between water temperature and dissolved oxygen content. The simplified terms visually demonstrate the linear relationship between pH and dissolved oxygen content. This indicates that the dissolved oxygen mechanism prediction equation derived by this method conforms to the nonlinear physical characteristics of water quality evolution.

[0141] By using this equation to inversely calculate dissolved oxygen, the mean square error (MSE) between the simulated dissolved oxygen and the actual dissolved oxygen value is 0.590. . Figure 3 This is a scatter plot of simulated and actual dissolved oxygen values, where the horizontal axis represents actual dissolved oxygen values ​​and the vertical axis represents simulated dissolved oxygen values. (Refer to...) Figure 3 As well as the mean square error, it can be seen that the extracted dissolved oxygen mechanism prediction equation accurately simulates the dissolved oxygen content and intuitively and clearly shows the relationship between water quality variables affecting dissolved oxygen content and dissolved oxygen.

[0142] Example 2 This invention also provides a genetic-ant colony coupled water quality mechanism equation mining system based on residual correlation guidance. The system is used to implement the method described in Embodiment 1. The system includes: a binary tree encoding and population initialization module, a coefficient estimation and AIC fitness evaluation module, a genetic evolution iterative optimization module, a genetic convergence and ant colony initialization module, and an ant colony global optimization and equation determination module. The binary tree encoding and population initialization module is used to construct a binary tree representation of the dissolved oxygen mechanism prediction equation based on water quality variables and operators that affect dissolved oxygen content, and to initialize the dissolved oxygen mechanism prediction equation structure population and equation semantic fingerprint library. The coefficient estimation and AIC fitness assessment module is used to substitute water quality data into the dissolved oxygen mechanism prediction equation structure and use an adaptive improved threshold ordinal threshold ridge regression algorithm to estimate the coefficients of the dissolved oxygen mechanism prediction equation; the dissolved oxygen mechanism prediction equation is evaluated based on the AIC index, and the initial dissolved oxygen mechanism prediction equation population is sorted. The genetic evolution iterative optimization module is used to perform crossover, mutation, and replacement operations on the previous generation of dissolved oxygen mechanism prediction equation population to generate a new equation population and introduce semantic equivalence detection and retry mechanism to guide equation generation. Then there is the repeatability coefficient estimation and AIC fitness evaluation module. The genetic convergence and ant colony initialization module is used to stop the genetic iteration when the AIC index of the dissolved oxygen mechanism prediction equation is lower than the preset threshold, extract the structure of the first 10 dissolved oxygen mechanism prediction equations as the water quality operator of the subsequent ant colony algorithm, and introduce a dynamic heuristic strategy based on residual correlation into the ant colony algorithm. The Ant Colony Global Optimization and Equation Determination module is used to apply the ant colony algorithm to search for the optimal dissolved oxygen mechanism prediction equation structure based on a random window, estimate the coefficients of the optimal dissolved oxygen mechanism prediction equation structure on global data, and determine the final dissolved oxygen mechanism prediction equation.

[0143] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A method for mining water quality mechanism equations based on residual correlation-guided genetic-ant colony coupling, characterized in that, The method includes: S1: Construct a binary tree representation of the dissolved oxygen mechanism prediction equation based on water quality variables and operators that affect dissolved oxygen content, and initialize the structure population and semantic fingerprint database of the dissolved oxygen mechanism prediction equation. S2: Substitute water quality data into the dissolved oxygen mechanism prediction equation structure and use an adaptive improved threshold ordinal threshold ridge regression algorithm to estimate the coefficients of the dissolved oxygen mechanism prediction equation; evaluate the dissolved oxygen mechanism prediction equation based on the AIC index and rank the initial dissolved oxygen mechanism prediction equation population. S3: Perform crossover, mutation, and substitution operations on the previous generation of dissolved oxygen mechanism prediction equation population to generate a new equation population, and introduce semantic equivalence detection and retry mechanism to guide equation generation, then repeat S2; S4: When the AIC index of the dissolved oxygen mechanism prediction equation is lower than the preset threshold, stop the genetic iteration, extract the structure of the top 10 dissolved oxygen mechanism prediction equations as the water quality operator of the subsequent ant colony algorithm, and introduce a dynamic heuristic strategy based on residual correlation into the ant colony algorithm. S5: The ant colony algorithm is applied to search for the optimal dissolved oxygen mechanism prediction equation structure based on a random window. The coefficients of the optimal dissolved oxygen mechanism prediction equation structure are estimated on global data to determine the final dissolved oxygen mechanism prediction equation.

2. The method according to claim 1, characterized in that, In S1, the method for constructing a binary tree representation of the dissolved oxygen mechanism prediction equation based on water quality variables and operators affecting dissolved oxygen content includes: ; in, Representing the The equation terms corresponding to the binary trees For the input water quality variables, The coefficients of each equation term, The number of water quality variables. The number of binary trees.

3. The method according to claim 2, characterized in that, In step S2, the method of substituting water quality data into the dissolved oxygen mechanism prediction equation structure and using an adaptive improved threshold-order threshold ridge regression algorithm to estimate the coefficients of the dissolved oxygen mechanism prediction equation includes: By reading the historical time series of water quality data from the monitoring station Substituting these variables as leaf node variables into the dissolved oxygen mechanism prediction equation structure yields the candidate library matrix. : ; in This represents the corresponding water quality variable vector. This represents the mapping function of the equation terms in the corresponding binary tree representation. The number of time points; Based on the candidate library matrix Ridge regression was used to obtain initial estimates of the coefficients of the dissolved oxygen mechanism prediction equation: ; in It is a regularization parameter; This is the candidate library matrix, i.e., the matrix of the independent variable terms of the equation; This is the coefficient vector, i.e., the sparse coefficient vector to be estimated; This is the dependent variable vector of the equation, which is the target variable of the regression equation. The square of the L2 norm; To and Identity matrices of the same dimension; The initial estimated values ​​of the coefficients of the dissolved oxygen mechanism prediction equation are obtained by iterative thresholding.

4. The method according to claim 3, characterized in that, In S2, the method for ranking the initial population of dissolved oxygen mechanism prediction equations based on the AIC index includes: The optimal dissolved oxygen mechanism prediction equation was selected from multiple candidate equations. ; in, The mean square error of the equation; The number of equation terms; This is a hyperparameter used to balance the accuracy and simplicity of the dissolved oxygen mechanism prediction equation; The equations were ranked according to the AIC index of the optimal dissolved oxygen mechanism prediction equation in the initial population, as follows: Time series data of water quality variables The dissolved oxygen prediction value calculated by substituting into the candidate dissolved oxygen mechanism prediction equation : ; in For the first coefficients of each equation term, For the first Equation terms, For the first Each equation term corresponds to water quality variable data. for A vector of size These are the corresponding time sampling points; Based on dissolved oxygen observation values and dissolved oxygen prediction values Calculation equation and the corresponding AIC indicator : ; ; in, Indicates the first Dissolved oxygen observation values, This represents the first result calculated based on the candidate dissolved oxygen mechanism prediction equation. One predicted dissolved oxygen value, Indicates the number of water quality sampling times at the testing station; AIC index based on each candidate dissolved oxygen mechanism prediction equation Sort by size from smallest to largest.

5. The method according to claim 4, characterized in that, In S4, the method of introducing a dynamic heuristic strategy based on residual correlation in the ant colony algorithm includes: In each iteration of the dissolved oxygen mechanism prediction equation search, the heuristics of all water quality operators are determined at the initial moment. Initialize to preset values; based on the pheromone concentration of the variable operator in the current iteration. and initial heuristic values The first equation term of the water quality operator is constructed by searching according to the probability transition formula. ; The equation terms are constructed with The probability is directly taken from the water quality operator. As a term in the equation, we have The probability is obtained by combining water quality operators. Constructing the predictive equation for the mechanism of compound dissolved oxygen ; ; Where P represents the trigger probability. For the ant colony algorithm water quality operator, For the prediction equation of simple complex dissolved oxygen mechanism; The selection of water quality operators based on probability selection formulas includes: ; in Indicates the selection operator The probability of; , For operators , j The concentration of pheromones on the surface; , For operators , j The level of inspiration on; It is an important factor of pheromones; As an important factor in heuristics; Finally, we obtain the equation structure for the first stage: ; In each subsequent step of the ant colony's equation-building path, the residual vector between the currently constructed partial equation and the true value is calculated. Then, the mutual information values ​​between each water quality variable node in the candidate set and the residual vector are calculated, specifically: No. The step-time equation structure is as follows: ; in, Indicates the first One equation term; Water quality variable time series data Substitute the first The step-time equation structure can yield the corresponding characteristic matrix. : ; Then, the coefficients of the equation are estimated using sequential threshold ridge regression. : ; in, It is a regularization parameter; This is the candidate library matrix, i.e., the matrix of the independent variable terms of the equation; The coefficient vector is the sparse coefficient vector to be estimated, which corresponds to the equation coefficient vector at step j. This is the vector of the dependent variable in the equation, i.e., the true value of dissolved oxygen; The square of the L2 norm; To and Identity matrices of the same dimension; Calculate the residual vector between the actual value and the true value. : ; Calculate the mutual information value between each water quality variable node in the candidate set and the residual vector. : ; in For joint probability density, and For marginal probability density, For ant colony algorithm water quality operators; Heuristics of water quality variable nodes Updated to the calculated mutual information value ; Based on the variable operator pheromone concentration of the current iteration Dynamic heuristics of the current step The next new dissolved oxygen mechanism prediction equation term is selected according to the probability selection formula.

6. The method according to claim 1, characterized in that, In step S5, the method for estimating the coefficients of the optimal dissolved oxygen mechanism prediction equation structure on global data and determining the final dissolved oxygen mechanism prediction equation includes: ; in, Indicates dissolved oxygen; Indicates water temperature; Indicates pH level; Indicates electrical conductivity; Indicates turbidity. Indicates total nitrogen, This indicates the permanganate index.

7. A system for mining water quality mechanism equations based on residual correlation-guided genetic-ant colony coupling, the system being used to implement the method described in any one of claims 1-6, characterized in that, The system includes: a binary tree encoding and population initialization module, a coefficient estimation and AIC fitness evaluation module, a genetic evolution iterative optimization module, a genetic convergence and ant colony initialization module, and an ant colony global optimization and equation determination module. The binary tree encoding and population initialization module is used to construct a binary tree representation of the dissolved oxygen mechanism prediction equation based on water quality variables and operators that affect dissolved oxygen content, and to initialize the dissolved oxygen mechanism prediction equation structure population and equation semantic fingerprint library. The coefficient estimation and AIC fitness assessment module is used to substitute water quality data into the dissolved oxygen mechanism prediction equation structure and use an adaptive improved threshold ordinal threshold ridge regression algorithm to estimate the coefficients of the dissolved oxygen mechanism prediction equation; evaluate the dissolved oxygen mechanism prediction equation based on the AIC index, and rank the initial dissolved oxygen mechanism prediction equation population. The genetic evolution iterative optimization module is used to perform crossover, mutation, and substitution operations on the previous generation of dissolved oxygen mechanism prediction equation population to generate a new equation population and introduce semantic equivalence detection and retry mechanism to guide equation generation. Then, the repetition coefficient estimation and AIC fitness evaluation module is used. The genetic convergence and ant colony initialization module is used to stop the genetic iteration when the AIC index of the dissolved oxygen mechanism prediction equation is lower than a preset threshold, extract the structure of the first 10 dissolved oxygen mechanism prediction equations as the water quality operator of the subsequent ant colony algorithm, and introduce a dynamic heuristic strategy based on residual correlation into the ant colony algorithm. The ant colony global optimization and equation determination module is used to apply the ant colony algorithm to search for the optimal dissolved oxygen mechanism prediction equation structure based on a random window, estimate the coefficients of the optimal dissolved oxygen mechanism prediction equation structure on global data, and determine the final dissolved oxygen mechanism prediction equation.