Flood control scheduling scheme recommendation method based on large language model and scene library matching

By constructing a structured scenario library of flood situation and dispatch scheme and utilizing a large language model, combined with correlation screening and causal modeling, the problem of rapidly generating scientific schemes in flood control dispatch was solved, achieving efficient and reliable flood control decision support.

CN123180716APending Publication Date: 2026-11-27CHANGJIANG SURVEY PLANNING DESIGN & RES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611082646.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing methods for generating flood control and dispatch plans are insufficient to quickly generate scientific and feasible plans in real-time decision-making scenarios. Historical experience is difficult to intelligently match and reuse, information integration and decision transformation are challenging, and the credibility and synergy of intelligent recommendations are inadequate.

Method used

A structured scenario library of flood situation and scheduling scheme is constructed. Knowledge extraction and text generation are performed using a large language model. Combined with relevance screening, causal modeling and expert verification, an interpretable scheduling scheme is generated through a two-layer hybrid similarity matching strategy.

Benefits of technology

It has improved the efficiency, scientific nature and reliability of flood control decision-making, significantly shortened the response time, enhanced the interpretability and reliability of the scheduling plan, and intelligently controlled decision-making risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180716A_ABST
    Figure CN123180716A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of flood control scheduling decision support, and discloses a flood control scheduling scheme recommendation method based on a large language model and scene library matching, which comprises the following steps: constructing a flood situation-scheduling scheme structured scene library; generating a standardized flood situation text based on a large language model; performing scene retrieval based on a hybrid matching strategy; scheduling scheme recommendation and preplan generation: first, forming an optimal matching scene set, then dynamically constructing an optimal scheme set according to a confidence level, and generating a structured scheduling preplan document based on the large language model. The flood control scheduling scheme recommendation method based on the large language model and the scene library matching systematizes historical successful scheduling experience and knowledge, intelligently matches the current real-time flood situation with the historical experience, thereby quickly generating a scheduling scheme recommendation which is interpretable and has a confidence evaluation, and effectively improving the efficiency, scientificity and reliability of flood control decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water conservancy flood control scheduling decision support technology, specifically to a method for recommending flood control scheduling schemes based on matching a large language model with a scenario database. Background Technology

[0002] With global climate change and the continuous improvement of river basin flood control engineering systems, current flood control command and decision-making face challenges such as the difficulty of forecasting water and rainfall conditions, the large number of flood control projects involved, and the wide range of flood protection targets. The pace of flood control consultations is accelerating, and the joint scheduling of flood control projects is becoming increasingly complex. However, during flood control consultations, decision-makers still need to analyze massive amounts of data on "rainfall, water levels, engineering projects, and potential hazards" to analyze the overall flood control situation of the river basin, determine the target river sections and scheduling objectives, and formulate scheduling plans based on the joint scheduling and operation plan of water projects. This "experience-based decision-making" model not only has limited response speed but also struggles to meet the higher requirements of timeliness and scientific rigor in modern flood control.

[0003] Currently, some research has attempted to introduce artificial intelligence technology into the field of flood control scheduling. For example, Chen Sheng et al. explored the use of thematic knowledge graphs to construct information carriers for joint scheduling calculation schemes of water projects. In a sample application in a certain river basin, this method demonstrated higher accuracy and efficiency compared to traditional methods. Huang Yan et al. proposed a knowledge graph construction and application technology scheme for joint scheduling of water projects, as well as a scenario-driven ontology construction method. However, existing work mainly focuses on the intelligent transformation of the joint scheduling process of flood control projects, primarily providing support for scheduling calculations and rule-based scheme generation. Research directly addressing the intelligent recommendation of scheduling schemes is still lacking. Especially in real-time decision-making scenarios such as flood control consultations, how to quickly generate and recommend scientific and feasible flood control scheduling schemes based on real-time rainfall and water level data and dynamic scheduling objectives, combined with historical experience, has yet to form a systematic and intelligent solution.

[0004] Furthermore, most of the effective flood control and dispatching experiences in history are sealed in unstructured texts such as various consultation documents and summary reports, which are difficult to be directly retrieved and utilized by existing decision-making systems, resulting in the dormancy and waste of valuable knowledge assets.

[0005] In summary, the aforementioned existing technologies have the following drawbacks: 1) Existing work focuses on the intelligent transformation of the joint scheduling process of flood control projects, mainly providing support for scheduling calculation and rule-based scheme generation. Research on the intelligent recommendation of scheduling schemes is still lacking, making it difficult to quickly generate scientific and feasible flood control scheduling schemes based on real-time rainfall and water conditions and dynamic scheduling objectives in real-time decision-making scenarios such as flood control consultation. 2) Information integration and decision transformation are difficult. The key elements of flood control decision-making are mostly isolated structured numerical values ​​or brief descriptions. Their deeper business meaning and decision value are submerged at the data level, making it difficult for decision-makers to effectively and quickly integrate these discrete data and map them into specific and operable flood control scheduling measures and objectives. There is a significant cognitive and application gap between data understanding and scheme generation. 3) The efficiency of reusing historical experience is low. Most of the effective flood control and dispatching experience in history is sealed in unstructured texts such as various consultation documents and summary reports. Traditional methods are difficult to achieve intelligent matching and analogical reasoning between case scenarios and real-time water and rainfall conditions. This makes it impossible to quickly retrieve and reuse a large amount of valuable practical experience in emergency consultations, resulting in the dormancy and waste of valuable knowledge assets. The decision-making process still relies heavily on manual experience review.

[0006] 4) The credibility and collaboration of intelligent solution recommendations are insufficient. Existing recommendation methods mostly adopt rule-based or single-dimensional matching mechanisms. The generated solutions lack quantitative assessment of the confidence level of the solutions, potential conflicts and implementation risks. When conflicting solutions occur, the risks cannot be effectively indicated, which can easily lead to decision-making errors.

[0007] With the rapid iteration of artificial intelligence technology, Large Language Models (LLMs), with their powerful natural language understanding, knowledge extraction, text generation, and cross-modal reasoning capabilities, have gradually penetrated into vertical industries such as water conservancy. Therefore, how to leverage the natural language processing and text generation advantages of LLMs to systematize and digitize historical successful flood control experience, and to establish a system capable of intelligently matching the current real-time flood situation with historical experience to quickly generate interpretable and high-confidence flood control plan recommendations, is a pressing technical challenge in the field of flood control decision-making. Summary of the Invention

[0008] The purpose of this invention is to address the shortcomings of the aforementioned technologies by providing a flood control scheduling scheme recommendation method based on matching a large language model with a scenario library. This method systematizes and digitizes historical successful scheduling experience, and intelligently matches the current real-time flood situation with historical experience, thereby quickly generating interpretable scheduling scheme recommendations with confidence assessment, effectively improving the efficiency, scientificity, and reliability of flood control decision-making.

