A construction design method for a biological retention facility based on RF-GA fitting and electronic equipment

The design of bioretention facilities was optimized by using the RF-GA fitting method, which solved the problem of traditional design relying on experience, achieved stable nitrogen and phosphorus removal effects and dynamic environmental adaptation, and reduced design and adjustment costs.

CN120873734BActive Publication Date: 2026-06-26BEIJING UNIV OF CIVIL ENG & ARCHITECTURE

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING UNIV OF CIVIL ENG & ARCHITECTURE
Filing Date
2025-07-17
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Traditional bioretention facilities rely on experience in their design, lack quantitative indicators, have unstable nitrogen and phosphorus removal effects, are difficult to cope with dynamic environmental changes, and have high design and adjustment costs.

Method used

A method based on RF-GA fitting was adopted, which simulates the hierarchical structure of bioretention facilities by coupling random forest model and genetic algorithm, predicts the concentration of pollutants in effluent, and optimizes facility design.

Benefits of technology

It improves the purification effect of bioretention facilities and can provide precise facility design references for different regions with varying rainwater pollutant concentrations, reducing design and adjustment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873734B_ABST
    Figure CN120873734B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on RF-GA fitting biological retention facility construction design method and electronic equipment, comprising: with existing biological retention facility hierarchical structure parameter and existing environmental parameter establish original data set;Existing environmental parameter includes when running city runoff rainwater concentration and the concentration data of effluent after treating pollutant;Original data set is used for training RF model after being preprocessed;Acquire target city environmental parameter, determine the numerical range of different structure parameters in existing biological retention facility hierarchical structure parameter, and splice with target city environmental parameter;Spliced data is input into the RF model trained, combined with GA algorithm, obtain the parameter combination of target city biological retention facility hierarchical structure and the effluent concentration of pollutant under this combination;Based on this method, the hierarchical structure of biological retention facility can be designed specifically, and the effluent quality of this hierarchical structure is predicted, which helps to improve the purification effect of biological retention facility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bioretention facility construction technology, and more specifically to a bioretention facility construction design method and electronic equipment based on RF-GA fitting. Background Technology

[0002] A sponge city refers to a city that minimizes urban flooding, improves the urban ecological environment, and enhances its sustainable development capabilities by constructing urban infrastructure with sponge-like characteristics. Bioretention facilities, as a low-impact development (LID) technology for sponge city construction, can effectively control suspended solids (SS), nitrogen, phosphorus, and other pollutants in rainwater runoff through physical interception, chemical adsorption, and microbial degradation.

[0003] The construction of bioretention facilities needs to take into account the environmental parameters of the area, namely the concentration of pollutants (ammonia nitrogen, nitrate nitrogen, total nitrogen, and total phosphorus) in the rainwater runoff. The hierarchical structure of the bioretention facility plays different roles (the plant and soil layers can adsorb ammonia nitrogen and total phosphorus; the electron donor and the flood zone can provide a living environment for microorganisms, decomposing nitrate nitrogen through nitrification and denitrification). Through their combined action, they purify the runoff rainwater and prevent high-concentration effluent from entering the receiving water body, which would lead to eutrophication of the receiving water body.

[0004] However, traditional bioretention facilities face the following problems during operation:

[0005] (1) The removal efficiency of nitrogen and phosphorus is unstable: the removal of nitrogen and phosphorus in rainwater runoff is affected by various parameters such as the type of packing material, denitrification conditions, and climate factors. The nitrogen and phosphorus removal efficiency of different bioretention facilities varies greatly, and even negative values ​​may occur.

[0006] (2) Design relies on experience: The current design of bioretention facilities is mainly based on the "Technical Specification for Rainwater Bioretention Facilities" and experience. There are no specific quantitative indicators, the purification results are unpredictable, and the facilities lack responsiveness to dynamic environments. If construction is based on experience, the actual effluent concentration needs to be monitored during operation after construction. If the concentration does not meet the standards, adjustments to the facilities will be considered, which is costly and time-consuming.

