A method for soil-groundwater regulatory question and answer large model hallucination detection and correction

By constructing a heterogeneous regulatory atomic fact graph and multi-label risk classification, the problem of misjudgment of cross-media relationships in soil-groundwater regulatory Q&A was solved, enabling fine-grained correction and improved interpretability of regulatory conclusions.

CN123140267APending Publication Date: 2026-11-20CHINESE RES ACAD OF ENVIRONMENTAL SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610989205.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies struggle to explicitly express cross-media migration relationships of pollutants in soil-groundwater regulatory question-and-answer systems, leading to object mismatch, threshold misuse, and conclusion jumps. Existing post-hoc verification methods cannot locate fine-grained atomic conclusions and computational dependencies.

Method used

By employing a regulatory atomic fact extraction network, a graph Transformer model, an answer atomic conclusion decomposition network, semantic consistency branches, and rule consistency branches, a heterogeneous regulatory atomic fact graph is constructed to perform evidence subgraph and rule subgraph retrieval. Combined with the regulatory consistency energy function module, traceable regulatory conclusions are generated.

Benefits of technology

It enables fine-grained correction of answers to soil-groundwater regulatory issues, reduces the risk of misuse of soil and groundwater data, identifies issues of conclusion jumps, and improves the interpretability and auditability of regulatory questions and answers through multi-label risk classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123140267A_ABST
    Figure CN123140267A_ABST
Patent Text Reader

Abstract

The application provides a soil-groundwater supervision question and answer large model illusion detection and correction method, which comprises the following steps: acquiring multi-source knowledge texts related to soil-groundwater supervision and risk early warning business, and inputting the multi-source knowledge texts into a trained illusion detection and correction model; the trained illusion detection and correction model outputs answers to soil-groundwater supervision questions; the illusion detection and correction model comprises a supervision atomic fact extraction network, a graph Transformer model, an answer atomic conclusion decomposition network, a semantic consistency branch and a rule consistency branch connected with the output end of the answer atomic conclusion decomposition network and having a parallel relationship, a supervision consistency performance energy function module connected with the output ends of the semantic consistency branch and the rule consistency branch, and a graph constraint decoder connected with the output end of the supervision consistency performance energy function module. The application improves the explainability and auditability of supervision question and answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent ecological environment supervision and natural language processing technology, and in particular relates to a method for detecting and correcting illusions in a large-scale question-and-answer model for soil-groundwater supervision. Background Technology

[0002] Soil-groundwater regulatory Q&As differ from open-domain Q&As. When determining whether pollutants exceed limits, trigger warnings, require intensive monitoring, or activating risk control measures, regulators must simultaneously verify the pollutant type, environmental medium, soil sampling depth, groundwater monitoring well screen layer location, aquifer, hydrogeological unit, land use, regional type, testing method, unit of measurement, data quality status, standard version, effective date, and triggering conditions. The same pollutant may have different thresholds and regulatory implications under different media, soil layers, aquifers, or standard versions.

[0003] Existing search enhancement generation methods typically recall several regulations, standards, or monitoring records based on text similarity and directly append them to the context of a larger model. This approach struggles to explicitly express the cross-media relationship of pollutant migration from the soil layer through the vadose zone to groundwater, and it also fails to distinguish between soil sampling points and groundwater monitoring wells, sampling depth and screen layer positions, plot boundaries and pollution plume boundaries, and current standards and historical standards. Even when candidate answers cite seemingly relevant text, object mismatch, threshold misuse, version misuse, or misinterpreting a single exceedance as meeting continuous monitoring trigger conditions may occur.

[0004] Existing answer post-verification methods mostly treat the entire answer as the judgment object, failing to locate fine-grained atomic conclusions or calculate the order and dependency closure relationships between these atomic conclusions. For example, the answer first gives the conclusion of initiating an early warning, but fails to provide premises such as continuous exceeding limits, valid data quality, or the same aquifer, which constitutes a conclusion jump; this problem is difficult to detect by relying solely on single-sentence fact matching.

[0005] Therefore, a technical solution is needed that integrates the unique media strata, hydrological connections, monitoring objects, standard application conditions, and regulatory triggering logic of soil and groundwater into the entire process of knowledge representation, subgraph retrieval, consistency judgment, and correction generation, so that every regulatory conclusion can be supported along a traceable evidence path and rule path. Summary of the Invention

[0006] This invention provides a method for detecting and correcting illusions in a large-scale question-and-answer model for soil-groundwater monitoring, which addresses the technical problems of existing technologies.

[0007] According to a first aspect of the present invention, a method for detecting and correcting illusions in a large-scale soil-groundwater regulatory question-and-answer model is provided, the method comprising the following steps: Step S1: Obtain multi-source knowledge text related to soil-groundwater supervision and risk warning business, and input the multi-source knowledge text into the trained illusion detection and correction model; Step S2: The trained hallucination detection and correction model outputs the answer to the soil-groundwater regulation problem; The hallucination detection and correction model includes a supervisory atomic fact extraction network, a graph Transformer model, an answer atomic conclusion decomposition network, semantically consistent branches and rule-consistent branches connected to the output of the answer atomic conclusion decomposition network and having a parallel relationship, a supervisory consistency energy function module connected to the output of the semantically consistent branches and rule-consistent branches, and a graph constraint decoder connected to the output of the supervisory consistency energy function module. The regulatory atomic fact extraction network extracts features from multi-source knowledge texts to obtain a set of regulatory atomic facts and constructs a heterogeneous regulatory atomic fact graph; the graph Transformer model encodes the heterogeneous regulatory atomic fact graph to obtain a graph representation with a soil-groundwater physical relationship bias. The atomic conclusion decomposition network decomposes the candidate answers generated by the target large model for answering the soil-groundwater regulation problem, and obtains the atomic conclusion sequence. For each atomic conclusion in the atomic conclusion sequence: determine the evidence subgraph and rule subgraph in the heterogeneous regulatory atomic fact graph corresponding to the atomic conclusion; the semantic consistency branch determines the fact support probability, rule adaptation probability, conclusion order adaptation probability, and evidence conflict strength corresponding to the atomic conclusion based on the evidence subgraph and rule consistency branch; the regulatory consistency energy function module calculates the time version error, regional application error, regulatory object error, and threshold correspondence error corresponding to the atomic conclusion to determine the atomic consistency energy corresponding to the atomic conclusion. Determine the answer-level consistency energy corresponding to the atomic conclusion sequence; The graph-constrained decoder determines the type of illusion risk and the output state of candidate answers based on the probability of fact support, rule fit, probability of conclusion order fit, strength of evidence conflict, time version error, regional applicability error, regulatory object error, and threshold correspondence error corresponding to each atomic conclusion. It then uses the constraint graph to correct the output state of candidate answers and generate the answer to the soil-groundwater regulation problem.

[0008] Preferably, the nodes in the heterogeneous regulatory atomic fact graph include at least pollutant nodes, medium nodes, threshold nodes, region nodes, time version nodes, rule nodes, subject nodes, and measure nodes, and the edges include at least applicable edges, triggering edges, substitution edges, conflict edges, supporting edges, and dependent edges.

[0009] Preferably, the graph Transformer model incorporates a physical relationship bias in the calculation of attention weights; the physical relationship bias is determined based on at least two of the following: the planar distance between the sampling point and the monitoring well, the overlap between the sampling depth range and the screen layer, the consistency of the aquifer, the direction of the hydraulic gradient, the direction of groundwater flow, and the accessibility of pollutants migrating from the soil layer through the vadose zone to the aquifer.

[0010] Preferably, the atomic conclusion decomposition network decomposes the candidate answers generated by the target large model for answering the soil-groundwater regulation problem to obtain a sequence of atomic conclusions, wherein: The answer atomic conclusion decomposition network consists of a pre-trained Transformer encoder, a bidirectional long short-term memory network, and a conditional random field layer. The Transformer encoder extracts the contextual semantics of candidate answers, the bidirectional long short-term memory network extracts cross-sentence sequence information, and the conditional random field layer identifies the boundaries of atomic conclusions.