[0009] To achieve the above objectives, the flood control scheduling scheme recommendation method based on matching a large language model with a scenario library designed in this invention includes the following steps: S1) Construct a structured scenario library for flood situation and dispatch scheme: Using a JSON Schema containing a three-element framework of flood situation, flood control objectives and defense measures as an extraction template, construct multi-task instruction prompts including role settings, task descriptions, JSON Schema embeddings and annotation examples. Take unstructured historical consultation minutes as input, drive the large language model to map and fill the historical consultation minutes into the three-element framework in a single inference and extract core data. Then, discretize and manually verify the data according to flood control business rules, store it in JSON format to form a structured scenario library, and perform offline vectorization preprocessing on the flood situation content of each scenario in the structured scenario library to generate numerical feature vectors and semantic vectors to form a vector database, and establish numerical feature vector indexes and semantic vector indexes respectively. S2) Generate standardized flood situation text based on large language model: Receive real-time rainfall and water level data and set flood control targets, use a three-stage algorithm of correlation screening, causal modeling and expert verification to identify key feature elements and obtain corresponding values, dynamically embed key feature elements and corresponding values ​​into preset prompt word templates, and drive the large language model to generate standardized flood situation description text. S3) Scene retrieval based on hybrid matching strategy: After standardization of the key feature elements and corresponding values ​​obtained in step S2), arrange them in a fixed order to generate a numerical query vector. Then, encode the standardized flood situation description text obtained in step S2) into a real-time semantic query vector. Then, perform two-layer hybrid similarity matching. First, retrieve the Top-K candidate scenes in the numerical feature index using the approximate nearest neighbor search algorithm. Then, calculate the cosine similarity between the semantic query vector and the semantic vector of the candidate scenes one by one, and then weight and fuse them according to the preset weight to obtain the comprehensive similarity score. S4) Scheduling scheme recommendation and contingency plan generation: Select scenarios with a comprehensive similarity score exceeding a preset basic threshold to form the optimal matching scenario set. Dynamically evaluate the confidence level based on the consistency between the comprehensive similarity score and the core scheduling measures. Dynamically construct the preferred scheme set based on the confidence level and generate a structured scheduling contingency plan document based on the large language model.

[0010] Preferably, in step S1), the flood situation includes four subcategories: real-time rainfall, real-time water level, forecasted rainfall, and forecasted water level. Through the collaborative design of a four-level structured framework and multi-task instruction prompts, the large language model can automatically identify, classify, and extract core data from text paragraphs in a single inference, significantly improving knowledge extraction efficiency and ensuring the integrity of element dimensions, which is in line with business logic.

[0011] Preferably, in step S1), when discretizing, the extracted core data is standardized according to the process of numerical analysis, unit unification, rule matching, and label generation. The rule matching includes three categories: threshold judgment, interval matching, and relative value calculation. By converting discrete values ​​into standardized descriptive labels with clear business meanings, the scenario matching failure caused by small numerical fluctuations is avoided, thereby enhancing the robustness of scenario matching.

[0012] Preferably, in step S1), the offline vectorization preprocessing includes numerical feature vectorization and semantic vectorization. Numerical feature vectorization performs global statistical calculations on the mean μ and standard deviation σ of all quantitative indicators in the structured scene library, generates a global statistical parameter table and stores it, uses the Z-Score standardization formula to transform the value of each quantitative indicator, and generates numerical feature vectors by arranging them in a fixed order according to the global quantitative indicator list. Semantic vectorization uses a sentence embedding model to encode the flood situation description text of each scene to generate a 768-dimensional semantic vector. An IVF_FLAT index is constructed for the numerical feature vector set, and an HNSW index is constructed for the semantic vector set. Through the dual-vector parallel index design, subsequent retrieval can independently call the numerical index or the semantic index, taking into account both the needs of rapid coarse screening of quantitative indicators and accurate matching of high-dimensional semantics, and greatly improving retrieval efficiency.

[0013] Preferably, in step S2), identifying key feature elements sequentially includes: Preliminary correlation screening: A correlation analysis algorithm combining optimal subset screening and stepwise regression is used to initially identify key information elements; Causal modeling: Based on the deep integration of identified key information elements and expert experience, causal analysis technology based on dynamic Bayesian networks is adopted to reveal the causal mechanism between key information elements and their impact on flood control objectives through structure learning and parameter learning. Expert verification: The physical mechanism constraints are defined using bounded linear temporal logic, and the dynamic Bayesian network model is verified using statistical model testing methods. The output is a set of key feature elements that conform to the causal inference of data and physical laws. Through three layers of verification of correlation, causality and physical mechanism, irrelevant data noise is effectively filtered out, ensuring that the identified key elements have a real causal impact on flood control targets and improving the effectiveness of subsequent semantic matching.

[0014] Preferably, in step S2), the prompt word template includes role setting, task description, rule constraints, and structural requirements. The structural requirements stipulate that the generated standardized flood situation description text sequentially includes an overview of the overall flood situation, rainfall, water conditions at key stations, key reservoir conditions, flood peak conditions, and future flood trend predictions. The text word count is controlled between 150 and 300 words. By constraining the output format of the large language model through the structured prompt word template, the generated text elements are complete, logically coherent, and use professional terminology, providing high-quality input for subsequent semantic vectorization.

[0015] Preferably, in step S3), the two-layer hybrid similarity matching includes: the first layer retrieves the numerical query vector in the numerical feature index using an approximate nearest neighbor search algorithm, and selects the top K scenes as a candidate set according to the descending order of cosine similarity; the second layer calculates the cosine similarity between the real-time semantic query vector and the semantic vector of the scene for each scene in the candidate set; the final comprehensive similarity score is calculated according to the following weighted summation formula: ,in To calculate the overall similarity score, The numerical similarity score. The semantic similarity score. α and β For preset weights and α + β =1. By using a cascaded structure of numerical coarse screening and semantic fine screening, the computational scope is reduced from thousands of scenarios to a single-digit number of candidate scenarios before high-dimensional semantic computation is performed, which significantly reduces computational overhead while ensuring matching accuracy.

[0016] Preferably, in step S4), the dynamic evaluation of confidence level includes high confidence level determination, low confidence level determination and medium confidence level determination. High confidence level determination is: the overall similarity score of the first-ranked scene exceeds the preset high score threshold, or the core scheduling measures logic of at least two scenes in the optimal matching scene set is consistent. The low confidence level determination requires the following conditions to be met simultaneously: the difference in the comprehensive similarity scores between the first and second ranked scenarios is less than a preset small threshold, and the key scheduling measures of the two scenarios are in direct conflict in essence. The others are determined with a medium confidence level; The reliability of the recommendation results is quantified by using both absolute advantage and consistency advantage as criteria, and potential conflict risks of alternatives are exposed to decision-makers in advance, thereby achieving intelligent decision risk control.