[0007] Therefore, how to simulate the hierarchical structure of a bioretention facility and the effluent concentration under this hierarchical structure, so as to provide a reference for the initial construction stage and provide design ideas for actual projects, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0008] In view of the above problems, the present invention provides a construction design method and electronic device for bioretention facilities based on RF-GA fitting, so as to at least solve some of the technical problems mentioned in the background art.

[0009] To achieve the above objectives, the present invention adopts the following technical solution:

[0010] On the one hand, the present invention provides a construction design method for bioretention facilities based on RF-GA fitting, comprising the following steps:

[0011] An original dataset was established based on the existing hierarchical structure parameters of the bioretention facility and existing environmental parameters; the existing environmental parameters include the concentration of urban runoff rainwater during operation and the concentration of pollutants in the treated effluent.

[0012] The original dataset is preprocessed and then used to train the RF model;

[0013] Obtain the environmental parameters of the target city, determine the numerical range of different structural parameters in the hierarchical structural parameters of the existing bioretention facility, and splice them with the environmental parameters of the target city to form spliced ​​data;

[0014] The spliced ​​data is input into the trained RF model for prediction, and combined with the GA algorithm, the parameter combination of the target city's bioretention facility hierarchy and the pollutant effluent concentration under this combination are obtained.

[0015] Furthermore, the existing bioretention facility hierarchical structural parameters specifically include: plant species, total height of the bioretention facility, relative height of the soil layer and corresponding filler composition, relative height of the medium layer and corresponding filler composition, relative height of the drainage layer and corresponding filler composition, relative height of the flooding zone, and type and location of the electron donor.

[0016] Furthermore, the hierarchical structural parameters of the existing bioretention facility are preprocessed, specifically including:

[0017] The overall height of bioretention facilities was standardized.

[0018] The plant species, soil layer filler composition, medium layer filler composition, drainage layer filler composition, electron donor type, and filling location are all processed using unique thermal coding.

[0019] Furthermore, the target urban environmental parameters include the concentration of nitrogen and phosphorus pollutants in stormwater runoff.

[0020] Furthermore, the RF model includes a nitrate nitrogen effluent concentration prediction sub-model, an ammonia nitrogen effluent concentration prediction sub-model, a total nitrogen effluent concentration prediction sub-model, and a total phosphorus effluent concentration prediction sub-model.

[0021] Furthermore, the construction and training of the RF model specifically includes:

[0022] (1) Dataset input: The existing bioretention facility hierarchical structure parameters and the urban runoff rainwater concentration during operation are used as control features, and the treated pollutant effluent concentration is used as target features; it is divided into two categories, namely {low concentration effluent, high concentration effluent}.

[0023] (2) Decision tree construction criteria: The Gini index is used as the feature splitting criterion to construct the decision tree; the Gini index Gini(D) is expressed as:

[0024]

[0025] Where, p k p1 represents the proportion of the k-th type of sample data in dataset D; p2 represents low-concentration effluent; p3 represents high-concentration effluent.

[0026] (3) Feature selection mechanism: Random forests consist of decision trees, and each decision tree consists of nodes. The number of nodes in a decision tree is represented as:

[0027]

[0028] Where m represents the number of nodes in the decision tree; n1 represents the number of environmental parameters in dataset D; and n2 represents the number of structural feature parameters in dataset D.

[0029] For each set of environmental parameters and structural characteristic parameters, calculate its weighted Gini index after splitting. A (D), represented as:

[0030]

[0031] Where A represents the hierarchical structural parameters of each existing bioretention facility and the urban runoff concentration during operation, denoted as candidate features; D j Gini(D) represents the j-th subset of candidate feature A; j ) represents subset D j The Gini index;

[0032] The Gini index is calculated starting from the root node of the decision tree. A The reduction ΔGini of (D) is calculated by selecting the feature that maximizes the reduction ΔGini as the node, and this process is repeated until all nodes of the decision tree are built. The reduction ΔGini is expressed as:

[0033] ΔGini=Gini(D)-Gini A (D)

