Data processing and question-answering method for tidal river network water environment treatment

By generating river network analysis plans, assigning evidence numbers, and constructing dual-evidence contexts, the problem of insufficient robustness of multi-source heterogeneous data in the governance of tidal river network water environment was solved, the accuracy and traceability of intelligent question answering results were improved, and the cost of manual verification was reduced.

CN122840039BActive Publication Date: 2026-11-20HOHAI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202611359088.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-20
Estimated Expiration
2046-09-03

AI Technical Summary

Technical Problem

Existing technologies for treating the water environment of tidal river networks lack robustness and factual consistency of multi-source heterogeneous data, making it difficult to reconcile factual discrepancies between data from different dimensions. In particular, when dealing with hydrological time series subjected to strong dynamic disturbances, the model output is prone to deviating from the actual evolution trend, and there is a lack of control measures for information supply blind spots.

Method used

By receiving user questions to generate a river network analysis plan, extracting vector retrieval fragments and assigning evidence numbers, combining water quality monitoring data analysis to generate dual evidence context, constructing constrained answer prompts, and performing consistency verification, the factual consistency and traceability of intelligent question answering are improved.

Benefits of technology

It improves the factual consistency and business adaptability of intelligent question-answering results, ensures the accuracy and traceability of answers, reduces the cost of manual verification, and enhances reasoning efficiency in complex water network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122840039B_ABST
    Figure CN122840039B_ABST
Patent Text Reader

Abstract

The application discloses a data processing and question-answering method for tidal river network water environment treatment. The method comprises the following steps: receiving a user question to generate a river network analysis plan; extracting a matched vector retrieval segment and assigning a first type of evidence number; performing water quality data analysis based on the analysis plan, generating river network data evidence and charts, and assigning a second type of evidence number; entering the two types of evidence numbers and charts into a unified evidence registry to build a double evidence context; building a constrained prompt word based on the double evidence context and a preconfigured answer constraint rule, generating a candidate answer; inputting the candidate answer and the context into a judgment module for consistency checking and outputting an evaluation result. The application can improve the factual self-consistency, traceability and business adaptability of intelligent question-answering results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent question answering and natural language processing technology for water environment, and in particular to a data processing and question answering method for the governance of tidal river network water environment. Background Technology

[0002] With the integration of digital twin water conservancy systems and large-scale language models, intelligent question-answering systems are increasingly being applied in water environment governance. In practical engineering and management scenarios, it is necessary not only to process unstructured static literature on mechanistic standards but also to query and track structured dynamic monitoring data such as water quality indicators. Building a question-answering engine capable of collaboratively processing multi-source heterogeneous data is beneficial for improving reasoning efficiency in complex water network environments, reducing manual verification costs, and ensuring the reliability of business decisions.

[0003] Current search-enhanced question-answering solutions typically construct separate document retrieval links or structured database query links. When processing interactive queries, they often concatenate data obtained from different channels with context and directly hand it over to the underlying model for processing.

[0004] In summary, existing methods still lack robustness and factual consistency when handling multi-source heterogeneous data in complex business scenarios. Therefore, further research and innovation are needed to address the aforementioned issues with existing technologies. Summary of the Invention

[0005] The purpose of this invention is to provide a data processing and question-and-answer method for the governance of tidal river network water environment, in order to solve the above-mentioned problems of the prior art.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A data processing and question-answering method for the governance of tidal river network water environment includes:

[0008] Receive user questions and generate a river network analysis plan based on the user questions;

[0009] Extract vector retrieval fragments that match the user's question, and assign a first-type evidence number to each vector retrieval fragment;

[0010] Based on the river network analysis plan, water quality monitoring data analysis was carried out to obtain river network data evidence and analysis charts derived from the river network data evidence, and a second type of evidence number was assigned to each river network data evidence.

[0011] Enter the first type of evidence number, the second type of evidence number, and the analysis chart into the unified evidence registry, and generate a dual evidence context based on vector retrieval fragments and river network data evidence;

[0012] Constrained answer prompts are constructed based on dual evidence context and pre-configured answer constraint rules, and candidate answers are generated based on the constrained answer prompts.

[0013] The candidate answers are compared with the dual-evidence context input evaluation module for consistency verification, and the quality evaluation results are output.

[0014] Beneficial effects: This invention can improve the factual consistency, traceability, and business adaptability of intelligent question-answering results. The related technical effects will be described in detail below with reference to specific embodiments. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating a data processing and question-and-answer method for the governance of tidal river networks as described in this application.

[0016] Figure 2 This is a flowchart illustrating the process of receiving user questions and generating a river network analysis plan based on those user questions, as described in this application.

[0017] Figure 3 This is a schematic diagram of a process for generating dual-evidence context based on vector retrieval fragments and river network data evidence in this application.

[0018] Figure 4 This is a schematic diagram illustrating a process for extracting vector retrieval fragments that match a user's question and assigning a first-type evidence number to each vector retrieval fragment, as described in this application.

[0019] Figure 5 This is a schematic diagram illustrating a process for performing water quality monitoring data analysis based on a river network analysis plan, as described in this application, to obtain river network data evidence and analytical charts derived from the river network data evidence. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0021] It should be noted that the terms "first," "second," etc., in the specification and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a predetermined order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0022] In view of the aforementioned problems, the applicant conducted a search and analysis and found that:

[0023] Due to the lag in static text and the high-frequency fluctuations in dynamic data, there are differences in spatiotemporal resolution. When faced with multi-source heterogeneous information streams, existing systems have difficulty coordinating the factual discrepancies that may exist between data from different dimensions.

[0024] Meanwhile, when processing hydrological time series subjected to strong dynamic disturbances, mathematical statistical logic is susceptible to interference from high-frequency physical signals, which can cause the model output to deviate from the actual evolution trend.

[0025] In this situation, there is also a lack of control measures when facing blind spots in information supply.

[0026] To overcome the above shortcomings, combined with Figures 1 to 5 The present application will be further illustrated with reference to specific embodiments.

[0027] On the one hand, a data processing and question-and-answer method for the governance of tidal river network water environment is proposed, which includes the following steps:

[0028] Step 101: Receive user questions and generate a river network analysis plan based on the user questions;

[0029] When business personnel input water environment inquiry commands through the front-end interactive interface, the system captures them as a text sequence in real time.

[0030] As an example, water environment query instructions can be composed of natural language.

[0031] Furthermore, the internally integrated natural language understanding model can be used to extract features from the text sequence, identify the spatiotemporal constraints, target evaluation objects, and intent contained therein, and convert the unstructured natural language into executable structured instructions.

[0032] For example, the key information extracted may include a predetermined time window, the name of a specified river section or the number of a monitoring point, and a query request for ammonia nitrogen concentration.

[0033] According to the predefined business protocol format, the extracted key elements are packaged and packaged to output a river network analysis plan with a fixed field structure, which is used to guide the specific execution boundaries of downstream data query and retrieval.

[0034] Step 102: Extract vector retrieval fragments that match the user's question, and assign a first-type evidence number to each vector retrieval fragment;

[0035] Optionally, relevant information may need to be retrieved from a static knowledge base.

[0036] Correspondingly, a pre-configured text embedding model can be used to map the received text sequence into a high-dimensional feature vector;

[0037] Based on the cosine similarity equidistant metric algorithm, parallel retrieval is performed in a pre-built professional document vector database to select the top few vector retrieval fragments with the closest spatial distance.

[0038] After extraction, the matched vector retrieval fragments are sorted in descending order of relevance and sequentially assigned a first-class evidence number. This ensures that each academic principle or normative provision has a clear source guide when organizing the answer.

[0039] Step 103: Perform water quality monitoring data analysis based on the river network analysis plan to obtain river network data evidence and analysis charts derived from the river network data evidence, and assign a second type of evidence number to each river network data evidence.

[0040] This step is responsible for supplementing real-time monitoring data. For example, the query execution engine reads the river network analysis plan generated in the previous stage and initiates a structured query request to the underlying river network business database via the network interface;

