An AI agent-based waterlogging forecast auxiliary generation method and system

CN123012022APending Publication Date: 2026-10-30GUANGDONG GUANGYU SCI & TECH DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611508973.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

每次预报前,用户需要通过界面表单逐一填写或选择各项参数,操作繁琐、耗时长

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012022A_ABST
    Figure CN123012022A_ABST
Patent Text Reader

Abstract

The application relates to the field of intelligent water affairs and artificial intelligence technology, and provides an inner waterlogging forecast auxiliary generation method and system based on an AI intelligent agent, which comprises the following steps: after identifying the inner waterlogging forecast intention of a user, converting an inner waterlogging forecast instruction and a forecast parameter into a query vector, performing similarity retrieval, obtaining a candidate knowledge segment, scoring and reordering the candidate knowledge segment, and outputting the most relevant knowledge segment; taking the most relevant knowledge segment and the inner waterlogging forecast instruction as input prompt words, generating complete parameters required by an inner waterlogging forecast model, and performing structural processing to obtain structured forecast parameters; inputting the structured forecast parameters into the inner waterlogging forecast model; and after completing inner waterlogging simulation operation, generating a forecast result of all inner waterlogging risk points in a forecast range. The application can automatically complete the intelligent process of inner waterlogging forecast model parameter configuration, shortens the parameter configuration time from minutes to seconds, and significantly improves the operation efficiency of inner waterlogging forecast.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of smart water management and artificial intelligence technology. Specifically, it relates to a method and system for assisting in the generation of urban flood forecasts based on AI intelligent agents. In particular, it relates to the intelligent generation and multi-dimensional visualization of urban flood forecasts in urban flood management scenarios by utilizing large language models, retrieval-enhanced generation technology, hydrological and hydrodynamic model coupling, and workflow orchestration technology. Background Technology

[0002] Currently, there are several existing technical solutions related to this invention in the field of urban flooding forecasting. Regarding flooding forecasting models, existing technologies have proposed real-time urban flooding forecasting methods and systems. These methods collect rainfall and meteorological forecast data, utilize hydrological and hydrodynamic coupling models to perform flooding simulation calculations, and generate flooding forecast results. Other existing technologies involve urban flooding forecasting methods based on deep learning coupled with hydrological models, improving the accuracy and efficiency of flooding forecasts through deep learning models. Furthermore, existing technologies have disclosed machine learning-based flooding risk prediction methods, using historical flooding data and rainfall data to train prediction models.

[0003] In existing technologies, the operation of urban flooding forecasting models requires users to manually configure a large number of parameters, including forecast range, forecast rainfall, lead time, and forecast step size. Before each forecast, users need to fill in or select each parameter one by one through an interface form, which is cumbersome and time-consuming. The efficiency bottleneck of manual operation is particularly prominent when it is necessary to frequently adjust the forecast scenario for comparison of multiple scenarios. Therefore, existing technologies lack an intelligent mechanism that can automatically complete the configuration of model parameters through natural language commands. Summary of the Invention

[0004] To achieve fully intelligent operation of urban flood forecasting, this invention provides an AI-based method and system for assisting in the generation of urban flood forecasts. The specific technical solution is as follows: A method for assisting in the generation of urban flood forecasts based on AI intelligent agents includes the following steps: S1 receives the flood forecast command input by the user, performs semantic parsing and intent recognition, and extracts the forecast parameters required by the flood forecast model; S2. After recognizing the user's intention to forecast waterlogging, the waterlogging forecast command and forecast parameters are converted into a high-dimensional vector representation to obtain a query vector. Based on the query vector, a similarity search is performed in the vector database of the local water conservancy knowledge base to obtain several candidate knowledge fragments related to waterlogging forecast. Each candidate knowledge fragment is scored and reordered according to the score, and the top N most relevant knowledge fragments are output. S3 uses the top N most relevant knowledge fragments and waterlogging forecast instructions as input prompts to generate the complete parameters required for the waterlogging forecast model and perform structured processing to obtain structured forecast parameters. S4, call the urban flooding forecast model and input the structured forecast parameters into the urban flooding forecast model to perform urban flooding simulation calculation; S5, after the waterlogging forecast model completes the waterlogging simulation calculation, it generates forecast results for all waterlogging risk points within the forecast range.

[0005] The AI-based intelligent agent-assisted flood forecast generation method automatically extracts and generates all parameters required for the flood forecast model by semantically understanding user natural language commands. It then automatically invokes the flood forecast model to complete flood simulation calculations, obtaining forecast results for all flood risk points within the forecast area. Compared to existing technologies that require users to manually fill in parameters item by item through an interface form, this invention automatically completes the intelligent process of configuring flood forecast model parameters, reducing parameter configuration time from minutes to seconds, significantly improving the operational efficiency of flood forecasting.

[0006] Preferably, S1 specifically includes: S11, obtains the waterlogging forecast command input by the user in natural language text through the large language model interaction module; S12: Identify whether the flood forecast command is intended to forecast flooding. If so, extract the forecast parameters required by the flood forecast model from the flood forecast command and jump to S2. If not, proceed to the general question and answer process or prompt the user to re-enter the information. S13, combining the contextual information from multiple rounds of dialogue, completes the information omitted or implied in the urban flooding forecast instructions.

[0007] Preferably, S2 specifically includes: S21. After identifying the user's intention to forecast flooding, the flooding forecast command and forecast parameters are converted into a high-dimensional vector representation using the Embedding model to obtain the query vector. S22, Based on the query vector, perform similarity retrieval in the vector database of the local water conservancy knowledge base to obtain several candidate knowledge fragments related to urban flooding forecast; S23: Input several candidate knowledge fragments into the Reranker module, score each candidate knowledge fragment, re-rank the candidate knowledge fragments according to the scores, and output the top N most relevant knowledge fragments.

[0008] Preferably, S3 specifically includes: S31: The top N most relevant knowledge fragments and flood forecast instructions are used as input prompt words and input into the large language model. Based on the explicit parameters directly extracted from the user instructions, the implicit parameters completed based on the most relevant knowledge fragments, and the automatically obtained supplementary parameters, the complete parameters required by the flood forecast model are generated. S32, the automatic forecast parameter generation module performs structured processing on the complete parameters to obtain structured forecast parameters.

[0009] Preferably, S4 specifically includes: S41, the automatic forecast parameter generation module passes the obtained structured forecast parameters to the waterlogging forecast model calling module, which then calls the waterlogging forecast model of the smart water management platform and fills the structured forecast parameters into the input interface of the waterlogging forecast model to perform waterlogging simulation calculations; S42, during the urban flooding simulation calculation, the progress display module obtains the calculation progress information of the urban flooding forecast model in real time and displays it dynamically in the form of a progress bar on the user interface.

[0010] Preferably, the method for assisting in the generation of urban flood forecasts based on AI agents further includes the following steps: Display a list of urban flooding forecast results; And / or, to display the results of urban flooding forecasts on maps; And / or, conduct statistical analysis of the results of urban flooding forecasts; And / or, export the results of urban flooding forecasts.