[0034] (4) Random forest construction and output: Decision trees with different feature combinations are constructed into a random forest. When performing prediction fitting, each decision tree will output the pollutant effluent concentration category. The final result of the random forest is determined by the majority voting mechanism. That is, the result with more votes is the output result of the random forest. If the number of votes is the same, it will be randomly selected.

[0035] Furthermore, during the prediction process of the RF model, the pollutant effluent concentration under the combination of bioretention layer structural parameters generated in each iteration is evaluated using the fitness function of the GA algorithm.

[0036] If the pollutant effluent concentration under the combination of bioretention layer structural parameters in the current iteration meets the preset low concentration standard, it indicates that the combination of bioretention layer structural parameters in the current iteration is effective.

[0037] Otherwise, the combination of biological retention layer structural parameters in the current iteration will be eliminated.

[0038] Furthermore, the fitness function of the GA algorithm is expressed as:

[0039]

[0040] Where Fitness represents the fitness value corresponding to the combination of structural parameters of the retention layer; W i C represents the weighting coefficient for the i-th type of pollutant; i S represents the concentration of pollutant of type i; i α represents the effluent standard of the constructed wetland for pollutant of type i; α represents the penalty intensity coefficient.

[0041] On the other hand, the present invention provides an electronic device, including a main control unit and a storage system;

[0042] The storage system is used to store the instruction program, data, and running algorithm for executing the above method;

[0043] The main control unit is used to call the instruction program, data, and running algorithm to execute the above method.

[0044] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a construction design method and electronic device for bioretention facilities based on RF-GA fitting, which has the following beneficial effects:

[0045] 1. Due to the complex relationship between environmental parameters, hierarchical structural parameters of bioretention facilities and the concentration of pollutants in effluent, this invention uses a combination of random forest and genetic algorithm to discover patterns in the complex relationship, realize the prediction of feature combinations of bioretention facilities and pollutant concentrations, which helps to improve the purification effect of bioretention facilities and provides design reference for practical engineering.

[0046] 2. Different cities have different atmospheric conditions, resulting in large differences in the concentration of pollutants in runoff rainwater after rainfall. The method provided by this invention can design the hierarchical structure of bioretention facilities (seepage-proof and partially seepage-proof) in a targeted manner and predict the effluent quality of such hierarchical structures, thus making up for the shortcomings of traditional experience-based design.

[0047] 3. Compared with traditional single-model applications, this invention uses (RF-GA) dual-model coupling. Traditional single models are suitable for fitting and predicting single targets (nitrate nitrogen, ammonia nitrogen, total nitrogen and total phosphorus), while this invention can balance the control features of multiple targets to explore the optimal feature combination.

[0048] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0050] Figure 1 A schematic diagram of the construction design method for bioretention facilities based on RF-GA fitting provided in an embodiment of the present invention.

[0051] Figure 2 A schematic diagram of the logical framework of the construction and design method for bioretention facilities based on RF-GA fitting provided in an embodiment of the present invention.

[0052] Figure 3 This is a schematic diagram of fitting the confusion matrix to the RF classification model provided in an embodiment of the present invention.

[0053] Figure 4 This is a schematic diagram of the biological retention layer structure provided in an embodiment of the present invention.

[0054] Figure 5 This is a schematic diagram of an electronic device frame provided in an embodiment of the present invention. Detailed Implementation

[0055] 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.

[0056] This invention discloses a construction design method for bioretention facilities based on RF-GA fitting, see [link to relevant documentation]. Figure 1 and Figure 2 As shown, it includes:

[0057] S1. Establish an original dataset based on the existing hierarchical structure parameters of the bioretention facility and the existing environmental parameters; the existing environmental parameters include the concentration of urban runoff rainwater during operation and the concentration of pollutants in the treated effluent.

[0058] S2. After preprocessing the original dataset, it is used to train the RF model;

[0059] S3. Obtain the environmental parameters of the target city, determine the numerical range of different structural parameters in the existing bioretention facility hierarchical structure parameters, and splice them with the environmental parameters of the target city to form spliced ​​data;

[0060] S4. Input the spliced ​​data into the trained RF model for prediction, and combine it with the GA algorithm to obtain the parameter combination of the target city's bioretention facility hierarchy and the pollutant effluent concentration under this combination.