[0017] Preferably, dynamically constructing the preferred solution set based on the confidence level includes: For high confidence, the preferred solution set only includes the best matching scenario with the highest comprehensive similarity score; If the confidence level is low, select no more than 3 scenarios with a comprehensive similarity score higher than the preset basic threshold from the set of optimal matching scenarios in descending order to form the preferred solution set; If the confidence level is medium, only the best matching scenario with the highest overall similarity score will be recommended and marked with a medium confidence level hint; The number of recommended solutions is dynamically adjusted based on the confidence level. In high-confidence scenarios, this reduces the decision-making burden and improves response efficiency, while in low-confidence scenarios, it expands the candidate solutions for comprehensive evaluation, thus balancing decision-making efficiency and comprehensiveness.

[0018] Preferably, in step S4), the process of generating the structured scheduling plan document is as follows: A composite instruction is constructed by integrating real-time scenario information, confidence assessment results, and detailed information of the preferred solution set. The composite instruction includes three structural requirements and integrated information: role setting, task description, and contingency plan. The compound instructions are input into the large language model, which generates a structured dispatch plan document containing three parts: flood situation, flood control objectives, and recommended dispatch scheme. By integrating multi-level information and constructing composite instructions, the large language model can output a complete and comprehensive plan document that can be directly used for flood control scheduling decisions, thus achieving automated connection from recommended plans to executable plans.

[0019] Compared with the prior art, the present invention has the following advantages: 1. By leveraging the knowledge extraction capabilities of large language models, massive amounts of unstructured historical consultation minutes, scheduling plans, and other texts are semi-automatically transformed into a structured scenario library containing three elements: flood situation, flood control objectives, and defense measures. This systematizes and knowledge-based flood control decision-making experience, significantly improves the data completeness of the decision-making basis, and makes implicit expert experience explicit and knowledge-based. This provides a high-quality, large-scale data foundation for subsequent intelligent matching and solves the pain points of traditional decision-making, which heavily relies on individual expert experience and scattered paper or electronic documents, and whose decision-making basis is incomplete and difficult to trace. 2. It realizes the intelligent transformation from discrete data to decision-making context, significantly improving matching accuracy and response speed. It automatically identifies the core elements with the strongest causal relationship to the current flood control target from massive real-time data, effectively filters out irrelevant data noise, improves the effectiveness of subsequent semantic matching, and transforms scattered key elements and corresponding data into standardized flood situation descriptions through a large language model, realizing efficient connection from raw data to decision-making basis. At the same time, it combines a two-layer hybrid matching algorithm to realize efficient and accurate retrieval of historical scene databases, which greatly shortens the response time compared with traditional decision support mode. 3. Enhanced the reliability and interpretability of the scheduling scheme, achieving intelligent decision-making risk control. Through a hybrid matching strategy of numerical coarse screening and semantic fine screening, it ensures that the matched historical cases are similar in both numerical and semantic aspects. Compared with using keyword retrieval or pure semantic retrieval alone, the accuracy of scheme matching is greatly improved. On this basis, the innovative confidence assessment and dynamic recommendation mechanism further realizes intelligent decision-making risk control: if the confidence of the optimal scheme is high, a single optimal solution is recommended to improve efficiency; if the confidence is low, the recommendation range is dynamically expanded for comprehensive judgment. This design can quantify the reliability of the recommendation results and effectively identify conflicting schemes, exposing potential decision-making risks to decision-makers in advance. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the overall architecture of the flood control scheduling scheme recommendation method based on matching a large language model and a scenario library according to the present invention. Figure 2 This is a flowchart illustrating the process of constructing a structured scenario library for flood situation and dispatching schemes in step S1) of the present invention. Figure 3 This is a flowchart illustrating the process of generating standardized flood situation description text in step S2) of the present invention. Figure 4 This is a schematic diagram of the scene retrieval and scheduling scheme recommendation process based on the hybrid matching strategy in steps S3) to S4) of the present invention. Detailed Implementation

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

[0022] like Figure 1 As shown, a method for recommending flood control scheduling schemes based on matching a large language model with a scenario database includes the following steps: S1) Constructing a structured scenario library for flood situation and dispatching schemes: Using a JSON Schema containing a three-element framework of flood situation, flood control objectives, and defense measures as an extraction template, a multi-task instruction prompt word is constructed, including role settings, task descriptions, JSON Schema embeddings, and annotation examples. Unstructured historical consultation minutes are used as input to drive a large language model to map and populate the historical consultation minutes into the three-element framework in a single inference iteration, extracting core data. This data is then discretized and manually verified according to flood control business rules, stored in JSON format to form a structured scenario library. Offline vectorization preprocessing is performed on the flood situation content of each scenario in the structured scenario library to generate numerical feature vectors and semantic vectors, forming a vector database. Numerical feature vector indexes and semantic vector indexes are established separately. Specifically, combined with... Figure 2 As shown, it includes the following: S11) Knowledge extraction and structuring based on large language models: A JSON Schema is pre-designed, comprising a ternary framework of flood situation, flood control targets, and defense measures. The value of the flood situation key is defined as a nested object, further subdivided into four subcategories: real-time rainfall, real-time water level, forecasted rainfall, and forecasted water level. This ensures the extracted information is complete and conforms to business logic. Subsequently, a multi-task instruction prompt is constructed, containing the following: a) Role definition: You are a senior water conservancy and flood control expert, proficient in hydrological terminology and the text structure of consultation minutes; b) Task Description: Your task is to accurately extract information related to the flood situation, flood control objectives, and defense measures from the given historical consultation minutes text, and to strictly summarize and output the text content according to the following JSON Schema format. No keys may be added or deleted. The flood situation refers to elements that have occurred or cannot be manually intervened, including forecasted inflow, real-time water conditions, rainfall, engineering conditions, and potential hazards. Flood control objectives refer to the specific goals and expected states of flood control work set based on the current flood situation, including elements such as the control water level of important stations, the use of flood storage and detention areas, and the final water level of core reservoirs. Defense measures refer to engineering and non-engineering measures that can be used for flood control decision-making, including elements such as the timing of flood defense, reservoir flood control strategies related to the deployment of defense capabilities, flood storage and detention area plans, and flood diversion volumes. c) JSON Schema Embedding: The complete JSON Schema text defined above is directly embedded into the prompt word; d) Annotation examples: Provide 2-3 high-quality complete annotation pairs {"input": "example text...", "output": {...example JSON...}} to guide the model in understanding the complex mapping relationship between text and structured data; Then, the core data is extracted, and the historical meeting minutes text is converted into a plain text string through optical character recognition (OCR) or text extraction tools. This string is used as input, concatenated with the complete instruction prompt words constructed above, and submitted to the large language model through an API call. The model performs a single forward inference calculation, and its output is a JSON string that strictly follows the preset schema and has been filled in. S12) Business Concept Abstraction and Discretization: Based on the preset flood control business rules, the extracted core data is processed, and a numerical mapping rule engine is written. The rules are stored in JSON format for easy maintenance. The core logic includes three categories: threshold judgment, interval matching, and relative value calculation. The extracted numerical elements are standardized. The processing flow is "numerical parsing → unit unification → rule matching → label generation". In this embodiment, some examples and rule details are as follows: Rainfall value "120mm" → mapped to "heavy rainstorm" (according to GB / T 28592-2012, 24-hour rainfall of 100~250mm is a heavy rainstorm); SX reservoir inflow "50000m³" 3 / s” → Associated with “Reaching the C River flood numbering standard” (Based on the C River flood numbering standard, the inflow of SX Reservoir is ≥50000 m³ / h) 3 / s represents the numbered flood); the LT station water level "33.33 meters" → compared with the warning water level of 32.50 meters, generates the label "0.83 meters above the warning level". Through this process, discrete values ​​are transformed into standardized descriptions with business meaning, improving the robustness of scenario matching; S13) Quality Control and Structured Storage: Quality control includes: Closed-loop verification: The closed-loop verification process adopts "automatic initial extraction + manual fine-tuning", and the specific steps are as follows: a) Automatic initial verification: The script automatically verifies the structured data after discretization in step S12), filters out invalid data with a field missing rate of more than 30% or abnormal values ​​(such as negative water level or zero flow rate without reasonable explanation), marks them as abnormal data, and automatically returns to the extraction stage in step S11) for re-extraction. b) Manual verification: Experts with experience in water conservancy and flood control work conduct a full review and correction of the automatically verified data. The review focuses on the consistency of business logic, such as whether the "not exceeding the warning level" label is contradictory to the value of exceeding the warning level; the completeness of information elements, such as whether core fields (station name, water level, flood control target) are missing; the accuracy of labels, such as whether the calculation of the warning level and the determination of the flood number comply with business rules; at the same time, for ambiguous entries, such as "a certain reservoir increases the discharge" without specifying the specific flow rate, the entries are corrected and supplemented based on the context. c) Iterative optimization: Collect errors found during the expert review process, such as knowledge extraction omission defense measures, labeling errors, etc. After classifying and summarizing, optimize the multi-task instruction prompts in step S11) and supplement the labeling examples for the corresponding error types; Structured storage involves integrating the information that has undergone the above processing and manual verification into a structured data record. This record serves as a scenario example and includes the following content: Scene ID: A unique identifier, such as CJ2020-S03.