[0011] Preferably, for each atomic conclusion in the atomic conclusion sequence: determining the evidence subgraph and rule subgraph in the heterogeneous regulatory atomic fact graph corresponding to the atomic conclusion includes: Based on atomic conclusions, domain retrieval anchors are determined in the heterogeneous regulatory atomic fact graph. The domain retrieval anchors include at least pollutant nodes, regulatory object nodes, environmental media nodes, sampling point nodes or monitoring well nodes, sampling depth or screen tube layer nodes, aquifer nodes, region nodes, issue time point nodes, standard version nodes, detection method nodes, threshold nodes, measurement unit nodes, regulatory rule nodes, and issue intent nodes. Starting with pollutant nodes and regulatory object nodes in the domain retrieval anchor points, a K-hop expansion is performed in the heterogeneous regulatory atomic fact graph to retain pollutant nodes corresponding to pollutants with the same meaning as the pollutant nodes; environmental media nodes are retained; when the regulatory object corresponding to the regulatory object node is soil, the sampling point type and sampling depth are verified; when the regulatory object corresponding to the regulatory object node is groundwater, the monitoring well type, screen layer, and aquifer are verified; when the effective time covers the issue time point and the applicable area includes the issue area, the area node and issue time point node are retained; the measurement unit conversion is performed on the detection value and threshold corresponding to the detection method node, and the detection method node with valid detection method is retained; based on the source authority, the retained nodes, and the graph paths in the heterogeneous regulatory atomic fact graph, an evidence subgraph composed of the retained nodes is constructed. Starting from threshold nodes, standard version nodes, or regulatory rule nodes in the domain retrieval anchor point, the algorithm expands along applicable edges, prerequisite edges, triggering edges, exception edges, measure edges, alternative edges, and conflict edges in the heterogeneous regulatory atomic fact graph. Nodes with the same pollutants, environmental media, sieve tube layers, or aquifers as the evidence subgraph are retained as rule nodes. Nodes in the heterogeneous regulatory atomic fact graph that record the number of consecutive exceedances, concentration change trends, pollution plume boundary changes, monitoring frequency, and data quality status are used as rule prerequisite nodes. Based on source authority, rule nodes, rule prerequisite nodes, and graph paths in the heterogeneous regulatory atomic fact graph, a rule subgraph consisting of nodes including rule nodes and rule prerequisite nodes is constructed. Among them, the applicable edge, premise edge, trigger edge, exception edge, measure edge, alternative edge, and conflict edge are determined based on the relationships between nodes in the heterogeneous regulatory atomic fact graph.

[0012] Preferably, the semantically consistent branch determines the fact support probability, rule fit probability, conclusion order fit probability, and evidence conflict strength corresponding to the atomic conclusion based on the evidence subgraph and the rule-consistent branch, wherein: Probability of Facts The calculation formula is:

[0013] in, , and These are the joint encoding representations of the question, the atomic conclusion, and the evidence subgraph, respectively; and Trainable parameters; subscript This indicates the probability of choosing a supporting category; Rule fit probability The calculation formula is:

[0014] in, This represents the current atomic conclusion; This represents the entirety of the regular subgraph. and These are aggregated representations of rule premise nodes and rule conclusion nodes, respectively; The function is a multilayer perceptron function; Conclusion order fit probability The calculation formula is:

[0015] in, and These represent the previous atomic conclusion and the current atomic conclusion, respectively. A graph representation of a regular subgraph; Embedding of the predicted dependency type; and These are trainable parameters; σ is the Sigmoid function. Strength of conflict of evidence The calculation formula is:

[0016] in, For the facts and The probability of contradiction; normalized weights Based on facts and The source authority, time interval overlap, spatial range overlap, and object consistency are jointly used to determine the information. For a set of fact pairs.

[0017] Preferably, the regulatory consistency energy function module calculates the time version error, regional applicability error, regulatory object error, and threshold corresponding error for the atomic conclusion, wherein: Time version error The calculation formula is:

[0018] in, The valid time interval of the standard cited for atomic conclusions. The valid time interval for applicable standards in the evidence subgraph or rule subgraph; The range of the regional application error is [0,1]. When the region targeted by the soil-groundwater monitoring problem is completely contained within the applicable region corresponding to the regional node, the regional application error is 0. When the region targeted by the soil-groundwater monitoring problem partially intersects with the applicable region corresponding to the regional node, the regional application error is between 0 and 1. When the region targeted by the soil-groundwater monitoring problem does not intersect with the applicable region corresponding to the regional node at all, the regional application error is 1. Error of regulatory target The calculation formula is:

[0019] in, , , , and These refer to pollutants, environmental media, sampling points or monitoring wells, sampling depths or screen tube layers, and aquifers in the atomic conclusions. , , , and These represent the values ​​corresponding to pollutant nodes, environmental medium nodes, sampling point nodes or monitoring well nodes, sampling depth or screen layer nodes, and aquifer nodes in the evidence subgraph, respectively; the I function is the indicator function; and the D function is the interval distance function. , , , and For normalized weights; Threshold corresponding error The calculation formula is:

[0020] in, For atomic conclusions to include thresholds or detection values, The threshold corresponding to the threshold node in the domain retrieval anchor point corresponding to the atomic conclusion, or the detection value corresponding to the detection method node, where ε is a positive number to prevent the denominator from being zero.

[0021] Preferably, the regulatory consistency energy function module calculates the time version error, regional applicability error, regulatory object error, and threshold correspondence error corresponding to the atomic conclusion to determine the atomic consistency energy corresponding to the atomic conclusion; and determines the answer-level consistency energy corresponding to the atomic conclusion sequence, wherein: Atomic consistency energy corresponding to atomic conclusions The calculation formula is:

[0022] in, , , , , , and These are the weighting coefficients; Answer-level consistency energy The calculation formula is:

[0023] Where n is the number of atomic conclusions; For normalized weights; For order-inappropriate penalty weights; The weights are for unclosed dependencies; D1 is the set of atomic conclusion dependencies. Representing atomic conclusions and There exist closed support paths between them; This indicates that there is no closed supporting path between atomic conclusions.

[0024] According to a second aspect of the present invention, an apparatus for detecting and correcting illusions in a large-scale question-and-answer model for soil-groundwater monitoring is provided, the apparatus comprising: Data acquisition module: configured to acquire multi-source knowledge text related to soil-groundwater supervision and risk warning business, and input the multi-source knowledge text into the trained hallucination detection and correction model; Output module: Configured to output the answer to the soil-groundwater regulation problem after the hallucination detection and correction model has been trained; The hallucination detection and correction model includes a supervisory atomic fact extraction network, a graph Transformer model, an answer atomic conclusion decomposition network, semantically consistent branches and rule-consistent branches connected to the output of the answer atomic conclusion decomposition network and having a parallel relationship, a supervisory consistency energy function module connected to the output of the semantically consistent branches and rule-consistent branches, and a graph constraint decoder connected to the output of the supervisory consistency energy function module. The regulatory atomic fact extraction network extracts features from multi-source knowledge texts to obtain a set of regulatory atomic facts and constructs a heterogeneous regulatory atomic fact graph; the graph Transformer model encodes the heterogeneous regulatory atomic fact graph to obtain a graph representation with a soil-groundwater physical relationship bias. The atomic conclusion decomposition network decomposes the candidate answers generated by the target large model for answering the soil-groundwater regulation problem, and obtains the atomic conclusion sequence. For each atomic conclusion in the atomic conclusion sequence: determine the evidence subgraph and rule subgraph in the heterogeneous regulatory atomic fact graph corresponding to the atomic conclusion; the semantic consistency branch determines the fact support probability, rule adaptation probability, conclusion order adaptation probability, and evidence conflict strength corresponding to the atomic conclusion based on the evidence subgraph and rule consistency branch; the regulatory consistency energy function module calculates the time version error, regional application error, regulatory object error, and threshold correspondence error corresponding to the atomic conclusion to determine the atomic consistency energy corresponding to the atomic conclusion. Determine the answer-level consistency energy corresponding to the atomic conclusion sequence; The graph-constrained decoder determines the type of illusion risk and the output state of candidate answers based on the probability of fact support, rule fit, probability of conclusion order fit, strength of evidence conflict, time version error, regional applicability error, regulatory object error, and threshold correspondence error corresponding to each atomic conclusion. It then uses the constraint graph to correct the output state of candidate answers and generate the answer to the soil-groundwater regulation problem.

