Flood forecasting method and system based on conditional adversarial domain adaptation
Through the flood forecasting method of conditional adversarial domain adaptation, the shared feature encoder and condition discriminator are used to solve the problem of domain offset between different river basins, improve the accuracy and robustness of flood forecasting, and achieve efficient adaptation in the target domain.
Patent Information
- Application Number
- CN202510413214.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-08-01
AI Technical Summary
The domain offset problem between different watersheds leads to a degradation in deep learning models' performance in flood forecasting, and it is expensive and time-consuming to obtain target watershed labeling data, limiting the generalization ability and accuracy of the model.
The flood forecasting method based on conditional adversarial domain adaptation is adopted. By constructing a source domain model based on ResNet, using a shared feature encoder and condition discriminator, iterative training is carried out in combination with multiple loss functions to achieve feature alignment and conditional adversariality, and the model's adaptability in the target domain is improved.
It significantly improves the accuracy and robustness of cross-domain flood forecasting, can effectively utilize source domain data, adapt to target domain characteristics, and improves the generalization ability and prediction accuracy of the model.
Smart Images

Figure CN120410818A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a flood forecasting method and system based on conditional adversarial domain adaptation, belonging to the fields of hydrology and deep learning. Background Art
[0002] Flood forecasting refers to predicting information such as the occurrence, scale, and impact range of floods by analyzing and evaluating various hydrometeorological data such as rainfall, river flow, and terrain, as well as combining historical flood records, so as to provide a scientific basis for flood prevention and mitigation. Accurate flood forecasting is of great significance for protecting people's lives and property and reducing economic losses, and thus has always been one of the key research areas in hydrology. Traditional flood forecasting methods mainly rely on the experience and professional knowledge of hydrological experts. These methods have certain subjectivity and limitations, and require a large amount of time, manpower, and material resources. In recent years, with the continuous development and application of artificial intelligence technology, more and more researchers have begun to explore applying deep learning technology to flood forecasting to improve the prediction accuracy and efficiency. Deep learning technology can mine the deep information of hydrological data through means such as automatic learning and data mining, establish a prediction model, and achieve more accurate and rapid flood forecasting.
[0003] In recent years, deep learning technology has gradually achieved certain results in flood forecasting work. However, due to the domain adaptation problem in flood forecasting: there are significant differences in hydrological characteristics between different basins, directly applying a model trained in one basin to another basin often leads to a decline in performance. This domain shift phenomenon greatly limits the prediction performance of the model, resulting in the model being unable to fully mine the spatio-temporal characteristics inside hydrological data, having weak generalization ability, and being unable to accurately conduct flood forecasting for new basins. In addition, obtaining a large amount of labeled data for the target basin is usually expensive and time-consuming, which further exacerbates the domain adaptation challenge in flood forecasting. Therefore, how to effectively utilize source domain data to improve the flood forecasting performance of the target domain has become an important issue in current research. Summary of the Invention
[0004] Object of the Invention: Aiming at the deficiencies of the prior art, the object of the present invention is to propose a flood forecasting method and system based on conditional adversarial domain adaptation to more comprehensively and effectively solve the domain shift problem between different basins and improve the accuracy and robustness of cross-domain flood forecasting.
[0005] Technical Solution: To achieve the above object of the invention, a flood forecasting based on conditional adversarial domain adaptation according to the present invention includes the following steps:
[0006] Step 1: Load and preprocess the hydrological data of the source domain and the target domain, including data division and normalization.
[0007] Step 2: Construct a source domain model based on ResNet, which includes a feature extraction encoder and a runoff prediction head.
[0008] Step 3: Use the source domain data to pre-train the model, optimize the model parameters and save the best model.
[0009] Step 4: Design a target domain adaptation training model, including a pre-trained backbone network, a shared feature encoder, a regressor, and a conditional discriminator for adversarial training. At the same time, construct a model used in the test phase.
[0010] Step 5: Map the source domain and target domain data into the same space through a shared feature extractor, calculate their MMD distance, obtain the MMD loss, and thus perform feature alignment.
[0011] Step 6: Implement a conditional adversarial module based on multilinear mapping, combine the features and predictions to form a conditional input, calculate the conditional adversarial loss and update the discriminator.
[0012] Step 7: Combine multiple loss functions, including the MMD loss in Step 5, the conditional adversarial loss in Step 6, the regression loss, and the consistency loss, calculate the total generator loss and update the generator, and perform iterative training.
[0013] Step 8: Regularly evaluate the performance of the model on the test set, calculate multiple evaluation metrics and visualize the feature distribution. Save the trained model and apply it to new target domain data for flood forecasting.
[0014] Furthermore, in Step 1, the hydrological data including rainfall and runoff of two basins are used as the dataset of the source domain and the target domain respectively. Among them, the source domain dataset has a total of N samples, X i is the rainfall data input for the i-th time, is the historical runoff data input for the i-th time, Y i is the runoff data input for the (T + t)-th time, where t represents the prediction period, that is, the time difference between the input and the output; in addition, the target domain dataset has a total of M samples, X j is the rainfall data input for the j-th time, is the historical runoff data input for the j-th time.
[0015] Furthermore, in Step 2, ResNet is used as the basic network to construct a source domain model including an encoder and a prediction head. Among them, the encoder is used to extract the features of rainfall data, and the prediction head is used to predict the future runoff. At the same time, the mean square error (MSE) is used as the loss function to optimize the parameters of the source domain model. The MSE is defined as:
[0016]
[0017] Further, the step 4 includes the following steps:
[0018] Step 4.1: Design a target domain adaptation training model, including a pre-trained backbone network G (used as a feature extractor for both the source domain and the target domain), a shared feature encoder E, regressors P_s and P_t (for prediction in the source domain and the target domain), and a conditional discriminator D for adversarial training.
[0019] Step 4.2: Construct test_model as the model used in the test phase, whose backbone loads the weights of the target domain encoder G, and prediction_head uses the weights of the pre-trained model and freezes the weights.
[0020] Further, in the step 5, the source domain features and the target domain features are mapped to the same space through the shared feature extractor E, and according to the distance between the two in the space E, the MMD loss is calculated. In the training loop, this MMD loss is used to guide the feature alignment process. The calculation process is as follows:
[0021] L mmd = mmd_rbf(E(f source ), E(f target ))
[0022] where E(f source ) represents the encoding of the source domain feature f souurce by the shared feature extractor E, E(f target ) represents the encoding of the target domain feature f target by the shared feature extractor E, and the mmd_rbf function is defined as follows:
[0023]
[0024] where x and y are the features of the source domain and the target domain respectively, n s and n t are the corresponding number of samples, Φ(·) is the feature mapping function that maps the features to the Reproducing Kernel Hilbert Space (RKHS), and ||·|| H represents the norm in the RKHS.
[0025] Further, the step 6 includes the following steps:
[0026] Step 6.1: Construct a conditional discriminator D that receives the multilinear mapping T(f, g) as input, and its structure is:
[0027] D(T(f, g)) = σ(FC(Conv(T(f, g))))
[0028] Among them, Conv represents the convolution operation, FC represents the fully connected layer operation, and σ is the sigmoid activation function.
[0029] Step 6.2: Define a multilinear mapping function T on D to combine the feature representation f and the regressor prediction g into a conditional input:
[0030]
[0031] Among them, represents the multilinear mapping, To solve the problem of dimensional explosion, a randomization method is adopted to approximate the high-dimensional multilinear mapping:
[0032]
[0033] Among them, ⊙ represents the element-wise product, R f and R g are random matrices, and d is the output dimension.
[0034] Step 6.3: Calculate the loss of the conditional discriminator D and backpropagate to update the network parameters to minimize the discriminator loss, and its loss L D is defined as follows:
[0035]
[0036] Among them, D(T(h t )) represents the prediction of the discriminator for the conditional input of the target domain, and D(T(h s )) represents the prediction of the discriminator for the conditional input of the source domain. W GP is the weight of the gradient penalty term, represents the gradient of the discriminator for the conditional input.
[0037] Furthermore, in step 7, calculate the total loss of the generator, backpropagate to update the network parameters, minimize the adversarial loss of the generator, and perform iterative training. Its loss L G is defined as follows:
[0038]
[0039] Among them, and are the prediction errors of the source domain and the target domain calculated using MSE respectively. L consistency is the consistency error between the source domain and the target domain predictions measured using the L1 loss. λ mmd 、λ reg、 λ cons are the weight coefficients of the corresponding loss terms.
[0040] A flood forecasting method and system based on conditional adversarial domain adaptation, including:
[0041] A data preprocessing module, which is used to load and preprocess the hydrological data of the source domain and the target domain, including data partitioning and normalization, and construct training and test data sets;
[0042] A source domain model construction module, which is used to construct a source domain model based on ResNet, including a feature extraction encoder and a runoff prediction head, and pre-train the model using the source domain data, optimize the model parameters and save the best model;
[0043] A domain adaptation model design module, which is used to design a target domain adaptation training model, including a pre-trained backbone network, a shared feature encoder, a regressor, and a conditional discriminator for adversarial training, and construct a model used in the test phase;
[0044] A feature alignment module, which is used to map the source domain and target domain data to the same space through a shared feature extractor, calculate their MMD distance, obtain the MMD loss, and thus perform feature alignment;
[0045] A conditional adversarial module, which is used to implement conditional adversarial based on multilinear mapping, combine features and predictions to form a conditional input, calculate the conditional adversarial loss, and update the discriminator;
[0046] A multi-loss optimization module, which is used to combine multiple loss functions, including MMD loss, conditional adversarial loss, regression loss, and consistency loss, calculate the total generator loss, update the generator, and perform iterative training;
[0047] A model evaluation and application module, which is used to regularly evaluate the performance of the model on the test set, calculate multiple evaluation metrics, visualize the feature distribution, save the trained model, and apply it to new target domain data for flood forecasting.
[0048] The present invention provides a computer system, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, it implements the flood forecasting method based on conditional adversarial domain adaptation described above.
[0049] The present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements the flood forecasting method and system based on conditional adversarial domain adaptation described above.
[0050] Beneficial effects: The present invention provides a flood forecasting method and system based on conditional adversarial domain adaptation. In order to more accurately and effectively solve the domain shift problem between different basins, the present invention first establishes a conditional adversarial module based on multilinear mapping, combines features and predictions to form conditional inputs. Compared with traditional methods that only use features for domain adaptation, the model's fitting ability for multimodal distributions is greatly enhanced, and the domain adaptation effect is significantly improved. Secondly, the present invention introduces an entropy conditional mechanism to dynamically adjust sample weights according to the certainty degree of predictions, enabling the model to better focus on samples that are easy to transfer, thereby improving the efficiency and accuracy of domain adaptation. Finally, the present invention uses a multi-loss joint optimization module, combining MMD loss, consistency loss, conditional adversarial loss, and regression loss, comprehensively considering feature distribution alignment, prediction consistency, and task relevance, effectively improving the generalization ability and robustness of the network model, and greatly enhancing the accuracy of flood forecasting when the target domain data is limited, making its final results more reliable and practical. The method of the present invention can not only effectively utilize source domain knowledge but also adapt to the specific features of the target domain, providing a new solution for cross-basin flood forecasting, which is of great significance for improving the efficiency of water resource management and flood control and disaster reduction. Brief Description of the Drawings
[0051] Figure 1 is the overall flowchart of the embodiment of the present invention;
[0052] Figure 2 is the network structure diagram of the overall method of the present invention;
[0053] Figure 3 is the network structure diagram of the conditional adversarial module in the present invention. Detailed Embodiments
[0054] The following further clarifies the present invention in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. After reading the present invention, various equivalent forms of modification of the present invention by those skilled in the art all fall within the scope defined by the appended claims of this application.
[0055] As Figure 1 shown, a flood forecasting method based on conditional adversarial domain adaptation disclosed in the embodiment of the present invention mainly includes the following steps:
[0056] Step 1: Take the research basin as the target domain and the basin with sufficient data as the source domain. Load and preprocess the hydrological data of the source domain and the target domain, including data division and normalization.
[0057] Specifically, the data of the source domain and the target domain in Step 1 include rainfall and runoff. Specifically, the source domain dataset has a total of N samples, Xi is the rainfall data of the i-th input, is the historical runoff data of the i-th input, Y i is the runoff data of the (T + t)-th input, where t represents the prediction period, that is, the time difference between input and output; in addition, the target domain dataset has a total of M samples, X j is the rainfall data of the j-th input, is the historical runoff data of the j-th input.
[0058] Step 2: Use ResNet as the basic network to construct a source domain model containing an encoder and a prediction head. The encoder is used to extract the features of rainfall data, and the prediction head is used to predict future runoff. At the same time, use the mean square error (MSE) as the loss function to optimize the parameters of the source domain model. The MSE is defined as:
[0059]
[0060] Step 3: Use the source domain data to pre-train the model, optimize the model parameters and save the best model.
[0061] Step 4: Design a target domain adaptation training model, including a pre-trained backbone network, a shared feature encoder, a regressor, and a conditional discriminator for adversarial training. At the same time, construct a model used in the test phase. Step 4 includes the following steps:
[0062] Step 4.1: Design a target domain adaptation training model, including a pre-trained backbone network G (used as a feature extractor for both the source domain and the target domain), a shared feature encoder E, regressors P_s and P_t (for prediction in the source domain and the target domain), and a conditional discriminator D for adversarial training.
[0063] Step 4.2: Construct test_model as the model used in the test phase. Its backbone loads the weights of the target domain encoder G, and the prediction_head uses the weights of the pre-trained model and freezes the weights.
[0064] Step 5: Map the source domain features and the target domain features in the same space through the shared feature extractor E. According to the distance between the two in the space E, calculate the MMD loss. In the training loop, use this MMD loss to guide the feature alignment process. The calculation process is as follows:
[0065] L mmd = mmd_rbf(E(f source) , E(f target ))
[0066] where E(f souurce) represents the encoding of the source domain feature f by the shared feature extractor E source of, E(f target ) represents the encoding of the target domain feature f by the shared feature extractor E target , and the mmd_rbf function is defined as follows:
[0067]
[0068] where x and y are the features of the source domain and the target domain respectively, and n s and n t are the corresponding number of samples, Φ(·) is the feature mapping function that maps features to the Reproducing Kernel Hilbert Space (RKHS), and ||·|| H represents the norm in the RKHS.
[0069] Step 6: Implement a conditional adversarial module based on the multilinear mapping, combine the features and predictions to form a conditional input, calculate the conditional adversarial loss, and update the discriminator.
[0070] Step 6 includes the following steps:
[0071] Step 6.1: Construct a conditional discriminator D that receives the multilinear mapping T(f, g) as input, and its structure is:
[0072] D(T(f, g)) = σ(FC(Conv(T(f, g))))
[0073] where Conv represents the convolution operation, FC represents the fully connected layer operation, and σ is the sigmoid activation function.
[0074] Step 6.2: Define a multilinear mapping function T on D for combining the feature representation f and the regressor prediction g into a conditional input:
[0075]
[0076] where, represents the multilinear mapping, To solve the problem of dimensionality explosion, a randomization method is used to approximate the high-dimensional multilinear mapping:
[0077]
[0078] where ⊙ represents the element-wise product, R f and R g are random matrices, and d is the output dimension.
[0079] Step 6.3: Calculate the loss of the conditional discriminator D, and backpropagate to update the network parameters to minimize the discriminator loss, and its loss L D is defined as follows:
[0080]
[0081] where D(T(h t )) represents the discriminator's prediction for the target domain conditional input, and D(T(h s )) represents the discriminator's prediction for the source domain conditional input. W GP is the weight of the gradient penalty term, represents the gradient of the discriminator with respect to the conditional input.
[0082] Step 7: Calculate the total loss of the generator and backpropagate to update the network parameters, minimize the generator adversarial loss, and perform iterative training. Its loss LG is defined as follows:
[0083]
[0084] where and are the prediction errors of the source domain and the target domain calculated using MSE, respectively. L consiistency is the consistency error between the source domain and target domain predictions measured using the L1 loss. λ mmd , λ reg , λ cons are the weight coefficients of the corresponding loss terms.
[0085] Step 8: Regularly evaluate the performance of the model on the test set, calculate multiple evaluation metrics and visualize the feature distribution. Save the trained model and apply it to the target domain data for flood forecasting.
[0086] Based on the same inventive concept, a flood forecasting method based on conditional adversarial domain adaptation, characterized by comprising: a data preprocessing module for loading and preprocessing the hydrological data of the source domain and the target domain, including data partitioning and normalization, and constructing training and test data sets; a source domain model construction module for constructing a source domain model based on ResNet, including a feature extraction encoder and a runoff prediction head, and pre-training the model using the source domain data, optimizing the model parameters and saving the best model; a domain adaptation model design module for designing a target domain adaptation training model, including a pre-trained backbone network, a shared feature encoder, a regressor, and a conditional discriminator for adversarial training, and simultaneously constructing a model used in the test phase; a feature alignment module for mapping the source domain and target domain data into the same space through a shared feature extractor, calculating their MMD distance, obtaining the MMD loss and thus performing feature alignment; a conditional adversarial module for implementing conditional adversarial based on multilinear mapping, combining the features and predictions to form a conditional input, calculating the conditional adversarial loss and updating the discriminator; a multi-loss optimization module for combining multiple loss functions, including MMD loss, conditional adversarial loss, regression loss and consistency loss, calculating the total generator loss and updating the generator, and performing iterative training; a model evaluation and application module for periodically evaluating the performance of the model on the test set, calculating multiple evaluation metrics and visualizing the feature distribution, saving the trained model, and applying it to new target domain data for flood forecasting.
[0087] For the specific working processes of the above-described modules, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described herein again. The division of the modules is only a logical function division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system.
[0088] Based on the same inventive concept, a computer system disclosed in an embodiment of the present invention includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, it implements the above-mentioned flood forecasting method and system based on conditional adversarial domain adaptation.
[0089]
Claims
1. A flood forecasting method based on conditional adversarial domain adaptation, characterized in that, It includes the following steps: Step 1: Load and preprocess the hydrological data of the source domain and the target domain, including data partitioning and normalization. Step 2: Construct a source domain model based on ResNet, including a feature extraction encoder and a runoff prediction head. Step 3: Use the source domain data to pre-train the model, optimize the model parameters and save the best model. Step 4: Design a target domain adaptation training model, including a pre-trained backbone network, a shared feature encoder, a regressor, and a conditional discriminator for adversarial training. At the same time, construct a model used in the test phase. Step 5: Map the source domain and target domain data into the same space through a shared feature extractor, calculate their MMD distance, obtain the MMD loss, and thus perform feature alignment. Step 6: Implement a conditional adversarial module based on multilinear mapping, combine the features and predictions to form a conditional input, calculate the conditional adversarial loss, and update the discriminator. Step 7: Combine multiple loss functions, including the MMD loss in Step 5, the conditional adversarial loss in Step 6, the regression loss, and the consistency loss, calculate the total generator loss, and update the generator for iterative training. Step 8: Regularly evaluate the performance of the model on the test set, calculate multiple evaluation metrics, and visualize the feature distribution. Save the trained model and apply it to the target domain data for flood forecasting.
2. The flood forecasting method based on conditional adversarial domain adaptation according to claim 1, wherein, The hydrological data including rainfall and runoff of two river basins are used as the datasets of the source domain and the target domain respectively in Step 1. Among them, the source domain dataset has a total of N samples, and X i is the rainfall data input for the i-th time, is the historical runoff data input for the i-th time, and Y i is the runoff data input for the (T + t)-th time, where t represents the prediction period, that is, the time difference between the input and the output; in addition, the target domain dataset has a total of M samples, and X j is the rainfall data input for the j-th time, is the historical runoff data input for the j-th time.
3. A flood forecasting method based on conditional adversarial domain adaptation according to claim 1, characterized in that In Step 2, the source domain model is constructed as follows: Use ResNet as the basic network to construct a source domain model including an encoder and a prediction head. The encoder is used to extract the features of rainfall data, and the prediction head is used to predict the future runoff. At the same time, the mean square error (MSE) is used as the loss function to optimize the parameters of the source domain model. The MSE is defined as:
4. A flood forecasting method based on conditional adversarial domain adaptation according to claim 1, characterized in that, Step 4 includes the following steps: Step 4.1: Design a target domain adaptation training model, including a pre-trained backbone network G (used as a feature extractor for both the source domain and the target domain), a shared feature encoder E, regressors P_s and P_t (used for prediction in the source domain and the target domain), and a conditional discriminator D for adversarial training. Step 4.2: Construct test_model as the model used in the test phase. Its backbone loads the weights of the target domain encoder G, and the prediction_head uses the weights of the pre-trained model and freezes the weights.
5. A flood forecasting method based on conditional adversarial domain adaptation according to claim 1, characterized in that, In Step 5, the source domain features and the target domain features are mapped in the same space through the shared feature extractor E. According to the distance between the two in space E, calculate the MMD loss. In the training loop, use this MMD loss to guide the feature alignment process. The calculation process is as follows: L mmd = mmd_rbf(E(f source ), E(f target )) Among them, E(f source ) represents the encoding of the source domain feature f by the shared feature extractor E source , and E(f target ) represents the encoding of the target domain feature f by the shared feature extractor E target . The mmd_rbf function is defined as follows: where x and y are the features of the source domain and the target domain, respectively, n s and n t are the corresponding number of samples, Φ(·) is the feature mapping function that maps features to the Reproducing Kernel Hilbert Space (RKHS), ||·|| H denotes the norm in the RKHS.
6. A flood forecasting method based on conditional adversarial domain adaptation according to claim 1, characterized in that Step 6 includes the following steps: Step 6.1: Construct a conditional discriminator D that receives the multilinear mapping T(f, g) as input. Its structure is: D(T(f, g)) = σ(FC(Conv(T(f, g)))) where Conv represents the convolution operation, FC represents the fully connected layer operation, and σ is the sigmoid activation function. Step 6.2: Define a multilinear mapping function T on D, which is used to combine the feature representation f and the regressor prediction g into a conditional input: Among them, represents a multilinear mapping, To solve the problem of dimensionality explosion, a randomization method is adopted to approximate high-dimensional multilinear mappings: where ⊙ represents the element-wise product, R f and R g are random matrices, and d is the output dimension. Step 6.3: Calculate the loss of the conditional discriminator D and backpropagate to update the network parameters to minimize the discriminator loss, whose loss L D is defined as follows: Among them, D(T(h t )) represents the discriminator's prediction of the target domain conditional input, D(T(h s )) represents the discriminator's prediction of the source domain conditional input, W GP is the weight of the gradient penalty term, represents the gradient of the discriminator with respect to the conditional input.
7. A flood forecasting method based on conditional adversarial domain adaptation according to claim 1, characterized in that, Step 7 calculates the total loss of the generator, backpropagates to update the network parameters, minimizes the adversarial loss of the generator, and iteratively trains, with its loss L G defined as follows: wherein, and are the prediction errors of the source domain and the target domain calculated by MSE, respectively, and L consistency is the consistency error between the source domain and the target domain predictions measured by the L1 loss, and λ mmd , λ reg , λ cons are the weight coefficients of the corresponding loss terms.
8. A flood forecasting system based on conditional adversarial domain adaptation, characterized in that, It includes: A data preprocessing module, which is used to load and preprocess the hydrological data of the source domain and the target domain, including data division and normalization, and construct training and test data sets; A source domain model construction module, which is used to construct a source domain model based on ResNet, including a feature extraction encoder and a runoff prediction head, and pre-train the model using the source domain data, optimize the model parameters and save the best model; A domain adaptation model design module, which is used to design a target domain adaptation training model, including a pre-trained backbone network, a shared feature encoder, a regressor, and a conditional discriminator for adversarial training, and construct a model used in the test phase; A feature alignment module, which is used to map the source domain and target domain data into the same space through a shared feature extractor, calculate their MMD distance, obtain the MMD loss, and thus perform feature alignment; A conditional adversarial module, which is used to implement conditional adversarial based on multilinear mapping, combine features and predictions to form conditional inputs, calculate the conditional adversarial loss and update the discriminator; A multi-loss optimization module, which is used to combine multiple loss functions, including MMD loss, conditional adversarial loss, regression loss and consistency loss, calculate the total generator loss and update the generator, and perform iterative training; A model evaluation and application module, which is used to regularly evaluate the performance of the model on the test set, calculate multiple evaluation metrics and visualize the feature distribution, save the trained model, and apply it to new target domain data for flood forecasting.
9. A computer system, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the computer program is loaded into the processor, it implements a flood forecasting method based on conditional adversarial domain adaptation according to any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements a flood forecasting method based on conditional adversarial domain adaptation according to any one of claims 1-7.