[0023] The flood situation section includes standardized text descriptions, such as: [{Real-time rainfall: Heavy to torrential rain in L River, JH Plain to a certain area, R River, SY River}, {Real-time water level: Inflow to SX Reservoir reaches 50,000 m³ / s}. 3 / s, reaching the flood standard; a reservoir exceeded the flood limit; water level in a certain area continued to rise}, {Rainfall forecast: It is expected that there will be continuous heavy rainfall near the main stream of the C River in the next 5 days}, {Water level forecast: The inflow peak of the SX Reservoir is expected to be 40,000 m³ / s in 3 days}, {Water level forecast: The inflow peak of the SX Reservoir is expected to be 40,000 m³ / s in 3 days}, 3 / s}]; Flood control objectives section: Contains explicit flood control objectives in this scenario, such as [{Target object: CLji, Objective: Reduce flood control pressure on downstream CLji area}]; The defense measures section includes a detailed text description of the scheduling scheme and a list of parsed structured scheduling instructions, such as [{Project:SX Reservoir, Operation: Maintain Outflow, Parameter: 31000}, {Project:DJK Reservoir, Operation: Control Outflow, Parameter: 1920}]. After storage is completed, a final structured scenario library of "flood situation-dispatch scheme" is formed. Each scenario is an independent and identically distributed decision snapshot, which can be called separately as a decision case to ensure the independence of subsequent matching and retrieval. S14) Offline vectorization preprocessing: a) Numerical Feature Vectorization: From the scenario library, batch extract quantitative indicators included in the "Flood Situation" section of all scenarios, including water level, flow rate, rainfall, exceedance level, forecast water level, and forecast flow rate at each station, forming a global quantitative indicator list. Ensure that the quantitative indicators for each scenario are included in this list; assign a value of 0 to unmentioned indicators. Perform global statistics on the quantitative indicators of the entire scenario library, calculate the mean μ and standard deviation σ of each quantitative indicator, generate a global statistical parameter table and store it. Use the Z-Score standardization formula to transform the value of each quantitative indicator. The standardization formula is as follows: Where x is the original quantized value, The standardized values ​​are then used as the basis for further processing. Following this, the standardized quantification index values ​​for each scenario are arranged sequentially according to the fixed order of the global quantification index list, generating numerical feature vectors. The vector dimension is consistent with the length of the global quantification index list (e.g., if there are 80 global indicators, the vector dimension is 80). Each numerical feature vector is associated with a corresponding scenario ID for subsequent coarse numerical screening. The numerical feature vector of the i-th scenario is denoted as... ; b) Semantic Vectorization: Using a sentence embedding model (such as Sentence-BERT), the "flood situation" content of each scene is encoded into a 768-dimensional semantic vector. The specific implementation steps are as follows: ① Combine the text content of "Real-time Rainfall", "Real-time Water Levels", "Forecasted Rainfall", and "Forecasted Water Levels" under each "Flood Situation" scenario into a complete "Flood Situation Description Text" in a fixed format of "Real-time Rainfall: [Content]; Real-time Water Levels: [Content]; Forecasted Rainfall: [Content]; Forecasted Water Levels: [Content]" to ensure the semantic integrity of the text; ② The concatenated "flood situation description text" input sentence is embedded into the model. The model outputs a 768-dimensional semantic vector, which can capture the deep context of the text and the dynamic trend of the flood situation, such as the semantic equivalence of "the flood process is steep" and "rapid rise and fall". Each semantic vector is associated with a corresponding scene ID. The semantic vector of the i-th scene is denoted as... ; c) Index Construction: Bind the generated numerical feature vectors and semantic vectors to their corresponding scene IDs and write them in batches to a vector database (such as Milvus). Create two independent vector datasets, one for numerical feature vectors and one for semantic vectors. Build an IVF_FLAT index for the numerical feature vector set, setting nlist=128 to adapt to fast calculation of numerical similarity. Build an HNSW index for the semantic vector set, setting M=16 and efConstruction=200 to adapt to approximate nearest neighbor search for high-dimensional semantic vectors, improving retrieval efficiency. S2) Generate standardized flood situation text based on a large language model: Receive real-time rainfall and water level data and set flood control targets. Employ a three-stage algorithm—correlation screening, causal modeling, and expert verification—to identify key feature elements and obtain corresponding values. Dynamically embed these key feature elements and corresponding values ​​into preset prompt word templates, driving the large language model to generate standardized flood situation description text. Specifically, combining... Figure 3 As shown, it includes the following: S21) Data Acquisition: Receive real-time rainfall and water level data during new flood events, specifically including rainfall in key areas / rain gauge stations at scales of the past and future 1, 3, 6, 12, and 24 hours, water levels and flow rates at important control stations, inflow and outflow rates and water levels at reservoirs, etc. At the same time, obtain flood control targets set by decision-makers, such as "ensure that the water level at station xx does not exceed the guaranteed water level"; S22) Identify key feature elements: Invoke the preset key feature identification model based on causal analysis to extract key feature elements with a strong causal relationship with flood control objectives from the input rainfall and water level data, including: Preliminary correlation screening: A correlation analysis algorithm combining optimal subset screening and stepwise regression is used to initially identify key information elements. The final output regression equation contains the set of core elements with the most predictive value and their weight parameters, which can quantitatively characterize the comprehensive impact of basic water and rainfall elements on natural disasters. Causal Modeling: Based on the deep integration of identified key information elements and expert experience, causal analysis technology based on dynamic Bayesian networks is adopted. Through structure learning and parameter learning, the causal mechanism between key information elements and their impact on flood control targets is revealed, thereby identifying the key factors that truly have a causal impact on the natural disaster process. Since the flood situation and its key characteristic elements change over time, a dynamic Bayesian Network (DBN) is used to construct an identification model describing the impact mechanism. Through the construction process of structure learning and parameter learning, the IMaGEs causal analysis algorithm is used to learn and construct the causal graph structure of the dynamic Bayesian network from the time series dataset, and then the parameters are calibrated using sample data. Expert verification: The physical mechanism constraints are defined using bounded linear temporal logic, and the dynamic Bayesian network model is verified using statistical model testing methods to see if it meets the requirements of expert knowledge and physical rules. The key feature elements that conform to the causal inference of data and strictly follow the physical laws of natural disasters are further optimized and screened out. Finally, the set of "rain and water" feature elements that have a key causal impact on the preset flood control target is output, and the corresponding values ​​of the feature elements are obtained from the dataset. S23) Large Language Model Prompt Word Construction and Text Generation: Using the key feature elements and corresponding values ​​output in step S22), and through preset rules and prompt word templates, the large language model is driven to generate standardized flood situation description text that conforms to business specifications. This ensures that the text elements are complete, logically coherent, and professionally rigorous, providing high-quality text input for semantic matching in subsequent scene retrieval. The specific implementation steps are as follows: a) Rules and template design: Pre-design judgment rules and prompt word templates for a large language model, including key feature variables. Define the structure, terminology, and element completeness requirements for text generation. The prompt word template includes role settings, task descriptions, rule constraints, and structural requirements. The structural requirements stipulate that the generated standardized flood situation description text should sequentially include an overview of the overall flood situation, rainfall, hydrological conditions at key stations, key reservoir conditions, flood peak conditions, and future flood trend predictions. The text length should be controlled between 150 and 300 characters. The prompt word template is as follows: Role: You are a senior water conservancy and flood control expert, skilled at organizing discrete flood-related data points into logically coherent, professionally expressed flood situation description text that conforms to flood control operational standards; Task: Based on the provided key feature elements and corresponding values, please generate a standardized flood situation description text following the rules and structure below: a1) First, provide an overview of the current overall flood situation and identify the core affected areas; a2) Describe in detail the rainfall situation (region, magnitude, time period), the water conditions of key stations (water level, degree of exceeding warning, flow rate), the engineering conditions of key reservoirs, and the flood peak situation. When describing the status of stations and reservoirs, you must clearly indicate key statuses such as "exceeding warning" and "exceeding flood limit" and their specific values. a3) Finally, when describing the future flood trend forecast, it is necessary to clearly indicate the short-term (next three days) and medium-to-long-term (three days later) forecast trends, and emphasize the potential major risks; a4) Use professional flood control terminology throughout the process, avoiding colloquial expressions. Ensure all elements are complete, logically clear, and the data is accurate. All input data points must be included without adding irrelevant content. Key feature elements and values: [Step S22) Output key feature elements and corresponding values, formatted as "Feature Variable: Value / Description"]. Please strictly adhere to the above requirements to generate a coherent, standardized flood situation description text, with a word count between 150-300 words, ensuring business accuracy and interpretability. b) Dynamic Generation: Employing a feature embedding-model-driven-text output process, the key feature elements and corresponding values ​​output in step S22) are dynamically embedded into prompt word templates. This drives the large language model to generate standardized flood situation description text. Based on the judgment rules, structural requirements, and professional terminology specifications in the input instructions, the model organizes discrete data points into logically coherent written text. An example is shown below: "Currently, the middle reaches of the C River are experiencing significant flooding, with the core affected area being the basin surrounding the C River HK station. Regarding rainfall, the area has experienced torrential rain, with a cumulative rainfall of 68.5 mm. In terms of water levels, the measured water level at the C River HK station is 27.8 meters, exceeding the warning level (27.3 meters) by 0.5 meters, with a measured peak flow of 52,000 cubic meters per second, reaching the standard for a numbered flood. Regarding key reservoir operations, the DJK Reservoir currently has a water level of 160.2 meters, a storage capacity of 29 billion cubic meters, and a discharge flow of 3,500 cubic meters per second; the project is operating normally. In the next 24 hours, moderate rain is expected in the middle reaches of the C River, and the water level at the C River HK station is expected to remain between 27.7 and 27.9 meters, without significant fluctuations, with the overall flood situation trending towards stability." c) Text Validation: The generated text is automatically validated using a script to ensure completeness of its elements, including the inclusion of all key feature variables and consistency with the values ​​output in step S22). Simultaneously, manual sampling is performed to ensure logical coherence, accurate use of terminology, and compliance with flood control operational standards. The validated text serves as input for subsequent semantic vectorization in step three, used for scenario retrieval. The standardized flood situation description text generated in this step is denoted as T. new ; S3) Scene retrieval based on a hybrid matching strategy: The key feature elements and corresponding values ​​obtained in step S2) are standardized and arranged in a fixed order to generate a numerical query vector. The standardized flood situation description text obtained in step S2) is encoded into a real-time semantic query vector. Then, a two-layer hybrid similarity matching is performed. First, the Top-K candidate scenes are retrieved in the numerical feature index using an approximate nearest neighbor search algorithm. Then, the cosine similarity between the semantic query vector and the semantic vector of each candidate scene is calculated, and the results are weighted and fused according to preset weights to obtain a comprehensive similarity score. Specifically, combined with... Figure 4 As shown, it includes the following: S31) Real-time context vectorization, including: Numerical query vector generation: For the key feature element index values ​​output in step S22), the global statistical parameters calculated in step S14), namely the mean μ and standard deviation σ of the index, are called, and standardized using the Z-Score standardization formula. All standardized values ​​are arranged strictly according to the fixed order of the numerical feature vectors generated in step S14), ensuring that the vector dimension and index order are completely consistent with the numerical feature vectors in the scene library, thus forming a real-time numerical query vector. ; Semantic query vector generation: The standardized flood situation description text generated in step S23) and validated is used. The sentence embedding model used in step S14 is then employed to generate the obtained T... new As input to the model, it drives the model to perform semantic encoding, and the model interprets T.new Deep semantic parsing is performed to capture the contextual information, dynamic trends, and interrelationships of the flood situation in the text, such as the causal relationship between rainfall and water level, and the correspondence between flood peaks and numbered floods. A 768-dimensional semantic vector is then output, which serves as the real-time semantic query vector. This vector has the same semantic vector dimension and encoding logic as the scene library in step S14), and can accurately reflect the semantic features of the current real-time flood situation, which can be used for accurate text semantic matching in subsequent steps. S32) Two-layer hybrid similarity matching: The first layer of numerical feature coarse screening: Drives the Approximate Nearest Neighbor (ANN) search algorithm to search within the numerical feature index. The algorithm calculates the query numerical vector. The numerical feature vector of each scene i in the scene library Cosine similarity between S num,i : Based on the cosine similarity values, the top K scenes are sorted in descending order and selected as the candidate set C. For example, if K=3, the candidate set C={s} 03, s 08, s 01 The corresponding numerical similarity is [0.92, 0.85, 0.76]. The purpose of this step is to quickly select a set of candidate scenes that are closest to the current situation in terms of numerical features, which will be used for subsequent second-level semantic fine screening. Second-layer text semantic matching: For each scene i in the candidate set C, obtain its pre-stored semantic vector. Calculate the query semantic vector With each cosine similarity S sem,j : The semantic similarity score is obtained, and this score is used to determine T. new The deep consistency between the candidate scenarios and the descriptions of core flood elements and development trends; Similarity fusion and ranking: A weighted average of numerical similarity scores and semantic similarity scores is preset, where the numerical similarity weight... α =0.4, semantic similarity weight β =0.6 (The weight can be dynamically adjusted according to the actual business scenario. If more emphasis is placed on quantitative indicators, it can be improved.) α Weights; if more emphasis is placed on semantic scene matching, the β weight can be increased), ensuring that the sum of the weights is 1 ( α + β =1), to ensure the reasonableness of the fusion score, a weighted summation formula is used to fuse the numerical similarity score and semantic similarity score of each candidate scene. The fusion formula is as follows: ,in To calculate the overall similarity score, The numerical similarity score. Based on the semantic similarity score, the Top-K candidate scenes are reordered according to the comprehensive similarity score, from high to low. After sorting, the scene ID, numerical similarity score, semantic similarity score and comprehensive similarity score of each candidate scene are retained to form the final candidate scene ranking result. S4) Scheduling scheme recommendation and contingency plan generation: Scenarios with a comprehensive similarity score exceeding a preset basic threshold are selected to form the optimal matching scenario set. The confidence level is dynamically evaluated based on the consistency between the comprehensive similarity score and the core scheduling measures. A preferred scheme set is dynamically constructed based on the confidence level, and a structured scheduling contingency plan document is generated based on a large language model. Specifically, it includes the following: S41) Solution Recommendation and Dynamic Confidence Evaluation: Based on the final ranking of candidate scenarios output in step S32), the optimal matching scenario is selected and a preliminary recommended solution is extracted. Simultaneously, the reliability of the recommendation results is dynamically evaluated using preset rules to determine the confidence level. The specific implementation is as follows: Optimal solution selection: The preset basic threshold for comprehensive similarity is 0.8 (which can be dynamically adjusted according to business needs; for example, it can be increased to 0.85 if higher matching accuracy is required). From the candidate scenarios finally sorted in step S32), the scenarios with comprehensive similarity scores exceeding the basic threshold are selected and recorded as the optimal matching scenario set. The structured scenario library constructed in step S13 is called to extract the "defense measures" content corresponding to the optimal matching scenario as the preliminary recommended solution set. Dynamic confidence assessment: The dynamic assessment of confidence levels includes high confidence, low confidence, and medium confidence levels. High confidence is determined by: performing parallel checks on the following two conditions; if either condition is met, the scenario is considered high confidence: Absolute dominance condition: If the score of the top-ranked solution exceeds a preset high score threshold (e.g., 0.9), it indicates that the model has a strong certainty about the optimal solution; Consistency Advantage Condition: Although the highest score does not reach the absolute high score threshold, the core scheduling measures proposed by the schemes in the candidate set are essentially highly consistent. The specific criterion is as follows: The system extracts the keywords or codes of the core scheduling measures from the schemes in the candidate set C, such as "SX Reservoir increases the discharge flow", "DJK Reservoir decreases the discharge flow", "Activate flood storage and detention area X", etc. Then, these core measures are classified and compared. If the schemes in the candidate set C have the same scheduling direction for key controllable projects (such as SX Reservoir), such as "increase discharge" or "decrease discharge", and the selection of core flood control means is consistent, such as "activate flood storage and detention area" or "fully utilize reservoir to impound water", then the core measures are considered to be highly consistent. To increase robustness, a consistency threshold can be set, such as at least two scenarios in at least three optimal matching scenario sets having logically consistent core scheduling measures, i.e., complete matching or high similarity. Low confidence level determination: If the high confidence level condition is not met, the system will further detect risk scenarios with similar scores but conflicting solutions. A low confidence level determination requires the following conditions to be met simultaneously: the difference in the overall similarity score between the first and second ranked scenarios is less than a preset small threshold, and the key scheduling measures of the two scenarios are essentially in direct conflict. Score similarity criteria: The score difference between the top-ranked and second-ranked schemes in the final comprehensive similarity score is less than a preset small threshold (e.g., 0.05). Essential conflict condition: The key scheduling measures proposed by the two schemes with similar scores are essentially in conflict. The determination of conflict focuses on making opposite or mutually exclusive decisions on the same key project or flood control measure. For example: Scheme A suggests "increasing the discharge flow of SX Reservoir to XXXX cubic meters per second", while Scheme B suggests "maintaining or reducing the discharge flow of SX Reservoir to YYYY cubic meters per second"; Scheme A suggests "immediately activating flood storage area A", while Scheme B suggests "temporarily not activating flood storage area A and prioritizing the use of reservoir capacity". The system extracts and compares the scheduling instructions for the same key object in the two schemes through natural language processing or predefined rules. If the instructions are found to be opposite in direction or logically mutually exclusive, it is determined to be an essential conflict. For other scenarios that are neither high nor low confidence, the system classifies them as medium confidence. The core characteristics of medium confidence scenarios are: the comprehensive similarity score of the best matching scenario is ≥ the basic threshold (0.8) but < the high score threshold (0.9), and the difference in the comprehensive similarity scores of the top two candidate scenarios with the highest scores is ≥ 0.05. The core scheduling measures of the top three candidate scenarios have no essential conflict but have slight differences, such as different monitoring frequencies and different fine-tuning ranges of flood discharge flow.