[0011] Preferably, S12 specifically includes S121, a pre-set business keyword library related to urban flooding forecast is set up, and the urban flooding forecast command is segmented. If the segmented urban flooding forecast command hits any keyword in the business keyword library, it is determined to be an urban flooding forecast intention. S122, if the waterlogging forecast instruction after word segmentation does not match any keyword in the business keyword library, the waterlogging forecast instruction is converted into a vector and its cosine similarity is calculated with the preset waterlogging forecast intent standard template vector. If the cosine similarity exceeds the preset threshold, it is determined to be a waterlogging forecast intent.

[0012] Preferably, S41 specifically includes: S411: Obtain forecasted rainfall, maximum soil water holding capacity, and initial loss; and obtain runoff depth based on forecasted rainfall, maximum soil water holding capacity, and initial loss. S412, the calculation coefficients are obtained based on the flood propagation time of the river section, and the upstream section flow and the inflow at the beginning and end of the time period are weighted and integrated based on the calculation coefficients to obtain the downstream section flow; S413 uses the DEM grid within the forecast range as the basic topographic data, combines the spatial distribution of the drainage network and the designed drainage capacity to obtain the net runoff of each grid node, and obtains the water depth and degree of flooding at the flood point based on the net runoff.

[0013] Preferably, in S23, scoring each candidate knowledge fragment specifically includes: S231, obtain the overall similarity between candidate knowledge fragments and urban flooding forecast instructions in terms of text semantics, and obtain a semantic matching score based on the overall similarity; S232, Construct a keyword list for the field of urban flooding forecasting, obtain the hit density and level of candidate knowledge fragments for the field keywords based on the keyword list for urban flooding forecasting, and obtain the field matching score based on the hit density and level; S233, based on the spatial range and temporal characteristics of urban flooding forecasts, matches the spatiotemporal range of candidate knowledge fragments to obtain a spatiotemporal matching score; S234, For candidate knowledge fragments of historical flooding cases, calculate the similarity between the working conditions of historical flooding cases and the current forecast scenario, and obtain the case fit score; S235, the semantic matching score, domain matching score, spatiotemporal matching score and case suitability score are weighted and fused to obtain the candidate knowledge fragment score.

[0014] A system for assisting in the generation of urban flood forecasts based on AI agents, used to implement the aforementioned method for assisting in the generation of urban flood forecasts based on AI agents, includes: The large language model interaction module is used to receive user input of waterlogging forecast commands, perform semantic parsing and intent recognition, and extract the forecast parameters required by the waterlogging forecast model. The Embedding model is used to convert the flood forecast instructions and forecast parameters into a high-dimensional vector representation after recognizing the user's intention to forecast flooding, obtain a query vector, and perform similarity retrieval in the vector database of the local water conservancy knowledge base based on the query vector to obtain several candidate knowledge fragments related to flood forecasting. The Reranker module is used to score each candidate knowledge fragment and re-rank the candidate knowledge fragments according to the scores, and output the top N most relevant knowledge fragments. The large language model is used to generate the complete parameters required for the flood forecasting model by taking the top N most relevant knowledge fragments and flood forecasting instructions as input prompt words. The automatic forecast parameter generation module is used to perform structured processing on complete parameters to obtain structured forecast parameters; The urban flooding forecasting model is used to perform urban flooding simulation calculations using structured forecast parameters as input, and generate forecast results for all urban flooding risk points within the forecast range. Attached Figure Description

[0015] The invention will be further understood from the following description taken in conjunction with the accompanying drawings. The components in the drawings are not necessarily drawn to scale, but rather the emphasis is on illustrating the principles of the embodiments. In different views, the same reference numerals designate corresponding parts.

[0016] Figure 1 This is a schematic diagram of the overall process of an AI-based intelligent agent-assisted generation method for urban flood forecasting in one embodiment of the present invention; Figure 2 This is a flowchart illustrating the specific method of step S1 in one embodiment of the present invention; Figure 3 This is a flowchart illustrating the specific method of step S2 in one embodiment of the present invention; Figure 4 This is a flowchart illustrating the specific method of step S3 in one embodiment of the present invention; Figure 5 This is a flowchart illustrating the specific method of step S4 in one embodiment of the present invention; Figure 6 This is a flowchart illustrating the specific method of step S12 in one embodiment of the present invention; Figure 7 This is a flowchart illustrating the specific method of step S23 in one embodiment of the present invention; Figure 8 This is a flowchart illustrating the specific method of step S41 in one embodiment of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to its embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of the invention.

[0018] like Figure 1 As shown, an embodiment of the present invention provides a method for assisting in the generation of urban flood forecasts based on AI intelligent agents, comprising the following steps: S1 receives the flood forecast command input by the user, performs semantic parsing and intent recognition, and extracts the forecast parameters required by the flood forecast model.

[0019] As a preferred technical solution, such as Figure 2 As shown, S1 specifically includes: S11 obtains the flood forecast command input by the user in natural language text through the large language model interaction module.

[0020] Specifically, users can input flood forecast commands in natural language text format through the large language model interaction module. The forms of user-input flood forecast commands include, but are not limited to, the following typical scenarios: Forecast queries for a single flooding point: such as "Query the water depth forecast for the flooding point on XX Street for the next 12 hours"; Forecast queries for specific areas: such as "Flooding forecast for area XX in the next 24 hours"; In addition, for multi-point forecast queries: such as "Please generate flood forecasts for all flood-prone areas in XX city for the next 6 hours".

[0021] This invention utilizes a large language model to flexibly understand natural language commands, enabling it to adapt to various forecast query scenarios. It supports precise forecast queries for individual water accumulation points, regional forecast queries for entire areas, and comprehensive forecast queries for administrative divisions. Users can obtain targeted forecast results simply by inputting natural language in different scenarios, without needing to learn complex system operations.

[0022] S12: Identify whether the flood forecast command is intended to predict flooding. If so, extract the forecast parameters required by the flood forecast model from the flood forecast command and jump to S2. If not, proceed to the general question and answer process or prompt the user to re-enter the information.

[0023] Specifically, the intent is first categorized to identify whether the user's command belongs to the "flood forecast" intent. If it does, the forecast process begins; otherwise, the user is redirected to a general Q&A process or prompted to re-enter the information.

[0024] Extract key forecast parameters required by the forecast model from the user's forecast instructions, including but not limited to forecast range, forecast rainfall, lead time, forecast step size, and forecast scenario.

[0025] Forecast range: such as "XX Zhongjie" (single point), "XX area" (area), "XX city" (administrative division), etc.; Forecast rainfall: if the user does not specify rainfall conditions in the instruction, the system will automatically complete it based on the current meteorological forecast data or historical rainfall scenarios; Forecast period: such as "future 12 hours", "future 24 hours", etc.; Forecast step size: the system automatically determines the appropriate forecast step size according to the length of the forecast period (such as hourly step for a 12-hour forecast period, hourly step for a 24-hour forecast period, or three-hour step); Forecast scenario: such as "routine forecast" or "emergency forecast", etc.