[0025] According to a third aspect of the present invention, an electronic device is provided, comprising: A processor is used to execute multiple instructions; Memory, used to store multiple instructions; The plurality of instructions are to be stored in the memory and loaded and executed by the processor as described above.

[0026] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein a plurality of instructions are stored therein; the plurality of instructions are configured to be loaded by a processor and executed as described above.

[0027] This invention constructs a soil-groundwater coupled heterogeneous regulatory fact graph characterizing the relationships between pollution sources, soil layers, vadose zones, aquifers, groundwater monitoring wells, pollutant concentrations, detection methods, thresholds, standard versions, and regulatory measures. At the atomic conclusion level of candidate answers, it employs semantically consistent branches, rule-consistent branches, and sequential dependency branches for collaborative discrimination. Multi-label risk classification is performed using atomic consistency energy and answer-level consistency energy. Finally, evidence subgraphs and rule subgraphs are used to jointly constrain and correct decoding. This invention aims to address the lack of joint constraints in existing large-scale question-answering models regarding soil-groundwater regulatory objects, strata, aquifers, standard versions, and triggering conditions, leading to problems such as facts detached from evidence, incorrect rule application, cross-media object confusion, threshold misuse, and conclusion jumps.

[0028] The present invention has the following beneficial technical effects: 1. This invention incorporates soil sampling depth, groundwater monitoring well screen layer position, aquifer, hydraulic connection, and cross-media migration path as components of graph structure and attention bias, avoiding the simple transplantation of general text verification algorithms to environmental monitoring scenarios.

[0029] 2. The present invention constructs evidence subgraphs and rule subgraphs by jointly retrieving anchor points, which can reduce the risk of misuse of soil data and groundwater data and mixing of data from different aquifers.

[0030] 3. In addition to semantic branches and rule branches, this invention sets up sequential dependency branches, which can identify problems such as jumping conclusions by directly giving regulatory measures without premises.

[0031] 4. This invention uses atomic consistency energy and answer-level consistency energy to uniformly summarize all atomic conclusions, which can both locate local errors and evaluate the overall reliability of the entire answer.

[0032] 5. The evidence conflict strength of this invention is calculated only between facts of the same pollutant, the same medium or layer, overlapping time and area, which can avoid misjudging normal standard version changes as conflicts.

[0033] 6. This invention uses the union of the evidence subgraph and the rule subgraph as the constraint graph, which can restrict the generation of off-graph entities, off-graph thresholds, off-graph regions and off-graph versions.

[0034] 7. This invention adopts a combination of multi-label risk classification and status control, which can output correction, condition completion, conflict analysis or rejection results respectively, thereby improving the interpretability and auditability of regulatory questions and answers.

[0035] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, the preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings. Attached Figure Description

[0036] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention, and the invention is illustrated by the following drawings. In the drawings: Figure 1 This is a schematic flowchart of a method for detecting and correcting illusions in a large-scale question-and-answer model for soil-groundwater monitoring, according to one embodiment of the present invention.

[0037] Figure 2 This is another schematic diagram of a method for detecting and correcting illusions in a large-scale question-and-answer model for soil-groundwater monitoring, which is one embodiment of the present invention.

[0038] Figure 3 This is a schematic diagram of the regulatory atomic fact diagram of one embodiment of the present invention.

[0039] Figure 4 This is a schematic diagram illustrating the construction of evidence subgraphs and rule subgraphs based on domain retrieval anchors according to one embodiment of the present invention.

[0040] Figure 5 This is a schematic diagram illustrating the discrimination and answer-level energy aggregation of one embodiment of the present invention.

[0041] Figure 6 This is a schematic diagram illustrating graph constraint correction decoding based on evidence subgraphs and rule subgraphs, according to one embodiment of the present invention. Detailed Implementation

[0042] First, combine Figures 1-2 This invention describes a method for detecting and correcting illusions in a large-scale question-and-answer model for soil-groundwater monitoring, based on one embodiment of the present invention. Figure 1 As shown, the method includes the following steps: Step S1: Obtain multi-source knowledge text related to soil-groundwater supervision and risk warning business, and input the multi-source knowledge text into the trained illusion detection and correction model; Step S2: The trained hallucination detection and correction model outputs the answer to the soil-groundwater regulation problem; The hallucination detection and correction model includes a supervisory atomic fact extraction network, a graph Transformer model, an answer atomic conclusion decomposition network, semantically consistent branches and rule-consistent branches connected to the output of the answer atomic conclusion decomposition network and having a parallel relationship, a supervisory consistency energy function module connected to the output of the semantically consistent branches and rule-consistent branches, and a graph constraint decoder connected to the output of the supervisory consistency energy function module. The regulatory atomic fact extraction network extracts features from multi-source knowledge texts to obtain a set of regulatory atomic facts and constructs a heterogeneous regulatory atomic fact graph; the graph Transformer model encodes the heterogeneous regulatory atomic fact graph to obtain a graph representation with a soil-groundwater physical relationship bias. The atomic conclusion decomposition network decomposes the candidate answers generated by the target large model for answering the soil-groundwater regulation problem, and obtains the atomic conclusion sequence. For each atomic conclusion in the atomic conclusion sequence: determine the evidence subgraph and rule subgraph in the heterogeneous regulatory atomic fact graph corresponding to the atomic conclusion; the semantic consistency branch determines the fact support probability, rule adaptation probability, conclusion order adaptation probability, and evidence conflict strength corresponding to the atomic conclusion based on the evidence subgraph and rule consistency branch; the regulatory consistency energy function module calculates the time version error, regional application error, regulatory object error, and threshold correspondence error corresponding to the atomic conclusion to determine the atomic consistency energy corresponding to the atomic conclusion. Determine the answer-level consistency energy corresponding to the atomic conclusion sequence; The graph-constrained decoder determines the type of illusion risk and the output state of candidate answers based on the probability of fact support, rule fit, probability of conclusion order fit, strength of evidence conflict, time version error, regional applicability error, regulatory object error, and threshold correspondence error corresponding to each atomic conclusion. It then uses the constraint graph to correct the output state of candidate answers and generate the answer to the soil-groundwater regulation problem.

[0043] This invention does not use the original text fragment as the smallest judgment object. Instead, it first maps the original knowledge into regulatory atomic facts through a regulatory atomic fact extraction network, then constructs a heterogeneous regulatory atomic fact graph, and decomposes the candidate answers into a sequence of atomic conclusions. Subsequently, it performs fact support discrimination and rule adaptation discrimination on each atomic conclusion simultaneously, and constructs a regulatory consistency energy function, with the energy magnitude and illusion type jointly determining the subsequent correction action.

[0044] The multi-source knowledge text includes data obtained from document libraries, monitoring databases, and land parcel spatial databases. For regulatory or standard texts, the document name, issuing agency, version number, effective date, repeal date, applicable area, applicable medium, and citation relationship are recorded. For soil sampling records, the sampling point coordinates, sampling depth range, soil layer type, pollutants, detection values, detection methods, units of measurement, and quality control status are recorded. For groundwater monitoring records, the monitoring well number, wellhead coordinates, screen tube start and end depths, corresponding aquifer, water level, sampling time, pollutants, detection values, detection methods, and quality control status are recorded.