[0024] S42) Dynamically construct the optimal solution set based on confidence level Based on the confidence assessment results in step S41), a set of preferred solutions for final recommendation is dynamically constructed to ensure the rationality and reliability of the solution set and adapt to the decision-making needs of different confidence scenarios. The specific implementation is as follows: Construction of high-confidence solution set: If step S41) is determined to be high confidence, it means that the optimal matching scenario is highly consistent with the real-time situation and the core measures have high reliability. Therefore, the final preferred solution set only includes the scenario with the highest comprehensive similarity score in the optimal matching scenario set selected in step S41). The solution set includes: optimal scenario ID, comprehensive similarity score, complete "defense measures" content (preliminary recommended solution), confidence level and judgment basis. For example, if the high-confidence preferred solution set only includes candidate scenario 1, it is clearly marked "high confidence (optimal scenario score 0.9171 ≥ 0.9, the first 3 scenario measures are logically consistent)". Construction of a low-confidence solution set: If step S41) is determined to be low-confidence, in order to ensure the comprehensiveness of the decision, from the optimal matching scenario set in step S41), scenarios with a comprehensive similarity score higher than the basic threshold (0.8) are selected from high to low, and the number of selected scenarios does not exceed 3, forming a preferred solution set. Each scenario in the preferred solution set is labeled with scenario ID, comprehensive similarity score, and "defense measures" content, and is also labeled "low confidence (core measures are conflicting and need to be manually judged)", providing multi-dimensional reference for manual decision-making; Construction of medium confidence solution set: If step S41) is determined to be medium confidence, in this case, the logic for constructing the optimal solution set is the same as that for high confidence. Only the best matching scenario with the highest comprehensive similarity score is recommended, without the "high confidence" label. At the same time, it is clearly marked "medium confidence (the score of the best scenario has not reached the high score threshold, the core measures have no essential conflict but there are slight differences, and can be fine-tuned in combination with real-time water conditions)", prompting the dispatchers to flexibly adjust the detailed measures according to the actual situation. S42) Generate a structured scheduling plan document based on a large language model: The optimized solution set constructed in step S41), combined with real-time scenario information and confidence assessment results, is used to generate a structured and professional scheduling plan document through a large language model. This ensures that the plan elements are complete, logically clear, and conform to business specifications. The specific implementation is as follows: Multi-level information integration and instruction construction: Integrating three types of core information to form composite instructions for a large language model, ensuring clear instruction hierarchy and complete content. The specific integration content is as follows: Real-time scenario information: The standardized flood situation description text generated in step S23) is integrated with the flood control objectives set in step S21) to fully present the current real-time flood situation and core flood control objectives; Confidence Level and Recommendation Basis: Introducing the confidence level assessment results from step S41), and combining them with the assessment basis, dynamically generating recommendation statements. The recommendation statement for high confidence is: "The recommended scheme has high confidence (optimal scenario comprehensive similarity ≥ 0.9171, the core measures logic of the top 3 candidate scenarios is consistent), and the following optimal scheme is recommended; if real-time water conditions change, the measures can be fine-tuned based on the actual situation." For low confidence, the recommendation statement is: "The generated scheme has low confidence, and there are conflicts in the core scheduling measures. Several highly similar historical schemes are provided for comprehensive evaluation; the final scheduling scheme needs to be determined based on real-time water conditions and expert experience." Detailed information on the solution set: Traverse the preferred solution set constructed in step S41), extract the "defense measures" content for each scenario, and label the corresponding final comprehensive similarity score. Organize the information in the format "Solution X (Comprehensive Similarity XX): [Measure Content]". For example, if the preferred solution set contains only one scenario, the formatted information would be: "Solution 1 (Comprehensive Similarity 0.9171): 1. Strengthen real-time water level monitoring at the C River HK station, reporting water level and flow data every hour; 2. Maintain a discharge flow of 3500 cubic meters per second at the DJK Reservoir, dynamically adjusting the discharge scale according to real-time water conditions; 3. Strengthen dike patrols within the basin, focusing on identifying dangerous sections and promptly addressing potential hazards; 4. Closely monitor future rainfall forecasts and conduct dynamic assessments of the flood situation." Integrating the above three types of information, a composite instruction is constructed, with the following template: "Role: You are an expert in writing flood control and water conservancy dispatch plans, skilled in combining flood situation, flood control objectives, and historical dispatch plans to write structurally complete, professionally rigorous, and implementable dispatch plan documents. Task: Based on the following integrated information, please generate a standardized structured dispatch plan. The plan must include three core parts: 1. Flood situation (fully presenting the real-time flood situation); 2. Flood control objectives (clearly defining core flood control requirements); 3. Recommended dispatch plan (combining confidence level explanations, presenting the plan content and basis). Requirements: Use professional flood control terminology, ensure logical coherence, complete elements, and direct applicability to flood control dispatch decisions. Do not add irrelevant content; use formal and rigorous language. Integrated information: 1. Real-time scenario information: [Integrated real-time situation and flood control objectives]; 2. Confidence level and recommendation basis: [Dynamically generated recommendation explanations]; 3. Detailed information on the plan set: [Formatted plan set content]. Please strictly follow the above requirements to generate the dispatch plan document." Scheduling plan generation: The composite instructions constructed above are used as input to the model, driving the model to automatically generate a structured scheduling plan document based on the hierarchical structure and content of the instructions.