[0061] Next, each of the above steps will be explained in detail.

[0062] In step S1 above, an original dataset is established using the existing bioretention facility hierarchical structure parameters and existing environmental parameters; wherein:

[0063] The specific hierarchical structural parameters of existing bioretention facilities include: plant species, total height of the bioretention facility, relative height of the soil layer and corresponding filler composition, relative height of the medium layer and corresponding filler composition, relative height of the drainage layer and corresponding filler composition, relative height of the flooding zone, type of electron donor and filling location; where relative height is based on total height; filling location includes soil layer, medium layer and drainage layer;

[0064] The existing environmental parameters specifically include: the concentration of urban runoff rainwater during operation and the concentration of pollutants in the treated effluent.

[0065] In step S2 above, the original dataset is preprocessed, mainly by preprocessing the hierarchical structural parameters of the existing bioretention facilities. Specifically, this includes:

[0066] (1) The total height of the bioretention facility is standardized; specifically, z-score standardization can help the model converge better and improve its accuracy. The z-score formula is as follows:

[0067]

[0068] Where X represents the original value of the height feature, μ is the mean of the feature, and σ is the standard deviation of the feature; based on this, the height feature is transformed into a standard normal distribution. The original dataset is then updated after standardization.

[0069] (2) One-hot encoding is used to process plant species, soil layer filler components, medium layer filler components, drainage layer filler components, electron donor species, and filling positions, preserving the mapping relationship of this encoding. Finally, the parameter space is uniformly covered to form an initial population, i.e., a combination of structural parameters. Since the categories themselves do not have size relationships, such as plant species (Iris tectorum, Liriope muscari, Iris tectorum, etc.), if (1, 2, 3, etc.) labels are used for encoding (3>2>1), the model will mistakenly believe that these plants have some size relationship, affecting the classification logic of the tree. In order to improve the model accuracy, this embodiment of the invention uses one-hot encoding to maintain the disorder and original information of the data, while recording the mapping relationship between the original information and the encoding, represented as:

[0070] OneHot(C i ) = e i =[0,...,1,...,0]∈R d

[0071] Among them, OneHot(C i ) indicates that category C i Mapping to d-dimensional vector space R d ; e represents the standard vector, satisfying the following conditions:

[0072]

[0073] This indicates that different categories are orthogonal in the vector space and have no numerical relationship in their encoding. Using this method can improve the accuracy of the model. It should be noted that, based on bio-retention facilities, no one in the prior art has used one-hot encoding for processing, but the embodiments of this invention use one-hot encoding, which can effectively improve the fitting accuracy of the RF model;

[0074] (3) Relative height data: The range is (0, 1), the scale is reasonable, it is not related to the model, and the original data is retained without processing.

[0075] In step S3 above, the environmental parameters of the target city are obtained and preprocessed to conform to the input format of the RF model. The environmental parameters of the target city include the concentrations of various pollutants in rainwater runoff, mainly including the concentrations of ammonia nitrogen, nitrate nitrogen, total nitrogen and total phosphorus.

[0076] The structural parameters are preprocessed using the same distribution method as S2. The numerical ranges of different structural parameters in the existing bioretention facility hierarchy are spliced ​​with the target city environmental parameters to form spliced ​​data. This spliced ​​data includes the initial retention layer structure and the target city environmental parameters. This spliced ​​data will be used as input to the trained RF model. To ensure that the RF model can directly use the spliced ​​data, it is necessary to ensure that the verification of the spliced ​​data and the format of the RF model's training data are consistent.

[0077] In step S4 above, the spliced ​​data is input into the trained RF model for prediction, and combined with the GA algorithm to obtain the final combination of retention layer structure parameters; wherein the GA algorithm (genetic algorithm) is the process of initializing candidate solutions.

[0078] The RF model and GA algorithm described above will be explained in detail below.

[0079] 1. RF model:

[0080] The aforementioned RF model includes sub-models for predicting nitrate nitrogen effluent concentration, ammonia nitrogen effluent concentration, total nitrogen effluent concentration, and total phosphorus effluent concentration; the construction and training of this RF model specifically includes:

[0081] (1) Dataset input: Since eutrophication of water bodies is mainly caused by excessive content of nutrients such as N and P, nitrate nitrogen, ammonia nitrogen, total nitrogen and total phosphorus are used as evaluation indicators of nitrogen and phosphorus pollutants. Therefore, the RF model uses environmental parameters and structural parameters as inputs; that is, the existing bioretention facility hierarchical structural parameters in the original dataset and the urban runoff rainwater concentration during operation are used as control features, and the effluent concentration of pollutants after treatment is used as target features; it is divided into two categories, namely {low concentration effluent, high concentration effluent}, that is, the classification result y∈{0,1};

[0082] Before and during model fitting, the dataset data must be preprocessed to improve the model's fitting effect. The relative height data, ranging from (0, 1), has a reasonable scale and is independent of the model; the original data is retained without further processing. The total height of the retention layer and the pollutant concentration in rainwater runoff are standardized. Unique thermal encoding is used for plant species, soil layer filler components, medium layer filler components, drainage layer filler components, electron donor types, and filling locations. For specific processing details, please refer to step S2 above.

[0083] (2) Decision tree construction criteria: The Gini index (D) is used as the feature splitting criterion to construct the decision tree; the Gini index (D) is expressed as:

[0084]

[0085] Where, p k p1 represents the proportion of the k-th class of sample data in dataset D; since the target feature is binary classification, p1 represents low-concentration effluent and p2 represents high-concentration effluent.

[0086] (3) Feature selection mechanism: Random forests consist of decision trees, and each decision tree consists of nodes. The number of nodes in a decision tree is represented as:

[0087]

[0088] Where m represents the number of nodes in the decision tree; n1 represents the number of environmental parameters in dataset D; and n2 represents the number of structural feature parameters in dataset D.

[0089] For each set of environmental parameters and structural characteristic parameters, calculate its weighted Gini index after splitting. A (D), represented as:

[0090]

[0091] Where A represents the hierarchical structural parameters of each existing bioretention facility and the urban runoff concentration during operation, denoted as candidate features; Gini(D j ) represents subset D j The target feature (i.e., low or high concentration) is the Gini index, which is the target feature of the Gini index. j The calculation method for ) can be found in the decision tree construction criteria mentioned above; D j Let D1 represent the j-th subset of candidate feature A. For example, if A is "filling location", then D1 is "soil layer", D2 is "medium layer", and D3 is "drainage layer". Indicates belonging to D j The ratio of the number of sets to the total number of sets;

[0092] The Gini index is calculated starting from the root node of the decision tree. A The reduction ΔGini of (D) is calculated by selecting the feature that maximizes the reduction ΔGini as the node, and this process is repeated until all nodes of the decision tree are built. The reduction ΔGini is expressed as:

[0093] ΔGini=Gini(D)-Gini A (D)

[0094] For example, if A is the "loading position", then Gini(D) is the Gini index of the dataset before selecting it as a node; Gini A(D) is the feature-weighted Gini index, calculated separately for the "soil layer," "medium layer," and "drainage layer," and then weighted according to their proportion in the total dataset. The final result is the feature Gini index after splitting based on feature A. The Gini index is calculated for each of the selected m nodes, and the node with the largest ΔGini is chosen as the root node. After selecting the root node, this process is repeated to select the next node until the decision tree is formed.

[0095] (4) Random forest construction and output: Decision trees with different feature combinations are constructed into a random forest. When performing prediction fitting, each decision tree will output the pollutant effluent concentration category (low concentration / high concentration). The final result of the random forest is determined by the majority voting mechanism. That is, the result with more votes is the output result of the random forest. If the number of votes is the same, it will be randomly selected.

[0096] (5) Model Evaluation: The random forest classification model is evaluated using accuracy, such as... Figure 3 As shown, the accuracy ranged from 0.6 to 0.8. The results indicate that the RF classification model performs well in fitting bioretention facilities.