[0026] like Figure 6 As shown, S12 specifically includes S121, a pre-set business keyword library related to urban flooding forecast is set up, and the urban flooding forecast command is segmented. If the segmented urban flooding forecast command matches any keyword in the business keyword library, it is determined to be an urban flooding forecast intention.

[0027] S122, if the waterlogging forecast instruction after word segmentation does not match any keyword in the business keyword library, the waterlogging forecast instruction is converted into a vector and its cosine similarity is calculated with the preset waterlogging forecast intent standard template vector. If the cosine similarity exceeds the preset threshold, it is determined to be a waterlogging forecast intent.

[0028] Specifically, the identification of the intent to issue a flood forecast employs a two-tiered strategy: keyword rule matching and semantic similarity calculation. A pre-built database of business keywords related to flood forecasting is established, including but not limited to flood forecast, waterlogging forecast, water depth forecast, flood prediction, forecasted flooding, waterlogging depth, lead time, and forecast range. After segmenting the user's input flood forecast command, if any keyword is matched, it is preliminarily determined to be an intent to issue a "flood forecast."

[0029] For vague expressions with similar meanings but no matching keywords, such as "Which areas will be flooded in the next few hours" or "Please check the flood situation tomorrow," the system uses an embedding model to convert user input into a vector and calculates cosine similarity with a preset "flood forecast" intent template vector. If the similarity exceeds a preset threshold, such as 0.75, it is also classified as a "flood forecast" intent.

[0030] If either of the above two levels passes, the process proceeds to the forecasting process, where subsequent operations such as extracting key forecasting parameters and calling models are performed. If neither passes, the process proceeds to the general Q&A process or returns a guidance prompt such as "For urban flooding forecasts, please provide information such as the forecast range and time."

[0031] S13, combining the contextual information from multiple rounds of dialogue, completes the information omitted or implied in the urban flooding forecast instructions.

[0032] It can combine contextual information from multiple rounds of dialogue to complete information omitted or implied in user commands. For example, if the user has mentioned a specific area in the previous round of dialogue, and the user enters "What about the next 12 hours?" in this round, the system will automatically complete the query to provide a forecast for that area for the next 12 hours.

[0033] S2, after recognizing the user's intention to forecast waterlogging, converts the waterlogging forecast command and forecast parameters into a high-dimensional vector representation to obtain a query vector. Based on the query vector, a similarity search is performed in the vector database of the local water conservancy knowledge base to obtain several candidate knowledge fragments related to waterlogging forecast. Each candidate knowledge fragment is scored and reordered according to the score, and the top N most relevant knowledge fragments are output.

[0034] As a preferred technical solution, such as Figure 3 As shown, S2 specifically includes: S21. After identifying the user's intention to forecast flooding, the flooding forecast command and forecast parameters are transformed into a high-dimensional vector representation using the Embedding model to obtain the query vector.

[0035] S22, based on the query vector, perform similarity retrieval in the vector database of the local water conservancy knowledge base to obtain several candidate knowledge fragments related to urban flooding forecast.

[0036] S23: Input several candidate knowledge fragments into the Reranker module, score each candidate knowledge fragment, re-rank the candidate knowledge fragments according to the scores, and output the top N most relevant knowledge fragments.

[0037] Specifically, the Embedding model is used to transform the user flooding preparation instructions and forecast parameters extracted in step S1 into a high-dimensional vector representation, resulting in a query vector. A similarity search is then performed in the vector database of the local water resources knowledge base to retrieve several knowledge document fragments related to flooding forecasting, including forecasting standards, historical forecast cases, and knowledge about the relationship between rainfall and flooding.

[0038] The candidate knowledge fragments obtained from the initial retrieval are input into the Reranker re-ranking module, which performs fine scoring and re-ranking through the Cross-Encoder architecture, and outputs the top N (e.g., N=5) most relevant knowledge fragments to help the large language model accurately understand the meaning of the prediction parameters and the standard requirements for model invocation.

[0039] More specifically, the key forecast parameters extracted in step S1, such as forecast range, lead time, forecast step size, rainfall scenario, and forecast scenario type, can be converted into standardized domain description text and concatenated with the user's original urban flooding forecast command to form a complete query sequence. Simultaneously, for each candidate knowledge fragment, its main text content and metadata fields such as knowledge type, applicable area, release time, and associated forecast model type are concatenated to obtain a document sequence. Finally, the query sequence and the candidate document sequence are concatenated again to form the final input sequence of the Cross-Encoder, and fine scoring and re-ranking are performed based on the Cross-Encoder architecture.

[0040] like Figure 7 As shown in S23, the scoring of each candidate knowledge fragment specifically includes: S231, obtain the overall similarity between candidate knowledge fragments and urban flooding forecast instructions in terms of text semantics, and obtain a semantic matching score based on the overall similarity.

[0041] The semantic matching score is between 0 and 1, and is mainly used to capture the overall matching relationship at the lexical, syntactic and semantic levels.

[0042] S232, construct a keyword list for the field of urban flooding forecasting, obtain the hit density and level of candidate knowledge fragments for the field keywords based on the keyword list for urban flooding forecasting, and obtain the field matching score based on the hit density and level.

[0043] The domain matching score ranges from 0 to 1. Domain terminology attention masks can be added to the attention layer of the Cross-Encoder to dynamically enhance the attention weights of core professional terms such as "rainstorm intensity formula," "runoff generation and concentration calculation," "recurrence period," and "pipeline drainage capacity," thereby improving the matching priority of these professional terms. Hit density and hierarchy can be normalized and weighted to obtain the domain matching score, which primarily targets and strengthens the matching of professional terms and regulations in the field of water conservancy and urban flooding, addressing the problem of general models' misunderstanding of professional terms.

[0044] S233, based on the spatial range and temporal characteristics of urban flooding forecasts, matches the spatiotemporal range of candidate knowledge fragments to obtain a spatiotemporal matching score.

[0045] The spatiotemporal matching score ranges from 0 to 1, primarily targeting the spatial scope and temporal characteristics of the forecast to match the applicable spatiotemporal scope of knowledge fragments. This addresses the issue of general retrieval prioritizing semantics over context, avoiding candidate knowledge fragments that are semantically related but completely mismatched with the business scenario. Specifically, the applicable region, applicable time period, and rainfall type tags in the knowledge fragment's metadata are first parsed. Then, a structured match is performed with the current forecast's spatial scope, lead time, and rainfall scenario. For example, a forecast for XX city area prioritizes matching flooding cases in XXX region, a flood season forecast prioritizes matching historical flood season cases, and an emergency forecast prioritizes matching emergency response-related knowledge, etc.

[0046] S234. For candidate knowledge fragments of historical flooding cases, calculate the similarity between the working conditions of historical flooding cases and the current forecast scenario, and obtain the case fit score.

