Physical fusion large language model multi-agent-based permeability coefficient field inversion method

By employing a physical fusion of large language models and multi-agent methods, the automated inversion of the permeability coefficient field is achieved, solving the high threshold and non-uniqueness problems of traditional methods. This ensures the physical consistency and efficiency of the inversion results, making it suitable for groundwater resource assessment and pollutant migration prediction.

CN122046975APending Publication Date: 2026-05-15QINGDAO BINHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610161282.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-04
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing methods for inverting permeability coefficient fields rely on human experience and traditional optimization algorithms, which have high barriers to entry, high computational costs, non-uniqueness, and local optima. Furthermore, data-driven methods lack physical interpretability and generalization ability, making it difficult to meet the needs of rapid decision-making.

Method used

A multi-agent approach based on physical fusion of large language models is adopted. Executable code is generated by the inference agent and combined with the execution agent to calculate groundwater flow. Parameters are adjusted through error evaluation feedback to achieve autonomous error correction and iterative optimization, thus constructing a closed-loop control system.

Benefits of technology

The process of permeability coefficient field analysis is fully automated, which reduces the reliance on the experience of hydrogeological experts, improves modeling efficiency and engineering decision-making speed, ensures that the inversion results follow physical constraints, and enhances the robustness and accuracy of the inversion results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122046975A_ABST
    Figure CN122046975A_ABST
Patent Text Reader

Abstract

The invention discloses a permeability coefficient field inversion method based on physical fusion large language model multi-agent, and belongs to the technical field of hydrogeological modeling and artificial intelligence crossing. The method aims at solving the problems that in the prior art, efficiency is low due to dependence on artificial experience, a pure data driving method lacks physical consistency, and closed-loop error correction cannot be achieved in large language model application. The method comprises the following steps: constructing a collaboration framework comprising a reasoning agent and an execution agent; generating an inversion code for calling a groundwater numerical simulator by the reasoning agent according to a natural language task; and the execution agent runs the code and obtains a simulation result, a code execution error and a simulation error are fed back to the reasoning agent through a double feedback mechanism of an inner-layer logic loop and an outer-layer physical loop, and the reasoning agent is driven to dynamically correct and iteratively optimize the code or an inversion strategy until the result is converged. According to the method, full-process automation of permeability coefficient field inversion is realized, and the physical rationality and reliability of an inversion result are ensured while manual dependence is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of hydrogeological modeling and artificial intelligence, and in particular relates to a method for inverting the permeability coefficient field based on a physical fusion large language model multi-agent. Background Technology

[0002] In fields such as groundwater resource assessment, pollutant migration prediction, and engineering seepage prevention, the permeability field of the underground medium is a key physical parameter determining the flow and solute transport behavior of groundwater. Due to the complexity of geological processes, the permeability coefficient exhibits significant spatial heterogeneity, making its accurate acquisition crucial for constructing reliable groundwater numerical models. However, limitations such as the limited number of borehole samples, high costs of field tests, and the ease with which strata can be disturbed make it difficult to directly obtain high-resolution data. Typically, inversion modeling methods are used to deduce the distribution of the permeability field from observational data.

[0003] Current methods for permeability coefficient field inversion primarily rely on a combination of manual experience and traditional optimization algorithms. Modelers must manually construct numerical models using specialized software, repeatedly testing and calibrating them through preset parameter partitions or geostatistical random fields, combined with various optimization algorithms. This traditional approach has significant drawbacks. First, the parameterization process for high-dimensional heterogeneous fields requires profound hydrogeological expertise, making the work extremely challenging. Second, in high-dimensional parameter spaces, the inversion process faces severe non-uniqueness and local optima problems, resulting in enormous computational costs and difficulty in convergence. Furthermore, the process lacks automated error correction capabilities. When unreasonable parameter combinations cause model crashes, the algorithm cannot automatically diagnose the problem, requiring frequent manual intervention and adjustments, leading to low efficiency. In actual engineering projects, this often takes weeks or even months, failing to meet the needs of rapid decision-making.