[0097] (6) Characteristic relationship verification: In this embodiment of the invention, nitrate nitrogen, ammonia nitrogen, total nitrogen and total phosphorus are used as target parameters to evaluate the contribution of the layered structure parameters of the bioretention facility to its influence. The results are shown in Table 1 below.

[0098] Table 1: Ranking of the importance of retention layer structural characteristic parameters to pollutants

[0099]

[0100]

[0101] As shown in Table 1 above, the influent concentration has a significant impact on ammonia nitrogen and total phosphorus pollutants, followed by the device height and vegetation. This is mainly because the removal of ammonia nitrogen and total phosphorus is primarily related to adsorption, consistent with experimental results. Nitrate nitrogen, however, is mainly affected by electron donors and the submerged zone. This is because the purification of nitrate nitrogen in bioretention facilities relies mainly on denitrification, while microorganisms have high requirements for carbon sources and oxygen conditions. Since different pollutants exhibit varying dependence on characteristics, to balance the parameters and minimize the weighted concentration of pollutants, the GA algorithm will be used to optimize the combination of parameters for the hierarchical structure of the bioretention facility.

[0102] 2. GA Algorithm (Genetic Algorithm):

[0103] (1) Input to GA algorithm: Use the original dataset as input to the GA algorithm, but only retain the structural parameters. At the same time, it is necessary to calculate the range of numerical fluctuations of each structural variable in the existing training data in order to determine the initial population and mutation stage of the GA algorithm.

[0104] (2) Genetic algorithm parameter settings: To improve the response speed, the time of a single run of the genetic algorithm was controlled within 0.5-2s. Through multiple runs, the maximum number of iterations of the genetic algorithm was finally set to 30, the population size to 20, the mutation rate to 0.05, and the crossover rate to 0.8. In this way, the time of a single run of the genetic algorithm can be maintained at about 0.7s.

[0105] (3) GA Algorithm Fitness Function: During the prediction process of the RF model, the GA algorithm fitness function is used to evaluate the combination of bioretention facility hierarchical structure parameters generated in each iteration. Each combination of bioretention facility hierarchical structure parameters represents a potential bioretention facility design scheme. If the pollutant effluent concentration under the bioretention layer structure parameter combination in the current iteration meets the preset low concentration standard, it indicates that the bioretention layer structure parameter combination in the current iteration is effective; otherwise, the bioretention layer structure parameter combination in the current iteration is eliminated. The GA algorithm fitness function is expressed as:

[0106]

[0107] Wherein, Fitness represents the fitness value corresponding to the combination of hierarchical structural parameters of the bioretention facility; W n The weighting coefficient represents the nth type of pollutant (reflecting the importance of the pollutant; 0.4 for total phosphorus and total nitrogen, and 0.1 for ammonia nitrogen and nitrate nitrogen); C n S represents the concentration of pollutant of type n (e.g., C1 = nitrate nitrogen concentration in effluent, C2 = ammonia nitrogen concentration in effluent, ...); n The effluent standard of the constructed wetland represents the pollutant of category n; α represents the penalty intensity coefficient, which is set to 10 in this embodiment of the invention.

[0108] 1) In the above fitness function formula, The benchmark penalty item represents the ratio of pollutant concentration to the standard value, reflecting the degree of compliance; specifically:

[0109] If C n <S n (Not exceeding the standard): The ratio is less than 1, and the penalty is lighter;

[0110] If C n =S n (Just meets the target): The ratio is 1, with no additional penalty;

[0111] If C n >Sn (Exceeding the standard): If the ratio is greater than 1, the penalty will be more severe.

[0112] 2) In the above fitness function formula, α×max(0,C) n -S n This is a penalty item for exceeding the standard, imposing additional penalties on the portion exceeding the standard; specifically:

[0113] If C n ≤S n This item is 0, so no penalty is added.

[0114] If C n >S n : Overscalar C n —S n Amplified by α times, forcing the model to prioritize avoiding overshoot.

[0115] The logic of this fitness function is to transform the problem of minimizing the penalty term of pollutant concentration (including the penalty for exceeding the standard) into the problem of maximizing the fitness function. By taking a negative number, the smaller the original penalty term (i.e. the lower the predicted effluent concentration), the greater the fitness.