[0025] Finally, it should be noted that the above description is a further detailed explanation of the invention in conjunction with specific embodiments. It should not be considered that the specific implementation of the invention is limited to these descriptions. For those skilled in the art, any simple substitutions made without departing from the concept of the invention should be considered within the scope of protection of this invention. The above embodiments are merely representative examples of the invention. Obviously, the invention is not limited to the above embodiments and many variations are possible. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the invention should be considered within the scope of protection of this invention.

[0026] Furthermore, the description of the above technical solutions is exemplary, and this specification may be embodied in different forms and should not be construed as limiting it to the technical solutions set forth herein. Rather, providing these descriptions will ensure that the disclosure of this invention is thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. Moreover, the technical solutions of this invention are defined only by the scope of the claims. Features of various embodiments of the invention may be combined or spliced ​​together in part or in whole, and may be implemented in various different configurations as will be fully understood by those skilled in the art. Embodiments of the invention may be implemented independently of each other or may be implemented together in an interdependent relationship.

[0027] For those skilled in the art, without departing from the concept of this invention, several simple deductions or substitutions can be made, and all of these should be considered to fall within the protection scope of this invention.

Claims

1. A method for recommending flood control scheduling schemes based on matching large language models with scene libraries, characterized in that: Includes the following steps: S1) Construct a structured scenario library for flood situation and dispatch scheme: Using a JSON Schema containing a three-element framework of flood situation, flood control objectives and defense measures as an extraction template, construct multi-task instruction prompts including role settings, task descriptions, JSON Schema embeddings and annotation examples. Take unstructured historical consultation minutes as input, drive the large language model to map and fill the historical consultation minutes into the three-element framework in a single inference and extract core data. Then, discretize and manually verify the data according to flood control business rules, store it in JSON format to form a structured scenario library, and perform offline vectorization preprocessing on the flood situation content of each scenario in the structured scenario library to generate numerical feature vectors and semantic vectors to form a vector database, and establish numerical feature vector indexes and semantic vector indexes respectively. S2) Generate standardized flood situation text based on large language model: Receive real-time rainfall and water level data and set flood control targets, use a three-stage algorithm of correlation screening, causal modeling and expert verification to identify key feature elements and obtain corresponding values, dynamically embed key feature elements and corresponding values ​​into preset prompt word templates, and drive the large language model to generate standardized flood situation description text. S3) Scene retrieval based on hybrid matching strategy: After standardization of the key feature elements and corresponding values ​​obtained in step S2), arrange them in a fixed order to generate a numerical query vector. Then, encode the standardized flood situation description text obtained in step S2) into a real-time semantic query vector. Then, perform two-layer hybrid similarity matching. First, retrieve the Top-K candidate scenes in the numerical feature index using the approximate nearest neighbor search algorithm. Then, calculate the cosine similarity between the semantic query vector and the semantic vector of the candidate scenes one by one, and then weight and fuse them according to the preset weight to obtain the comprehensive similarity score. S4) Scheduling scheme recommendation and contingency plan generation: Select scenarios with a comprehensive similarity score exceeding a preset basic threshold to form the optimal matching scenario set. Dynamically evaluate the confidence level based on the consistency between the comprehensive similarity score and the core scheduling measures. Dynamically construct the preferred scheme set based on the confidence level and generate a structured scheduling contingency plan document based on the large language model.