[0004] In recent years, deep learning-based surrogate models or end-to-end inversion methods have been applied to permeability coefficient field reconstruction to improve computational efficiency. While these methods can significantly shorten the computation time per iteration, they are essentially data-driven black-box models. They require tens of thousands of forward simulations to build training datasets, leading to high upfront data preparation costs. Furthermore, they lack physical interpretability, making it difficult to guarantee that the inversion results strictly satisfy fundamental physical constraints such as Darcy's law and mass conservation. Especially in regions with scarce observational data, their generalization ability is poor, and the reliability of the inversion results cannot be fully trusted in engineering practice.

[0005] With the rise of large language models, a few studies have attempted to utilize them to assist in generating numerical simulation code or optimization scripts. However, current explorations mainly remain at the stage of static code generation or open-loop assistance, and a mature technical system has not yet been formed. Existing general-purpose large language models lack prior physical knowledge specific to the field of hydrogeology, and the generated model files or parameter settings often violate basic common sense, producing illusions. At the same time, existing technologies mainly act as code translators and cannot autonomously correct code based on runtime feedback from simulation software like human experts, nor can they dynamically adjust and update strategies based on intermediate simulation results. It is difficult for a single intelligent agent to independently complete the complex task of the entire process from geological conceptualization, code writing, simulation execution to result analysis. Therefore, existing technologies still lack a closed-loop technical system that can deeply integrate physical mechanism constraints with the reasoning capabilities of large language models and achieve autonomous inversion, automatic error correction, and iterative optimization of permeability coefficient fields without human intervention. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention proposes a penetration coefficient field inversion method based on a physical fusion large language model for multiple agents, thereby resolving the issues present in the prior art.

[0007] Firstly, to achieve the above objectives, this invention provides a method for inverting the penetration coefficient field of a multi-agent system based on a physical fusion large language model, comprising the following steps: The reasoning agent receives a natural language task description containing information about the groundwater system. Based on the task description, the reasoning agent generates executable code containing a penetration coefficient field parameterization scheme and optimized control logic. The executable code is run by the executing agent to call an external physical numerical simulator to perform forward modeling calculations of groundwater flow and obtain simulation results; The simulation results are compared with preset observation data to generate error assessment information; The error evaluation information is fed back to the inference agent to drive the inference agent to adjust the parameterization scheme or optimization control logic in the executable code, and iterate until the convergence condition is met.

[0008] Optionally, the collaboration between the inference agent and the execution agent includes: The reasoning agent and the execution agent communicate and synchronize their states through a communication interface built on an automatic agent framework. The execution agent sends error messages or abnormal states generated when running the executable code to the inference agent as a first type of feedback. The reasoning agent corrects syntax or logic errors in the executable code based on the first type of feedback.

[0009] Optionally, the inference agent generates executable code including: The reasoning agent, based on embedded hydrogeological knowledge rules, parses the natural language task description into a partitioning strategy for the permeability coefficient field. The reasoning agent assigns an initial range of penetration coefficients to each partition that conforms to common physical sense; Based on the partitioning strategy and the initial range, the inference agent writes an inversion script that calls an optimization algorithm library to minimize the simulation error as the objective function.

[0010] Optionally, the executing agent runs executable code including: Before executing the executable code, static syntax analysis and application interface call compliance checks are performed on the executable code. After the check is passed, the external physical numerical simulator is driven to load the model input file and perform calculations through the interface instructions defined in the executable code.

[0011] Optionally, the external physical numerical simulator is a groundwater flow numerical simulation program that strictly follows Darcy's law and the principle of conservation of mass.

[0012] Optionally, the generated error assessment information includes: Calculate the root mean square error between the head distribution data in the simulation results and the observed head values ​​in the observation data; Determine whether the root mean square error is lower than a preset convergence threshold.