[0116] (4) GA Algorithm Iteration: In each iteration of the GA algorithm, the population will undergo selection, crossover, mutation and replacement, which are detailed below:

[0117] Selection: This embodiment of the invention employs a tournament selection strategy. Specifically, several individuals are randomly selected and compared, with the individual exhibiting the best fitness advancing to the next generation. The tournament selection strategy, compared to other strategies, can be configured as a quantitative selection process, aligning with the purification effect of the bioretention facility.

[0118] Crossover: Combining the genes of two parents to produce a new generation. The purpose of crossover is to generate new individuals by combining the advantageous traits of two individuals. Specifically, it involves recombining two trait combinations in a bioretention facility according to an algorithm to form a new combination. The fitness of the new combination is higher than that of its parent combination.

[0119] Mutation: This involves making small-scale, random modifications to individual genes to maintain population diversity and prevent early convergence to local optima. Specifically, it involves modifying local features of feature combinations.

[0120] Replacement: The process of replacing older individuals with newer ones, thereby improving the overall fitness of the population by eliminating individuals with poor fitness. Specifically, it involves replacing older trait combinations with newly generated, highly fit trait combinations in the next cycle, continuously improving the fitness of these combinations.

[0121] 3. Output the final combination of bioretention facility hierarchical structural parameters and the effluent pollutant concentration under this combination:

[0122] The combination of final retention facility layer structure parameters and the pollutant effluent concentration under this combination include the final bioretention facility layer structure and the pollutant effluent concentration under the final bioretention facility layer structure;

[0123] When the fitness of an individual in the population reaches the maximum number of iterations, that individual is considered the optimal solution. For example, in this embodiment of the invention, the optimal solution includes the plant species, soil layer filler composition, relative height of the soil layer, medium layer filler composition, relative height of the medium layer, drainage layer filler composition, relative height of the drainage layer, relative height of the flooded area, electron donor type and loading location, and the predicted effluent concentration after purification of the urban stormwater runoff under this combination. Figure 4 As shown, ① represents the plant species; ② represents the soil layer; ③ represents the medium layer; ④ represents the drainage layer; and ⑤ represents the geotextile, which prevents the upper fill material from migrating downwards.

[0124] As can be seen, the method provided by the embodiments of the present invention can achieve targeted purification of rainwater runoff pollution by bioretention facilities in different regions and cities.

[0125] In another embodiment, an electronic device is also provided, see [link to previous embodiment]. Figure 5 As shown, the system includes a main control unit, a storage system, a user interaction module, a communication interface, and a power management system. The storage system is a memory used to store the instruction program, data, and operating algorithms for executing the aforementioned RF-GA fitting-based bioretention facility construction design method. The main control unit is a processor used to call the instruction program, data, and operating algorithms to execute the aforementioned RF-GA fitting-based bioretention facility construction design method. The user interaction module is a screen display that can show both input and program output results. The communication interface consists of wireless communication (WIFI) and a wired interface (USB Type-C), allowing users to use the program via WIFI connection or directly on the electronic device. The power management system is primarily a battery that powers the operation of other electronic components. Figure 5 In the diagram, a single arrow indicates power supply, while a double arrow indicates data and command interaction.