[0041] After obtaining the original monitoring data sequence, the mean statistics, extreme value search or sorting calculation are performed according to the hydrodynamic and water environment analysis model specified in the river network analysis plan, thereby generating statistical results reflecting the physical state of the water body.

[0042] At the same time, the system will simultaneously render corresponding visual materials such as line charts, bar charts, or spatial distribution heat maps.

[0043] It should be understood that all quantitative conclusions obtained through data querying and statistics, as well as the corresponding visual materials, will be uniformly assigned a Category II evidence number.

[0044] Among them, the quantitative conclusions are river network data evidence, and the visual materials are analysis charts.

[0045] Step 104: Enter the first type of evidence number, the second type of evidence number, and the analysis chart into the unified evidence registration form, and generate a dual evidence context based on the vector retrieval fragment and the river network data evidence;

[0046] Optionally, a global association table, i.e. a unified evidence registry, is initialized in memory to bring together the first type of evidence number of static documents and the identifier of dynamic data in the same namespace.

[0047] The identification information of the visual materials is also bound and registered at the same time;

[0048] According to the predetermined text concatenation rules, vector retrieval fragments containing specific business knowledge and data blocks containing structured quantitative conclusions are merged and assembled.

[0049] This constitutes a dual-evidence context that defines the boundaries of the facts.

[0050] It should be understood that this step can prevent large language models from producing factual errors.

[0051] Step 105: Construct constrained answer prompts based on the dual evidence context and pre-configured answer constraint rules, and generate candidate answers based on the constrained answer prompts;

[0052] After constructing the dual-evidence context, it is embedded into a fixed-format template framework, and behavioral constraint criteria, i.e., answer constraint rules, are injected on this basis.

[0053] In some cases, template frames, i.e., constrained answer prompts, are used.

[0054] It mandates that the system can only respond based on the input background facts, and requires that the first type of evidence number be included at the end of each conclusive judgment.

[0055] Under this constraint, the spontaneous diffusion and divergence capabilities of the large language model are limited to the given boundaries of water conservancy facts. Its final output candidate answers can be represented as standardized paragraphs that are business-oriented and whose conclusions can be traced back to specific data.

[0056] Step 106: Based on the unified evidence registry and dual evidence context, input the candidate answers and dual evidence context into the evaluation module for consistency verification, and output the quality evaluation results.

[0057] Optionally, post-review can be performed on candidate responses. For example, the context of the pre-assembled dual evidence can be loaded and used as the sole criterion to divide candidate responses into multiple smallest evaluation units according to grammatical logic.

[0058] Next, we will compare the semantic judgments after segmentation with the original facts corresponding to the identifiers attached to them to see if there is any factual discrepancy or subjective fabrication.

[0059] In this case, after logical calculation and anomaly percentage statistics, quantitative evaluation parameters are output, namely the quality evaluation results.

[0060] In this step, the set of parameters can provide a basis for front-end business personnel to verify or intercept abnormal prompts.

[0061] On the other hand, it receives user questions and generates a river network analysis plan based on these questions, including:

[0062] Step 201: Input the user problem and the predefined analysis architecture into the language model, and output the initial analysis plan in a structured format;

[0063] In the initial parsing phase, in order to enable the underlying large language model to call the vertical business database, a structured analysis architecture parameter table can be optionally configured.

[0064] Among them, the analysis architecture parameter table defines the data field specifications necessary for water environment management business, specifically covering pattern enumeration fields, target object list fields, time window fields, monitoring indicator fields, and subtask list fields;

[0065] The monitoring indicator field is configured by default to ammonia nitrogen, i.e., NH3-N concentration, which is an important water quality parameter for monitoring the water environment of tidal river networks.

[0066] The pattern enumeration field includes discrete values ​​such as whole network snapshot analysis, river segment time series analysis, measurement point ranking, comparison analysis of multiple objects, and composite analysis.

[0067] Further, the analysis architecture parameter table and the received raw text sequence are sent to the language model, which can output an initial analysis plan containing the extracted parameter key-value pairs;

[0068] The initial analysis plan uses JavaScript object notation, i.e., JSON format, to convert natural language into a carrier of data query intent.

[0069] Step 202: Perform a validity check on the initial analysis plan. If the check fails, drive the language model to perform error correction and retry.

[0070] As an example, after obtaining the structured text generated by the language model, the logic of intercepting and verifying the validity is scheduled and executed.

[0071] Read the values ​​of each field in the initial analysis plan and compare them one by one with the preset format specifications and enumerated value ranges in the analysis architecture parameter table;

[0072] If a required field is missing, the time range is logically reversed, or the pattern value exceeds the allowed range, the current initial analysis plan is determined to be invalid.

[0073] After the verification failure status is triggered, the specific error type message along with the original problem will be sent back to the language model, requiring it to perform self-correction calculations based on the error message in order to obtain the analysis plan file after the retry.

[0074] Step 203: If the verification still fails after error correction and retry, it degenerates into only executing the path that extracts the vector retrieval fragment that matches the user's question;

[0075] For example, a fault tolerance and degradation mechanism can be set up for the parsing stage. After one round of error correction and retry, if the newly output file still fails to pass the aforementioned legality rules, the decision control unit will block the call operation to the structured river network monitoring database.

[0076] Under this path, only the original user question is distributed to the document knowledge base retrieval link, where the extracted academic principles or historical fragments can be used to answer the question, and the output results will include a prompt explaining that the current question lacks executable water quality data query conditions.

[0077] Step 204: When the verification is successful, the initial analysis plan is used as the river network analysis plan.

[0078] If the initial analysis plan passes the validity check directly, or if the format error is eliminated after error correction and retry, the content of the valid file can be directly mapped to the river network analysis plan variable in the main process, thereby starting the subsequent database call execution program.

[0079] In other words, when the verification is successful, the analysis plan that passes the verification will be used as the river network analysis plan.

[0080] Furthermore, for complex business scenarios where user input commands simultaneously contain multiple spatial objects or multiple evaluation dimensions, this embodiment further illustrates the evidence management mechanism in a multi-task environment, specifically including:

[0081] Optionally, each analysis subtask can be executed separately, and the evidence number and chart identifier generated by each analysis subtask can be extracted.

[0082] For example, when the pattern field in the parsed river network analysis plan is marked as a composite analysis type, the multiple independent analysis tasks nested within it are separated by the task splitter and distributed to multiple parallel query threads at the underlying level.

[0083] Each query thread independently retrieves the water quality data of the corresponding river network object and generates local quantitative charts and textual evidence.

[0084] After each thread completes its calculations, the collection interface extracts the second type of evidence number and the corresponding chart call identifier, which are independently generated by different subtasks, from the underlying storage.

[0085] Optionally, evidence numbers and chart identifiers can be remapped across tasks to eliminate numbering conflicts between subtasks;

[0086] Because each subtask operates independently and in parallel at the underlying level, the generated local sequence numbers may have overlapping characters. For example, two independent subtasks may both output a local result labeled as Figure a.

[0087] Furthermore, the numbering conversion unit extracts the hierarchical index sequence code of each subtask, and uses this index sequence code as a pre-feature parameter to perform string combination operations with the original evidence number and chart identifier, which can be used to maintain the uniqueness of the global namespace.

[0088] After remapping calculation, the conflicting identifier characters are replaced with encoded identifiers, avoiding addressing errors when calling the large language model later.

[0089] Optionally, based on the remapped evidence number and chart identifier, the analysis results of each analysis subtask are aggregated, and the vector retrieval fragments are merged with the aggregated analysis results to generate a composite analysis context as a dual evidence context.

[0090] After the encoding conversion is completed, the time range, target object and underlying query results corresponding to each subtask are extracted and concatenated according to the preset block arrangement logic.

[0091] Write a composite summary containing the total number of tasks, the analysis mode of each task, and a statistical list of target objects at the beginning of the concatenated sequence.

[0092] It should be understood that the integrated text sequence with the added composite summary information constitutes a composite analysis context that supports multi-task concurrent reasoning, which will directly cover the dual evidence context data area in the main process.