[0047] This method only applies to historical flooding case studies, calculating the similarity between the case study's conditions and the current forecast scenario to provide a historical basis for parameter generation. For example, by extracting characteristic parameters such as total rainfall, rainfall duration, topography, pipeline density, and underlying surface type from the case study, and performing cosine similarity calculations with the current forecast rainfall parameters and underlying surface parameters of the forecast area, a case fit score that can be used to quantify the case study's reference value can be obtained.

[0048] S235, the semantic matching score, domain matching score, spatiotemporal matching score and case suitability score are weighted and fused to obtain the candidate knowledge fragment score.

[0049] The weighting of semantic matching score, domain matching score, spatiotemporal matching score, and case suitability score can be adjusted based on the forecast scenario. For example, in emergency forecast scenarios, the weighting of domain matching score and spatiotemporal matching score can be increased, prioritizing matching with current standards and recent similar cases; in regular forecast scenarios, the weighting of semantic matching score can be increased.

[0050] S3 uses the top N most relevant knowledge fragments and flood forecast instructions as input prompts to generate the complete parameters required for the flood forecast model and performs structured processing to obtain structured forecast parameters.

[0051] As a preferred technical solution, such as Figure 4 As shown, S3 specifically includes: S31 uses the top N most relevant knowledge fragments and flood forecast instructions as input prompts, inputs them into the large language model, and generates the complete parameters required by the flood forecast model based on the explicit parameters directly extracted from the user instructions, the implicit parameters completed based on the most relevant knowledge fragments, and the automatically obtained supplementary parameters.

[0052] S32, the automatic forecast parameter generation module performs structured processing on the complete parameters to obtain structured forecast parameters.

[0053] Explicit parameters include forecast range and lead time, while implicit parameters include recommended values ​​for forecast step size and forecast scenario type. Supplementary parameters include current weather forecast data and historical rainfall data for the same period.

[0054] The automatic forecast parameter generation module structures the above complete parameters into a standard input format for the urban flooding forecast model, including but not limited to: urban flooding forecast range (represented by spatial boundary coordinates or a list of urban flooding points), forecast rainfall conditions (rainfall amount, rainfall intensity, rainfall duration, etc.), and forecast scenarios (forecast period length, forecast step size, and scenario type identifier).

[0055] This invention employs a two-stage retrieval strategy combining vector retrieval and Reranker reordering to ensure that the large language model receives high-quality professional knowledge support when understanding user forecasting needs and generating model parameters, thereby improving the accuracy of parameter generation and the standardization of model invocation.

[0056] S4 calls the urban flooding forecast model and inputs the structured forecast parameters into the urban flooding forecast model to perform urban flooding simulation calculations.

[0057] The automatic forecast parameter generation module passes structured forecast parameters to the urban flooding forecast model invocation module. This module calls the urban flooding forecast model of the smart water management platform through a standard API interface, fills the parameters into the model input interface, and starts the model calculation.

[0058] The urban flooding forecasting model performs urban flooding simulation calculations based on input forecast parameters. The core calculation logic of the model includes surface runoff calculation based on forecast rainfall data, runoff calculation based on urban topography and drainage network data, and calculation of water depth and flooding severity at each flooding point based on surface water accumulation simulation.

[0059] As a preferred technical solution, such as Figure 5 As shown, S4 specifically includes: S41, the automatic forecast parameter generation module passes the obtained structured forecast parameters to the urban flooding forecast model calling module, which then calls the urban flooding forecast model of the smart water management platform and fills the structured forecast parameters into the input interface of the urban flooding forecast model to perform urban flooding simulation calculations.

[0060] like Figure 8 As shown, S41 specifically includes: S411: Obtain forecasted rainfall, maximum soil water holding capacity, and initial water loss; obtain runoff depth based on forecasted rainfall, maximum soil water holding capacity, and initial water loss.

[0061] In this invention, surface runoff is calculated using the SCS-CN (Soil Conservation Service Curve Number) method, with the formula: R = (P - Ia) 2 / (P-Ia+S), where R is the runoff depth, P is the forecast rainfall, S is the soil maximum water holding capacity (calculated from the CN value: S=25400 / CN-254), and Ia is the initial loss (Ia=0.2S). Different underlying surfaces (roads, green spaces, roofs, etc.) correspond to different CN values. The system assigns weights based on land use types within the flood forecast area to calculate the weighted comprehensive runoff depth, providing input for subsequent runoff calculations.

[0062] Runoff is positive when rainfall exceeds initial loss; otherwise, it is zero. Initial loss can be understood as the total loss before rainfall generates surface runoff, including all water loss in the initial stages such as vegetation interception, surface filling, and soil infiltration. CN is a dimensionless comprehensive parameter reflecting the runoff characteristics of the underlying surface, ranging from 0 to 100. The higher the value, the easier it is for the underlying surface to generate runoff.

[0063] Because the traditional SCS-CN formula is derived from empirical statistics of agricultural watersheds, its direct application to urban areas suffers from drawbacks such as an excessively high proportion of initial losses and coarse underlying surface grain size. Preferably, to address the needs of urban scenarios for urban flood forecasting, the aforementioned SCS-CN model is improved, yielding the urban total surface runoff R1 = (Pt - Ia1). 2 / (Pt-Ia1+S1).

[0064] Wherein, Pt represents the time-period rainfall corresponding to the forecast step, to match the 1-hour, 3-hour, and other urban flooding forecast time steps, to realize the calculation of the time-period runoff process; Ia1 represents the product between the urban initial loss coefficient and the urban comprehensive maximum water holding capacity S1. The urban initial loss coefficient is determined based on the underlying surface type and is proportional to the permeability. For impermeable underlying surfaces such as expressways and roofs, the value can be 0.05-0.1; for semi-permeable underlying surfaces such as hard plazas and sidewalks, the value can be 0.1-0.15; and for permeable underlying surfaces such as parks, green spaces, and farmland, the value can be 0.15-0.2.

[0065] The specific methods for obtaining the city's comprehensive maximum water holding capacity S1 include: firstly, dividing the urban underlying surface into more than 8 categories, such as expressways, main and secondary roads, branch roads, building roofs, hard plazas, parks and green spaces, farmland, and water bodies, and matching a corresponding benchmark CN value for each category. Then, the benchmark CN value is corrected based on the cumulative rainfall in the previous 72 hours to obtain the city's comprehensive maximum water holding capacity S1. For example, the urban soil moisture can be divided into three levels: arid, normal, and wet, based on the cumulative rainfall in the previous 72 hours. In the normal level, the benchmark CN value is used as the city's comprehensive maximum water holding capacity. In the wet level, the benchmark CN value is increased by 5%-15% to obtain the city's comprehensive maximum water holding capacity, so as to reflect the enhanced runoff capacity after the soil is saturated. Correspondingly, in the arid level, the benchmark CN value is decreased by 5%-15% to obtain the city's comprehensive maximum water holding capacity.