2. The flood control scheduling scheme recommendation method based on matching a large language model and a scenario library as described in claim 1, characterized in that: In step S1), the flood situation includes four subcategories: real-time rainfall, real-time water level, forecasted rainfall, and forecasted water level.

3. The flood control scheduling scheme recommendation method based on matching a large language model and a scenario library as described in claim 1, characterized in that: In step S1), when discretizing, the extracted core data is standardized according to the process of numerical analysis, unit unification, rule matching, and label generation. The rule matching includes three categories: threshold judgment, interval matching, and relative value calculation.

4. The flood control scheduling scheme recommendation method based on matching a large language model and a scenario library as described in claim 1, characterized in that: In step S1), the offline vectorization preprocessing includes numerical feature vectorization and semantic vectorization. The numerical feature vectorization performs global statistical calculations on the mean μ and standard deviation σ of all quantitative indicators in the structured scene library, generates a global statistical parameter table and stores it, uses the Z-Score standardization formula to transform each quantitative indicator value, and generates numerical feature vectors by arranging them in a fixed order according to the global quantitative indicator list. Semantic vectorization uses a sentence embedding model to encode the flood situation description text for each scenario, generating a 768-dimensional semantic vector; an IVF_FLAT index is constructed for the numerical feature vector set, and an HNSW index is constructed for the semantic vector set.