[0013] Optionally, driving the inference agent to make adjustments includes: When the error evaluation information indicates that the convergence condition has not been met, the error evaluation information is sent to the reasoning agent as a second type of feedback; The reasoning agent adjusts the optimization algorithm control parameters or the penetration coefficient search space boundary in the executable code based on the error quantification index in the second type of feedback.

[0014] Optionally, after the convergence condition is met, the final inverted spatial distribution map of the permeability coefficient field and the corresponding uncertainty analysis report are output.

[0015] Secondly, the present invention also provides a computer terminal device, comprising: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the penetration coefficient field inversion method based on the physical fusion large language model multi-agent in the first aspect described above.

[0016] Thirdly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the steps of the penetration coefficient field inversion method based on a physical fusion large language model multi-agent in the first aspect described above.

[0017] Compared with the prior art, the present invention has the following advantages and technical effects: This invention provides a permeability coefficient field inversion method based on a physical fusion large language model multi-agent collaboration framework. By constructing a physical fusion large language model multi-agent collaborative framework, it automates the entire process from geological conceptualization to parameter inversion, significantly reducing reliance on hydrogeological expert experience and manual modeling costs. It avoids the tedious manual trial-and-error process of traditional methods, thereby greatly improving modeling efficiency and engineering decision-making speed. This method adopts a code-as-a-strategy paradigm, directly calling mature physical numerical simulators for calculations without the need for pre-constructing massive training datasets. While effectively reducing computational costs, it ensures that the inversion results strictly adhere to physical mechanisms such as Darcy's law, solving the problems of poor interpretability and weak reliability in regions with scarce observational data inherent in purely data-driven black-box models. Furthermore, the closed-loop mechanism established in this invention, with its perception, decision-making, and execution feedback capabilities, can autonomously diagnose and correct code logic and inversion strategies based on runtime feedback from the numerical simulator. This achieves true intelligent closed-loop control, ensuring the robustness and high accuracy of the complex heterogeneous permeability coefficient field inversion process, overcoming the technical bottleneck of frequent process interruptions due to code errors or unreasonable parameters in existing technologies. Attached Figure Description

[0018] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart illustrating the penetration coefficient field inversion method based on a physical fusion large language model for multi-agent systems according to an embodiment of the present invention. Figure 2 This is a schematic diagram showing the comparison between the real head field and the inverted head field, as well as the residual distribution, in an embodiment of the present invention. (a) is the real head field, (b) is the inverted head field, and (c) is the residual distribution. Detailed Implementation

[0019] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0020] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0021] like Figure 1 As shown, this embodiment provides a method for inverting the penetration coefficient field of a multi-agent system based on a physical fusion large language model, including: The reasoning agent receives a natural language task description containing information about the groundwater system. Based on the task description, the reasoning agent generates executable code containing a penetration coefficient field parameterization scheme and optimized control logic. The executable code is run by the executing agent to call an external physical numerical simulator to perform forward modeling calculations of groundwater flow and obtain simulation results; The simulation results are compared with preset observation data to generate error assessment information; The error evaluation information is fed back to the inference agent to drive the inference agent to adjust the parameterization scheme or optimization control logic in the executable code, and iterate until the convergence condition is met.

[0022] Specifically, the implementation process of this embodiment includes: First, in step S1 (task initialization phase), the system receives the user's input of the inversion task described in natural language, basic hydrogeological data of the study area (such as aquifer boundaries and initial permeability coefficient range), and observational data (such as monitoring well head sequences). Then, in step S2 (code generation phase), the inference agent, based on a built-in physical fusion prompt framework, transforms the aforementioned unstructured task into a standardized Python calibration script. During this process, the agent utilizes the "code as policy" paradigm to automatically define parameterization schemes (such as zoning or hydraulic conductivity fields) and optimization algorithms.

[0023] Next, step S3 (logic verification phase) is performed, where the executing agent performs static syntax analysis and API interface checks on the generated script. If the code contains syntax errors or library function call anomalies, the system will trigger the inner "logic feedback loop," returning detailed error backtracking information to the inference agent, instructing it to correct the code logic while maintaining the physical semantics, until the script can run successfully.