[0066] The definition of urban net surface runoff is: Net surface runoff depth = Total urban surface runoff - Drainage efficiency coefficient of the pipe network × Design drainage capacity of the pipe network per unit area × Forecast step. Here, the net surface runoff depth is the actual depth of runoff that remains on the surface and forms water accumulation after deducting the drainage capacity of the pipe network. The drainage efficiency coefficient reflects the combined efficiency of regional stormwater inlet collection and the drainage capacity of the pipe network, and its value ranges from 0 to 1.

[0067] S412: The calculation coefficients are obtained based on the flood propagation time of the river section. The upstream section flow and the inflow at the beginning and end of the time period are weighted and integrated based on the calculation coefficients to obtain the downstream section flow.

[0068] For example, in this invention, the confluence calculation adopts the Muskingum method to perform river confluence calculation. The calculation formula is: Q2=C0×I2+C1×I1+C2×Q1, where Q1 and Q2 are the upstream and downstream cross-sectional flows, I1 and I2 are the inflows at the beginning and end of the time period, and C0, C1, and C2 are calculation coefficients, which are calculated by the river flood propagation time K and the flow weight factor x: C0=(-K×x+0.5×Δt) / (KK×x+0.5Δt), C1=(K×x+0.5×Δt) / (KK×x+0.5×Δt), C2=(KK×x-0.5×Δt) / (KK×x+0.5×Δt), and C0+C1+C2=1. The surface runoff calculation results are used as the inflow input for the interval, and the calculation is performed step by step along the river network to finally output the flow and water level processes of each forecast section.

[0069] S413 uses the DEM grid within the forecast range as the basic topographic data, combines the spatial distribution of the drainage network and the designed drainage capacity to obtain the net runoff of each grid node, and obtains the water depth and degree of flooding at the flood point based on the net runoff.