[0045] Preprocessing of multi-source knowledge texts includes unifying pollutant names and synonyms, establishing conversion rules for measurement units; converting the effective and expiration dates of standard versions into time intervals; converting administrative regions, land parcel boundaries, pollution plume boundaries, and hydrogeological units into spatial hierarchies or geometric objects; quantifying sampling depth intervals and screen tube layers; and determining upstream and downstream relationships between monitoring wells based on water level contour lines or known groundwater flow directions.

[0046] For data lacking key fields, instead of deleting it directly, a missing data flag and a data quality weight are set. The data quality weight can be determined based on sampling standardization, testing method effectiveness, quality control sample results, data review status, and the level of the source institution.

[0047] The regulatory atomic fact extraction network is a Transformer network with an encoder and a decoder. The decoder is configured with a relation extraction head and a condition extraction head to extract regulatory atomic facts from multi-source knowledge text. For example, a regulatory atomic fact might be: . respectively As the main entity, For relational types, As an object entity, As an environmental medium, For soil sampling depth, soil layer location, or groundwater monitoring well screen tube layer location, It is an aquifer or hydrogeological unit. This includes the time of the event, the effective date range of the standard, and the version number. For the scope of application in space, For the detection method, unit of measurement, data quality status, threshold conditions, number of consecutive monitoring times, trend conditions or exception conditions, To ensure the authority of the source.

[0048] The heterogeneous regulatory atomic fact diagram is denoted as G=(V,E). In addition to regulations and monitoring facts, the diagram also includes the vertical media topology of "soil layer, vadose zone, and aquifer" as well as the spatial topology of "pollution source, migration path, monitoring well, and receptor." Vertical migration edges can be established based on the physicochemical properties of the pollution, soil permeability, groundwater depth, and identified migration channels; hydraulic connection edges and upstream / downstream edges can be established based on aquifer consistency and groundwater flow direction.

[0049]

[0050] Furthermore, the nodes in the heterogeneous regulatory atomic fact graph include at least pollutant nodes, medium nodes, threshold nodes, region nodes, time version nodes, rule nodes, subject nodes, and measure nodes, and the edges include at least applicable edges, triggering edges, substitution edges, conflict edges, supporting edges, and dependent edges.

[0051] For example, the nodes of the heterogeneous regulatory atomic fact graph include at least pollutant nodes, soil sampling point nodes, groundwater monitoring well nodes, soil layer nodes, vadose zone nodes, aquifer nodes, detection method nodes, threshold nodes, region nodes, time version nodes, rule nodes, and measure nodes, and the edges include at least detection edges, corresponding edges, applicable edges, vertical migration edges, hydraulic connection edges, upstream and downstream edges, trigger edges, exception edges, alternative edges, conflict edges, support edges, and dependency edges.

[0052] In this invention, the graph Transformer model uses relation-aware attention to update node representations. The node update formula from layer l to layer l+1 is as follows:

[0053] in, and Let be the representations of node v at level l and level l+1, respectively; R is the set of relation types. Let r be the set of neighboring nodes connected to node v through relation r; The transformation matrix of the node itself; Let r be the transformation matrix corresponding to relation r; σ represents the attention weights for the relationship perception between neighbor node u and node v; σ is a non-linear activation function.

[0054] The relation-aware attention weights are calculated using the following formula:

[0055] in, and For querying the key transformation matrix; d represents the embedding of relation r; d represents the dimension of representation. This is an bias in the physical relationship between soil and groundwater.

[0056] The result is obtained by weighting at least two of the following: the planar distance between sampling points or monitoring wells, the overlap between the sampling depth range and the screen layer, whether the aquifers are consistent, the direction of the hydraulic gradient, the direction of groundwater flow, and the accessibility of pollutants across media. Therefore, when textual semantics are similar but the aquifers are different, the layers are inconsistent, or the hydraulic direction is unreasonable, the graph Transformer model reduces the attention weight between corresponding nodes.

[0057] The Transformer model incorporates a physical relationship bias into the calculation of attention weights. The physical relationship bias is determined based on at least two of the following: the planar distance between the sampling point and the monitoring well, the overlap between the sampling depth range and the screen layer, the consistency of the aquifer, the direction of the hydraulic gradient, the direction of groundwater flow, and the accessibility of pollutants migrating from the soil layer through the vadose zone to the aquifer.

[0058] The atomic conclusion decomposition network decomposes the candidate answers generated by the target large model for answering the soil-groundwater regulation problem, obtaining a sequence of atomic conclusions, where: The answer atomic conclusion decomposition network consists of a pre-trained Transformer encoder, a bidirectional long short-term memory network, and a conditional random field layer. The Transformer encoder extracts the contextual semantics of candidate answers, the bidirectional long short-term memory network extracts cross-sentence sequence information, and the conditional random field layer identifies the boundaries of atomic conclusions.

[0059] In this invention, a relation classification head determines the temporal, causal, conditional, or conclusion-dependent relationships between any two atomic conclusions and forms an atomic conclusion dependency graph. The pre-trained Transformer encoder obtains the contextual representation of candidate answers, the bidirectional long short-term memory network obtains cross-sentence temporal representations, and the conditional random field layer identifies the boundaries of atomic conclusions. The relation classification head is used to determine the temporal, causal, conditional, and conclusion-dependent relationships between atomic conclusions. The sequential dependency branch outputs the probability of conclusion order fit for each atomic conclusion relative to its preceding atomic conclusion and the rule subgraph.

[0060] Furthermore, for each atomic conclusion in the atomic conclusion sequence: determining the evidence subgraph and rule subgraph in the heterogeneous regulatory atomic fact graph corresponding to the atomic conclusion includes: Based on atomic conclusions, domain retrieval anchors are determined in the heterogeneous regulatory atomic fact graph. The domain retrieval anchors include at least pollutant nodes, regulatory object nodes, environmental media nodes, sampling point nodes or monitoring well nodes, sampling depth or screen tube layer nodes, aquifer nodes, region nodes, issue time point nodes, standard version nodes, detection method nodes, threshold nodes, measurement unit nodes, regulatory rule nodes, and issue intent nodes. Starting with pollutant nodes and regulatory object nodes in the domain retrieval anchor points, a K-hop expansion is performed in the heterogeneous regulatory atomic fact graph to retain pollutant nodes corresponding to pollutants with the same meaning as the pollutant nodes; environmental media nodes are retained; when the regulatory object corresponding to the regulatory object node is soil, the sampling point type and sampling depth are verified; when the regulatory object corresponding to the regulatory object node is groundwater, the monitoring well type, screen layer, and aquifer are verified; when the effective time covers the issue time point and the applicable area includes the issue area, the area node and issue time point node are retained; the measurement unit conversion is performed on the detection value and threshold corresponding to the detection method node, and the detection method node with valid detection method is retained; based on the source authority, the retained nodes, and the graph paths in the heterogeneous regulatory atomic fact graph, an evidence subgraph composed of the retained nodes is constructed. Starting from threshold nodes, standard version nodes, or regulatory rule nodes in the domain retrieval anchor point, the algorithm expands along applicable edges, prerequisite edges, triggering edges, exception edges, measure edges, alternative edges, and conflict edges in the heterogeneous regulatory atomic fact graph. Nodes with the same pollutants, environmental media, sieve tube layers, or aquifers as the evidence subgraph are retained as rule nodes. Nodes in the heterogeneous regulatory atomic fact graph that record the number of consecutive exceedances, concentration change trends, pollution plume boundary changes, monitoring frequency, and data quality status are used as rule prerequisite nodes. Based on source authority, rule nodes, rule prerequisite nodes, and graph paths in the heterogeneous regulatory atomic fact graph, a rule subgraph consisting of nodes including rule nodes and rule prerequisite nodes is constructed. Among them, the applicable edge, premise edge, trigger edge, exception edge, measure edge, alternative edge, and conflict edge are determined based on the relationships between nodes in the heterogeneous regulatory atomic fact graph.