[0126] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0127] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A construction design method for bioretention facilities based on RF-GA fitting, characterized in that, Includes the following steps: An original dataset was established based on the existing hierarchical structure parameters of the bioretention facility and existing environmental parameters; the existing environmental parameters include the concentration of urban runoff rainwater during operation and the concentration of pollutants in the treated effluent. The original dataset is preprocessed and then used to train the RF model; During training, the existing bioretention facility hierarchy parameters in the preprocessed original dataset and the runtime urban runoff rainwater concentration are used as control features, and the treated pollutant effluent concentration is used as the target feature. It is divided into two categories: {low concentration effluent, high concentration effluent}. The RF model includes a nitrate nitrogen effluent concentration prediction sub-model, an ammonia nitrogen effluent concentration prediction sub-model, a total nitrogen effluent concentration prediction sub-model, and a total phosphorus effluent concentration prediction sub-model. Obtain the environmental parameters of the target city, determine the numerical range of different structural parameters in the hierarchical structural parameters of the existing bioretention facility, and splice them with the environmental parameters of the target city to form spliced ​​data; The spliced ​​data is input into the trained RF model for prediction, and combined with the GA algorithm, the parameter combination of the target city's bioretention facility hierarchy and the pollutant effluent concentration under this combination are obtained. During the prediction process of the RF model, the combination of biological retention layer structural parameters generated in each iteration is evaluated using the fitness function of the GA algorithm. If the pollutant effluent concentration under the combination of bioretention layer structural parameters in the current iteration meets the preset low concentration standard, it indicates that the combination of bioretention layer structural parameters in the current iteration is effective. Otherwise, the combination of biological retention layer structural parameters in the current iteration will be eliminated; The fitness function of the GA algorithm is expressed as follows: Where Fitness represents the fitness value corresponding to the combination of structural parameters of the retention layer; W i C represents the weighting coefficient for pollutant class i; i S represents the concentration of pollutant of type i; i This indicates the effluent standard for constructed wetlands containing pollutants of type i. This represents the penalty intensity coefficient.

2. The construction and design method for a bioretention facility based on RF-GA fitting according to claim 1, characterized in that, The existing bioretention facility hierarchical structural parameters specifically include: plant species, total height of the bioretention facility, relative height of the soil layer and corresponding filler composition, relative height of the medium layer and corresponding filler composition, relative height of the drainage layer and corresponding filler composition, relative height of the flooding zone, and type and location of the electron donor.

3. The construction and design method for a bioretention facility based on RF-GA fitting according to claim 2, characterized in that, Preprocessing the hierarchical structural parameters of the existing bioretention facility specifically includes: The overall height of bioretention facilities was standardized. The plant species, soil layer filler composition, medium layer filler composition, drainage layer filler composition, electron donor type and filling location are processed using unique thermal coding.

4. The construction and design method for a bioretention facility based on RF-GA fitting according to claim 1, characterized in that, The target urban environmental parameters include the concentrations of nitrogen and phosphorus pollutants in stormwater runoff.

5. The construction and design method for a bioretention facility based on RF-GA fitting according to claim 2, characterized in that, The construction and training of the RF model specifically includes: (1) Dataset input; (2) Decision tree construction criteria: The Gini index is used as the feature splitting criterion to construct the decision tree; the Gini index Represented as: Where, p k p1 represents the proportion of the k-th type of sample data in dataset D; p2 represents low-concentration effluent; p3 represents high-concentration effluent. (3) Feature selection mechanism: Random forests consist of decision trees, and each decision tree consists of nodes. The number of nodes in a decision tree is expressed as: Where m represents the number of nodes in the decision tree; n1 represents the number of environmental parameters in dataset D; and n2 represents the number of structural feature parameters in dataset D. For each set of environmental parameters and structural characteristic parameters, calculate its weighted Gini index after splitting. , represented as: Where A represents the hierarchical structural parameters of each existing bioretention facility and the urban runoff concentration during operation, denoted as candidate features; D j This represents the j-th subset of candidate feature A; Representing a subset The Gini index; The Gini index is calculated starting from the root node of the decision tree. reduction Choose to reduce the amount The largest feature is used as a node, and calculations are performed sequentially until all nodes of the decision tree are built; this reduces the amount of computation. Represented as: (4) Random forest construction and output: Decision trees with different feature combinations are constructed into a random forest. When performing prediction fitting, each decision tree will output the pollutant effluent concentration category. The final result of the random forest is determined by the majority voting mechanism. That is, the result with more votes is the output result of the random forest. If the number of votes is the same, it will be randomly selected.

6. An electronic device, characterized in that, Including the main control unit and storage system; The storage system is used to store instruction programs, data, and running algorithms for executing the method according to any one of claims 1-5; The main control unit is used to call the instruction program, data and running algorithm to execute the method described in any one of claims 1-5.