[0070] In this invention, the water depth at each flood-prone point is calculated based on a coupled calculation of a DEM (Digital Elevation Model) and the carrying capacity of the drainage network. Specifically, the DEM grid within the forecast range is used as the basic topographic data. Combined with the spatial distribution of the drainage network and the designed drainage capacity (including pipe diameter, slope, and pumping rate), the net catchment volume (total runoff minus the network's drainage capacity) of each grid node is calculated. The formula for calculating water depth is: H = (Q_in × Δt - Q_out × Δt) / A, where Q_in is the inflow rate to the grid node, Q_out is the drainage flow rate from the pipes, Δt is the calculation step size, and A is the catchment area of ​​the node. When the accumulated water volume exceeds the water storage capacity of the depression at that node, surface water accumulates.

[0071] The degree of waterlogging is classified according to the calculated water depth: a depth ≥15cm is considered general waterlogging, ≥30cm is considered severe waterlogging, and no water accumulation is considered no waterlogging. Water overflow is distributed between grids using DEM elevation data, with water flowing from high to low. The final output shows the water depth and waterlogging level of each waterlogged point in its respective grid.

[0072] S42, during the urban flooding simulation calculation, the progress display module obtains the calculation progress information of the urban flooding forecast model in real time and displays it dynamically in the form of a progress bar on the user interface.

[0073] During model computation, the computation progress information can be obtained in real time through the progress display module and dynamically displayed in the user interface in the form of a progress bar, so that users can intuitively understand the progress status of the model computation and reduce the anxiety caused by long-term computation.

[0074] S5, after the waterlogging forecast model completes the waterlogging simulation calculation, it generates forecast results for all waterlogging risk points within the forecast range.

[0075] After the urban flooding forecast model is completed, the forecast results for all urban flooding risk points within the forecast range are returned via API. The returned forecast results data includes, but is not limited to, the following fields: Forecasted flood-prone areas: e.g., "XX Middle Street"; Spatial location coordinates: longitude and latitude of the flooded point; Forecast of flooding severity: divided into three levels: "severe flooding", "moderate flooding", and "no flooding". Forecast time: The valid time corresponding to the forecast result; Forecast water depth: The predicted water depth value and unit.

[0076] For example, for the command "Query the water depth forecast for the flooded area on XX Middle Street for the next 12 hours", the model returns forecast results including the name of the flooded area, the predicted maximum water depth, and the time of the maximum water accumulation. For area forecast queries, the model returns a list of forecast results for all flood-prone areas within the area.

[0077] In summary, the AI-based intelligent agent-assisted flood forecast generation method automatically extracts and generates all parameters required for the flood forecast model by semantically understanding user natural language commands, and automatically calls the flood forecast model to complete flood simulation calculations, obtaining forecast results for all flood risk points within the forecast area. Compared to existing technologies that require users to manually fill in parameters item by item through an interface form, this invention can automatically complete the intelligent process of configuring flood forecast model parameters, reducing parameter configuration time from minutes to seconds, significantly improving the operational efficiency of flood forecasting.

[0078] In one embodiment, the method for generating waterlogging forecasts based on AI agents further includes the following steps: displaying a list of waterlogging forecast results; and / or displaying a map of the waterlogging forecast results; and / or performing statistical analysis of the waterlogging forecast results; and / or exporting the waterlogging forecast results.

[0079] Specifically, the forecast results list display module displays the forecast results obtained in step S5 in a list format, and supports the following two display modes.

[0080] Mode 1: System Interface Display. The forecast results are displayed in a standardized list interface within the "Four Forecasts for Water Security" module of the smart water management platform. The list contains forecast information for all flood-prone areas, including fields such as ranking, name of flood-prone area, predicted maximum water depth, and time of maximum water accumulation.

[0081] Mode 2: Interactive Interface Display. The forecast results are simultaneously output as a table in the user interface of the large language model, serving as a question-and-answer response. The table content is consistent with the system interface display, and includes a forecast summary and travel suggestions generated by the agent.

[0082] The data sources for both display modes are consistent, ensuring that the forecast information obtained by users is synchronized and accurate regardless of which interface they view it on.

[0083] Here, the present invention supports the simultaneous display of forecast results in list / table format on both the smart water management platform interface and the large language model interactive interface. Furthermore, the output in the interactive interface includes not only data tables but also forecast summaries and travel suggestions automatically generated by the intelligent agent, which improves the readability and practicality of the forecast results.

[0084] The forecast results map display module spatially displays the forecast results on a GIS map, allowing users to intuitively understand the distribution of forecasted urban flooding. Specifically, it includes: (1) Multi-element hierarchical representation. The map needs to display the forecast results of all predicted waterlogging points, as well as related basic geographic information data (such as roads, water systems, and administrative boundaries) and operational data (such as drainage facilities and monitoring stations). Different data elements are represented by different map symbols, and examples are given in the map legend to facilitate users to quickly identify various elements.

[0085] (2) Grading and coloring of waterlogging severity. For waterlogging forecast data, different colors are used to mark the waterlogging severity according to the forecast: Red: Indicates "severe flooding" level; Orange: Indicates "general flooding" level; Green: Indicates "no flooding" level.

[0086] The legend provides an example of the correspondence between colors and the level of flooding.

[0087] (3) View details for a single point. When a user clicks on a forecast data marker for a single flood-prone area on the map, the system will pop up a details window displaying comprehensive information about that flood-prone area, including: Forecast information including the name of the flood-prone area, the forecast time for flooding, and the forecast severity of flooding; Static information: basic information about the flood-prone area (such as the type of flood-prone area, construction time, etc.), information of the responsible person (name and contact information of the responsible person), and information on management measures (such as response measures in the flood control plan); Dynamic information includes: water depth monitoring data (real-time water depth values), water depth change curves (showing historical and forecast water depth change trends in a line graph), urban flooding profile diagrams (showing the topographic profile and water accumulation distribution of flooded areas), associated monitoring videos (supporting online playback of on-site monitoring footage), and associated rainfall station data (real-time and forecast rainfall), etc.

[0088] (4) Dynamic correlation update. When the forecast results are updated (such as when a new forecast period arrives), the map display content is automatically updated synchronously.

[0089] Here, this invention integrates forecast results with basic geographic information data and operational data into a map for display. Different data elements are represented using different map symbols, and the predicted degree of urban flooding is graded using red, orange, and green colors, allowing users to intuitively perceive the spatial distribution and severity of the predicted urban flooding. Compared to existing technologies where map display elements are singular and the grading is unclear, this invention's multi-element fusion and grading coloring display significantly improves situational awareness efficiency.

[0090] The forecast results statistics module supports statistical display of urban flooding forecast results according to different dimensions, including: (1) Statistics by administrative division: The flood forecast results are summarized and statistically analyzed by administrative division level such as district, town and street, and the number of severe flood points, general flood points, non-flood points and their proportions are displayed in each administrative region, so that managers can grasp the disaster situation of different regions from a macro level.

[0091] (2) Statistics by degree of waterlogging: All forecast waterlogging points are classified into three levels: severe waterlogging, general waterlogging, and no waterlogging, and the number, proportion and spatial distribution characteristics of waterlogging points at each level are displayed.

[0092] Statistical results can be visualized in the system in the form of bar charts, pie charts, or statistical tables to assist managers in making decisions and judgments.

[0093] When a user clicks on a single flood-prone area, this invention not only displays the forecast result itself, but also simultaneously displays the static information (basic information, responsible person, management measures) and dynamic information (water depth monitoring data, water depth change curve, flood profile diagram, associated monitoring video, associated rainfall stations) of that area. This three-dimensional information display method, combining forecast results, static information, and dynamic monitoring, enables managers to quickly complete comprehensive analysis and decision-making based on the forecast results, filling the gap in existing technologies where the information dimensions for viewing detailed forecast results are insufficient.

[0094] This invention supports the statistical summarization of forecast results by two dimensions: administrative division (district, town / street) and waterlogging severity. It presents the overall situation of waterlogging forecasts from both spatial and severity perspectives, providing strong data support for macro-management decisions.

[0095] The results export module allows users to export urban flooding forecast data to a common format file, specifically including: (1) Exporting the flood forecast list: Export all forecast results data obtained in step five as a standardized list file, which contains forecast information for all flood points.

[0096] (2) Exporting the statistical results of urban flooding forecast: Export the statistical summary results generated in step eight as a statistical report.

[0097] The exported files support CSV and XLSX formats to meet the diverse data format requirements of different users. The exported files can be directly used for further data processing, report preparation, or data exchange with other systems.

[0098] This invention supports exporting flood forecast lists and forecast statistics to multiple formats such as CSV and XLSX, meeting the diverse data format needs of different users and facilitating secondary processing, report compilation, and cross-system exchange of forecast data.

[0099] An embodiment of the present invention also provides an AI-based intelligent agent-assisted urban flood forecast generation system, used to implement the AI-based intelligent agent-assisted urban flood forecast generation method, including a large language model interaction module, a knowledge base retrieval module, a Reranker reordering module, an automatic forecast parameter generation module, an urban flood forecast model calling module, a progress display module, a forecast result list display module, a forecast result map display module, a forecast result statistics module, and a result export module.

[0100] The large language model interaction module receives flood forecast commands from users in the form of natural language text, extracts the forecast parameters required by the flood forecast model, and engages in multi-turn dialogue with the user. This module embeds a large language model and possesses natural language understanding and generation capabilities.

[0101] The Embedding model is used to transform the flood forecast command and forecast parameters into a high-dimensional vector representation after recognizing the user's intention to forecast flooding, thereby obtaining a query vector. Based on the query vector, a similarity search is performed in the vector database of the local water conservancy knowledge base to obtain several candidate knowledge fragments related to flood forecasting.

[0102] The knowledge base retrieval module includes a local water resources knowledge base and a vector database. The local water resources knowledge base stores unstructured knowledge such as water resources professional documents, urban flooding forecast specifications, historical urban flooding forecast cases, and rainfall forecast interpretation rules; the vector database stores the vector representations of the above knowledge after being transformed by the Embedding model.

[0103] The Reranker module scores each candidate knowledge fragment and re-ranks them based on the scores, outputting the top N most relevant knowledge fragments to improve the accuracy of the relevance between search results and user needs. The large language model uses the top N most relevant knowledge fragments and flood forecast instructions as input prompts to generate the complete parameters required for the flood forecast model. The automatic forecast parameter generation module performs structured processing on the complete parameters to obtain structured forecast parameters.

[0104] The urban flooding forecast model invocation module is used to invoke the urban flooding forecast model of the smart water management platform, automatically fill the forecast parameters into the model interface, and start the model calculation. The urban flooding forecast model is used to perform urban flooding simulation calculations with structured forecast parameters as input, and generate forecast results for all urban flooding risk points within the forecast range.

[0105] The progress display module is used to acquire and display the progress status of the forecast model calculation in real time to the user during the forecast model calculation process, presented in the form of a progress bar. The forecast result list display module is used to display the forecast results returned by the forecast model in a list format, which can be displayed in the smart water management platform interface, or as a table as a question and answer output in the large language model interactive interface.

[0106] The forecast results map display module is used to show the spatial distribution of forecasted flooding points in a Geographic Information System (GIS) map, supporting hierarchical representation and graded color display of multiple elements. The forecast results statistics module is used to statistically summarize and visualize the forecast results according to different dimensions (administrative division, degree of flooding).

[0107] The results export module supports exporting flood forecast lists and forecast statistics to CSV, XLSX, and other file formats. The workflow orchestration engine orchestrates and schedules the collaborative workflows between the above modules, ensuring that each step is executed sequentially and that data is transferred. The MCP protocol adaptation module enables standardized interaction between modules and between the system and external tools and data sources.

[0108] Specifically, users can input flood forecast commands in text form through the interactive interface. After understanding the user's intent, the big data model automatically extracts forecast parameters (including forecast range, rainfall, lead time, forecast step size, etc.), calls the flood forecast model of the smart water management platform, and automatically fills the parameters into the model for calculation. During the calculation, a progress bar is displayed in real time. The forecast model returns the forecast results for all risk points within the forecast range, including the name of the flooded point, its spatial coordinates, the predicted flood severity (severe flooding, moderate flooding, and no flooding at level three), and the forecast time. The forecast results are also displayed in list form on the system interface and the AI ​​interactive interface. The system displays the data in a map; red, orange, and green colors represent severe flooding, moderate flooding, and no flooding, respectively, with different data elements represented by different map symbols and accompanied by legends. Clicking on a single flooding point allows users to view its name, forecast time, and forecast flooding severity, along with the display of static information (basic information, responsible persons, and management measures) and dynamic information (water depth monitoring data, water depth change curves, flooding profile diagrams, associated monitoring videos, and associated rainfall stations). Forecast results can be statistically displayed by administrative division (district, town / street) and by flooding severity. Forecast lists and statistical results can be exported to CSV, XLSX, and other formats.

[0109] This invention realizes intelligent operation of the entire process of urban flooding forecasting, from natural language command understanding, automatic parameter configuration, model calculation, multi-dimensional result display to statistical export, which significantly improves the operational efficiency and readability and usability of urban flooding forecasting results.

[0110] This invention can be implemented in various ways. Several typical embodiments are listed below, but the scope of protection of this invention is not limited thereto.

[0111] Implementation Method 1: Centralized Implementation Method Based on Cloud Deployment All modules of the system described in this invention are deployed on a cloud server. Users access the large language model's interactive interface through a web browser or mobile app and input text commands for urban flooding forecasts. The cloud server completes all processing steps, including command understanding, knowledge retrieval, parameter generation, model invocation (the urban flooding forecast model is deployed in the cloud or connected via API), progress display, result parsing, list display, map display, statistics, and export. This implementation is suitable for centralized management models in smart water management, with the advantage that users do not need to deploy any local systems, and maintenance and upgrades are centralized in the cloud.

[0112] Implementation Method 2: Private Implementation Method Based on Local Deployment The system described in this invention is deployed on a local server of a smart water management organization, with the flood forecasting model and all data stored locally. The large language model can be deployed locally or connected to a trusted cloud service via a dedicated line. This implementation is suitable for scenarios with high requirements for data security and privacy protection, especially sensitive applications involving flood forecasting of critical infrastructure. The advantage of this approach is that data remains within its domain, ensuring high security.

[0113] Implementation Method 3: Hybrid Implementation Method Based on Edge-Cloud Collaboration The computationally intensive modules, such as large language models, are deployed in the cloud, while modules for forecast parameter generation, model invocation, progress display, result parsing, list display, map display, statistics, and export are deployed on edge nodes or local servers. User commands are forwarded to the cloud through edge nodes for semantic understanding. The cloud then returns the extracted parameters to the edge nodes, which in turn invoke locally deployed or nearby urban flooding forecast models to complete calculations and display results. This implementation combines the advantages of powerful cloud computing and low-latency edge computing, making it particularly suitable for scenarios with limited network conditions or high requirements for forecast response speed.

[0114] Implementation Method 4: Multi-Agent Cooperative Implementation Method Based on MCP Protocol Each functional module in the system described in this invention is encapsulated as an independent agent, and these agents interact in a standardized manner via MCP (Model Context Protocol). For example, the interaction module is encapsulated as an "interaction agent," the knowledge retrieval module as a "knowledge agent," the parameter generation module as a "parameter agent," the model invocation module as a "forecast agent," the progress display module as a "progress agent," the list display module as a "list display agent," the map display module as a "map agent," the statistics module as a "statistics agent," and the export module as an "export agent." Each agent connects to the system through an MCP protocol adapter, and the workflow orchestration engine dynamically arranges the invocation order and data transmission relationships of each agent according to the forecast task requirements. This implementation offers the highest flexibility and scalability, facilitating the addition of new functional agents or the replacement of existing agents in the future.

[0115] Implementation Method 5: Scalable Implementation Method Based on Plug-in Architecture The functional modules in the system described in this invention are designed as pluggable modules. Users can choose to enable or disable certain modules according to their actual needs, or they can develop new modules to extend the system's functionality. For example, users can develop adapter modules for specific urban flooding forecasting models (such as hydrological models provided by different vendors), map display modules for specific GIS platforms, statistical modules for specific statistical dimensions, etc. This implementation method is suitable for scenarios with a wide variety of urban flooding forecasting models, frequently changing business requirements, or the need for rapid iteration.

[0116] Implementation Method Six: RPA-based Process Automation The repetitive operations in the system described in this invention, such as model parameter input, model invocation, and result data extraction, are encapsulated into RPA (Robotic Process Automation) processes. After understanding user instructions and generating parameters, the large language model invokes the corresponding RPA process through the RPA execution engine to simulate manual operation in interacting with traditional urban flood forecasting systems (especially legacy systems that do not support API interfaces) and obtaining forecast results. This implementation method is suitable for scenarios that require interaction with legacy systems, such as using RPA to simulate manual operation to access old systems, achieving seamless integration between new and old systems.

[0117] Implementation Method 7: Implementation Method Based on Forecast Model Integration Framework The system described in this invention is designed as a unified framework for calling urban flood forecasting models, supporting the simultaneous access of multiple different urban flood forecasting models (such as hydrological models, hydrodynamic models, machine learning models, etc.). The large language model automatically selects the most suitable forecasting model for invocation based on user commands and the characteristics of the forecast scenario, or simultaneously invokes multiple models for integrated forecasting and compares and displays the forecast results of each model for user reference. This implementation is suitable for application scenarios with multiple forecasting model resources and where it is desirable to fully leverage the advantages of each model.

[0118] Implementation Method 8: Implementation Method Based on Automatic Report Generation Building upon the existing functions of listing, mapping, statistically analyzing, and exporting flood forecast results, this system adds an automatic forecast report generation feature. After acquiring forecast results, statistical data, and map information, the large language model automatically generates a structured flood forecast report, including a forecast overview, detailed forecasts for each flooded location, situation analysis, and recommendations for key areas of concern. The report can be exported in Word, PDF, and other formats for direct submission or archiving. This implementation method is suitable for management scenarios requiring the regular preparation of flood forecast reports, further reducing the labor costs associated with report compilation.

[0119] Implementation Method Nine: Implementation Method Based on Embedding in Instant Messaging Platform The system described in this invention is embedded in an instant messaging platform (such as WeChat Work, DingTalk, Lark, etc.) in the form of a chatbot. Users can directly enter text forecast query commands in the instant messaging chat window. The system completes the entire process of urban flooding forecasting in the background and returns the forecast results to the chat window in the form of message cards (including tables, summaries, suggestions, etc.). This implementation makes full use of users' existing instant messaging tools, without the need for additional application installation, reducing the system's promotion and usage costs, and is especially suitable for scenarios where frontline managers can quickly obtain forecast information.

[0120] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A method for assisting in the generation of urban flood forecasts based on AI intelligent agents, characterized in that, Includes the following steps: S1 receives the flood forecast command input by the user, performs semantic parsing and intent recognition, and extracts the forecast parameters required by the flood forecast model; S2. After recognizing the user's intention to forecast waterlogging, the waterlogging forecast command and forecast parameters are converted into a high-dimensional vector representation to obtain a query vector. Based on the query vector, a similarity search is performed in the vector database of the local water conservancy knowledge base to obtain several candidate knowledge fragments related to waterlogging forecast. Each candidate knowledge fragment is scored and reordered according to the score, and the top N most relevant knowledge fragments are output. S3 uses the top N most relevant knowledge fragments and waterlogging forecast instructions as input prompts to generate the complete parameters required for the waterlogging forecast model and perform structured processing to obtain structured forecast parameters. S4, call the urban flooding forecast model and input the structured forecast parameters into the urban flooding forecast model to perform urban flooding simulation calculation; S5, after the waterlogging forecast model completes the waterlogging simulation calculation, it generates forecast results for all waterlogging risk points within the forecast range.

2. The method for assisting in the generation of urban flood forecasts based on AI intelligent agents as described in claim 1, characterized in that, S1 specifically includes: S11, obtains the waterlogging forecast command input by the user in natural language text through the large language model interaction module; S12: Identify whether the flood forecast command is intended to forecast flooding. If so, extract the forecast parameters required by the flood forecast model from the flood forecast command and jump to S2. If not, proceed to the general question and answer process or prompt the user to re-enter the information. S13, combining the contextual information from multiple rounds of dialogue, completes the information omitted or implied in the urban flooding forecast instructions.

3. The method for assisting in the generation of urban flood forecasts based on AI intelligent agents as described in claim 2, characterized in that, S2 specifically includes: S21. After identifying the user's intention to forecast flooding, the flooding forecast command and forecast parameters are converted into a high-dimensional vector representation using the Embedding model to obtain the query vector. S22, Based on the query vector, perform similarity retrieval in the vector database of the local water conservancy knowledge base to obtain several candidate knowledge fragments related to urban flooding forecast; S23: Input several candidate knowledge fragments into the Reranker module, score each candidate knowledge fragment, re-rank the candidate knowledge fragments according to the scores, and output the top N most relevant knowledge fragments.

4. The method for assisting in the generation of urban flood forecasts based on AI intelligent agents as described in claim 3, characterized in that, S3 specifically includes: S31: The top N most relevant knowledge fragments and flood forecast instructions are used as input prompt words and input into the large language model. Based on the explicit parameters directly extracted from the user instructions, the implicit parameters completed based on the most relevant knowledge fragments, and the automatically obtained supplementary parameters, the complete parameters required by the flood forecast model are generated. S32, the automatic forecast parameter generation module performs structured processing on the complete parameters to obtain structured forecast parameters.

5. The method for assisting in the generation of urban flood forecasts based on AI intelligent agents as described in claim 4, characterized in that, S4 specifically includes: S41, the automatic forecast parameter generation module passes the obtained structured forecast parameters to the waterlogging forecast model calling module, which then calls the waterlogging forecast model of the smart water management platform and fills the structured forecast parameters into the input interface of the waterlogging forecast model to perform waterlogging simulation calculations; S42, during the urban flooding simulation calculation, the progress display module obtains the calculation progress information of the urban flooding forecast model in real time and displays it dynamically in the form of a progress bar on the user interface.

6. The method for assisting in the generation of urban flood forecasts based on AI intelligent agents as described in claim 5, characterized in that, It also includes the following steps: Display a list of urban flooding forecast results; And / or, to display the results of urban flooding forecasts on maps; And / or, conduct statistical analysis of the results of urban flooding forecasts; And / or, export the results of urban flooding forecasts.

7. The method for assisting in the generation of urban flood forecasts based on AI intelligent agents as described in claim 6, characterized in that, S12 specifically includes S121, a pre-set business keyword library related to urban flooding forecast is set up, and the urban flooding forecast command is segmented. If the segmented urban flooding forecast command hits any keyword in the business keyword library, it is determined to be an urban flooding forecast intention. S122, if the waterlogging forecast instruction after word segmentation does not match any keyword in the business keyword library, the waterlogging forecast instruction is converted into a vector and its cosine similarity is calculated with the preset waterlogging forecast intent standard template vector. If the cosine similarity exceeds the preset threshold, it is determined to be a waterlogging forecast intent.

8. The method for assisting in the generation of urban flood forecasts based on AI intelligent agents as described in claim 7, characterized in that, S41 specifically includes: S411: Obtain forecasted rainfall, maximum soil water holding capacity, and initial loss; and obtain runoff depth based on forecasted rainfall, maximum soil water holding capacity, and initial loss. S412, the calculation coefficients are obtained based on the flood propagation time of the river section, and the upstream section flow and the inflow at the beginning and end of the time period are weighted and integrated based on the calculation coefficients to obtain the downstream section flow; S413 uses the DEM grid within the forecast range as the basic topographic data, combines the spatial distribution of the drainage network and the designed drainage capacity to obtain the net runoff of each grid node, and obtains the water depth and degree of flooding at the flood point based on the net runoff.

9. The method for assisting in the generation of urban flood forecasts based on AI intelligent agents as described in claim 8, characterized in that, In S23, the scoring of each candidate knowledge fragment specifically includes: S231, obtain the overall similarity between candidate knowledge fragments and urban flooding forecast instructions in terms of text semantics, and obtain a semantic matching score based on the overall similarity; S232, Construct a keyword list for the field of urban flooding forecasting, obtain the hit density and level of candidate knowledge fragments for the field keywords based on the keyword list for urban flooding forecasting, and obtain the field matching score based on the hit density and level; S233, based on the spatial range and temporal characteristics of urban flooding forecasts, matches the spatiotemporal range of candidate knowledge fragments to obtain a spatiotemporal matching score; S234, For candidate knowledge fragments of historical flooding cases, calculate the similarity between the working conditions of historical flooding cases and the current forecast scenario, and obtain the case fit score; S235, the semantic matching score, domain matching score, spatiotemporal matching score and case suitability score are weighted and fused to obtain the candidate knowledge fragment score.

10. A system for assisting in the generation of urban flood forecasts based on AI agents, used to implement the method for assisting in the generation of urban flood forecasts based on AI agents as described in any one of claims 1-9, characterized in that, include: The large language model interaction module is used to receive user input of waterlogging forecast commands, perform semantic parsing and intent recognition, and extract the forecast parameters required by the waterlogging forecast model. The Embedding model is used to convert the flood forecast instructions and forecast parameters into a high-dimensional vector representation after recognizing the user's intention to forecast flooding, obtain a query vector, and perform similarity retrieval in the vector database of the local water conservancy knowledge base based on the query vector to obtain several candidate knowledge fragments related to flood forecasting. The Reranker module is used to score each candidate knowledge fragment and re-rank the candidate knowledge fragments according to the scores, and output the top N most relevant knowledge fragments. The large language model is used to generate the complete parameters required for the flood forecasting model by taking the top N most relevant knowledge fragments and flood forecasting instructions as input prompt words. The automatic forecast parameter generation module is used to perform structured processing on complete parameters to obtain structured forecast parameters; The urban flooding forecasting model is used to perform urban flooding simulation calculations using structured forecast parameters as input, and generate forecast results for all urban flooding risk points within the forecast range.