[0024] After the script passes verification, it proceeds to step S4 (physical simulation execution phase). The executing agent calls the external numerical simulation engine MODFLOW to perform forward modeling calculations and captures simulation logs in real time. Subsequently, in step S5 (physical consistency evaluation phase), the system automatically extracts the head or concentration data from the simulation output, calculates the root mean square error (RMSE) between the simulation output and the measured data, and evaluates whether it meets the preset convergence criteria (e.g., RMS error < observation noise level). If the convergence requirements are not met, the system triggers the outer physical feedback loop, feeding back the quantified error indicators and intermediate parameter distribution to the inference agent, driving it to adjust the inversion strategy or update the parameter search space, and regenerate or optimize the next round of simulation code.

[0025] Finally, when the simulation results meet the convergence conditions, step S6 (result output stage) is executed, and the system outputs the final inverted heterogeneous permeability coefficient field distribution map and related uncertainty analysis report, thus ending the entire inversion process.

[0026] Furthermore, the collaboration between the reasoning agent and the execution agent includes: The reasoning agent and the execution agent communicate and synchronize their states through a communication interface built on an automatic agent framework. The execution agent sends error messages or abnormal states generated when running the executable code to the inference agent as a first type of feedback. The reasoning agent corrects syntax or logic errors in the executable code based on the first type of feedback.

[0027] Furthermore, the reasoning agent generates executable code including: The reasoning agent, based on embedded hydrogeological knowledge rules, parses the natural language task description into a partitioning strategy for the permeability coefficient field. The reasoning agent assigns an initial range of penetration coefficients to each partition that conforms to common physical sense; Based on the partitioning strategy and the initial range, the inference agent writes an inversion script that calls an optimization algorithm library to minimize the simulation error as the objective function.

[0028] Furthermore, the executable code executed by the intelligent agent includes: Before executing the executable code, static syntax analysis and application interface call compliance checks are performed on the executable code. After the check is passed, the external physical numerical simulator is driven to load the model input file and perform calculations through the interface instructions defined in the executable code.

[0029] Furthermore, the external physical numerical simulator is a groundwater flow numerical simulation program that strictly follows Darcy's law and the principle of conservation of mass.

[0030] Furthermore, the generated error assessment information includes: Calculate the root mean square error between the head distribution data in the simulation results and the observed head values ​​in the observation data; Determine whether the root mean square error is lower than a preset convergence threshold.

[0031] Furthermore, driving the inference agent to make adjustments includes: When the error evaluation information indicates that the convergence condition has not been met, the error evaluation information is sent to the reasoning agent as a second type of feedback; The reasoning agent adjusts the optimization algorithm control parameters or the penetration coefficient search space boundary in the executable code based on the error quantification index in the second type of feedback.

[0032] Furthermore, after the convergence condition is met, the final inverted spatial distribution map of the permeability coefficient field and the corresponding uncertainty analysis report are output.

[0033] Specifically, the implementation process of this embodiment includes: First, the model was constructed and the data was initialized. The selected study area has a relatively complex aquifer geological structure, including seven typical geological units: the northern floodplain, the southern floodplain, the upper reaches of the paleochannel, the lower reaches of the paleochannel, clay lenses, sand bodies, and high-conductivity fault zones. Based on the above geological information, this embodiment established a two-dimensional steady-state groundwater flow numerical model using MODFLOW-2005. The model adopted uniform grid partitioning and set constant head boundary conditions to simulate regional groundwater flow. At the same time, two pumping wells were arranged in the area as source and sink terms. In order to obtain observational data for inversion, nine virtual observation wells were preset in the study area, and a set of real permeability coefficients were set as "true values" for the seven types of geological units (Table 1). The model was run to obtain the real head distribution field. Then, Gaussian random noise with a mean of 0 and a standard deviation of 0.05 meters was superimposed on this to simulate the measurement error in actual observation, thereby generating the final observed head data. The model grid information, boundary conditions, noisy observation data, and the task instruction to "invert the spatial distribution of permeability coefficient of heterogeneous aquifers based on observation data" are all uniformly input into the data storage and interface module.