[0061] For example, the evidence subgraph includes fact nodes and their connecting edges that simultaneously meet the following conditions within a K-hop range starting from the domain retrieval anchor point: the pollutants are the same or belong to a preset set of synonyms; the environmental medium is consistent with the problem object; at least one of the following matches is true: sampling point type, monitoring well type, sampling depth range, screen tube layer, or aquifer; the effective time interval of the fact covers the problem time point; the spatial scope of the fact includes the problem area; the detection method, unit of measurement, and data quality status meet the applicable requirements; the source authority is not lower than a preset authority threshold; the rule subgraph includes prerequisite nodes, trigger nodes, exception nodes, measure nodes, alternative nodes, and conflict nodes that are associated with the regulatory object in the evidence subgraph and are applicable to the same time version, region, environmental medium, and aquifer.

[0062] Furthermore, the semantically consistent branch determines the fact support probability, rule fit probability, conclusion order fit probability, and evidence conflict strength corresponding to the atomic conclusion based on the evidence subgraph and the rule-consistent branch, where: Probability of Facts The calculation formula is:

[0063] in, , and These are the joint encoding representations of the question, the atomic conclusion, and the evidence subgraph, respectively; and Trainable parameters; subscript This indicates the probability of choosing a supporting category; Rule fit probability The calculation formula is:

[0064] in, This represents the current atomic conclusion; This represents the entirety of the regular subgraph. and These are aggregated representations of rule premise nodes and rule conclusion nodes, respectively; The function is a multilayer perceptron function. Its input is a vector obtained by concatenating the representation of the current atomic conclusion, the overall representation of the rule subgraph, the aggregated representation of the rule premise node, and the aggregated representation of the rule conclusion node according to the dimension. Its output is a scalar score that is converted into the rule fit probability by the Sigmoid function. Conclusion order fit probability The calculation formula is:

[0065] in, and These represent the previous atomic conclusion and the current atomic conclusion, respectively. A graph representation of a regular subgraph; Embedding of the predicted dependency type; and These are trainable parameters; σ is the Sigmoid function. Strength of conflict of evidence The calculation formula is:

[0066] in, For the facts and The probability of contradiction; normalized weights Based on facts and The source authority, time interval overlap, spatial range overlap, and object consistency are jointly used to determine the information. For a set of fact pairs.

[0067] In this invention, the semantic consistency branch employs a Cross-Encoder Transformer to jointly encode the regulatory issues, atomic conclusions, and factual texts and structured attributes ordered by authority in the evidence subgraph, outputting a three-class probability of "support, contradiction, and unknown". The rule consistency branch uses a graph Transformer to encode the rule subgraph and a multilayer perceptron to compare the atomic conclusions, the rule premise set, and the rule conclusion set, outputting a rule fit probability. If the atomic conclusion rewrites "two consecutive periods of exceeding limits" as "a single instance of exceeding limits", or ignores premises such as "the same monitoring well, the same aquifer, and valid data quality", then... reduce.

[0068] In this invention, when regulatory measures are directly provided for candidate answers without specifying applicable standards, monitoring targets, or triggering conditions, the effectiveness of these measures is reduced. .

[0069] For example, an atomic conclusion sequence is a minimal verifiable statement containing only one regulatory predicate and its necessary parameters, such as "Well G3 belongs to aquifer H1", "The detection value of pollutant P is x", "The applicable threshold is y", and "Exceeding the limit for two consecutive periods is a prerequisite for initiating an early warning".

[0070] The strength of evidence conflict is calculated only for fact pairs that have the same regulatory object and overlapping scope of application. First, a set of fact pairs connected by conflicting edges, substitution edges, or version inheritance edges is selected from the evidence subgraph and rule subgraph. Then perform the calculation. If the facts... and If a version belongs to both an obsolete version and a current version, and their applicable periods do not overlap, then they are not considered to be in conflict, but rather treated as version replacements. Furthermore, the regulatory consistency energy function module calculates the time version error, regional applicability error, regulatory object error, and threshold corresponding error for the atomic conclusions, where: Time version error The calculation formula is:

[0071] in, The valid time interval of the standard cited for atomic conclusions. The valid time interval for applicable standards in the evidence subgraph or rule subgraph; The range of the regional application error is [0,1]. When the region targeted by the soil-groundwater monitoring problem is completely contained within the applicable region corresponding to the regional node, the regional application error is 0. When the region targeted by the soil-groundwater monitoring problem partially intersects with the applicable region corresponding to the regional node, the regional application error is between 0 and 1. When the region targeted by the soil-groundwater monitoring problem does not intersect with the applicable region corresponding to the regional node at all, the regional application error is 1. Error of regulatory target The calculation formula is:

[0072] in, , , , and These refer to pollutants, environmental media, sampling points or monitoring wells, sampling depths or screen tube layers, and aquifers in the atomic conclusions. , , , and These represent the values ​​corresponding to pollutant nodes, environmental medium nodes, sampling point nodes or monitoring well nodes, sampling depth or screen layer nodes, and aquifer nodes in the evidence subgraph, respectively; the I function is the indicator function; and the D function is the interval distance function. , , , and For normalized weights; Threshold corresponding error The calculation formula is:

[0073] in, For atomic conclusions to include thresholds or detection values, The threshold corresponding to the threshold node in the domain retrieval anchor point corresponding to the atomic conclusion, or the detection value corresponding to the detection method node, where ε is a positive number to prevent the denominator from being zero.