[0093] On the other hand, further explanations are provided on the specific data entry steps for parallel document vector retrieval, multi-mode river network monitoring data analysis, structured translation of non-text analysis charts, and unified registration of dual-source evidence.

[0094] In one possible implementation, vector retrieval fragments matching the user's question are extracted, and each vector retrieval fragment is assigned a first type of evidence number, including:

[0095] Step 301: Encode the user question into a query vector;

[0096] In this processing stage, the acquired natural language character sequences undergo dimensionality reduction mapping. For example, a pre-trained text embedding model is used to convert discrete lexical units into dense floating-point arrays; these arrays have fixed dimensional parameters and serve as representations of the semantic features of the original question in vector space.

[0097] In some scenarios, the text embedding model can adopt a pre-trained language representation model based on the Transformer architecture, or other model instances can be selected according to the actual deployment environment.

[0098] The language model is a large-scale pre-trained language model with text generation capabilities, and specific model specifications can be selected according to inference accuracy and computing resource conditions.

[0099] Step 302: Perform similarity retrieval in the pre-built vector database based on the query vector, and extract the text fragments corresponding to the retrieval results as vector retrieval fragments;

[0100] Furthermore, the cosine similarity algorithm can be optionally invoked to calculate the feature space distance between the array and each static vector retrieval fragment in the pre-built database in parallel.

[0101] Next, distance value comparison is performed to filter and extract several vector retrieval fragments whose spatial distance is lower than the preset judgment value. After stripping off their auxiliary formats, important character sequences are retained.

[0102] Step 303: Assign first-type evidence numbers to each vector retrieval fragment in the order of the distance returned by the retrieval.

[0103] For example, for the returned set of vector retrieval fragments, the sorting unit performs an ascending sorting operation from smallest to largest based on the calculated spatial distance parameter.

[0104] Next, the sorted sequence set is traversed, and each character sequence in the set is assigned an incrementing sequence number constant. This set of constants is fixed as the first type of evidence number for the vector retrieval fragment, used to establish a traceable index mapping relationship in response generation.

[0105] According to an embodiment of this application, water quality monitoring data analysis is performed based on a river network analysis plan to obtain river network data evidence and analytical charts derived from the river network data evidence, including:

[0106] For example, the analysis mode in the river network analysis plan is parsed, and the corresponding whole network snapshot analysis mode, time series trend analysis mode, ranking analysis mode or multi-object comparison analysis mode is called.

[0107] For river network business data links, the routing distribution node extracts the pattern field parameters from the analysis plan generated in the previous stage. Based on the preset conditional branch controller, it activates the predetermined data calculation process. Different calculation processes are equipped with different underlying database query access permissions and corresponding statistical aggregation function libraries.

[0108] For example, the river network business database is queried based on the analysis pattern of the call, and the business statistics results are calculated;

[0109] Optionally, a query statement can be sent to the underlying structured water quality database using the corresponding interface to extract scalar data groups of a predetermined time window and object dimension;

[0110] The statistical aggregation function library is further invoked to perform calculations on the scalar data set. Under a specific operating condition branch, if the whole network snapshot analysis mode is invoked, the calculation node extracts the instantaneous scalar set of each measuring point at the same cross-sectional time to calculate the spatial range parameter;

[0111] If the ranking analysis mode is invoked, the sorting operator is triggered to sort the feature parameters of each object in descending order. The obtained time-series or cross-sectional calculation output values ​​together constitute the business statistics results of this batch of queries.

[0112] For example, river network data evidence is generated based on business statistics results, and corresponding line trend charts, bar charts, or spatial distribution maps are derived as analysis charts.

[0113] After extracting the discrete numerical values, they can be formatted into a key-value pair data structure system, which can then be used as a text carrier for dynamic data sequences.

[0114] Simultaneously, it can receive the same discrete computational values ​​as input sources and generate associated visual pixel matrices based on the dimensionality of the values.

[0115] In this case, one-dimensional time-series values ​​can be mapped to planar polyline trajectories, sorted values ​​can be mapped to bar charts, and spatial coordinates and concentration values ​​can be mapped to a river network topology diagram layer.

[0116] According to embodiments of this application, the method for generating dual-evidence context based on vector retrieval fragments and river network data evidence further includes:

[0117] Optionally, extract key statistics, ranking details, or fluctuation trends from the analysis charts;

[0118] Alternatively, it is necessary to perform feature dimensionality reduction and inverse solution operations on the generated visual pixel matrix object.

[0119] Accordingly, the program scans the internal parameters of the underlying chart object and extracts the global maximum, global minimum, and corresponding time axis parameters for the line chart.

[0120] Extract a finite number of object name-scalar pairs from the beginning and end of a sequence in a bar chart;

[0121] Spatial node coordinate parameters and bound discrete values ​​of ammonia nitrogen concentration are extracted from the schematic diagram of the river network.

[0122] Optionally, the extracted results can be converted into text summaries and structured data tables;

[0123] Furthermore, discrete parameters are filled into a pre-configured text skeleton template, and character concatenation technology is used to generate coherent descriptive string fragments.

[0124] For data pairs involving sorting multiple objects and spatial coordinate positioning, predefined line breaks and column separators can be used to rearrange and construct them into a text table with a two-dimensional row and column logical relationship.

[0125] Optionally, the text summary, structured data table, and analysis chart number can be feature-bound, and the bound overall data can be injected into the dual-evidence context.

[0126] Furthermore, new storage data blocks are allocated, and string fragments containing numerical conclusions, two-dimensional row and column text, and call identification codes of graphic source files are merged and encapsulated into a unified structure object;

[0127] The structure object is appended to the data segment of the main dual evidence context using pointer append or serialization write operations.

[0128] According to the embodiments of this application, the first type of evidence number, the second type of evidence number, and the analysis chart are entered into the unified evidence registration form, including:

[0129] Optionally, evidence record entries can be created in a unified evidence registry;

[0130] Within the global storage space, the registry maintenance unit performs database row record initialization operations, generating multiple blank data entity objects to receive the multi-source verification information that will be written.

[0131] Optionally, the first type of evidence number, the second type of evidence number, and the chart identifier associated with the analysis chart are written into the corresponding evidence record entries respectively;

[0132] Further, scan the sequence of constant identifiers generated in each computing link;

[0133] The first type of evidence number, the second type of evidence number, and the visual graphic call identification code are used as unique primary keys, and their values ​​are updated and assigned to the specified address range of the aforementioned generated data entity object.

[0134] Optionally, a metadata field can be configured for each evidence record entry. The metadata field shall at least include the title, evidence type, source object, and evidence content.

[0135] For example, based on the primary key index, auxiliary feature parameters are added to the entity object column by column;

[0136] The specified column variables receive the truncated feature fingerprint sequence, the enumerated state quantity indicating the data source type, the parameter indicating the sensor measurement point number or the vector retrieval fragment belonging to the library, and the basic text characters contained in the record.

[0137] These together constitute the verification data structure that supports conflict resolution and fact-checking.

[0138] In some embodiments, when the analysis mode invoked is the time-series trend analysis mode, the business statistics results are calculated in the following ways:

[0139] Step 401: Obtain the raw time-series water quality data within the preset time window;

[0140] In hydrodynamic environments like tidal river networks, the physicochemical properties of the water body are affected by periodic tidal backwater and tidal dynamics, exhibiting high-frequency fluctuations. At this stage, a request can be sent to the underlying water resources time-series database to extract the time-series data collected by front-end sensing devices at a set frequency.

[0141] This set has a clearly defined start and end timestamp range and corresponds to one or more spatial monitoring nodes, which can provide input for subsequent deconstruction of water environment temporal characteristics.

[0142] Step 402: Perform tidal harmonic separation on the original time-series water quality data to decompose it into tidal components and ebb tide trend components;

[0143] When processing environmental time series, directly extracting extreme values ​​or calculating the mean is easily affected by high-frequency tidal fluctuations, resulting in output results that deviate from the actual water quality evolution patterns. Therefore, a signal decomposition operator is applied to process the series set.