[0034] Subsequently, the system automatically enters the task parsing and strategy generation phase. Upon receiving the instruction, the inference agent module performs semantic understanding using embedded hydrogeological prior knowledge, automatically determining that a "zonal parameterization" strategy should be adopted. This involves dividing the aquifer into seven independent parameter zones based on geological units. Simultaneously, the agent sets a broad but physically reasonable parameter search range for each zone. For example, the permeability coefficient range for the high-permeability fault zone (K7) is set to [1, 200] m / d, and the range for the clay lens body (K5) is set to [0.001, 5] m / d. Based on these settings, the inference agent automatically writes and generates the first version of the inversion control script. This script defines the root mean square error (RMSE) between the observed and simulated hydraulic heads as the objective function, selects the Differential Evolution algorithm as the global optimizer, sets the strategy to best1bin, and limits the maximum number of model calls to 5000.

[0035] Next, a closed-loop automated iterative process is initiated. The execution control module runs the initial script, driving the physical numerical simulation module MODFLOW to perform forward modeling calculations on randomly generated parameter combinations. The optimization and evaluation module calculates the RMSE of each simulation result and observation data in real time and feeds the error value back to the inference agent, directing the algorithm to generate new population parameters for iteration. It is worth noting that this method utilizes a unique automatic error correction function during operation: in a certain iteration, when the algorithm attempts an extreme parameter combination that causes MODFLOW numerical non-convergence (e.g., K7=195 m / d), the feedback and error correction module immediately captures this "running failure" anomaly. After feeding back structured error information to the inference agent, the agent dynamically corrects the script, for example, temporarily lowering the search upper limit of K7 from 200 m / d to 150 m / d or increasing the solver's stability settings, and automatically restarting the iteration. The entire error correction and recovery process requires no manual intervention.

[0036] After approximately 3500 model calls, the inversion process reached the convergence criterion and output the results. Stable convergence was achieved when the RMSE reached 0.035 meters. This residual value is significantly lower than the preset observation noise level (0.05 meters), proving that the method can effectively filter noise and identify the true physical signals. By substituting the inverted parameters (Table 1) into the model for verification, it was found that the equipotential line morphology of the simulated head field is highly consistent with that of the real head field, accurately reproducing complex flow field characteristics such as flow around and confluence. Figure 2As shown, (a) is the actual hydraulic head field, (b) is the inverted hydraulic head field, and (c) is the residual distribution. Spatial analysis of the residuals shows that they exhibit a zero-mean random unstructured distribution throughout the entire study area, confirming that the obtained parameter set is within the neighborhood of the global optimal solution. Regarding geological interpretation, although the inverted value (0.71 m / d) of the clay lens (K5) differs somewhat from the actual value (0.01 m / d), this objectively reflects the equivalent threshold effect of low-permeability media in groundwater inversion. Crucially, this embodiment correctly identified its status as the "lowest relative permeability unit" and correctly compared it with the fault zone as the "highest relative permeability unit," fully preserving the key geological logic characterizing the heterogeneity of the aquifer. In summary, this embodiment fully demonstrates the entire process of achieving efficient inversion of a high-dimensional, highly heterogeneous permeability coefficient field without human intervention.

[0037] Table 1

[0038] This invention also includes a permeability coefficient field inversion system based on a physical fusion large language model multi-agent system, which mainly consists of the following components. These components cooperate with each other to complete the automatic inversion process of the permeability coefficient field, specifically including: The reasoning agent module, built upon a large language model, is the core intelligent unit in this embodiment. It is used to understand the user-inputted inversion task requirements, basic information about the groundwater system, and inversion constraints. This module embeds knowledge rules and physical constraints from the hydrogeological field, automatically generating a permeability coefficient field parameterization scheme, inversion objective function, parameter value range, and optimization algorithm control logic. It also dynamically adjusts the inversion strategy based on feedback information.