[0074] In this invention, when an atomic conclusion does not explicitly provide a version but the current version can be uniquely determined from the point in time of the problem, that version is taken as T( When a unique version cannot be determined, set a version missing flag and increase the time version error. (Regulatory object error) This involves assessing the degree of inconsistency in calculations regarding pollutants, environmental media, sampling points or monitoring wells, sampling depths or screen layer locations, and aquifers. After completing unit conversions and confirming consistency in testing methods, media, layers, regions, and standard versions, the thresholds or detection values ​​in the atomic conclusions are compared. Applicable values ​​in the figure When the detection methods are incompatible or the units cannot be reliably converted, the numerical difference is not calculated directly. Instead, the error corresponding to the threshold is set to 1 and a method mismatch flag is added.

[0075] Furthermore, the regulatory consistency energy function module calculates the time version error, regional applicability error, regulatory object error, and threshold correspondence error corresponding to the atomic conclusions to determine the atomic consistency energy corresponding to the atomic conclusions; it also determines the answer-level consistency energy corresponding to the atomic conclusion sequence, where: Atomic consistency energy corresponding to atomic conclusions The calculation formula is:

[0076] in, , , , , , and These are the weighting coefficients; Answer-level consistency energy The calculation formula is:

[0077] Where n is the number of atomic conclusions; The normalized weights are determined based on the importance of atomic conclusions in candidate answers, the sensitivity of regulatory actions, and the authority of evidence. For order-inappropriate penalty weights; The weights are for unclosed dependencies; D1 is the set of atomic conclusion dependencies. Representing atomic conclusions and There exists a closed supporting path consisting of evidentiary facts, rule premises, and rule conclusions; This indicates that there is no closed supporting path between atomic conclusions, that is, the necessary evidence facts or rule premises required for the dependency relationship between atomic conclusions are not satisfied, or there is no continuous supporting path between the evidence facts, rule premises and rule conclusions; when this condition is met, the corresponding indicator function in the answer-level consistency energy formula takes the value of 1, otherwise it takes the value of 0.

[0078] In this invention, , , , , , and These are the weight coefficients, which can be determined by validation set search or by trainable parameters, and are constrained to be greater than zero during training.

[0079] Furthermore, the graph-constrained decoder determines the type of illusion risk and the output state of candidate answers based on the factual support probability, rule fit probability, conclusion order fit probability, evidence conflict strength, time version error, regional applicability error, regulatory object error, and threshold correspondence error corresponding to each atomic conclusion. The constraint graph is then used to correct the output state of the candidate answers, generating the answer to the soil-groundwater regulatory problem, where: Illusion risk types include factual illusion, rule illusion, time version illusion, regional applicability illusion, object mismatch illusion, threshold misuse illusion, and conclusion jump illusion.

[0080] The hallucination risk type and candidate answer output status are determined based on the probability of factual support, rule fit, conclusion order fit, evidence conflict strength, time version error, regional applicability error, regulatory object error, and threshold correspondence error corresponding to each atomic conclusion, as shown in the table below.

[0081]

[0082] In this invention, when Not exceeding the first energy threshold And when there is no hallucination label, the output state is a direct answer; when < ≤ Furthermore, when there are replaceable facts or supplementable premises in the diagram, the output state is a correction or a conditional response; when... When the conflict threshold is exceeded, the output status is conflict resolution; when > When the evidence subgraph is empty or its authority is below the minimum requirement, the output status is "deferred judgment" or "restricted rejection". Each category uses an independent threshold, therefore the same atomic conclusion can have multiple illusion labels simultaneously.

[0083] when When the evidence subgraph is below the fact support threshold and has no closed supporting path, it is marked as a fact illusion; when When the value is below the rule adaptation threshold, it is marked as a rule illusion; when , , or When the corresponding thresholds are exceeded, they are marked sequentially as time version illusion, region application illusion, object mismatch illusion, or threshold misuse illusion; when When the value is below the sequence fit threshold or the atomic conclusion dependency is not closed, it is marked as a conclusion jump illusion; when When the conflict threshold is exceeded, the output state is set to conflict resolution state; when the answer-level consistency energy does not exceed the first energy threshold and there is no illusion label, the direct answer is output; when the answer-level consistency energy is between the first energy threshold and the second energy threshold and there is a replaceable in-graph fact, the corrected answer or conditional answer is output; when the answer-level consistency energy exceeds the second energy threshold or the evidence subgraph is empty, the deferred judgment answer or restricted rejection answer is output.

[0084] Constraint graphs are used to correct the output state of candidate answers to generate answers to soil-groundwater regulation problems. The answers to soil-groundwater regulation problems include corrective answers, conditional answers, conflict resolution answers, deferred judgment answers, or restricted rejection answers.

[0085] For example, the constraint graph is the union of the evidence subgraph and the rule subgraph corresponding to the current atomic conclusion, including supporting edges, applicable edges, and dependent edges between them. The graph constraint decoder generates different types of answers based on the output state. Constraints include entity constraints, numerical constraints, version constraints, premise constraints, conflict constraints, and off-graph constraints. Entity constraints require that the generated pollutants, sampling points, monitoring wells, soil layers, aquifers, areas, and measures must exist in the constraint graph or belong to preset synonyms and standardized names. Numerical constraints require that the generated detection values, thresholds, and units must come from numerical nodes in the constraint graph or be obtained from explicit unit conversion edges; generating untraceable values ​​is prohibited. Version constraints require that when referencing standards or rules, the applicable version or effective time must be output simultaneously; when the issue time point is unclear and multiple possible versions exist, a conditional answer is output. Premise constraints require that when rule nodes have premises such as consecutive occurrences, trends, data quality, the same monitoring well, or the same aquifer, the corresponding regulatory measures are allowed to be generated only if all premise nodes are satisfied. Conflict constraints prohibit the direct selection of any conclusion as the definitive answer when the conflict intensity exceeds a threshold; instead, the source of the conflict, its scope of application, and information to be verified must be listed. Off-graph constraints prohibit the generation of entities, thresholds, regions, and versions outside the constraint graph that cannot be obtained through synonym mapping or unit conversion. In implementation, at each decoding step, the probability of tokens can be masked based on the allowed entity set and allowed value set, and candidate sequences can be reordered using path completeness, source authority, and answer readability.

[0086] During the training process of this invention, the loss function L_A of the hallucination detection and correction model is as follows:

[0087] in, To regulate the loss from atomic fact extraction, For fact graph relationship prediction and physical relationship constraint loss, To support the classification of losses with facts, To adapt the rules and determine the loss, Classify loss by atomic conclusion order and dependency. For hallucination multi-label classification loss, The classification loss is used to determine the output state. For graph-constrained decoding loss, , , , , , , , These are the loss weights that are greater than zero.

[0088] In this invention, the training samples include normal answers and domain perturbation answers. Domain perturbation includes at least: replacing the soil threshold with a groundwater threshold; changing the soil sampling depth or groundwater sieve layer; replacing the aquifer; replacing the current version with a historical version; replacing the applicable area with an inapplicable area; changing the detection method or unit of measurement; deleting rule premises such as continuous exceedance, upward trend, or quality effectiveness; and exchanging the order of facts, conditions, conclusions, and measures. , , , , , , , Adaptive learning can be set based on the performance of the validation set or by using an uncertainty-weighted approach.

[0089] This invention discloses a specific embodiment of a method for detecting and correcting illusions in a large-scale question-and-answer model for soil-groundwater monitoring.

[0090] First Implementation Example: This example illustrates the joint identification of rule illusion, threshold misuse, and conclusion jumps. The system receives the question: "The current detection value of pollutant P in monitoring well G3 exceeds the threshold. Should an early warning be activated immediately?" Example facts in the regulatory fact diagram are as follows.

[0091]

[0092] The candidate answer is: "The current concentration of P in well G3 exceeds 0.010 mg / L, therefore an early warning should be initiated immediately." This is decomposed into c1 "The current detection value of G3 is 0.013 mg / L", c2 "The applicable threshold is 0.010 mg / L", c3 "Exceeded the limit this period", and c4 "An early warning should be initiated immediately". c1 to c3 are supported by facts; however, the rule subgraph indicates that initiating an early warning requires two consecutive periods exceeding the limit, while f4 shows that the previous period did not exceed the limit. Therefore, the p_rule of c4 is reduced. Since c4 directly provides a measure without the prerequisite of "two consecutive periods exceeding the limit", p_ord is also reduced. The system marks c4 as a rule illusion and a conclusion jump illusion, outputting a conditional corrective answer: "According to the example rule of version V2 in region A, the current detection value of pollutant P in well G3 is 0.013 mg / L, which is higher than 0.010 mg / L, but the previous period was 0.009 mg / L. The early warning trigger condition of two consecutive periods exceeding the limit has not yet been met; it is recommended to continue monitoring according to the rule and verify the results of the next period." Second Implementation Example: The question is: "If pollutant P exceeds the limit in the deep soil of plot B, can it be directly concluded that the groundwater in the downstream monitoring well G8 has exceeded the limit?" The fact map includes deep soil sampling point S5, the migration path of the vadose zone, aquifer H2, upstream well G6, and downstream well G8. The candidate answer directly compares the soil test value of S5 with the groundwater threshold and concludes that the groundwater in G8 exceeds the limit.

[0093] The domain search anchors identified "deep soil S5" and "groundwater well G8" respectively. The evidence subgraph shows that the environmental media of S5 and G8 are different, and there are currently no effective groundwater detection values ​​for G8. Although a potential migration path from S5 through the vadose zone to H2 exists in the graph, migration accessibility is only used for risk indication and cannot replace the monitoring fact of G8. Therefore, d_obj is high and p_sem is low. The system marks the relevant atomic conclusions as object mismatch illusion and fact illusion, and outputs: "The exceeding limit in deep soil S5 indicates that pollutants may migrate along the vadose zone to H2, but this cannot be used to directly conclude that groundwater in G8 has exceeded the limit; a judgment should be made in conjunction with the effective detection results of G8 or downstream monitoring wells of the same aquifer." Third Implementation: The issue occurs after version V2 becomes effective. Candidate answers reference the threshold of the now-defunct version V1, while another internal ledger without version labeling retains V1 values. The system calculates d_time based on the standard version node and effective time interval, and determines whether the facts constitute a conflict based on source authority, time overlap, and scope of application. Since the effective times of V1 and V2 do not overlap, they form a version substitution relationship rather than a conflict of current evidence; the internal ledger without version labeling receives lower authority weight due to incomplete time attributes. The system flags the time version illusion and prioritizes using V2 values ​​to generate corrective answers, while also indicating that the internal ledger needs updating.

[0094] This invention discloses a device for detecting and correcting illusions in a large-scale question-and-answer model for soil-groundwater regulation. The device may include: Data acquisition module: configured to acquire multi-source knowledge text related to soil-groundwater supervision and risk warning business, and input the multi-source knowledge text into the trained hallucination detection and correction model; Output module: Configured to output the answer to the soil-groundwater regulation problem after the hallucination detection and correction model has been trained; The hallucination detection and correction model includes a supervisory atomic fact extraction network, a graph Transformer model, an answer atomic conclusion decomposition network, semantically consistent branches and rule-consistent branches connected to the output of the answer atomic conclusion decomposition network and having a parallel relationship, a supervisory consistency energy function module connected to the output of the semantically consistent branches and rule-consistent branches, and a graph constraint decoder connected to the output of the supervisory consistency energy function module. The regulatory atomic fact extraction network extracts features from multi-source knowledge texts to obtain a set of regulatory atomic facts and constructs a heterogeneous regulatory atomic fact graph; the graph Transformer model encodes the heterogeneous regulatory atomic fact graph to obtain a graph representation with a soil-groundwater physical relationship bias. The atomic conclusion decomposition network decomposes the candidate answers generated by the target large model for answering the soil-groundwater regulation problem, and obtains the atomic conclusion sequence. For each atomic conclusion in the atomic conclusion sequence: determine the evidence subgraph and rule subgraph in the heterogeneous regulatory atomic fact graph corresponding to the atomic conclusion; the semantic consistency branch determines the fact support probability, rule adaptation probability, conclusion order adaptation probability, and evidence conflict strength corresponding to the atomic conclusion based on the evidence subgraph and rule consistency branch; the regulatory consistency energy function module calculates the time version error, regional application error, regulatory object error, and threshold correspondence error corresponding to the atomic conclusion to determine the atomic consistency energy corresponding to the atomic conclusion. Determine the answer-level consistency energy corresponding to the atomic conclusion sequence; The graph-constrained decoder determines the type of illusion risk and the output state of candidate answers based on the probability of fact support, rule fit, probability of conclusion order fit, strength of evidence conflict, time version error, regional applicability error, regulatory object error, and threshold correspondence error corresponding to each atomic conclusion. It then uses the constraint graph to correct the output state of candidate answers and generate the answer to the soil-groundwater regulation problem.

[0095] The present invention further provides an electronic device, comprising: A processor is used to execute multiple instructions; Memory, used to store multiple instructions; The plurality of instructions are to be stored in the memory and loaded and executed by the processor as described above.

[0096] The present invention further provides a computer-readable storage medium storing a plurality of instructions; the plurality of instructions are used by a processor to load and execute the method as described above.

[0097] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0098] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.