5. The flood control scheduling scheme recommendation method based on matching a large language model and a scenario library as described in claim 1, characterized in that: In step S2), identifying key feature elements includes the following steps in sequence: Preliminary correlation screening: A correlation analysis algorithm combining optimal subset screening and stepwise regression is used to initially identify key information elements; Causal modeling: Based on the deep integration of identified key information elements and expert experience, causal analysis technology based on dynamic Bayesian networks is adopted to reveal the causal mechanism between key information elements and their impact on flood control objectives through structure learning and parameter learning. Expert verification: The physical mechanism constraints are defined using bounded linear temporal logic, and the dynamic Bayesian network model is verified through statistical model testing methods, outputting a set of key feature elements that conform to data causal inference and physical laws.

6. The flood control scheduling scheme recommendation method based on matching a large language model and a scenario library as described in claim 1, characterized in that: In step S2), the prompt word template includes role setting, task description, rule constraints and structural requirements. The structural requirements stipulate that the generated standardized flood situation description text shall include an overview of the overall flood situation, rainfall, water conditions at key stations, key reservoir conditions, flood peak conditions and future flood trend predictions in sequence, and the number of words in the text shall be controlled between 150 and 300.

7. The flood control scheduling scheme recommendation method based on matching a large language model and a scenario library as described in claim 1, characterized in that: In step S3), the two-layer hybrid similarity matching includes: the first layer retrieves the numerical query vector in the numerical feature index using an approximate nearest neighbor search algorithm, and selects the top K scenes as a candidate set according to the descending order of cosine similarity; the second layer calculates the cosine similarity between the real-time semantic query vector and the semantic vector of the scene for each scene in the candidate set; the final comprehensive similarity score is calculated according to the following weighted summation formula: ,in To calculate the overall similarity score, The numerical similarity score. The semantic similarity score. α and β For preset weights and α + β =1.

8. The flood control scheduling scheme recommendation method based on matching a large language model and a scenario library as described in claim 1, characterized in that: In step S4), the dynamic evaluation of confidence level includes high confidence level determination, low confidence level determination and medium confidence level determination. High confidence level determination is: the overall similarity score of the first ranked scene exceeds the preset high score threshold, or the core scheduling measures logic of at least two scenes in the optimal matching scene set is consistent. The low confidence level determination requires the following conditions to be met simultaneously: the difference in the comprehensive similarity scores between the first and second ranked scenarios is less than a preset small threshold, and the key scheduling measures of the two scenarios are in direct conflict in essence. The others are judged with a medium confidence level.

9. The flood control scheduling scheme recommendation method based on matching a large language model and a scenario library as described in claim 8, characterized in that: The optimal solution set is dynamically constructed based on the confidence level, including: For high confidence, the preferred solution set only includes the best matching scenario with the highest comprehensive similarity score; If the confidence level is low, select no more than 3 scenarios with a comprehensive similarity score higher than the preset basic threshold from the set of optimal matching scenarios in descending order to form the preferred solution set; If the confidence level is medium, only the best matching scenario with the highest overall similarity score will be recommended and marked with a medium confidence level.

10. The flood control scheduling scheme recommendation method based on matching a large language model and a scenario library as described in claim 1, characterized in that: In step S4), the process of generating the structured scheduling plan document is as follows: A composite instruction is constructed by integrating real-time scenario information, confidence assessment results, and detailed information of the preferred solution set. The composite instruction includes three structural requirements and integrated information: role setting, task description, and contingency plan. The compound instructions are input into the large language model, which generates a structured dispatch plan document containing three parts: flood situation, flood control objectives, and recommended dispatch scheme.