[0039] Execution Control Module: This module receives the inversion scripts generated by the inference agent and automatically executes and manages them within the computing environment. It is responsible for accessing operating system resources, numerical simulation program interfaces, and optimization algorithm libraries to schedule and control the inversion process, while simultaneously monitoring the program's running status in real time.

[0040] Physical Numerical Simulation Module: This module is for numerical calculation of groundwater flow, used to calculate groundwater head, flow rate, and other response results under given permeability coefficient field conditions. This module preferably uses MODFLOW or an equivalent groundwater numerical simulation software, strictly adhering to Darcy's law and the principle of groundwater mass conservation to ensure the physical consistency of the simulation results.

[0041] Communication interface: Implement message passing and state synchronization between intelligent agents based on an automatic agent framework (such as AutoGen).

[0042] Through the coordinated operation of the above-mentioned components, this embodiment can achieve automation, intelligence, and efficiency in the permeability coefficient field inversion process while ensuring physical constraints.

[0043] The penetration coefficient field inversion system based on a physical fusion large language model and multi-agent system provided by this invention adopts a modular hierarchical structure design. Its overall structure includes an intelligent decision-making layer, an execution control layer, and a physical computing layer from top to bottom. Each layer achieves information interaction and collaborative operation through standardized interfaces.

[0044] The intelligent decision-making layer, composed of reasoning agent modules, is located at the upper level of the system structure. As the core of the inversion process, it receives external inputs including the inversion objective, basic information about the groundwater model, and constraints. It then performs semantic understanding and logical reasoning on the inversion task. Through embedded hydrogeological knowledge rules and physical constraints, the intelligent decision-making layer uniformly plans the parameterization of the permeability coefficient field, the inversion strategy, and the optimization process, and outputs executable inversion control commands.

[0045] The execution control layer, located between the intelligent decision-making layer and the physical computing layer, consists of execution control modules and is used to schedule and execute the inversion script output by the intelligent decision-making layer. This layer is responsible for calling operating system resources, optimizing algorithm libraries, and numerical simulation interfaces to perform sequential control and state management of the inversion process, while also monitoring the program's running status in real time.

[0046] The physical computation layer consists of a physical numerical simulation module and an optimization and evaluation module. Under the scheduling of the execution control layer, it performs numerical calculations of groundwater flow and updates inversion parameters. The physical numerical simulation module calculates the groundwater head or flow response based on the current permeability field parameters, while the optimization and evaluation module performs error analysis on the simulation results and observation data, generating evaluation information to guide the next step of the inversion.

[0047] Through the above-described hierarchical structure design, this embodiment realizes a clear structural relationship of "decision-execution-calculation-feedback" in the permeability coefficient field inversion process, ensuring the stability, scalability and reliability of the system operation and the inversion results.

[0048] In this embodiment, a computer terminal device is provided, including: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the above-described method for inverting the penetration coefficient field of a multi-agent system based on a physical fusion large language model.

[0049] In this embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the above-described method for inverting the penetration coefficient field of a multi-agent system based on a physical fusion large language model.