[0099] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0100] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0101] The integrated unit, implemented as a software functional unit, can be stored in a computer-readable storage medium. This software functional unit, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, a physical server, or a cloud server, etc., requiring the Ubuntu operating system to be installed) to execute some steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0102] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention shall still fall within the scope of the technical solution of the present invention.

Claims

1. A method for detecting and correcting illusions in a large-scale question-and-answer model for soil-groundwater regulation, characterized in that, The methods include: Step S1: Obtain multi-source knowledge text related to soil-groundwater supervision and risk warning business, and input the multi-source knowledge text into the trained illusion detection and correction model; Step S2: The trained hallucination detection and correction model outputs the answer to the soil-groundwater regulation problem; The hallucination detection and correction model includes a supervisory atomic fact extraction network, a graph Transformer model, an answer atomic conclusion decomposition network, semantically consistent branches and rule-consistent branches connected to the output of the answer atomic conclusion decomposition network and having a parallel relationship, a supervisory consistency energy function module connected to the output of the semantically consistent branches and rule-consistent branches, and a graph constraint decoder connected to the output of the supervisory consistency energy function module. The regulatory atomic fact extraction network extracts features from multi-source knowledge texts to obtain a set of regulatory atomic facts and constructs a heterogeneous regulatory atomic fact graph; the graph Transformer model encodes the heterogeneous regulatory atomic fact graph to obtain a graph representation with a soil-groundwater physical relationship bias. The atomic conclusion decomposition network decomposes the candidate answers generated by the target large model for answering the soil-groundwater regulation problem, and obtains the atomic conclusion sequence. For each atomic conclusion in the atomic conclusion sequence: determine the evidence subgraph and rule subgraph in the heterogeneous regulatory atomic fact graph corresponding to the atomic conclusion; the semantic consistency branch determines the fact support probability, rule adaptation probability, conclusion order adaptation probability, and evidence conflict strength corresponding to the atomic conclusion based on the evidence subgraph and rule consistency branch; the regulatory consistency energy function module calculates the time version error, regional application error, regulatory object error, and threshold correspondence error corresponding to the atomic conclusion to determine the atomic consistency energy corresponding to the atomic conclusion. Determine the answer-level consistency energy corresponding to the atomic conclusion sequence; The graph-constrained decoder determines the type of illusion risk and the output state of candidate answers based on the probability of fact support, rule fit, probability of conclusion order fit, strength of evidence conflict, time version error, regional applicability error, regulatory object error, and threshold correspondence error corresponding to each atomic conclusion. It then uses the constraint graph to correct the output state of candidate answers and generate the answer to the soil-groundwater regulation problem.

2. The method as described in claim 1, characterized in that, The nodes in the heterogeneous regulatory atomic fact graph include at least pollutant nodes, medium nodes, threshold nodes, region nodes, time version nodes, rule nodes, subject nodes, and measure nodes, and the edges include at least applicable edges, triggering edges, substitution edges, conflict edges, supporting edges, and dependent edges.

3. The method as described in claim 2, characterized in that, The Transformer model incorporates a physical relationship bias into the calculation of attention weights. The physical relationship bias is determined based on at least two of the following: the planar distance between the sampling point and the monitoring well, the overlap between the sampling depth range and the screen layer, the consistency of the aquifer, the direction of the hydraulic gradient, the direction of groundwater flow, and the accessibility of pollutants migrating from the soil layer through the vadose zone to the aquifer.

4. The method as described in claim 2, characterized in that, The atomic conclusion decomposition network decomposes the candidate answers generated by the target large model for answering the soil-groundwater regulation problem, obtaining a sequence of atomic conclusions, where: The answer atomic conclusion decomposition network consists of a pre-trained Transformer encoder, a bidirectional long short-term memory network, and a conditional random field layer. The Transformer encoder extracts the contextual semantics of candidate answers, the bidirectional long short-term memory network extracts cross-sentence sequence information, and the conditional random field layer identifies the boundaries of atomic conclusions.