[0144] As an example, standard harmonic analysis or bandpass filtering algorithms can be used as the separation logic.

[0145] Next, the main tidal frequency parameters of the predetermined period of the tidal river network are calibrated, and the mixed time series signal is separated into two independent sequence arrays; one set is the tidal component that characterizes the short-period reciprocating dynamic law, and the other set is the de-tidal trend component that reflects the actual sewage discharge or self-purification evolution state of the water body after filtering out high-frequency hydrodynamic oscillations.

[0146] Step 403: Extract the long-term trend of the ebb tide trend component and extract the tidal phase features of the tidal component.

[0147] That is, after obtaining the decoupled sequence array, parameter dimensionality reduction operation is performed on the two sequence lines respectively.

[0148] For the tidal trend component that reflects the actual evolution of water quality, calculate its moving average difference or linear fitting slope over a preset time span to quantify the long-term trend of the sequence, so as to determine whether the indicator shows a deterioration, improvement or stagnation.

[0149] For the tidal component that carries the hydrodynamic law, the time axis parameters corresponding to its amplitude peak and valley values ​​are extracted to determine the matching characteristics between the extreme values ​​of water quality concentration and the phases of rising and falling tides, thereby assessing the correlation constraint state between pollution load and hydrodynamic conditions.

[0150] Step 404: Combine the long-term trend and tidal phase characteristics to form business statistics results, which are used to construct trend evidence and tidal phase characteristic evidence with independent numbers respectively.

[0151] For example, the evolution direction parameters and phase matching parameters obtained by dimensionality reduction through bilinear features are reorganized into a unified key-value pair data structure, which serves as the overall business statistical result output under the current analysis mode.

[0152] Within the evidence conversion channel, for the trend feature segments derived from the tidal trend component, an identifier constant is assigned to them, which is then solidified as a factual basis for describing the long-term evolution of water quality.

[0153] Simultaneously, for the phase segments derived from the tidal wave characteristics, another set of identifier constants is assigned to them, which are then solidified as the factual basis for judging the hydrodynamic boundary conditions.

[0154] In some alternative implementations, for river network areas subject to strong manual scheduling interference from pumping stations or sluice gates, the decomposition logic in tidal harmonic separation can be replaced with a data-driven empirical mode decomposition algorithm.

[0155] Under this condition, several intrinsic mode function sequences are adaptively extracted. After removing the mode sets that match the high-frequency characteristics of artificial scheduling, the remaining low-frequency mode sequences are reconstructed into de-tidal trend components. This scheme introduces an adaptive signal decomposition mechanism, which can enhance the denoising stability of the model under complex water conservancy engineering scheduling environments.

[0156] In one possible implementation, the process of generating a dual-evidence context based on vector retrieval fragments and river network data evidence also includes a cross-source conflict detection step:

[0157] Step 501: Extract assertion polarity coding values ​​for the same object or the same water quality index from the vector retrieval fragment and river network data evidence;

[0158] Calculate the semantic similarity between vector retrieval fragments and river network data evidence;

[0159] In the process of constructing a dual-evidence context, since unstructured document knowledge and dynamic monitoring data come from different sources, they may produce completely opposite conclusions for the same river network object or the same monitoring indicator.

[0160] Therefore, a conflict detection layer is initiated before merging evidence. For example, trend assertions about the core evaluation object are extracted from Type I evidence in text form and Type II evidence in data form.

[0161] Establish a symbol set containing three discrete values, and map the assertion direction to the corresponding digital constant, i.e., the assertion polarity code value.

[0162] In this embodiment, when evidence indicates that the ammonia nitrogen concentration increases, rises, or worsens, the assertion polarity code value is assigned to 1;

[0163] When evidence indicates a decrease, reduction, or improvement in concentration, the assigned assertion polarity code value is -1;

[0164] When the evidence indicates that the state is stable or fluctuates, the assigned assertion polarity code value is 0.

[0165] For the extraction of the polarity direction of the assertion in the first type of evidence, polarity discrimination prompt words can be sent to the language model to map the trend description of the evaluation object in the evidence text into polarity encoded values;

[0166] For the extraction of the polarity direction asserted by the second type of evidence, the polarity coding value can be directly determined based on the sign of the linear fitting slope of the tidal trend component.

[0167] Step 502: Based on the semantic similarity between the vector retrieval fragment and the river network data evidence, as well as their respective assertion polarity coding values, the conflict score is quantitatively calculated.

[0168] Accordingly, after obtaining the polarity constants corresponding to the two types of evidence, the text feature vectors of the two are extracted;

[0169] Further calculation of the cosine similarity between text vectors yields a scalar parameter indicating semantic closeness. Next, a linear operator is loaded to perform a composite operation between the absolute value of the difference in polarity constants and the cosine similarity, constructing a non-directional cross-source conflict score, also known as the conflict score. The formula for calculating the cross-source conflict score is as follows:

[0170] Conflict(ci ,n j )=sim(c i ,n j )×|P(c i )-P(n j )| / 2;

[0171] In the above formula:

[0172] Conflict(c i ,n j The score represents the cross-source conflict score between the first type of evidence and the second type of evidence.

[0173] sim(c i ,n j The semantic similarity between two pieces of evidence is calculated using a text embedding model, and can also be called cosine similarity.

[0174] P(ci) is the assertion polarity coding value of the first type of evidence;

[0175] P(n j ) represents the assertion polarity coding value for the second type of evidence;

[0176] i is the index number of the first type of evidence;

[0177] j is the index number of the second type of evidence;

[0178] | | is the absolute value symbol, used to ensure that a monotonically increasing positive mapping relationship is maintained regardless of the direction of the conflict;

[0179] 2 is the normalized span constant.

[0180] In some cases, sim(c i ,n j The original cosine similarity can be the processed semantic similarity. If the original cosine similarity is greater than or equal to 0, the original cosine similarity is retained as the processed semantic similarity. If the cosine similarity is less than 0, the processed semantic similarity is set to 0.

[0181] Step 503: When the calculated conflict score exceeds the preset conflict threshold, it is determined that there is a semantic conflict between the vector retrieval fragment and the river network data evidence.

[0182] Accordingly, after calculating the cross-source conflict score, it is compared with the preset conflict threshold by scalar size;

[0183] The conflict threshold can be stored in system memory.

[0184] In this embodiment, the preset conflict threshold can be set to 0.6; alternatively, a suitable threshold value can be determined through experiments on the validation set based on the actual business requirements for conflict detection sensitivity.

[0185] Furthermore, when the calculated scalar value is greater than the preset conflict threshold, it indicates that the two pieces of evidence have output opposite physical conclusions in a highly related semantic context. The pair of pieces of evidence can be marked as having a semantic conflict state, and subsequent domain arbitration rules can be triggered.

[0186] According to one aspect of this application, after determining that there is a semantic conflict between the vector retrieval fragment and the river network data evidence, the following sub-steps are also included:

[0187] For example, domain arbitration is performed on vector retrieval fragments with semantic conflicts and river network data evidence. The domain arbitration includes at least one of the following parallel rules: timeliness priority rule, accuracy priority rule, and range matching priority rule.

[0188] Once a conflict is determined between the two types of evidence, a conflict arbitration rule base established based on common knowledge in the water conservancy industry will be invoked to implement logical conditional routing to reduce knowledge conflicts. In this embodiment, the following parallel rules will be matched and executed according to the specific working conditions:

[0189] Scenario 1: Prioritizing Timeliness. When the publication timestamp of the document corresponding to the first type of evidence is earlier than the collection timestamp of the data corresponding to the second type of evidence, the ruling shall be based on the latest monitoring data, and the generated content shall be the arbitration grounds that the latest monitoring data covers a more recent period.

[0190] Scenario 2: Precision-based matching rule. When the textual content of the first type of evidence is a qualitative description, while the calculation result of the second type of evidence is a quantitative scalar, the ruling shall be based on the quantitative data, and an arbitration argument shall be generated in which the content of quantitative data takes precedence over the qualitative description.

[0191] Scenario 3: Priority Rule for Matching Scope. When the spatial scope described by the first type of evidence is larger than the target object of the user's question, and the second type of evidence is collected directly targeting that target object, the ruling shall be based on the second type of evidence, and a corresponding arbitration reason for scope matching shall be generated.

[0192] For example, a conflict warning paragraph is constructed based on the arbitration conclusion and corresponding arbitration reasons generated in the field of enforcement arbitration;

[0193] After determining the primary key of the evidence to be used first and obtaining the corresponding arbitration grounds, fill them into the built-in conflict transfer text template; this operation can convert the arbitration parameters into descriptive statements containing the conflicting party number, the priority evidence number, and the explanation of causation.

[0194] For example, a conflict warning paragraph is inserted into a dual-evidence context, wherein the conflict warning paragraph contains at least the evidence number where there is a semantic conflict, the arbitration conclusion, and the arbitration reasoning.

[0195] Based on this, the string concatenation instruction is invoked to inject the generated descriptive statements as pre-introduction information between specified paragraphs in the dual evidence context.

[0196] In view of this, it helps to reduce the phenomenon that models make random guesses or refuse to output due to knowledge conflicts.

[0197] As an alternative, the polarity product determination method can also be used when calculating the quantification conflict score.

[0198] Under this condition, calculate the product of the polarity coding value of the first type of evidence and the polarity coding value of the second type of evidence.

[0199] When the product is equal to -1, the two pieces of evidence are determined to be in opposite directions, and their semantic similarity is directly used as the conflict score.

[0200] If the product is greater than or equal to 0, the conflict score is assigned the value 0.

[0201] It should be understood that this scheme reduces the processor clock cycle consumption during a single feature crossover.

[0202] In one possible implementation, before constructing the constrained answer prompt based on the dual evidence context and pre-configured answer constraint rules, a pre-assessment step of evidence sufficiency is also included:

[0203] Step 601: Decompose the user problem into multiple semantic requirement units;

[0204] Traditional retrieval enhancement systems typically rely on single-dimensional binary logic comparison when determining whether background knowledge supports the intent of the question, lacking detailed verification of the internal relational structure of complex interactive text.

[0205] In this processing stage, semantic segmentation operators can be invoked to analyze the acquired natural language question statements into a series of requirement subsets with independent information granularity;

[0206] Each extracted subset of requirements constitutes the smallest system query constraint element, such as a trend-type unit representing the direction of change of the predetermined river network monitoring points, or an explanatory unit representing the cause of abnormal phenomena.

[0207] After deconstruction and extraction, a set of semantic requirement units can be constructed, and the lifecycle of this set can be maintained within the current processing thread for high-precision coverage metric verification.

[0208] In this embodiment, semantic segmentation can be achieved by sending a prompt word containing a requirement decomposition instruction to the language model. The prompt word requires the model to decompose the user's question into independent and verifiable information query clauses, with each clause corresponding to an information requirement to be verified.

[0209] In other embodiments, the same functionality can also be achieved using a rule-based segmentation method based on dependency parsing.

[0210] Step 602: For each semantic requirement unit, calculate its semantic relevance to each evidence item in the dual evidence context, and take the maximum relevance as the maximum coverage score of the corresponding semantic requirement unit.

[0211] After obtaining the discrete subset of requirements, the process begins to traverse each independent requirement unit loaded in the set. During the traversal loop, the distance calculation component measures the semantic relevance between this independent requirement unit and all discrete text fragments and structured data sequences within the dual-evidence context, thereby measuring the tightness of the information matching.

[0212] When scanning the distance array between the current independent demand unit and all candidate knowledge items, the highest relevance value can be automatically extracted and assigned as the theoretical support upper limit for that single-dimensional demand. The formula for this extraction process can be expressed as follows:

[0213] cov(r k )=max(rel(r k ,e));

[0214] In the above formula, cov(r) k ) represents the maximum coverage score of the k-th semantic requirement unit, e represents a single evidence item in the current dual-evidence context set, and rel(r k ,e) represents the semantic relevance parameter between the k-th semantic requirement unit and a single evidence item. The max operation traverses the entire evidence set and extracts the element with the highest relevance scalar value as the output value of the current equation.

[0215] Step 603: Based on the maximum coverage score of each semantic requirement unit and the preset coverage threshold, calculate the overall evidence sufficiency score of the user question.

[0216] Furthermore, the generated sub-indicators are integrated into a global scalar parameter for evaluating the system's response capability.

[0217] Under a specific path, the step response characteristics can be used to perform a binary state transition operation on each sub-indicator. When the sub-indicator is greater than or equal to the pre-configured constant boundary, the state variable is set to 1, and otherwise it is set to 0.

[0218] In this embodiment, the coverage threshold can be set to 0.5; specifically, the appropriate value can be determined through experiments on the validation set based on the accuracy requirements of evidence coverage in the actual application scenario.

[0219] Furthermore, the binarized state variables are summed to obtain the total proportion of effective coverage units. The formula for calculating the sufficiency of evidence score is as follows:

[0220] S suf (Q)=(1 / K)×∑(I(cov(r k )≥τ));

[0221] In the formula, S suf (Q) represents the sufficiency score of evidence, characterizing the overall support strength of the user's question; K is the total number of semantic requirement units (constant); k is the integer index of the unit being traversed; cov(r k ) is the maximum coverage score scalar of the preceding output, τ is the pre-configured coverage threshold parameter, I is the indicator function, which outputs a constant constant 1 when the internal logical condition is true, and a constant constant 0 otherwise. The summation operation performs an accumulation operation on all state feature values ​​mapped by the indicator function, and the division operation at the beginning of the formula maps the sum value to the standard percentage statistical interval.

[0222] In this case, at least one of the following parallel strategies shall be implemented based on the sufficiency of evidence score:

[0223] After obtaining the normalized global scalar evaluation parameters, the communication routing allocator starts the corresponding execution control flow channel according to the numerical range in which it is located, aiming to eliminate the unfounded feature expansion behavior of the computing module in the context of incomplete basic information.

[0224] Optionally, when all semantic requirement units are covered, the process of constructing constrained answer prompts based on dual-evidence context and pre-configured answer constraint rules is performed.

[0225] In this first branch channel, the control center releases all control over the running parameters to the underlying text generation engine, driving the language model to comprehensively load all background verification vector retrieval fragments within the current thread for complete logical reasoning.

[0226] Optionally, when only some semantic requirement units are covered, a missing evidence declaration instruction is added to the constrained answer prompt to limit the candidate answer to only the part supported by evidence, and then declare the part that lacks evidence.

[0227] Within this restricted operating condition channel, dynamic instruction injection is performed to write exclusive control logic into the header structure of the network interface call. This instruction enforces the elimination of unfounded inferences from candidate answers, thereby achieving partial data return with quality control boundaries.

[0228] Optionally, when no semantic requirement unit is covered, the candidate answer generation process is intercepted and a preset rejection statement is directly output.

[0229] Alternatively, a pre-judgment can be performed. When the evidence sufficiency score is zero, the inference service call is skipped, and a preset rejection statement is directly returned to the front-end interface. This preset rejection statement includes a message indicating that the current question lacks supporting evidence.

[0230] In this case, the pre-configured response constraint rules include at least one of the following parallel constraints:

[0231] The use of external knowledge and speculative information outside the context of dual evidence is prohibited;

[0232] Each factual conclusion in the generated candidate responses must be clearly marked with the first or second type of evidence number cited;

[0233] When river network data evidence contains direct statistical values ​​or trend results, candidate responses can be generated based on the river network data evidence.

[0234] In certain environments, a formatted reconstruction process for constrained answer prompts can be initiated.

[0235] During the reorganization operation, the rule template framework that is permanently stored in the read-only area can be extracted.

[0236] The frame's payload receiving section is bound to a dual-path verification information stream, while its control constraint section is hard-coded with three parallel constraint criteria.

[0237] This operation ensures that in each text generation cycle, the language model will force the content source of the generated sentence segment to point to the given knowledge payload, thereby completing the index tracing loop of fact verification.

[0238] The business requirement that prioritizes the generation of river network data as set in the rules belongs to an independent hierarchical control system, which is different from the global interception behavior triggered when data is missing.

[0239] When the numerical extraction component confirms that the underlying statistics cover the object parameter space, the data priority criterion executes the underlying weight allocation.

[0240] When no overlap of spatial features is detected, the score-based interception module has already blocked task distribution at the very beginning of the call chain.

[0241] The above maintains the stability of the response boundary.

[0242] In one possible implementation, the candidate answer is compared with the dual-evidence context input evaluation module for consistency verification, and a quality evaluation result is output, including:

[0243] Step 701: Parse the candidate answers into independent assertion units;

[0244] After obtaining the text paragraphs output by the large language model, the text deconstruction program can be started;

[0245] Candidate answers are segmented into discrete statement records according to syntactic logic and punctuation.

[0246] Next, the smallest statement unit containing factual conclusions, statistical results, trend judgments, ranking conclusions, normative basis, or explanatory judgments can be identified and extracted, and used as an independent assertion unit.

[0247] In terms of data structure, all the decomposed assertion units are reorganized into a structured list of sets.

[0248] Step 702: Based on the dual evidence context, quantitative scores for accuracy, fidelity and relevance are given to each assertion unit, and the comprehensive score of the candidate answer in each evaluation dimension is calculated.

[0249] Furthermore, load the evaluation index weight matrix.

[0250] For example, for each assertion unit in the set, a scalar comparison is performed from three independent dimensions, using the dual evidence context as the factual reference benchmark.

[0251] Among them, the accuracy dimension is used to determine whether the numbers or trends contained in the assertion are consistent with the technical meaning of the original chart and data source.

[0252] The fidelity dimension is used to determine whether the assertion is strictly supported by the evidence package and whether it contains external prior knowledge or subjective speculation outside the evidence package.

[0253] The relevance dimension is used to assess whether the assertion directly addresses the core intent of the user's question.

[0254] In this embodiment, each assertion unit is assigned a discrete integer value from 0 to 10 for each dimension. After traversal calculation, the mean of each indicator is calculated using arithmetic mean logic, which serves as the comprehensive score for the candidate answer level. The calculation formula is as follows:

[0255] Score d =∑(score rd ) / R;

[0256] In the formula, Score d The score represents the overall score of the candidate answer on the d-th evaluation dimension, where d represents any dimension identifier among accuracy, fidelity, or relevance, R is the constant of the total number of decomposed assertion units, and r is the integer index of the assertion unit being traversed. rd Let r be the single-item score scalar of the r-th assertion unit on the d-th dimension. The summation operation iterates through and accumulates the scores of all assertion units in the set.

[0257] Step 703: The proportion of assertion units that need to be cited but are not marked with evidence numbers can be counted using indicator functions to obtain the missing citation rate, and the proportion of assertion units that are marked with evidence numbers but whose corresponding evidence content cannot support the assertion unit can be counted to obtain the citation error rate.

[0258] For example, this step establishes a canonical verification mechanism based on indicator functions.

[0259] By filtering according to rules, it is determined whether the r-th assertion unit contains a factual statement. If it does, it is referenced to the necessity state variable M. r Assign a value of 1, otherwise assign a value of 0.

[0260] If the state variable M of a certain assertion unit r If the value is 1, but the set of evidence numbers marked at the end of the line is empty, then it is counted as a missing reference.

[0261] For example, the reference missing rate can be calculated using a first counter and a division operator, i.e.:

[0262] V miss =∑(I(M r =1and|E r |=0)) / ∑(I(M r =1));

[0263] Among them, V miss The missing reference rate represents the candidate answer, r represents the assertion unit index integer, and M represents the missing reference rate. r E represents the reference necessity state variable of the r-th assertion unit. r represents the set of evidence numbers labeled by the r-th assertion unit. Here, || represents the number of elements contained in the set. I represents an indicator function that outputs a constant 1 when the logical condition expression inside it is true, and outputs a constant 0 otherwise. The ∑ operation in the denominator obtains the total number of factual conclusions that need to be cited in the whole text, and the ∑ operation in the numerator obtains the number of abnormal single sentences that are not labeled.

[0264] Simultaneously, when the set of evidence numbers labeled for a certain assertion unit is not empty, the support relation scalar S of the single piece of evidence cited for that assertion unit is calculated by retrieving the frontier registry.

[0265] The scalar S is assigned a value of 1 when the evidence supports the assertion, and a value of 0 otherwise.

[0266] Accordingly, the assertion unit and the original evidence text corresponding to its labeled evidence number are formed into an input pair, which are then input into the natural language reasoning decision-maker to determine whether the original evidence text constitutes a semantic implication relationship for the assertion unit.

[0267] When it is determined to be implied, the support relation scalar S is assigned a value of 1;

[0268] When the relationship is determined to be contradictory or neutral, the supporting relation scalar S is assigned a value of 0.

[0269] If an assertion unit is labeled with a number, but the maximum value of the supporting relation scalar among all the evidence it cites is still 0, then it is considered a citation error.

[0270] Furthermore, the reference error rate is calculated using the second counter, namely:

[0271] V err =∑(I(|E r |>0 and max(S(a r ,e))=0)) / ∑(I(|E r |>0));

[0272] In the formula, V err E represents the citation error rate of candidate answers. r Let a be the set of evidence numbers labeled for the r-th assertion unit. r Let e ​​be the r-th assertion unit, and let e be the set E. r In the single evidence item, S is the support relation determination function, the max operation extracts the highest support scalar among all evidence items referenced by the current assertion unit, I is the indicator function, the ∑ operation in the denominator counts the total number of assertion units with reference annotation behavior in the whole text, and the ∑ operation in the numerator counts the number of abnormal unit items with incorrect annotation or false reference.

[0273] Step 704: The calculated comprehensive scores, missing citation rate, and citation error rate of the candidate answers in each evaluation dimension are aggregated to generate the quality evaluation results.

[0274] After all indicators have been calculated, they can be encapsulated into a standard JSON response structure, along with text descriptions of the specific locations of missing or incorrect references, to generate the final quality evaluation results, which can then be provided to external systems for backtracking interception or horizontal model selection.

[0275] In another possible implementation, to address the technical concern that large language models are prone to random fluctuations in evaluation results under multi-temperature sampling, the scoring calculation also includes a stability verification process based on multi-round resampling, specifically including the following sub-steps:

[0276] Step 7021: For the same evaluation input, call the evaluation module in parallel to perform multiple rounds of resampling scoring;

[0277] For the same evaluation input containing the same user question, dual evidence context, and candidate answers, the scheduling process calls the underlying evaluation model in parallel to perform N independent scoring operations;

[0278] N represents the number of rounds of resampling.

[0279] In this embodiment, the number of sampling times N can be set to 3, and different sampling temperature parameters or random number seeds are configured for each call, so as to obtain 3 sets of independent scoring feature vectors.

[0280] Step 7022: Calculate the median score of each evaluation dimension across multiple rounds as the final comprehensive score;

[0281] This involves collecting the score feature vectors from multiple rounds of resampling output.

[0282] For each predetermined evaluation dimension such as accuracy, fidelity, and relevance, the scores from multiple rounds can be sorted by size, and the scalar value in the middle of the sequence can be extracted as the final comprehensive score, thereby filtering out extreme outliers caused by occasional illusions in the large language model.

[0283] Step 7023: Based on the standard deviation and mean of scores in each round of evaluation, divide the standard deviation of scores in each round by the sum of the mean of scores in each round and a preset small constant to obtain the scoring consistency index.

[0284] That is, calculate the standard deviation and mean of the scores over multiple rounds for this dimension. Since the mean of scores over multiple rounds may approach 0 under low-scoring conditions in large models, a preset small constant is introduced at the mean in the denominator to construct a consistency index to prevent errors caused by division by zero.

[0285] For example, the formula for calculating the rating consistency index is as follows:

[0286] CV d =σ d / (μ d +ε);

[0287] In the formula, CV d Let σ be the consistency index for the d-th evaluation dimension, where d is the identifier of the evaluation dimension. d The standard deviation of the scores from multiple rounds of resampling, μd The mean value is the mathematical average of the scores from multiple rounds of resampling, where ε is a preset, relatively small constant. In some embodiments, it can be fixed at 0.00001 to ensure that the mean μ is within the range of ε. d Provides numerical protection support when the value is 0.

[0288] Step 7024: When the scoring consistency index exceeds the preset instability threshold, add a manual review warning to the generated quality evaluation result.

[0289] After calculating the consistency index of the scores for each dimension, it can be compared with the preset instability threshold stored in memory.

[0290] In some cases, the default instability threshold is fixed at 0.3.

[0291] If the calculated discrete index value is greater than the instability threshold, it indicates that the current model's evaluation output for the text has unacceptable fluctuations, and the quality inspection process is unstable. The control center then sets the instability warning status field from 0 to 1 in the output quality evaluation result JSON text, and adds a prompt message to the warning description paragraph indicating that business personnel need to perform manual review.

[0292] As an alternative, the single-sentence dimension comparison and scoring process can also be replaced by probability output extraction based on the Natural Language Entailment (NLI) three-class classification model.

[0293] In this case, the assertion unit and the corresponding evidence item are input into the pre-trained implication classifier. The probability scalar values ​​of the three categories of implication, contradiction and neutrality output by the classifier are extracted. The probability scalar values ​​of the implication category are normalized and mapped to serve as the fidelity score of the assertion unit.

[0294] This approach reduces reliance on large, high-performance generative models by introducing a small-scale discriminative classifier, thereby improving the evaluation response rate of edge computing devices.

[0295] For example, a real-world business scenario from a tidal river network water environment management project can be selected for testing. The test set includes various types of user questions, such as trend queries, ranking queries, comparative analysis, and compound queries.

[0296] Experimental results show that the trend evidence generated after introducing tidal harmonic separation has a higher consistency rate with the results of manual verification than the method of directly using the original time series data.

[0297] After introducing cross-source conflict detection and domain arbitration, the proportion of contradictory statements in candidate responses decreased;

[0298] The multi-level triage strategy based on evidence sufficiency pre-assessment outperforms the traditional binary interception method in scenarios where evidence is partially missing.

[0299] It is understandable that the specific improvement may vary depending on the application scenario, data scale, and the capabilities of the underlying language model.

[0300] In some cases, when there are no assertion units that need to be cited in the candidate answers, i.e., the denominator is 0, the missing citation rate and citation error rate can be preset to 0.

[0301] According to one aspect of this application, a data processing and question-and-answer system for the governance of tidal river network water environment is disclosed. This system can be used to execute the methods provided in the embodiments of this application, and its implementation principle is similar; the identical parts will not be repeated here. Specifically, it includes the following modules:

[0302] For example, the plan generation module is used to receive user questions and generate river network analysis plans based on the user questions;

[0303] In a specific system operating environment, the planning generation module is mainly responsible for translating and converting the front-end interactive interface and the underlying instructions;

[0304] This module has a built-in text parsing interface, which is responsible for capturing the natural language character stream input by the user and converting it into structured machine-readable instructions. At the same time, it filters illegal format parameters through an error correction and retry mechanism.

[0305] For example, the vector retrieval module is used to extract vector retrieval fragments that match the user's question and assign a first-class evidence number to each vector retrieval fragment;

[0306] The vector retrieval module is built on an unstructured database and is responsible for recalling academic principles and historical experience.

[0307] It calls a text embedding algorithm service to map the query text into a feature vector and perform distance comparison in a high-dimensional space. Then, it attaches a unique sequence constant to the extracted text record.

[0308] For example, the data analysis module is used to perform water quality monitoring data analysis based on the river network analysis plan, obtain river network data evidence and analysis charts derived from the river network data evidence, and assign a second type of evidence number to each river network data evidence.

[0309] It establishes connections with the underlying tidal river network water quality and hydrological time series database and spatial topology database through a high-speed data bus;

[0310] It integrates tidal harmonic separation operators and multi-dimensional statistical operators. It can schedule the corresponding operators to perform scalar calculations according to the plan instructions, and output the calculated values ​​to the built-in graphics rendering engine for visualization conversion, and assign identifier constants to various data and graphics assets.

[0311] For example, the evidence registration module is used to enter the first type of evidence number, the second type of evidence number, and the analysis chart into the unified evidence registration form, and generate a dual evidence context based on vector retrieval fragments and river network data evidence;

[0312] It is equipped with a high-speed cache address space, which not only performs the initial creation of data entries and field assignment operations, but also calls conflict detection and arbitration rules to intercept contradictory factual conclusions during the process of merging multi-source data into a dual evidence context.

[0313] For example, the question-and-answer generation module is used to construct constrained answer prompts based on the dual evidence context and pre-configured answer constraint rules, and to generate candidate answers based on the constrained answer prompts;

[0314] It is equipped with a large language model inference engine and a front-end quality assessment interception component. It further performs channel diversion based on the calculated evidence sufficiency score, and restricts the output boundary by reorganizing the constraint rules and verification knowledge in a templated manner, and enforces the data priority and source citation criteria.

[0315] For example, the answer evaluation module is used to perform consistency verification on the candidate answer input itself based on the dual evidence context and output the quality evaluation result.

[0316] It runs independently of the generation engine, further decomposes the output text into the smallest assertion units, can use a multi-round resampling mechanism to obtain a set of evaluation indicators, and introduces a small constant when calculating the coefficient of variation to avoid division by zero overflow. The output is a data structure containing scores, missing citation rate, citation error rate and stability warnings.

[0317] Based on the same inventive concept as the above method embodiments, this embodiment also provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, it implements the method as described in any of the above embodiments.

[0318] In terms of physical hardware topology, electronic devices have computing units and data persistence units;

[0319] The processor can specifically be a central processing unit, a graphics processing unit, or a dedicated tensor processing unit;

[0320] Specifically, memory can encompass random access memory, read-only memory, or non-volatile flash memory.

[0321] The processor reads the instruction sequence stored in memory through the system bus, establishes the corresponding data structure and execution thread in the memory space, and then sequentially completes the operation instructions such as question parsing, dual-source retrieval, constraint-based construction of prompt words, and answer consistency evaluation.

[0322] For high-density operations such as tidal harmonic separation and matrix similarity comparison, the processor can accelerate the processing of scalars and vectors through multi-threaded concurrency mechanisms.

[0323] Based on the same inventive concept as the above-described method embodiments, this embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method as described in any embodiment of this application.

[0324] For example, a computer-readable storage medium is a non-transitory data carrier used to store compiled binary executable code;

[0325] The physical form of this medium can be an optical storage disk, a magnetic hard disk drive, or a solid-state storage chip. When this storage medium is connected to the computer system's read interface, the binary instructions it carries are loaded into the system's runtime environment, driving the host hardware to perform data querying, knowledge comparison, text generation, and assertion-level post-processing verification tasks under dual-evidence constraints.

[0326] According to one aspect of this application, the main tidal constituent frequency parameter can be a tidal river network hydrological characteristic parameter pre-configured in the system. Its specific value is determined according to the main tidal constituent type of the target river network, such as the semi-diurnal tide M2 ​​constituent or the diurnal tide K1 constituent, or it can be obtained by conventional tidal harmonic constant analysis method based on actual hydrological observation records.

[0327] According to one aspect of this application, trend direction determination can be performed on each piece of evidence by calling a language model, that is: inputting the evidence text and preset direction classification prompts into the language model, and requesting the model to output the change direction label of the evidence with respect to the target indicator.

[0328] According to one aspect of this application, the dual-evidence context integrates feature prior information and inference rule constraints, unifying and integrating multi-source input features and underlying iterative inference mechanisms to achieve robust discrimination of multi-factor driven relationships.

[0329] The second type of evidence number is a unique identifier for the research data, used to distinguish and match dynamic time-series data and multi-source sample units, so as to realize the binding and corresponding association of the dual evidence system.

[0330] In this application, a tidal harmonic separation algorithm is used to decouple the original environmental time series signal into a de-tidal trend component and a tidal phase component. This can be used to suppress artifacts caused by hydrodynamic disturbances, providing a denoised trend basis for large models that reflects the true evolution of water quality, and reducing the frequency of trend misjudgment.

[0331] Furthermore, a cross-source conflict quantification detection model combining assertion polarity encoding and semantic similarity was designed, and a domain arbitration mechanism was introduced with timeliness, accuracy, and range matching dimensions. This enables the system to autonomously select priority evidence and inject dialectical hints when knowledge conflicts occur, helping to reduce contradictory inferences output by the model.

[0332] In this context, a maximum coverage calculation method based on semantic decomposition of demand units is adopted to construct a multi-level traffic distribution strategy. This transforms the originally coarse-grained binary logic into partial responses and statements of missing facts, thereby improving response utilization under conditions of limited evidence coverage.

[0333] Furthermore, a multi-dimensional quantitative scoring system based on the smallest assertion unit is adopted, combining the statistical ratio of citation errors and missing citations with indicator functions, and introducing a small constant at the mean of multiple rounds of resampling. A quality control closed loop with division-to-zero protection capability is established, giving the phenomenon of illusion and citation disconnect a quantifiable interception benchmark.

[0334] The system embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple modules 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 indirect coupling or communication connection through some interfaces, units, or modules, and may be electrical or other forms.

[0335] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0336] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

Claims

1. A data processing and question-and-answer method for the governance of tidal river network water environment, characterized in that, include: Receive user questions and generate a river network analysis plan based on the user questions; Extract vector retrieval fragments that match the user's question, and assign a first-type evidence number to each vector retrieval fragment; Based on the river network analysis plan, water quality monitoring data analysis was carried out to obtain river network data evidence and analysis charts derived from the river network data evidence, and a second type of evidence number was assigned to each river network data evidence. Enter the first type of evidence number, the second type of evidence number, and the analysis charts into the unified evidence registry, and generate a dual evidence context based on vector retrieval fragments and river network data evidence; Constrained answer prompts are constructed based on dual evidence context and pre-configured answer constraint rules, and candidate answers are generated based on the constrained answer prompts. The candidate answers are input into the evaluation module with dual evidence context for consistency verification, and the quality evaluation results are output. In the process of generating dual-evidence context based on vector retrieval fragments and river network data evidence, a cross-source conflict detection step is also included: extracting assertion polarity encoding values ​​for the same object or the same water quality index from the vector retrieval fragments and river network data evidence. Based on the semantic similarity between the vector retrieval fragment and the river network data evidence, and their respective assertion polarity coding values, a conflict score is quantitatively calculated; when the calculated conflict score exceeds a preset conflict threshold, it is determined that there is a semantic conflict between the vector retrieval fragment and the river network data evidence. Domain arbitration is performed on vector retrieval fragments and river network data evidence that have semantic conflicts. Domain arbitration includes at least one of the following parallel rules: timeliness priority rule, accuracy priority rule, and range matching priority rule. Based on the arbitration conclusions and corresponding arbitration reasons generated in the field of enforcement arbitration, a conflict warning paragraph is constructed. Insert a conflict-indicating paragraph into the context of dual evidence, wherein the conflict-indicating paragraph contains at least the evidence number where there is a semantic conflict, the arbitration conclusion, and the arbitration reasoning.

2. The method according to claim 1, characterized in that, Receive user questions, and generate a river network analysis plan based on the user questions, including: Input user questions and predefined analysis architectures into the language model to output an initial analysis plan in a structured format; The initial analysis plan is validated for legality. If the validation fails, the language model is driven to perform error correction and retry. If the verification still fails after error correction and retry, it degenerates into only executing the path that extracts the vector retrieval fragment that matches the user's question; When the verification is successful, the initial analysis plan will be used as the river network analysis plan.

3. The method according to claim 1, characterized in that, When a river network analysis plan includes multiple sub-tasks, the first type of evidence number, the second type of evidence number, and the analysis charts are entered into a unified evidence registry. A dual-evidence context is generated based on vector retrieval fragments and river network data evidence, including: Execute each analysis subtask separately and extract the evidence number and chart label generated by each analysis subtask; Perform cross-task remapping of evidence numbers and chart labels; Based on the remapped evidence number and chart identifier, the analysis results of each analysis subtask are aggregated to generate a composite analysis context as a dual evidence context.

4. The method according to claim 1, characterized in that, Extract vector retrieval fragments that match the user's question, and assign a first-type evidence number to each vector retrieval fragment, including: Encode user questions into query vectors; Based on the query vector, a similarity search is performed in the vector database, and the text fragments corresponding to the search results are extracted as vector search fragments. Based on the distance returned by the retrieval, each vector retrieval fragment is assigned a first-type evidence number in sequence.

5. The method according to claim 1, characterized in that, Based on the water quality monitoring data analysis performed according to the river network analysis plan, river network data evidence and analytical charts derived from the river network data evidence were obtained, including: Parse the analysis modes in the river network analysis plan and call the corresponding whole network snapshot analysis mode, time series trend analysis mode, ranking analysis mode or multi-object comparison analysis mode; The analysis model based on invocation queries the river network business database to calculate business statistics results; River network data evidence is generated based on business statistics results, and corresponding line trend charts, bar charts, or spatial distribution maps are derived as analysis charts.

6. The method according to claim 5, characterized in that, When the analysis mode is time-series trend analysis mode, the business statistics results are calculated in the following way: Acquire raw time-series water quality data within a preset time window; Tidal harmonic separation was performed on the raw time-series water quality data to decompose it into tidal components and ebb tide trend components. Extract the long-term trend of the ebb tide component and extract the tidal phase features of the tidal component; Long-term trends and tidal phase characteristics are combined to form business statistics, which are then used to construct trend evidence and tidal phase characteristic evidence with independent numbering.

7. The method according to claim 1, characterized in that, The process of generating dual-evidence context based on vector retrieval fragments and river network data evidence also includes: Extract and analyze key statistics, ranking details, or fluctuation trends from charts and graphs; The extracted results are converted into text summaries and structured data tables; The text summary, structured data table, and analysis chart number are feature-bound, and the bound overall data is injected into the dual evidence context.

8. The method according to claim 1, characterized in that, The pre-configured response constraint rules include at least one of the following constraints in parallel: The use of external knowledge and speculative information outside the context of dual evidence is prohibited; Each factual conclusion in the generated candidate responses must be clearly marked with either the first-class evidence number or the second-class evidence number cited. When the river network data evidence contains direct statistical values ​​or trend results, candidate responses are generated based on the river network data evidence.

9. The method according to claim 1, characterized in that, The candidate answers are compared with the dual-evidence context input evaluation module for consistency verification, and the quality evaluation results are output, including: The candidate responses are parsed into independent assertion units; Based on the dual-evidence context, the accuracy, fidelity and relevance of each assertion unit are quantitatively scored, and the comprehensive score of the candidate answer in each evaluation dimension is calculated. Using indicator functions, the proportion of assertion units that need to be cited but are not marked with evidence numbers, and the proportion of assertion units that are marked with evidence numbers but whose corresponding evidence content cannot support the assertion unit, are respectively counted to obtain the missing citation rate and the citation error rate. The overall score, missing citation rate, and citation error rate are combined to generate a quality assessment result.

Citation Information

Patent Citations

  • Meteorological operation and maintenance intelligent question and answer method based on multi-mode GraphRAG

    CN121835911A

  • Water conservancy intelligent question-answering system and method based on knowledge enhancement and data driving

    CN121860062A

  • Intelligent customer service question and answer processing method, device and equipment and storage medium

    CN122470689A