[0050] This invention surpasses existing technologies through the following key technical features: 1. A physical fusion paradigm based on code as policy: Unlike the traditional "black box" approach of end-to-end deep learning that directly predicts parameters, this embodiment employs a code-as-policy fusion method. The inference agent does not directly output the permeability coefficient value; instead, it generates an executable Python calibration script (calling MODFLOW). This technique ensures that all inversion operations are performed within the framework of a physical numerical simulator, thereby forcibly guaranteeing the physical consistency of the inversion results (satisfying Darcy's law and mass conservation), directly solving the problem of lack of physical interpretability in purely data-driven methods.

[0051] 2. Dual feedback loop mechanism: This embodiment employs an internal and external dual feedback loop mechanism: the inner logic loop utilizes the executing agent to capture syntax errors or API call anomalies during code execution and feeds back the backtracking information to the inference agent for self-correction. This enables the system to handle programming errors and prevent inversion interruptions. The outer physical loop feeds back quantitative indicators calculated by numerical simulation (such as head residual RMSE and solute concentration distribution) to the inference agent. Based on these physical responses, the agent dynamically adjusts the optimization algorithm (such as the mutation rate of the differential evolution algorithm) or updates the parameter search space.

[0052] 3. Hint engineering and constraint manifolds for embedding domain knowledge: To address the issue of "illusions" arising from general large models, this embodiment embeds structured hydrogeological prior knowledge (such as empirical ranges of permeability coefficients for different lithologies and definitions of aquifer boundary conditions) into the system prompts of the reasoning agent. By pre-setting "constrained manifolds," the possible parameter solution set is strictly limited to a physically reasonable range, preventing the agent from generating parameter combinations that violate geological common sense.

[0053] An alternative solution to this embodiment is: First, regarding the selection of the core inference engine (large language model), this embodiment uses a general-purpose, high-performance large language model (such as GPT-4 or DeepSeek). However, in practical applications, a specialized, low-parameter model fine-tuned with professional data from the hydrogeological field can be used as an alternative. This alternative involves retraining open-source models (such as Llama or Mistral) using a large number of hydrogeological textbooks, the MODFLOW manual, and historical case reports, enabling them to have stronger domain-specific code generation capabilities without relying on large-scale prompting engineering. Although its general inference capabilities may be slightly weaker, it offers faster response times and lower deployment costs in specific inversion tasks, while still being able to complete the conversion task from natural language to inversion scripts.

[0054] Secondly, regarding the physical simulation engine and execution environment, although this embodiment uses MODFLOW as an example, other groundwater numerical simulation software or multiphysics simulation tools can be used as alternatives. For example, the physical engine used for agent docking can be replaced with finite element software FEFLOW, GMS (Groundwater Modeling System), or the open-source OpenGeoSys. In this case, the code generated by the inference agent will be converted from Python scripts based on the floppy library to the scripting language of the corresponding software (such as FEFLOW's IFM plugin interface or C++ scripts), or the corresponding format input file can be directly generated and the command-line solver can be called. This alternative does not change the essence of "physical fusion," but only changes the specific physical calculation carrier, and can still ensure the physical consistency of the inversion results.

[0055] Furthermore, in terms of the architecture design of the intelligent agents, the dual-agent (reasoning + execution) mode of this embodiment can be extended to a hierarchical multi-agent expert group mode. For example, a "geological expert agent" can be set up to be responsible for generalizing the geological model, a "programming expert agent" can be responsible for writing code, and a "review expert agent" can be responsible for checking the code logic. Finally, the "execution agent" runs the code. Alternatively, a simplified solution using a single agent combined with the thought chain technology can be adopted, in which a single agent internally digests the perception, decision-making, and reflection processes step by step. Although its stability in complex tasks may be slightly inferior to multi-agent collaboration, it can still achieve automated closed-loop control in simple one-dimensional or two-dimensional homogeneous model inversion, which is a simplified variation of the technical solution in this embodiment.

[0056] Finally, regarding the implementation of the inversion optimization strategy, in addition to the "code as strategy" approach (i.e., the LLM directly writes the code for optimization algorithms such as differential evolution) adopted in this embodiment, a hybrid approach of "LLM driving traditional inversion software" can also be used as an alternative. That is, the large language model no longer directly writes the iterative loop code for the optimization algorithm, but instead generates the control files and template files required by the parameter estimation software (such as PEST or UCODE), and then schedules the PEST program to automatically optimize the parameters. In this alternative, the large language model mainly plays the role of "advanced configurator" and "result interpreter." Although the mathematical solution of the optimization process is delegated to PEST, the automated construction of the entire workflow and the physical logic control are still dominated by the agent, achieving the same goal of lowering the threshold and automating the inversion process.

[0057] This invention provides a permeability coefficient field inversion method based on a physical fusion large language model multi-agent collaboration framework. By constructing a physical fusion large language model multi-agent collaborative framework, it automates the entire process from geological conceptualization to parameter inversion, significantly reducing reliance on hydrogeological expert experience and manual modeling costs. It avoids the tedious manual trial-and-error process of traditional methods, thereby greatly improving modeling efficiency and engineering decision-making speed. This method adopts a code-as-a-strategy paradigm, directly calling mature physical numerical simulators for calculations without the need for pre-constructing massive training datasets. While effectively reducing computational costs, it ensures that the inversion results strictly adhere to physical mechanisms such as Darcy's law, solving the problems of poor interpretability and weak reliability in regions with scarce observational data inherent in purely data-driven black-box models. Furthermore, the closed-loop mechanism established in this invention, with its perception, decision-making, and execution feedback capabilities, can autonomously diagnose and correct code logic and inversion strategies based on runtime feedback from the numerical simulator. This achieves true intelligent closed-loop control, ensuring the robustness and high accuracy of the complex heterogeneous permeability coefficient field inversion process, overcoming the technical bottleneck of frequent process interruptions due to code errors or unreasonable parameters in existing technologies.

[0058] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for inverting the penetration coefficient field of a multi-agent system based on a physical fusion large language model, characterized in that, Includes the following steps: The reasoning agent receives a natural language task description containing information about the groundwater system. Based on the task description, the reasoning agent generates executable code containing a penetration coefficient field parameterization scheme and optimized control logic. The executable code is run by the executing agent to call an external physical numerical simulator to perform forward modeling calculations of groundwater flow and obtain simulation results; The simulation results are compared with preset observation data to generate error assessment information; The error evaluation information is fed back to the inference agent to drive the inference agent to adjust the parameterization scheme or optimization control logic in the executable code, and iterate until the convergence condition is met.

2. The method according to claim 1, characterized in that, The collaboration between the reasoning agent and the execution agent includes: The reasoning agent and the execution agent communicate and synchronize their states through a communication interface built on an automatic agent framework. The execution agent sends error messages or abnormal states generated when running the executable code to the inference agent as a first type of feedback. The reasoning agent corrects syntax or logic errors in the executable code based on the first type of feedback.

3. The method according to claim 1, characterized in that, The executable code generated by the reasoning agent includes: The reasoning agent, based on embedded hydrogeological knowledge rules, parses the natural language task description into a partitioning strategy for the permeability coefficient field. The reasoning agent assigns an initial range of penetration coefficients to each partition that conforms to common physical sense; Based on the partitioning strategy and the initial range, the inference agent writes an inversion script that calls an optimization algorithm library to minimize the simulation error as the objective function.

4. The method according to claim 1, characterized in that, The executable code executed by the intelligent agent includes: Before executing the executable code, static syntax analysis and application interface call compliance checks are performed on the executable code. After the check is passed, the external physical numerical simulator is driven to load the model input file and perform calculations through the interface instructions defined in the executable code.

5. The method according to claim 1, characterized in that, The external physical numerical simulator is a groundwater flow numerical simulation program that strictly follows Darcy's law and the principle of conservation of mass.

6. The method according to claim 1, characterized in that, The generated error assessment information includes: Calculate the root mean square error between the head distribution data in the simulation results and the observed head values ​​in the observation data; Determine whether the root mean square error is lower than a preset convergence threshold.

7. The method according to claim 1, characterized in that, Driving the inference agent to make adjustments includes: When the error evaluation information indicates that the convergence condition has not been met, the error evaluation information is sent to the reasoning agent as a second type of feedback; The reasoning agent adjusts the optimization algorithm control parameters or the penetration coefficient search space boundary in the executable code based on the error quantification index in the second type of feedback.

8. The method according to claim 1, characterized in that, After the convergence condition is met, the final inverted spatial distribution map of the permeability coefficient field and the corresponding uncertainty analysis report are output.

9. A computer terminal device, characterized in that, include: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors perform the steps of the method as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-8.