5. The method as described in claim 2, characterized in that, For each atomic conclusion in the atomic conclusion sequence: determine the evidence subgraph and rule subgraph in the heterogeneous regulatory atomic fact graph corresponding to the atomic conclusion, including: Based on atomic conclusions, domain retrieval anchors are determined in the heterogeneous regulatory atomic fact graph. The domain retrieval anchors include at least pollutant nodes, regulatory object nodes, environmental media nodes, sampling point nodes or monitoring well nodes, sampling depth or screen tube layer nodes, aquifer nodes, region nodes, issue time point nodes, standard version nodes, detection method nodes, threshold nodes, measurement unit nodes, regulatory rule nodes, and issue intent nodes. Starting with pollutant nodes and regulatory object nodes in the domain retrieval anchor points, a K-hop expansion is performed in the heterogeneous regulatory atomic fact graph to retain pollutant nodes corresponding to pollutants with the same meaning as the pollutant nodes; environmental media nodes are retained; when the regulatory object corresponding to the regulatory object node is soil, the sampling point type and sampling depth are verified; when the regulatory object corresponding to the regulatory object node is groundwater, the monitoring well type, screen layer, and aquifer are verified; when the effective time covers the issue time point and the applicable area includes the issue area, the area node and issue time point node are retained; the measurement unit conversion is performed on the detection value and threshold corresponding to the detection method node, and the detection method node with valid detection method is retained; based on the source authority, the retained nodes, and the graph paths in the heterogeneous regulatory atomic fact graph, an evidence subgraph composed of the retained nodes is constructed. Starting from threshold nodes, standard version nodes, or regulatory rule nodes in the domain retrieval anchor point, the algorithm expands along applicable edges, prerequisite edges, triggering edges, exception edges, measure edges, alternative edges, and conflict edges in the heterogeneous regulatory atomic fact graph. Nodes with the same pollutants, environmental media, sieve tube layers, or aquifers as the evidence subgraph are retained as rule nodes. Nodes in the heterogeneous regulatory atomic fact graph that record the number of consecutive exceedances, concentration change trends, pollution plume boundary changes, monitoring frequency, and data quality status are used as rule prerequisite nodes. Based on source authority, rule nodes, rule prerequisite nodes, and graph paths in the heterogeneous regulatory atomic fact graph, a rule subgraph consisting of nodes including rule nodes and rule prerequisite nodes is constructed. Among them, the applicable edge, premise edge, trigger edge, exception edge, measure edge, alternative edge, and conflict edge are determined based on the relationships between nodes in the heterogeneous regulatory atomic fact graph.

6. The method as described in claim 5, characterized in that, The semantic consistency branch determines the fact support probability, rule fit probability, conclusion order fit probability, and evidence conflict strength corresponding to the atomic conclusion based on the evidence subgraph and the rule consistency branch, where: Probability of Facts The calculation formula is: in, , and These are the joint encoding representations of the question, the atomic conclusion, and the evidence subgraph, respectively; and Trainable parameters; subscript This indicates the probability of choosing a supporting category; Rule fit probability The calculation formula is: in, This represents the current atomic conclusion; This represents the entirety of the regular subgraph. and These are aggregated representations of rule premise nodes and rule conclusion nodes, respectively; The function is a multilayer perceptron function; Conclusion order fit probability The calculation formula is: in, and These represent the previous atomic conclusion and the current atomic conclusion, respectively. A graph representation of a regular subgraph; Embedding of the predicted dependency type; and These are trainable parameters; σ is the Sigmoid function. Strength of conflict of evidence The calculation formula is: in, For the facts and The probability of contradiction; normalized weights Based on facts and The source authority, time interval overlap, spatial range overlap, and object consistency are jointly used to determine the information. For a set of fact pairs.

7. The method as described in claim 6, characterized in that, The regulatory consistency energy function module calculates the time version error, regional applicability error, regulatory object error, and threshold-related error corresponding to the atomic conclusions, where: Time version error The calculation formula is: in, The valid time interval of the standard cited for atomic conclusions. The valid time interval for applicable standards in the evidence subgraph or rule subgraph; The range of the regional application error is [0,1]. When the region targeted by the soil-groundwater monitoring problem is completely contained within the applicable region corresponding to the regional node, the regional application error is 0. When the region targeted by the soil-groundwater monitoring problem partially intersects with the applicable region corresponding to the regional node, the regional application error is between 0 and 1. When the region targeted by the soil-groundwater monitoring problem does not intersect with the applicable region corresponding to the regional node at all, the regional application error is 1. Error of regulatory target The calculation formula is: in, , , , and These refer to pollutants, environmental media, sampling points or monitoring wells, sampling depths or screen tube layers, and aquifers in the atomic conclusions. , , , and These represent the values ​​corresponding to pollutant nodes, environmental medium nodes, sampling point nodes or monitoring well nodes, sampling depth or screen layer nodes, and aquifer nodes in the evidence subgraph, respectively; the I function is the indicator function; and the D function is the interval distance function. , , , and For normalized weights; Threshold corresponding error The calculation formula is: in, For atomic conclusions to include thresholds or detection values, The threshold corresponding to the threshold node in the domain retrieval anchor point corresponding to the atomic conclusion, or the detection value corresponding to the detection method node, where ε is a positive number to prevent the denominator from being zero.

8. The method as described in claim 7, characterized in that, The regulatory consistency energy function module calculates the time version error, regional applicability error, regulatory object error, and threshold corresponding error for the atomic conclusion, and determines the atomic consistency energy corresponding to the atomic conclusion. Determine the answer-level consistency energy corresponding to the atomic conclusion sequence, where: Atomic consistency energy corresponding to atomic conclusions The calculation formula is: in, , , , , , and These are the weighting coefficients; Answer-level consistency energy The calculation formula is: Where n is the number of atomic conclusions; For normalized weights; For order-inappropriate penalty weights; The weights are for unclosed dependencies; D1 is the set of atomic conclusion dependencies. Representing atomic conclusions and There exist closed support paths between them; This indicates that there is no closed supporting path between atomic conclusions.

9. A device for detecting and correcting illusions in a large-scale question-and-answer model for soil-groundwater monitoring, characterized in that, include: Data acquisition module: configured to acquire multi-source knowledge text related to soil-groundwater supervision and risk warning business, and input the multi-source knowledge text into the trained hallucination detection and correction model; Output module: Configured to output the answer to the soil-groundwater regulation problem after the hallucination detection and correction model has been trained; The hallucination detection and correction model includes a supervisory atomic fact extraction network, a graph Transformer model, an answer atomic conclusion decomposition network, semantically consistent branches and rule-consistent branches connected to the output of the answer atomic conclusion decomposition network and having a parallel relationship, a supervisory consistency energy function module connected to the output of the semantically consistent branches and rule-consistent branches, and a graph constraint decoder connected to the output of the supervisory consistency energy function module. The regulatory atomic fact extraction network extracts features from multi-source knowledge texts to obtain a set of regulatory atomic facts and constructs a heterogeneous regulatory atomic fact graph; the graph Transformer model encodes the heterogeneous regulatory atomic fact graph to obtain a graph representation with a soil-groundwater physical relationship bias. The atomic conclusion decomposition network decomposes the candidate answers generated by the target large model for answering the soil-groundwater regulation problem, and obtains the atomic conclusion sequence. For each atomic conclusion in the atomic conclusion sequence: determine the evidence subgraph and rule subgraph in the heterogeneous regulatory atomic fact graph corresponding to the atomic conclusion; the semantic consistency branch determines the fact support probability, rule adaptation probability, conclusion order adaptation probability, and evidence conflict strength corresponding to the atomic conclusion based on the evidence subgraph and rule consistency branch; the regulatory consistency energy function module calculates the time version error, regional application error, regulatory object error, and threshold correspondence error corresponding to the atomic conclusion to determine the atomic consistency energy corresponding to the atomic conclusion. Determine the answer-level consistency energy corresponding to the atomic conclusion sequence; The graph-constrained decoder determines the type of illusion risk and the output state of candidate answers based on the probability of fact support, rule fit, probability of conclusion order fit, strength of evidence conflict, time version error, regional applicability error, regulatory object error, and threshold correspondence error corresponding to each atomic conclusion. It then uses the constraint graph to correct the output state of candidate answers and generate the answer to the soil-groundwater regulation problem.

10. An electronic device, comprising: A processor is used to execute multiple instructions; Memory, used to store multiple instructions; The plurality of instructions are to be stored in the memory and loaded by the processor and executed as described in any one of claims 1-8.