Expert question and answer auxiliary interaction method and system based on large water affair model

By using an expert question-and-answer system based on a large water management model, the problems of insufficient context awareness and data silos in smart water management systems have been solved, enabling accurate understanding of user intent and efficient decision support.

CN121745321APending Publication Date: 2026-03-27SEQUOIA LIBRA TECH GRP CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-27
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing smart water systems, traditional question-and-answer methods lack context awareness, cannot handle the experience and qualitative language of frontline personnel, and suffer from severe data silos, resulting in low decision-making efficiency and an inability to provide end-to-end intelligent services.

Method used

An expert question-and-answer assisted interactive system based on a large water affairs model is constructed. The system constructs semantic vectors for questions through multimodal input, retrieves SCADA time-series data, static knowledge graphs and historical treatment records, performs semantic mapping and time-series feature engineering, and generates structured expert responses.

Benefits of technology

It achieves a precise understanding of user intent, breaks down data silos, provides proactive decision support constrained by expert rules, and improves decision quality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745321A_ABST
    Figure CN121745321A_ABST
Patent Text Reader

Abstract

The invention relates to an expert question and answer auxiliary interaction method and system based on a large water affair model, and relates to the technical field of intelligent water affair. The method comprises the following steps: firstly, constructing a problem semantic vector fusing a current intention and a historical background by deeply analyzing user interaction data and a historical session; then, SCADA time sequence data, a static knowledge graph and a historical processing record are retrieved from an external multi-source data stream by taking the vector as an index, and are converted into a situation feature vector reflecting the running state constraint at the current moment through semantic mapping and time sequence feature engineering. By jointly inputting a problem semantic vector and a situation feature vector into a pre-trained water affair field large model, the system can perform verification reasoning under strict working condition constraints, and encapsulates a reasoning result into a structured expert reply based on a visual template. The technical problems that in the prior art, a general model is prone to generating illusion, the retrieval result accuracy is low, and end-to-end intelligent diagnosis cannot be provided are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent water management technology, specifically to an expert question-and-answer assisted interaction method and system based on a large water management model. Background Technology

[0002] With the continuous development of smart water management, water operations are at a critical stage of transformation from informatization to intelligentization. Given the high degree of specialization and complexity of scenarios such as sewage treatment, the problem of over-reliance on the personal experience of frontline personnel in the traditional model is becoming increasingly prominent. There is an urgent need to build an intelligent auxiliary system that can deeply integrate data, knowledge and business logic to accumulate expert experience and improve the quality of decision-making.

[0003] Existing technical solutions typically separate general question-and-answer, data query, and knowledge base retrieval. At the question-and-answer level, systems often employ keyword matching or pre-defined rule bases. This mechanical interaction method lacks the ability to understand ambiguous expressions, cannot handle the experiential and qualitative language of frontline personnel, and struggles to establish effective connections by combining dialogue history and environmental factors. At the data application level, SCADA systems and knowledge bases exist in data silos. Query tools can only return numerical values ​​or basic charts, failing to automatically connect real-time operating conditions with professional theories for in-depth analysis, resulting in a lack of anomaly detection and interpretation capabilities. Furthermore, existing knowledge retrieval often suffers from severe information overload, resulting in low accuracy of search results. When general-purpose models are directly applied to industrial scenarios, the lack of rigorous process mechanism constraints and real-time data support easily leads to misleading results or generates recommendations that do not comply with safety regulations. This isolation of functional modules not only fragments data flow and business flow, forcing manual switching between different systems to transmit information and severely reducing decision-making efficiency, but also limits the system's ability to provide end-to-end intelligent services based on a complete information view, failing to truly achieve the leap from passive information retrieval to proactive expert decision support.

[0004] Therefore, there is an urgent need for a new expert question-and-answer assisted interaction method that can integrate multi-source heterogeneous data, has context-aware capabilities, and is constrained by expert rules. Summary of the Invention

[0005] This application provides an expert question-and-answer assisted interaction method and system based on a large water resources model, in order to at least solve the above-mentioned technical problems existing in the prior art.

[0006] According to the first aspect of this application, an expert question-and-answer assisted interaction method based on a large water resources model is provided, comprising: S1: receiving user interaction data and historical session context data; S2: constructing a question semantic vector that integrates current intent and historical background based on user interaction data and historical session context data; S3: retrieving associated SCADA time-series data, static knowledge graphs, and historical treatment records from external multi-source data streams using the question semantic vector as the index key to obtain a heterogeneous raw data set; S4: performing semantic mapping and time-series feature engineering on the heterogeneous raw data set to obtain a contextual feature vector reflecting the current operational status constraints; S5: jointly inputting the question semantic vector and the contextual feature vector into a pre-trained large water resources model to obtain a verification reasoning result; S6: parsing the judgment conclusions and treatment data in the verification reasoning result, and modularly encapsulating the judgment conclusions and treatment data and filling them with chart components based on a matching visualization template to obtain a structured expert response that can be used for edge-side rendering interaction.

[0007] According to a second aspect of this application, an expert question-and-answer assisted interactive system based on a large water resources model is provided, comprising: a conversation interaction data acquisition module for receiving user interaction data and historical conversation context data; a question semantic vector construction module for constructing a question semantic vector that integrates current intent and historical background based on user interaction data and historical conversation context data; a heterogeneous data acquisition module for retrieving associated SCADA time-series data, static knowledge graphs, and historical treatment records from external multi-source data streams using the question semantic vector as an index key to obtain a heterogeneous raw data set; a heterogeneous data mapping scenario construction module for performing semantic mapping and time-series feature engineering on the heterogeneous raw data set to obtain a scenario feature vector reflecting the current operational status constraints; a verification reasoning result generation module for jointly inputting the question semantic vector and scenario feature vector into a pre-trained large water resources model to obtain a verification reasoning result; and a response generation module for parsing the judgment conclusions and treatment data in the verification reasoning result, and modularly encapsulating the judgment conclusions and treatment data and filling them with chart components based on a matched visualization template to obtain a structured expert response that can be used for edge-side rendering interaction.

[0008] Compared with existing technologies, this application aims to construct an expert question-and-answer assisted interactive system centered on a large-scale water resources model, breaking down the functional barriers between ordinary question-and-answer, data query, and knowledge retrieval in traditional systems. First, by deeply analyzing user interactions and historical conversation data, a question semantic vector integrating current intent and historical context is constructed, effectively solving the problems of insufficient context awareness and inadequate understanding of ambiguous expressions in traditional technologies. Then, this vector is used as an index to retrieve SCADA time-series data, static knowledge graphs, and historical records. Through semantic mapping and time-series feature engineering, it is transformed into a contextual feature vector reflecting real-time operational constraints, overcoming the shortcomings of data silos and the lack of mechanistic analysis in simple numerical queries. Based on this, the question semantics and contextual features are jointly input into a pre-trained large-scale water resources model, performing verification reasoning under strict operating condition constraints and generating structured expert responses. This process upgrades passive retrieval to proactive decision support constrained by expert rules, effectively solving the problems of general models being prone to illusions, having low accuracy, and being unable to provide end-to-end intelligent diagnosis. Attached Figure Description

[0009] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, wherein: in the drawings, the same or corresponding reference numerals denote the same or corresponding parts.

[0010] Figure 1 This is a flowchart of an expert question-and-answer assisted interaction method based on a large water resources model according to an embodiment of this application; Figure 2 This is a schematic diagram of data flow in an expert question-and-answer assisted interaction method based on a large water resources model according to an embodiment of this application; Figure 3 The flowchart of step S4 in the expert question-and-answer assisted interaction method based on a large water resources model according to an embodiment of this application is shown; Figure 4 This is a block diagram of an expert question-and-answer assisted interactive system based on a large water resources model, according to an embodiment of this application. Detailed Implementation

[0011] To further illustrate the technical means and effects adopted by this application in order to achieve the intended purpose, the following detailed description of the specific implementation methods, structures, features and effects of this application is provided in conjunction with the accompanying drawings and preferred embodiments.

[0012] To address the shortcomings in the aforementioned technical fields, this application provides an expert question-and-answer assisted interaction method based on a large-scale water resources model, such as... Figure 1 and Figure 2 As shown, Figure 1This is a flowchart of an expert question-and-answer assisted interaction method based on a large water resources model, according to an embodiment of this application. Figure 2 This is a schematic diagram of data flow in an expert question-and-answer assisted interaction method based on a large water resources model according to an embodiment of this application.

[0013] Specifically, step S1 involves receiving user interaction data and historical session context data. It's understandable that the unpredictable and non-standardized nature of waterworks operations means that single text commands are insufficient to accurately reproduce abnormal equipment noises or scum formation; operators tend to prefer voice or image interaction. Furthermore, troubleshooting is a continuous thought process, and current questions often omit subjects or imply prior references; isolated analysis can easily lead to semantic bias. Therefore, step S1 aims to build a comprehensive and multi-modal input foundation. By integrating multi-source sensory information and complete historical context, it accurately captures the user's true intent within a specific spatiotemporal context, effectively solving the interaction rigidity problem caused by the lack of multimodal support and memory capabilities in existing technologies.

[0014] In one possible implementation of this application, step S1 is as follows: First, it is initiated using an interactive interface program deployed on a water monitoring center or mobile handheld terminal. When operators discover an anomaly during inspection or monitoring and initiate a consultation request from the front end, the program immediately captures the current user interaction data. This data is multimodal, encompassing the raw signals generated by operators through different input devices. Specifically, the user interaction data includes, but is not limited to: text command strings input via keyboard or touchscreen, such as querying the real-time influent flow rate of the No. 2 line of the biological treatment tank; pulse code modulation data recorded in PCM or WAV format from voice audio streams collected by a microphone array, such as an operator's verbal statement that the current effluent ammonia nitrogen is too high, and whether it is a problem with the reflux ratio; and on-site images or system screenshots taken by a camera, such as a photo showing fine sludge particles on the surface of the secondary sedimentation tank or a screenshot of the blower operation curve on the SCADA system. These data are tagged with a unified timestamp at the acquisition end and encapsulated into a current interaction object containing a modal type identifier (such as Type=Text / Audio / Image) and the original data payload.

[0015] Meanwhile, to address the issue of missing semantics in single interactions, this step performs parallel operations to retrieve historical session context data. Historical session context data is not simply log recording, but rather a complete structured record of previous rounds of dialogue within the current session window. During implementation, the system accesses a high-performance in-memory database such as a Redis cluster or a document-oriented database based on the current user's login credentials (User_ID) and the currently active session identifier (Session_ID). This database stores a question-and-answer pair column arranged chronologically. For example, if the current session is set to retain the first 10 rounds of dialogue, the retrieved data includes all user-asked questions (raw text) from time t-10 to time t-1, as well as expert responses generated by a large model. This historical data is organized in list form, with each element containing the dialogue's role label (User or Assistant), the content text, and the timestamp at that time.

[0016] For example, in the control stage of a biological reactor at a wastewater treatment plant, the operator first inquires about the current dissolved oxygen concentration in the aerobic tank. The system previously answered that the dissolved oxygen concentration in the aerobic tank was 1.5 mg / L. Next, the operator presses the voice input button and asks: "Is this value too low under the current influent load?" Simultaneously, a photo of the instruments in the influent pump station is uploaded. At this point, step S1 is executed as follows: First, the interface layer receives the voice audio data (part of the user interaction data) and the instrument photo data (another part of the user interaction data). Then, the program uses the Session_ID to retrieve historical records (historical session context data) from the database containing "User: Query Dissolved Oxygen..." and "Assistant: 1.5 mg / L". Although the current voice input only contains the pronoun "this value," the historical context data obtained through step S1 clearly contains the information that the dissolved oxygen is 1.5 mg / L, providing necessary data support for subsequent steps to interpret what this value refers to. Finally, after receiving the two parts of data mentioned above, this step performs integrity verification and format encapsulation on the data. For unstructured data such as images and audio, it will be temporarily stored in an object storage service and an access path will be generated; for text and structured historical records, they will be directly loaded into memory objects.

[0017] Specifically, step S2 involves constructing a question semantic vector that integrates current intent and historical context based on user interaction data and historical conversation context data. Correspondingly, in water operations, frontline personnel often use unstructured multimodal methods such as voice or photos to describe anomalies, which are heavily influenced by personal experience and are often vague. Furthermore, troubleshooting is a continuous reasoning process, and the current question often implicitly refers to previous conversation states; isolated interaction data cannot fully convey the true intent. Because existing solutions lack a unified understanding of non-standard multimodal inputs and the ability to correlate them with historical conversations, capturing core questions is difficult. Therefore, step S2 aims to transform heterogeneous multi-source inputs into machine-understandable high-dimensional dense vectors, deeply fusing current inputs with historical logical links to provide a computational foundation for subsequent large-scale model reasoning, encompassing precise spatiotemporal constraints and a complete semantic background.

[0018] In one possible implementation of this application, step S2 includes: S21: performing modal discrimination and transcription processing on user interaction data based on an acoustic model and / or an optical character recognition network to obtain a normalized text sequence; S22: performing water-related intent recognition and entity slot extraction on the normalized text sequence to obtain structured slot features containing process entity labels and intent probability distributions; S23: performing context-aware semantic fusion on the structured slot features and historical session context data to obtain a question semantic vector.

[0019] Step S2 is described as follows: Step S21 first reads the user interaction data, determines the modal type of the data, and then distributes the data to the corresponding deep learning processing pipeline according to the determination result. If the determination result shows that the input data is a speech audio stream, such as an operator recording a question on-site via a mobile terminal asking "Is this dissolved oxygen reading too low under the current influent load?", the program will call the pre-trained acoustic model for transcription. This acoustic model adopts an Automatic Speech Recognition (ASR) network based on the Transformer architecture. During implementation, the original PCM audio data is first pre-emphasized, framed, and windowed, and Mel-frequency cepstral coefficients or Fbank features are extracted as the input feature matrix. The feature matrix is ​​input into the encoder part of the Transformer, which consists of a multi-head self-attention mechanism and a feedforward neural network stacked in multiple layers. By calculating the dependencies within the input sequence, it maps the acoustic features into high-dimensional hidden layer feature vectors. Subsequently, the decoder is based on the hidden layer feature vectors. Based on the previously generated character, the probability distribution of the character at the current moment is predicted autoregressively. This process can be expressed by the conditional probability formula: ,in, This represents the final output text sequence. The character predicted at time t. For the character history before time t, This is the acoustic hidden layer representation of the encoder output. The weight matrix and bias terms in the model are obtained through supervised training on a large-scale water industry speech dataset, using the backpropagation algorithm to minimize the cross-entropy loss function, thus ensuring that the model can accurately recognize industry-specific terms such as anaerobic, hypoxic, and aeration. If the discrimination result shows that the input data is an image, such as a photo uploaded by an operator showing an instrument reading of 1.5 mg / L, the program will call the optical character recognition network for processing. This network adopts a convolutional recurrent neural network architecture, including convolutional layers, recurrent layers, and transcription layers. In implementation, the image is first scaled to a fixed height while maintaining the aspect ratio, and then input into a CNN network with VGG or ResNet as the backbone to extract feature maps. The feature maps are segmented into feature sequences and input into a bidirectional long short-term memory network (BiLSTM). BiLSTM is responsible for modeling the contextual features in the sequence and predicting the character category probability corresponding to each feature frame. Finally, the connectionic temporal classification (CTC) algorithm is used to solve the problem of the inconsistency between the feature sequence length and the label sequence length, and the frame-level prediction results are mapped to the final text string by finding the optimal path. The formula for calculating path probability is: ,in, Represents a possible character path. For the input image, This indicates that the character is generated at time t. The probability of this is determined. By removing duplicate characters and whitespace from the path, key text information in the image, such as 1.5 mg / L, is finally parsed. For directly input text commands, regular expressions are used to remove noise such as HTML tags and special control characters. Finally, the speech text obtained from ASR transcription, such as whether the dissolved oxygen reading is too low under the current influent load, the image text extracted by OCR, such as 1.5 mg / L, and the direct text input after cleaning, are concatenated into a standardized string, i.e., a normalized text sequence, according to the chronological order of occurrence. This sequence clearly represents the user's complete intent and sensory observation data, such as whether the dissolved oxygen reading is too low under the current influent load, and the instrument reading is 1.5 mg / L.

[0020] Step S22 loads and runs the pre-trained BERT-BiLSTM-CRF joint model to perform deep semantic parsing and structured extraction on the text data. The normalized text sequence output in step S21 is "Is this dissolved oxygen reading too low under the current influent load? The instrument reading is 1.5 mg / L." The program first converts this sequence into a token sequence acceptable to the model, inserting a [CLS] identifier at the beginning of the sentence and a [SEP] identifier at the end. The core of this process lies in the parallel computing architecture of the BERT-BiLSTM-CRF joint model. First, the text sequence is input to the BERT layer. This layer utilizes a multi-layer bidirectional Transformer encoder, based on weights pre-trained on a large-scale water affairs professional corpus (such as process manuals, design specifications, and maintenance records), to map each token to a dynamic word vector with rich contextual semantics. Specifically, the [CLS] position at the beginning of the sentence outputs a vector. It aggregates the global semantic information of the entire sentence for subsequent intent classification tasks. The intent recognition branch is connected to the [CLS] vector through a fully connected layer and uses the Softmax function to calculate the probability distribution of each preset intent category. The calculation formula is as follows: in, Given the input sequence, and These are the weight matrix and bias term of the fully connected layer, respectively, and these parameters are determined through supervised training. For the example above, the model might calculate a probability of 0.85 for fault diagnosis intent, 0.10 for parameter query, and 0.05 for others, thus determining the dominant intent as fault diagnosis. Simultaneously, the entity extraction branch utilizes the word vector sequence output by BERT. As input, the data enters a Bidirectional Long Short-Term Memory (BiLSTM) layer. The BiLSTM layer contains two LSTM units, one forward and one backward, capturing forward semantic dependencies (such as dissolved oxygen modifying readings) and backward contextual features, respectively, outputting a hidden state sequence containing long-distance dependency features. This hidden state sequence is then fed into a Conditional Random Field (CRF) layer. The CRF layer uses a state transition matrix to globally constrain the label sequence, ensuring that the output entity labels conform to BIO labeling rules and logical constraints in the water domain (e.g., B-LOC cannot be directly followed by I-PER). The scoring function of the CRF layer is defined as: ,in, The label at position i is the output of BiLSTM. The launch score, From the label Transferred to The transition score is calculated. Finally, the highest-scoring label sequence is decoded using the Viterbi algorithm. In this application, the model accurately identifies dissolved oxygen as a process parameter entity, 1.5 mg / L as a numerical entity, and influent load as an operating condition entity. Finally, the program encapsulates the intent probability distribution output by the intent classification branch, such as {intent: fault diagnosis, probability: 0.85}, and the entity label set output by the entity extraction branch, such as [{entity: dissolved oxygen, label: process parameter}, {entity: 1.5 mg / L, label: numerical}], into tuples to generate structured tank features.

[0021] In one possible implementation of this application, step S23 includes: S231: embedding and encoding the structured slot features to obtain the current query embedding vector; S232: reading the key information from the previous k rounds of historical session context data and generating a historical context embedding matrix based on the key information from the previous k rounds; S233: performing context-aware semantic fusion of the historical context embedding matrix and the current query embedding vector using the following formula to obtain the question semantic vector, the formula being: in, For the current query embedding vector, The semantic feature vector of the i-th round of dialogue content is embedded in the historical context matrix. For dimensional scaling factor, For normalized exponential functions, For trainable weight matrix, For the bias term vector, For vector concatenation, It is a non-linear activation function. This is the semantic vector of the problem.

[0022] First, the embedding encoding operation in step S231 is performed. A pre-trained water domain embedding layer is used. This layer is based on BERT or Word2Vec architecture and is obtained through unsupervised pre-training using a dedicated corpus built from massive water-related professional literature, process manuals, and SCADA operation logs. It can accurately capture the semantic features of industry terms such as aeration and reflux, mapping the structured slot features output in step S22 into a high-dimensional dense vector. Specifically, the one-hot vector of the intent category is concatenated with the word embedding vector of the entity label. The one-hot vector of the intent category is a sparse vector constructed based on preset water-related business scenarios (such as fault diagnosis and parameter query), and its dimension corresponds to the total number of intent categories. The word embedding vector of the entity label is a low-dimensional dense vector obtained by looking up a table. By training a Skip-gram model on a large-scale water-related corpus, related terms are made to be close in distance in the vector space. Feature compression and extraction are then performed through a fully connected layer to obtain the current query embedding vector. For example, if the operator's voice command is "Is this indicator too low?", after processing by S22, the fault diagnosis intent is identified, but a clear subject entity is lacking. In this case, the generated... It primarily represents the semantic tendency of querying abnormal states.

[0023] Meanwhile, the program executes step S232 to read historical session context data. It retrieves the key information from the previous k rounds under the current session ID from the memory database. The value of k is determined based on the sliding window size set in experimental verification, aiming to balance the completeness of context information with the consumption of computational resources. It is set to cover the number of dialogue rounds required to complete a complete troubleshooting thought process (e.g., 3 to 7 rounds), ensuring that key historical states can be retrieved while avoiding the introduction of premature irrelevant noise. In this application, k=5. For example, in the previous dialogue, the user asked "What is the dissolved oxygen in the aerobic pool?", and the system replied "The current reading is 1.5 mg / L." These historical text pairs are encoded using the same embedding model to generate a historical context embedding matrix. each of the lines The semantic feature vector representing the i-th round of historical dialogue carries the key information of object: dissolved oxygen and value: 1.5 mg / L.

[0024] Then, proceed to step S233. To address the specific referential issue of this metric, a scaled dot product attention mechanism is used to calculate the relevance between the current query and the historical context. In the above formula, With historical matrix The transpose of the expression is used to perform a dot product operation to measure the similarity between the current intention and the history of each round. This is the dimension scaling factor; for example, when the vector dimension is 768, this value is... This is used to prevent the dot product result from being too large, causing the Softmax function to enter the gradient minimum region. The Softmax function normalizes the calculation result to a probability distribution. This refers to attention weight. In the above example, since the current query involves indicator judgment, it has the highest correlation with the historical records of dissolved oxygen values ​​from the previous round, therefore the corresponding weight is... The weight can be as high as 0.9, while the weight of earlier, irrelevant chat records is close to 0. Next, the calculated weights are used to weight and aggregate historical information to calculate the context vector. This step extracts and enhances historical features related to dissolved oxygen and 1.5 mg / L through weighted summation, forming a clear contextual semantic representation. Finally, a gated fusion network generates the final problem semantic vector. , in the formula, It is a trainable weight matrix. These are the bias term vectors. These two parameters are optimized during the model training phase using the backpropagation algorithm, aiming to learn how to best combine the current intent with the historical context. This is a non-linear activation function (such as Tanh or ReLU). The final output... It is no longer a simple text vector, but a composite semantic vector that integrates the object: dissolved oxygen in the aerobic pool, the value: 1.5 mg / L, and the action: diagnosing the cause of the low oxygen level.

[0025] Specifically, step S3 involves retrieving related SCADA time-series data, static knowledge graphs, and historical treatment records from external multi-source data streams using the problem's semantic vector as the index key to obtain a heterogeneous raw data set. It is understandable that in actual water operations, a single data dimension is insufficient to support accurate diagnosis; for example, judging dissolved oxygen anomalies requires a comprehensive assessment combining real-time load, design specifications, and historical experience. Addressing the data silo problem of scattered storage of SCADA data, technical documents, and historical records in existing architectures, this application implements step S3 using the generated high-dimensional semantic vector as a global index, transcending the boundaries of heterogeneous data sources, and automatically recalling real-time states, theoretical basis, and experiential references that are highly semantically and logically related to the current problem. By integrating this three-dimensional information, a complete chain of evidence is constructed for subsequent large-scale model reasoning, effectively solving the problem of insufficient decision-making basis caused by information fragmentation in traditional methods.

[0026] In one possible implementation of this application, step S3 is as follows: First, a connection channel with an external multi-source data stream needs to be established. The external multi-source data stream is a logical data bus that integrates multi-dimensional information from the industrial site. Its specific architecture includes: a time-series database such as InfluxDB storing millisecond-level sampled data to record sensor values ​​such as flow rate, liquid level, and current; a static knowledge graph built based on a graph database such as Neo4j to store process mechanisms, design parameters, and equipment relationships; and a historical handling record library based on a vector database such as Milvus, containing past fault descriptions, cause analyses, and solutions.

[0027] The retrieval of SCADA time-series data first involves parsing the entity features in the semantic vector of the question, identifying the core process object as the aerobic tank-dissolved oxygen meter. Using a pre-defined measurement point mapping table, this semantic entity is converted into a low-level sensor tag ID, such as Tag_DO_Aeration_02. Subsequently, the program retrieves the data based on the current timestamp. Generate a time series query window as follows Construct SQL or dedicated time-series query statements to extract continuous monitoring values ​​within the specified time window from the time-series database. For example, obtain the dissolved oxygen data sequence [2.20, 2.10, ..., 1.52, 1.49] mg / L for the past two hours, along with associated blower frequency and influent flow rate data. This data reflects the physical operating status of the equipment at the current moment and under recent trends.

[0028] Meanwhile, for retrieval of static knowledge graphs and historical processing records, question semantic vectors are directly utilized. As a query vector, a similarity search is performed in the vector space. This process uses cosine similarity as the metric. By calculating and ranking, the retrieval engine recalls the Top-N most similar content fragments. For example, from the static knowledge graph, design specifications are recalled: the dissolved oxygen control range of the aerobic section of the A / O process should be 2.0-4.0 mg / L, and a level below 1.5 mg / L may lead to a decrease in nitrification efficiency; similar cases are recalled from historical treatment records: in October 2023, dissolved oxygen was consistently 1.5 mg / L, and investigation revealed that insufficient airflow was caused by surge in blower #2, which was resolved by adjusting the guide vane opening.

[0029] Finally, the retrieved numerical time-series data matrix, textual process specification fragments, and structured historical case records were standardized and encapsulated. All heterogeneous data was packaged into a unified data object, namely, the heterogeneous raw data set. This set not only includes what it is (current value 1.5), but also what it should be (standard value 2.0) and how it was done in the past (adjusting the fan).

[0030] Specifically, step S4 involves semantic mapping and temporal feature engineering of the heterogeneous raw data set to obtain a contextual feature vector reflecting the constraints of the current operational state. It should be understood that the heterogeneous raw data set encompasses high-frequency SCADA values, semi-structured standardized text, and multi-dimensional historical cases, exhibiting significant heterogeneity and disorder in both physical attributes and semantic dimensions. This chaotic format makes it impossible for large models to perform effective logical reasoning directly. Direct input can easily lead to illusions or erroneous decisions due to misaligned time granularity or unclear entity references. Therefore, this application introduces step S4, which, through rigorous data cleaning and feature extraction, maps the chaotic raw materials to a spatiotemporally unified, semantically clear, and dimensionally standardized mathematical feature space, thereby constructing a digital context that truly reflects the physical constraints of the current operational state.

[0031] Figure 3 The flowchart illustrates step S4 of the expert question-and-answer assisted interaction method based on a large water resources model according to an embodiment of this application. For example... Figure 3As shown, in one possible implementation of this application, step S4 includes: S41: performing data semantic alignment and spatiotemporal standardization on the heterogeneous original data set to obtain standardized context data; S42: performing mechanistic feature calculation and vector multidimensional fusion on the standardized context data to obtain context feature vectors.

[0032] Step S4 is described as follows: Step S41 receives a heterogeneous raw data set containing time-series readings of dissolved oxygen (DO) in the aerobic tank, design specification text, and historical blower failure cases, and sequentially performs standardized calculation processes for the time-series data, text data, and case indicators. For the SCADA time-series data in the set, cleaning and resampling operations are first performed. In actual operation, due to fluctuations in sensor signal transmission, the acquired dissolved oxygen data may have timestamp alignment deviations or data packet loss. For example, when acquiring DO data from the past 2 hours, the normal sampling frequency is once per minute, but a data gap appears at 10:05. At this time, a linear interpolation algorithm is used to fill the missing values. After completing the missing value filling, in order to match the time granularity of subsequent model processing, the program downsamples the high-frequency data according to a unified master clock step size, such as setting it to 15 minutes. Here, the mean or median of the data within this time window is used as the representative value at that moment. After this processing, the originally messy raw time-series data is transformed into a standard time series with strictly aligned time intervals and no gaps, such as [1.48, 1.50, 1.52, ..., 1.49] mg / L. Simultaneously, entity linking operations are performed on the textual knowledge data in the set. Because documents from different sources describe the same process object differently—for example, the design specification uses "aerobic zone of biological treatment tank," while the field operation log uses "O tank" or "aeration tank"—to eliminate this semantic ambiguity, a pre-built process entity thesaurus or an edit-distance-based fuzzy matching algorithm is used to uniformly map these non-standardized descriptions to unique process node IDs within the system, such as Node_ID:BIO_Aeration_Zone_02. This ensures that subsequent models, when dealing with the constraint of a design value of 2.0 mg / L, can accurately associate it with the current aerobic tank entity, rather than other process sections. Furthermore, dimensional normalization is performed on the evaluation indicators in the case data. Historical data may contain various metrics with vastly different dimensions, such as an ammonia nitrogen removal rate of 85% (percentage) and blower energy consumption of 4500 kWh (absolute value). To eliminate the impact of differences in numerical magnitude on feature fusion, the program employs a max-min normalization method to map all numerical metrics to the standard interval [0,1]. For example, if the current energy consumption is 4500 kWh and the historical range is [3000, 5000], the normalized value is 0.75. This process makes metrics with different physical meanings comparable. Finally, all data fragments after the above time-series cleaning, entity alignment, and dimensional normalization processes are reorganized by the program according to the time and entity dimensions to generate a standardized contextual data object with a clear structure and explicit semantics. This object not only contains the aligned dissolved oxygen sequence but also includes normative constraints bound to unique IDs and standardized historical reference metrics.

[0033] In one possible implementation of this application, step S42 includes: S421: calculating multi-order mechanism-derived variables for time-series process parameters in standardized context data to obtain an enhanced dynamics matrix; S422: encoding the enhanced dynamics matrix with time-series dynamic evolution features to obtain a dynamic hidden layer vector; S423: extracting static text attributes from standardized context data and embedding them to obtain a static vector, calculating the adaptive gating coefficient between the dynamic hidden layer vector and the static vector using a fully connected network, and weighting and fusing the dynamic hidden layer vector and the static vector based on the adaptive gating coefficient to obtain a context feature vector.

[0034] Step S421 first reads the standardized scenario data object output in step S41 and extracts the time series of key process parameters after alignment and interpolation. Following the previous embodiment, the data extracted here is the time series of dissolved oxygen (DO) in the aerobic tank over the past two hours. The value of the current time t The value was 1.49 mg / L, the value at the previous time t-1. The concentration was 1.52 mg / L, and the time step was... The time frame is set to 15 minutes. First, the first-order kinetic characteristic (rate) is calculated. This characteristic aims to quantify how quickly process parameters change over time; for dissolved oxygen, its rate of change directly reflects the change in oxygen consumption rate (OUR) or oxygenation efficiency in the biochemical system. The calculation uses the backward difference method, and the formula is: Substituting the above values, we can calculate the rate of change at the current moment. =(1.49-1.52) / 15=-0.002mg / (L·min). This negative value clearly indicates that dissolved oxygen is decreasing, and the rate of decrease quantifies the oxygen consumption intensity of current microbial activity. Next, the second-order kinetic characteristics (trend) are calculated. To capture the acceleration of parameter changes and thus achieve early identification of process deterioration trends (e.g., in the early stages of sludge bulking, the deterioration of certain indicators often exhibits accelerated characteristics), the processing logic differentiates the rate sequence again: , such as the rate at the previous moment If the value is -0.001 mg / (L·min), then the current acceleration is... =(-0.002-(-0.001)) / 15=-0.000067. This non-zero acceleration value reveals to the model that dissolved oxygen is not only decreasing, but the rate of decrease is accelerating, suggesting a potential risk of insufficient aeration or exacerbated influent load shocks. Subsequently, the most critical constraint deviation features are constructed. This step requires introducing safety threshold constants from the domain knowledge base. These constants are derived from the static knowledge graph or design specification documents retrieved in step S3. For example, the retrieved design specification specifies the lower limit threshold of dissolved oxygen in the aerobic section of the A / O process. =2.0 mg / L, upper limit threshold =4.0 mg / L. To transform the hard constraints of the physical world into soft numerical characteristics understandable by the model, the rectified linear unit (ReLU) function is used to calculate the distance between the current value and the safety boundary. : In the formula, This means that a non-zero penalty value will only be generated when the parameter exceeds the safety boundary. Analyzing the current operating condition, due to... The first item The result is 0, the second item. The result is 0.51. (Calculation result) =0.51 precisely quantifies the degree of violation of the current state; a larger value indicates a more severe deviation from the specification. Finally, a feature stacking operation is performed. The original observations are then... The calculated first-order rate Second-order acceleration and constraint deviation values The feature vectors are concatenated along the feature channel dimension to generate the enhanced feature vector for the current moment. The above calculation is repeated for each time step within the time window to finally form the enhanced dynamic matrix. This matrix is ​​no longer a simple numerical record, but contains rich mechanistic information such as the current value (1.49), the speed of change (-0.002), the trend (accelerated decline), and the degree of violation (0.51).

[0035] Step S422 first receives the enhanced dynamics matrix output from step S421. Following the previous embodiment, this matrix covers dissolved oxygen data from the aerobic pool over the past 2 hours (120 minutes), resampled in 15-minute time steps, thus containing T=8 time steps. The feature vector for each time step consists of four dimensions: original value, first-order velocity, second-order acceleration, and constraint bias. This sequence is then input into a pre-trained Long Short-Term Memory (LSTM) network. LSTM networks are specifically designed to address the vanishing gradient problem in long-sequence training and are well-suited for processing biochemical reaction data with hysteresis characteristics. The core architecture of the LSTM unit includes a forget gate, an input gate, and an output gate for finely controlling the flow of information along the time axis. First, at each time step t, the LSTM unit performs forgetting and remembering operations. The forget gate determines how much information from the cell state at the previous time step needs to be discarded. In water-related scenarios, sensor data often contains high-frequency random noise (such as reading fluctuations caused by bubble interference), which is not helpful in determining long-term trends. For example, when a sharp short-term fluctuation is detected but does not form a sustained trend, the forgetting gate suppresses the impact of this fluctuation on long-term memory. Simultaneously, the input gate determines how much new information is updated in the cell state at the current moment. This is crucial for capturing sudden shock loads, such as a sudden surge in flow caused by the start of a water pumping station; this dynamic mutation information needs to be remembered immediately. Finally, sequence compression is performed for the output. The output gate determines the output of the hidden state based on the current cell state. After recursive calculations over T=8 time steps, the processing logic extracts the hidden state from the last time step, such as setting the hidden layer dimension to 64 or 128. This vector is the output dynamic hidden layer vector. It is no longer a simple numerical record, but rather a high-dimensional dense vector that compresses and encodes the inertia of continuously decreasing dissolved oxygen, the trajectory of accelerated deterioration, and the current degree of deviation from safety.

[0036] Next, step S423 is executed. First, static text attributes related to the current entity are extracted from the standardized context data, such as process type: A2O, design dissolved oxygen lower limit: 2.0 mg / L, and region: aerobic tank zone two. These discrete symbolic information are encoded through a pre-trained entity embedding layer. This embedding layer is essentially a lookup table, mapping each unique attribute ID to a fixed-dimensional vector. The embedding vectors of all relevant attributes are averaged or concatenated, and then passed through a linear transformation layer to obtain a static vector with the same dimension as the dynamic hidden layer vector. Subsequently, an adaptive gating mechanism is introduced. In actual operation, when an emergency failure occurs (such as a sharp drop in DO), the model should focus more on real-time dynamic trends; while during routine inspections or planning, static design specifications are more critical. To simulate this expert thinking, a regulating gate composed of a fully connected network is constructed. The dynamic hidden layer vector... With static vector Perform splicing, input the network, and calculate the gating coefficients. : ,in, and These are learnable parameters. (Sigmoid function) Ensure output coefficients For example, in the scenario described above where dissolved oxygen abnormally decreases, due to... It contains strong characteristics of a deteriorating trend, and the network calculations A value of 0.8 would imply that dynamic information should receive 80% of the attention at the current moment. Finally, a weighted fusion is performed based on this coefficient to generate the final contextual feature vector. , here Nonlinear activation functions such as ReLU or Tanh are used to enhance the nonlinearity of feature representation. This process achieves an organic unity between dynamic perception and static constraints: the generated... It retains the dynamic fact that a significant decline is currently occurring, while also incorporating the static constraint that the design baseline is 2.0 mg / L, and the weight allocation is entirely determined automatically by the current context.

[0037] Specifically, step S5 involves jointly inputting the problem semantic vector and the context feature vector into a pre-trained large-scale water resources model to obtain the verification reasoning results. Correspondingly, simple numerical features cannot be directly transformed into effective decisions by the large-scale model, and general-purpose large-scale models, lacking industrial boundary constraints, are prone to generating illusions, leading to suggestions that violate process mechanisms or exceed safety limits. Therefore, it is necessary to establish a bridge connecting numerical features and symbolic reasoning. Step S5 of this application guides the model to reason within a defined framework by transforming abstract high-dimensional vectors into a structured system of prompts strongly constrained by expert rules. This mechanism effectively avoids blind generation, ensuring that the final output diagnostic conclusions and treatment strategies are not only semantically fluent but also logically rigorous, safe, and executable.

[0038] In one possible implementation of this application, step S5 includes: S51: constructing structured reasoning prompts based on the problem semantic vector and the context feature vector; S52: inputting the structured reasoning prompts into a pre-trained large-scale water resources model to obtain a preliminary candidate solution set containing multiple potential diagnostic conclusions or treatment strategies; S53: performing expert rule constraints and logical verification on each solution in the preliminary candidate solution set based on the expert constraint rule set to obtain an effective solution index mask marking the compliance status of the solution; S54: using the effective solution index mask to filter and sort the preliminary candidate solution set by confidence to obtain the verification reasoning result.

[0039] Step S5 is described as follows: Step S51 first receives the problem semantic vector output from step S2, containing the fault diagnosis intent and dissolved oxygen anomaly entity, and the context feature vector output from step S4, containing fused features of DO=1.49mg / L, accelerated decline trend, and deviation from the norm. First, a cross-attention mechanism is used to deeply align and enhance the features of these two heterogeneous vectors. In this mechanism, the problem semantic vector is mapped to a query vector, and the context feature vector is mapped to a key vector and a value vector. This uses the user's problem intent as a probe to dynamically focus on the most relevant parts of the complex context features. For example, when the problem focuses on a trend, the attention mechanism assigns higher weights to the second-order acceleration dimension in the context vector. After this calculation, an aligned and enhanced input vector is output, which strengthens the operating condition features most closely related to the current problem (such as the prominent dissolved oxygen decline rate) and suppresses irrelevant static noise. Next, a template filling operation is performed. The program calls a preset prompt word template. This template is a standardized text framework pre-built based on water management business scenarios (such as biological tank diagnosis, pump station scheduling, and water quality prediction), stored in a configuration center or knowledge base. Its structure contains several semantic slots to be filled. For example, for a fault diagnosis scenario, the template format is: "Currently monitored object is {Entity}, real-time value is {Value}, trend shows {Trend}, has deviated from the safety threshold {Deviation}, and the main cause of similar historical conditions is {History_Reason}". A lightweight decoder network maps the aforementioned enhanced input vector to corresponding natural language description fragments and fills them into the template slots. Based on prior data, the filled text might be: "Currently monitored object is dissolved oxygen in the aerobic tank, real-time value is 1.49 mg / L, trend shows accelerated decline, has deviated from the safety threshold of 0.51 (severe), and the main cause of similar historical conditions is aeration head blockage or influent load shock." Subsequently, a crucial constraint injection step is performed. The program accesses the expert constraint rule set. This rule set is a structured knowledge base compiled from national water pollutant discharge standards, water plant process operation manuals, and equipment safety operation procedures, stored in a graph database or rule engine. Each rule is marked with priority and applicable scenario. Based on current scenario characteristics, such as low dissolved oxygen, high-priority control constraints are retrieved. For example, rule ID: R-AO-005 "The aeration rate adjustment should not exceed 10% at a time" and rule ID: R-Gen-012 "Priority should be given to ensuring that the effluent ammonia nitrogen meets the standard." The program converts these hard constraints into system instructions in natural language form and appends them to the header of the Prompt. Finally, this step encapsulates the above three parts—system instructions (expert constraints), scenario description (filled template), and user goal (original question)—in a specific structure to generate the final structured reasoning prompt. For example: [System] You are a water expert.The following rules must be followed: 1. Aeration rate adjustments should not exceed 10% increments; 2. Prioritize ensuring ammonia nitrogen compliance. [Context] The current DO level in the aerobic tank is 1.49 mg / L, showing an accelerating downward trend with a high deviation... [User] Please analyze the reasons and provide adjustment suggestions.

[0040] It is understandable that in the practical scenarios of water industry control, there are often deep-seated logical problems between the demands of operators and the core constraints of the process system. This is mainly manifested in the lack of explicit mathematical modeling of the potential energy conflict between the user's intentions and the process safety boundaries. In specific water operations, operators' demands often focus on economic indicators, such as requiring aeration to be adjusted to the minimum to save electricity costs. However, the core constraints of the process system are water quality standards, such as ammonia nitrogen and COD, which must be controlled below the red line. These two naturally constitute a competitive or even antagonistic relationship in the non-convex optimization space. If the multi-vector fusion prompt word construction step in the first embodiment above only uses simple cross-attention for semantic alignment and converts expert rules into text-level system prompt words for splicing and injection, this approach essentially places the strong constraints of physical laws and the soft user intentions at the same text weight level. This leads to a situation where, when large models process long text contexts, they are prone to exceeding the instruction compliance limit due to the weight allocation bias of the attention mechanism. That is, in order to satisfy the user's extreme cost-saving intentions, they generate illusionary suggestions that exceed the process safety threshold. Furthermore, if the projection component of the intent vector in the security rule vector space is not calculated during the vector generation stage, it means that if the user's intent direction and the security gradient direction are geometrically obtuse (i.e., opposite), the system cannot correct the deviation at the source of the prompt word construction, i.e., at the geometric space level. It can only transmit the contaminated intent to the model, greatly increasing the verification pressure and error probability of subsequent inference steps. To address these technical issues, an adversarial security prompt word construction method based on orthogonal projection is implemented. This method achieves hard constraints on the input of large models by cleaning up illegal intents from the source in the vector space.

[0041] In a preferred embodiment that can be implemented in this application, step S51 includes: S511: Based on the expert constraint rule set, rule activation is performed on the situation feature vector to obtain the activation rule gradient vector. This step aims to dynamically extract the dynamic safety field most coupled with the current instantaneous state from the static rule base, ensuring that subsequent correction operations have a clear realistic direction. In the complex and ever-changing water plant operating environment, not all rules have equal binding force at all times. For example, when the influent load is low, the risk rules for sludge bulking should have lower weights, while when ammonia nitrogen surges, rules related to nitrification should dominate. The system needs to calculate the Mahalanobis distance between the current operating condition vector and the triggering conditions of each rule in the expert rule set in real time, thereby quantifying the urgency of each rule at the current moment. In specific implementation, the rules are weighted using the Softmax mechanism to select the top K most dangerous rules, and the vectors embedded with these text rules are weighted and synthesized to construct an activation rule gradient vector representing the absolutely prohibited direction of passage under the current operating condition. The calculation formula for this process is as follows: In the formula, The vector representing the current real-time operating conditions is the context feature vector generated by the previous steps, such as a vector containing the current dissolved oxygen level of 1.49 mg / L and its decreasing trend. The threshold center vector defined for the k-th rule, for example, the rule defines the safe dissolved oxygen center as 2.0 mg / L; The covariance matrix of historical operating data is based on the SCADA operation logs accumulated by the water plant over a long period of time (such as the sampling data every minute over the past year). Key process parameters (such as flow rate, COD, ammonia nitrogen, etc.) are selected to construct the data matrix, and the covariance between each parameter is calculated using statistical formulas. It is used to eliminate the influence of dimensional differences between different process parameters such as flow rate and concentration. This is a sensitivity adjustment coefficient, selected based on the system's sensitivity requirements to rule distances. It is used to control the concentration of weight allocation and is set as a constant between 0.5 and 1.0. The larger the value, the more sensitive it is to distance. This is the embedding vector corresponding to the text of the k-th rule; This represents the dynamic activation weight of the k-th rule; This is the final synthesized activation rule gradient vector, which indicates the most dangerous direction at the current moment.

[0042] S512: Based on the activation rule gradient vector, an orthogonal adversarial bias correction projection is performed on the problem semantic vector to obtain a safety-corrected semantic vector and a conflict strength scalar. This process purifies the user intent at a mathematical and geometric level. No matter how aggressive the original intent is, the safety-corrected semantic vector output after this step objectively no longer contains any components that violate the current process safety red lines, thus fundamentally eliminating the possibility of large models generating non-compliant suggestions due to comprehension biases, achieving a qualitative leap from post-event verification to pre-event immunity. Specifically, the system decomposes the user intent vector into safe subspace components and dangerous subspace components, and forcibly removes the projection components pointing to dangerous regions through a subtraction operation controlled by the ReLU activation function. This process can be expressed as: in, The original user question semantic vector, for example, the user intent is to reduce the aeration frequency; This is the cosine of the angle between the intention vector and the danger gradient vector. If the user's intention direction and the danger gradient direction have components in the same direction, i.e., the user wants to jump into the pit, this value is positive. As a scalar of conflict intensity, it is only non-zero when there is conflict in the same direction after ReLU activation. If the user's intention is to increase aeration, which is opposite to the dangerous direction, then the value is 0 and no correction is performed. This is the projection correction force coefficient, used to control the strength of the correction. It is usually set to 1.0 to completely cancel out dangerous components. This is the final output, mathematically cleaned, safety-corrected semantic vector. For example, when a user requests power saving (reducing frequency) when dissolved oxygen is low, the corrected vector will retain the power-saving portion that does not affect dissolved oxygen, while removing the dangerous component of reducing frequency.

[0043] S513: Based on the conflict intensity scalar, conflict-aware prompts are dynamically synthesized from the safety-corrected semantic vector and contextual feature vector to obtain structured inference prompts. This mechanism, combining implicit vector cleaning with explicit textual warnings, constitutes a dual security defense, ensuring that the final generated inference prompts retain the user's reasonable demands while strictly adhering to the safety bottom line of water treatment processes. The system aligns and decodes the cleaned safety-corrected semantic vector and contextual feature vector, and uses the calculated conflict intensity scalar as a trigger to dynamically inject metacognitive warning instructions. When the conflict intensity exceeds a preset threshold, it means that the user's intention is extremely dangerous. The system will explicitly append a high-priority risk warning text to the generated prompts, forcing the large model to increase the penalty item with higher safety weights at the inference level. The relevant process is represented as follows: in, This is a fragment of a metacognitive warning instruction; Set the threshold constant for conflict alarms, for example, to 0.3; This is an indicator function, which takes the value 1 when the condition is met; A decoder that decodes vectors into natural language descriptions; This operation represents the concatenation of text or vector content. These are the structured reasoning prompts for the final synthesis. This is a function for generating warning text. In this way, the final prompts input to the large model not only contain the corrected safety intent, but may also include warnings: "High-risk intent detected; please prioritize strong instructions regarding safety constraints," thus guiding the model to generate compliant strategies.

[0044] Step S52 first inputs the structured reasoning prompt into a pre-trained large-scale water domain model. This model is built on a Transformer Decoder-only architecture, with parameters typically exceeding tens of billions. The model undergoes two specific optimization phases: first, during pre-training, it utilizes a massive corpus of water-related professional terminology, including process design manuals, equipment maintenance logs, SCADA historical operation data, and various accident case libraries, internalizing the nonlinear coupling relationship between dissolved oxygen, microbial activity, and aeration rate; second, it undergoes fine-tuning using reinforcement learning based on human feedback (RLHF) to make its output more consistent with the thinking logic of water experts. Internally, the input prompt is first processed by a Tokenizer into a Token ID sequence, and then mapped to high-dimensional word embedding vectors through an embedding layer. Subsequently, these vectors enter a multi-layered stacked Transformer decoder module. The core of each module is a multi-head self-attention mechanism used to capture long-distance semantic dependencies in the input sequence. For the feature of an accelerating downward trend, the model uses the attention mechanism to calculate its association strength with concepts such as aerator head blockage or influent load shock in the internal knowledge base. This allows the model to focus on the contextual information of normal fan current when dealing with a decrease in dissolved oxygen (DO), thus suppressing the inference of fan failure and instead activating neural connections related to microporous aerator blockage. Based on the activated knowledge path, the model begins multi-hop inference. It's not just simple pattern matching, but constructing logical chains: from a decrease in DO and normal fan operation, to an increase in influent COD, it deduces a sharp increase in the system oxygen consumption rate (OUR), ultimately pinpointing the cause as excessive influent shock load. This inference process outputs text through autoregressive generation, predicting the probability distribution of the next token based on the current context using a softmax function. To cover multiple possibilities, a cluster search or kernel sampling strategy is used in the generation phase to guide the model to generate multiple solutions with different paths. Finally, the model outputs a preliminary set of candidate solutions. For the aforementioned DO anomaly cases, this set may contain three structured candidate solutions: Solution A (high confidence) suggests immediately increasing the frequency of blower #2 to 55Hz for rapid oxygen replenishment, aiming to forcibly raise the DO value in a short period of time using strong airflow; Solution B (medium confidence) suggests opening the vent valve for acid washing and maintenance of the microporous aerator, attempting to address the potential aerator head blockage problem at its root; Solution C (low confidence) suggests temporarily reducing the operating frequency of the influent booster pump to reduce the instantaneous influent shock load, as a defensive measure to alleviate the oxygen consumption pressure of the biological system by reducing the total amount of pollutants input, but because it involves changing the overall plant hydraulic balance, the model assigns it a lower confidence ranking.

[0045] Step S53 first performs numerical parameter parsing. For each natural language text in the preliminary candidate solution set, the processing program calls a parameter extractor based on regular expressions or a dedicated small semantic parsing model to extract the core action entity and quantified parameters. For solution A, the extracted object is: #2 blower, action: frequency adjustment, parameter: 55Hz; for solution B, the extracted object is: vent valve, action: open; for solution C, based on a static knowledge base, the semantic meaning of reducing frequency in the solution is mapped to the specific physical entity, water intake pump, thus extracting the object: water intake pump, action: frequency reduction, parameter: 10%. These structured parameter sets constitute the basic data for subsequent verification. Next, the expert constraint rule set is called in parallel for matching one rule at a time. This expert constraint rule set is a structured knowledge base stored in a graph database or high-performance rule engine. Its construction process originates from the digital translation of national water pollutant discharge standards, water plant process design manuals, equipment operation and maintenance white papers, and internal enterprise safety operating procedures. Each rule in the rule set contains a constraint object, logical operator, threshold constant, and weight level. For example, rule R1 defines that the maximum operating frequency of the blower frequency converter must not exceed 50Hz, with a veto weight; rule R2 defines that the biological treatment tank must be in a water-off state during acid washing maintenance, with a high weight; rule R3 defines that the flow rate after the influent pump adjustment must not be lower than the minimum flow rate threshold for maintaining the hydraulic circulation of the entire plant, with a medium weight. Subsequently, multi-dimensional parallel verification calculations are performed on the parsed parameters. First, a safety verification is performed, checking whether the scheme parameters exceed the physical limits of the equipment or the process safety red line. When verifying scheme A, the extracted parameter 55Hz is compared with Max=50Hz in rule R1, and it is determined to be a violation because over-frequency operation may cause the motor to burn out. Second, a mutual exclusion verification is performed, where the program, combined with the current real-time operating status, checks whether the suggested operation conflicts with the currently executed task. When verifying scheme B, if the current scenario data shows that the aerobic tank is in a normal influent state, then this scheme violates rule R2, because online acid washing requires emptying the tank, and directly opening the drain valve would lead to a direct discharge of wastewater. Finally, process compliance verification was performed. For Scheme C, the program calculation confirmed that although the reduced influent flow rate decreased production capacity, it remained above the minimum flow threshold and effectively curbed the deterioration of dissolved oxygen, without triggering dry-running or overflow risks. Therefore, it complies with environmental and safety constraints. To quantify the above verification results, a weighted penalty mechanism was used to calculate the compliance score for each scheme, as follows: In the formula, This represents the cumulative penalty value for the i-th candidate solution. The set of all relevant rules that are triggered. It is an indicator function, when candidate solutions Violation of rules The value is 1 if it is true, and 0 otherwise. It is a rule The preset weights, for rules involving veto power related to equipment safety and environmental emissions, are determined by the weights. It is set to a very large positive number (or logical infinity). It is a binary compliance status; as long as any penalty exists, that is... If the score is >0, the solution's score is set to 0 (unavailable); it is set to 1 only if it is fully compliant. The final generated... It is a Boolean mask vector. In the above case, scheme A scores 0 points for overclocking violation, scheme B scores 0 points for operation mutual exclusion violation, and scheme C scores 1 points for adjustment within the safe range. Therefore, the generated valid scheme index mask is [0,0,1].

[0046] Following step S53, step S54 first utilizes the generated valid scheme index mask. The initial candidate solution set is filtered using logical masks. This process is similar to an AND gate operation in digital circuits, directly eliminating solutions with a mask value of 0. In the above case, solutions A (blower overclocking) and B (illegal venting) are physically blocked, leaving only solution C (reducing water inflow). A fallback response mechanism is implemented during this process. In extreme cases, where all solutions generated by the large model fail expert rule verification (e.g., all masks are 0, indicating the current operating condition exceeds the safety processing boundary of the automated decision-making system or the large model fails to understand complex field constraints), a pre-set manual intervention prompt is automatically generated. The prompt states that the current operating condition is complex, all automated strategies pose safety risks, and immediate contact with process experts for manual intervention is recommended, along with the specific reasons for the violations, such as solution A violating frequency limits or solution B violating operating procedures, to ensure the absolute bottom-line safety of the system. If valid solutions exist after filtering, such as retaining solution C and other compliant solutions like solution D, the retained solutions are reordered based on the confidence scores output by the large model during the generation phase. If the confidence level of solution C is 0.85 and the confidence level of solution D is 0.65, then the top-1 solution, solution C, is selected first. Finally, the optimal solution after filtering and ranking is standardized and packaged to generate the verification inference result.

[0047] Specifically, step S6 involves parsing and verifying the judgment conclusions and handling data in the reasoning results, and modularly encapsulating the judgment conclusions and handling data and filling them with chart components based on a matching visualization template to obtain a structured expert response that can be used for edge-side rendering and interaction. In other words, existing technologies typically separate analysis results from the user interface, forcing users to manually switch between report reading, SCADA chart review, and control execution. This fragmented interaction method severely reduces emergency response efficiency and increases the risk of misoperation. Furthermore, simple textual descriptions lack intuitive data support and struggle to quickly convey the severity of the situation. Therefore, step S6 aims to transform the backend semantic logic into interactive rich media components on the frontend, strengthening the persuasiveness of data evidence through visualization, and utilizing encapsulated callback hooks to achieve WYSIWYG closed-loop control, thereby truly realizing a leap from passive information push to proactive intelligent decision-making assistance.

[0048] In one possible implementation of this application, step S6 includes: S61: using a regular expression semantic parser to perform semantic deconstruction and modularization of the verification reasoning results to obtain a segmented semantic set; S62: based on a visualization template library, performing visualization template matching and data injection on the segmented semantic set to obtain an instantiated visualization component set; S63: filling the segmented semantic set and the instantiated visualization component set into a response layout container, and binding interactive events and execution callback hooks to obtain structured expert responses.

[0049] Step S6 is as follows: Step S61 receives the verification reasoning result, for example: [Conclusion] The influent load shock caused abnormal dissolved oxygen. [Basis] In the past 2 hours, DO decreased from 2.2 mg / L to 1.49 mg / L, accompanied by an increase in influent COD. [Recommendation] Reduce the operating frequency of the influent booster pump by 10%. The core component, the regular semantic parser, is invoked to scan the text. This parser is a hybrid architecture text processing engine, consisting of a rule-based regular expression module and a lightweight named entity recognition network. The regular expression module pre-sets common paragraph anchor patterns in water reports, such as "^Conclusion", "^Basis", "^Recommendation", etc. The parser first performs key paragraph identification, using these anchors to accurately segment the continuous text stream into independent semantic blocks such as the conclusion paragraph, the basis explanation paragraph, and the recommended operation paragraph. Subsequently, for the most complex basis explanation paragraph, the parser starts the NER submodule for data extraction. This NER module is based on the BiLSTM-CRF architecture and has been specifically trained on water time-series data annotation corpus, enabling it to identify time-value pairs hidden in the text. In the above case, the model identified [2 hours, 2.2 mg / L] and [current, 1.49 mg / L], along with the implicit trend description. The parser reorganized these discrete numerical points into standardized data payload objects, such as {Indicator: "DO", Data Sequence: [{Time: "10:00", Value: 2.2}, {Time: "12:00", Value: 1.49}], Trend: "Decrease"}. Next, for the suggested operation segments, the parser performed operation structuring processing. Dependency parsing trees were used to identify verbs (decrease), object (intake booster pump operating frequency), and quantity complements (10%). The program mapped these components to a standard action + object + parameter + condition quadruple structure: {Action: "Decrease", Object: "Intake Booster Pump", Parameter: "10%", Condition: "None"}. Finally, all processed text segments, extracted time-series data objects, and operation instruction tuples were packaged together to generate a chunked semantic set.

[0050] Step S62 first loads the pre-built visualization template library. This library is a component repository stored in a JSON file on the front-end resource server or configuration center, containing various ECharts or D3.js chart configuration templates such as line charts, bar charts, dashboards, and topology maps. Each template comes with applicable metadata descriptions; for example, the line chart template is marked as applicable type: continuous time series data; minimum data points: 2; the dashboard template is marked as applicable type: single-point status value; with threshold range. It iterates through each data payload object in the segmented semantic set and performs feature extraction. For the aforementioned dissolved oxygen data payload, the program analyzes and derives its features as: data continuity = True (time series), number of dimensions = 2 (time, numerical), category cardinality = 1 (only DO indicator). Subsequently, template scoring and selection are performed. A matching scoring function S(D,T) is defined to calculate the fit between data feature D and template metadata T: in, This is an indicator function used to determine if the data types are consistent. and These refer to the number of dimensions supported by the data and the template, respectively. The template's preset local attribute scores, , and These are preset weighting coefficients used to measure the relative importance of data type consistency, dimension matching, and template priority, and are determined based on expert experience or system experimental testing. For DO time series data, the line chart template receives the highest score due to its type and dimension matching; while the pie chart template receives a very low score due to its type mismatch. The program selects the line chart as the visualization payload accordingly. After selecting the template, a data injection operation is performed. The program converts the specific numerical sequences in the data payload according to the data format specifications of the selected template. For example, [{time:"10:00", value:2.2}...] is mapped to xAxis.data and series.data in the ECharts configuration items. Simultaneously, the program reads the safety threshold obtained in the previous steps, such as 2.0 mg / L, and automatically adds a red markLine warning line to the configuration item. Finally, a rendering-ready instantiated visualization component set is generated, which contains a complete list of chart configuration objects populated with actual business data and configured with colors, thresholds, and annotations.

[0051] Step S63 first creates an empty responsive layout container, designed based on the Flexbox or Grid layout model, capable of adapting to the screen size of large PC screens or mobile handheld terminals. Then, a streaming assembly is performed. The program follows the logical order of expert reports, consistent with human cognition, sequentially extracting content from the chunked semantic set and the instantiated component set for filling. First, a conclusion summary block is filled at the top of the container, using highlighted font to display the core judgment of water load impact; next, an instantiated key trend chart (DO line chart) is filled below, allowing users to see the trajectory of data decline and instances of exceeding limits; then, detailed supporting text is filled in, explaining the underlying mechanism; finally, an action suggestion list is filled at the bottom. During the assembly process, the program defines key interactions. For chart components, interaction event listeners are bound, such as configuring an onClick event, which triggers a pop-up window displaying details of similar historical cases associated with that moment when the user clicks on an abnormally low value point in the chart. For the action suggestion cards at the bottom, execution callback hooks are bound to them. This hook is a pre-packaged API call request containing the four-tuple information parsed in step S61: {Action: "Reduce", Object: "Inlet Pump", Parameter: "10%"}. When the user clicks the confirm button on the front-end interface, this hook is triggered, sending instructions directly to the underlying SCADA control interface without requiring the user to manually navigate to a different page. Finally, the program serializes the entire object, containing layout structure information, chart configuration data, and interaction event definitions, to generate the final structured expert response. This standard JSON response object not only tells the user what happened and what to do, but also provides chart evidence and an entry point for the operation.

[0052] In summary, the expert question-answering assisted interaction method based on a large-scale water resources model, as described in this application, is elucidated. First, by deeply analyzing user interactions and historical conversation data, a question semantic vector integrating current intent and historical context is constructed, effectively solving the problems of insufficient context awareness and inadequate understanding of ambiguous expressions in traditional technologies. Then, using this vector as an index, SCADA time-series data, static knowledge graphs, and historical records are retrieved. Through semantic mapping and time-series feature engineering, this data is transformed into a contextual feature vector reflecting real-time operational constraints, overcoming the shortcomings of data silos and the lack of mechanistic analysis in simple numerical queries. Based on this, the question semantics and contextual features are jointly input into a pre-trained large-scale water resources model, performing verification reasoning under strict operating condition constraints and generating structured expert responses. This effectively solves the problems of general models being prone to illusions, having low accuracy, and being unable to provide end-to-end intelligent diagnosis.

[0053] Figure 4 The following is a block diagram of an expert question-and-answer assisted interactive system based on a large water resources model according to an embodiment of this application, such as... Figure 4As shown, the expert question-and-answer assisted interaction system 100 based on a water affairs big data model includes: a conversation interaction data acquisition module 110, used to receive user interaction data and historical conversation context data; a question semantic vector construction module 120, used to construct a question semantic vector that integrates the current intent and historical background based on user interaction data and historical conversation context data; a heterogeneous data acquisition module 130, used to retrieve associated SCADA time-series data, static knowledge graphs, and historical treatment records from external multi-source data streams using the question semantic vector as the index key to obtain a heterogeneous raw data set; a heterogeneous data mapping scenario construction module 140, used to perform semantic mapping and time-series feature engineering on the heterogeneous raw data set to obtain a scenario feature vector reflecting the current operational status constraints; a verification reasoning result generation module 150, used to jointly input the question semantic vector and scenario feature vector into a pre-trained water affairs big data model to obtain verification reasoning results; and a response generation module 160, used to parse the judgment conclusions and treatment data in the verification reasoning results, and to modularly encapsulate the judgment conclusions and treatment data and fill them with chart components based on a matching visualization template to obtain a structured expert response that can be used for edge-side rendering interaction. Here, those skilled in the art will understand that the specific operations of each step in the above-mentioned expert question-and-answer assisted interactive system based on the water affairs big data model have been referenced above. Figures 1 to 3 The expert question-and-answer assisted interaction method based on the water affairs big model has been described in detail, and therefore, its repeated description will be omitted.

[0054] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. An expert question-and-answer assisted interactive method based on a large-scale water resources model, characterized in that, include: S1: Receive user interaction data and historical session context data; S2: Based on user interaction data and historical session context data, construct a question semantic vector that integrates current intent and historical background; S3: Using the semantic vector of the problem as the index key, retrieve the associated SCADA time-series data, static knowledge graph and historical processing records from external multi-source data streams to obtain a heterogeneous original data set; S4: Perform semantic mapping and temporal feature engineering on the heterogeneous original dataset to obtain a contextual feature vector that reflects the current operational state constraints; S5: Input the problem semantic vector and the context feature vector into the pre-trained large water domain model to obtain the verification reasoning results; S6: Parse and verify the judgment conclusions and disposal data in the reasoning results, and based on the matching visualization template, modularly encapsulate the judgment conclusions and disposal data and populate the chart components to obtain structured expert responses that can be used for on-side rendering and interaction.

2. The expert question-and-answer assisted interaction method based on a large water resources model according to claim 1, characterized in that, Step S2 includes: S21: Modal discrimination and transcription processing of user interaction data based on acoustic models and / or optical character recognition networks to obtain normalized text sequences; S22: Perform water-related intent recognition and entity slot extraction on normalized text sequences to obtain structured slot features containing process entity labels and intent probability distributions; S23: Perform context-aware semantic fusion on structured slot features and historical session context data to obtain the question semantic vector.

3. The expert question-and-answer assisted interaction method based on a large water resources model according to claim 2, characterized in that, Step S23 includes: S231: Embedding and encoding the structured slot features to obtain the current query embedding vector; S232: Read the key information of the first k rounds from the historical session context data, and generate a historical context embedding matrix based on the key information of the first k rounds; S233: Context-aware semantic fusion is performed on the historical context embedding matrix and the current query embedding vector using the following formula to obtain the question semantic vector: in, For the current query embedding vector, The semantic feature vector of the i-th round of dialogue content is embedded in the historical context matrix. For dimensional scaling factor, For normalized exponential functions, For trainable weight matrix, For the bias term vector, For vector concatenation, It is a non-linear activation function. This is the semantic vector of the problem.

4. The expert question-and-answer assisted interaction method based on a large water resources model according to claim 1, characterized in that, Step S4 includes: S41: Perform data semantic alignment and spatiotemporal standardization on heterogeneous original datasets to obtain standardized contextual data; S42: Perform mechanistic feature calculation and vector multidimensional fusion on standardized context data to obtain context feature vectors.

5. The expert question-and-answer assisted interaction method based on a large water resources model according to claim 4, characterized in that, Step S42 includes: S421: Perform multi-order mechanism-derived variable calculations on time-series process parameters in standardized scenario data to obtain the enhanced dynamics matrix; S422: Perform time-series dynamic evolution feature encoding on the enhanced dynamics matrix to obtain the dynamic hidden layer vector; S423: Extract static text attributes from standardized contextual data and embed them into a static vector. Calculate the adaptive gating coefficients between the dynamic hidden vector and the static vector using a fully connected network. Then, weight and fuse the dynamic hidden vector and the static vector based on the adaptive gating coefficients to obtain the contextual feature vector.

6. The expert question-and-answer assisted interaction method based on a large water resources model according to claim 1, characterized in that, Step S5 includes: S51: Construct structured reasoning prompts based on question semantic vectors and context feature vectors; S52: Input structured reasoning prompts into a pre-trained large water domain model to obtain a preliminary set of candidate solutions containing multiple potential diagnostic conclusions or treatment strategies; S53: Based on the expert constraint rule set, perform expert rule constraints and logical verification on each scheme in the preliminary candidate scheme set to obtain an effective scheme index mask that marks the compliance status of the scheme; S54: Use the effective solution index mask to filter and sort the preliminary candidate solution set by confidence to obtain the verification inference result.

7. The expert question-and-answer assisted interaction method based on a large water resources model according to claim 6, characterized in that, Step S51 includes: S511: Based on the expert constraint rule set, perform rule activation on the context feature vector to obtain the activation rule gradient vector; S512: Based on the activation rule gradient vector, orthogonal adversarial bias correction projection is performed on the problem semantic vector to obtain the security correction semantic vector and the conflict intensity scalar. S513: Based on the conflict intensity scalar, dynamic synthesis of conflict-aware prompt words is performed on the security correction semantic vector and the context feature vector to obtain structured reasoning prompt words.

8. The expert question-and-answer assisted interaction method based on a large water resources model according to claim 1, characterized in that, Step S6 includes: S61: Use a regular semantic parser to deconstruct and modularize the semantics of the verification reasoning results to obtain a block semantic set; S62: Based on the visual template library, perform visual template matching and data injection on the segmented semantic set to obtain an instantiated visual component set; S63: Fill the responsive layout container with the chunked semantic set and the instantiated visual component set, and bind interactive events and execution callback hooks to obtain structured expert responses.

9. An expert question-and-answer assisted interactive system based on a large-scale water resources model, characterized in that, include: The session interaction data acquisition module is used to receive user interaction data and historical session context data; The question semantic vector construction module is used to construct question semantic vectors that integrate current intent and historical context based on user interaction data and historical session context data. The heterogeneous data acquisition module is used to retrieve associated SCADA time-series data, static knowledge graphs, and historical processing records from external multi-source data streams using the question semantic vector as the index key to obtain a heterogeneous raw data set; The heterogeneous data mapping scenario construction module is used to perform semantic mapping and temporal feature engineering on heterogeneous raw data sets to obtain scenario feature vectors that reflect the current running state constraints. The verification reasoning result generation module is used to jointly input the problem semantic vector and the context feature vector into a pre-trained large water domain model to obtain the verification reasoning result. The response generation module is used to parse the judgment conclusions and disposal data in the verification reasoning results, and to modularly encapsulate the judgment conclusions and disposal data and populate them with chart components based on the matched visualization template to obtain a structured expert response that can be used for on-side rendering and interaction.

Citation Information

Patent Citations

  • Adaptive learning question-answering system and method based on multi-modal interaction

    CN120256575A

  • Rainwater condition intelligent interaction service platform based on large language model

    CN120596642A

  • Intelligent multi-round question and answer system based on large model

    CN120611028A

  • Intelligent question answering system of water affair service system

    CN121501945A

  • Interactive conversation assistance using semantic search and generative AI

    US11960514B1

Cited By

  • Water industry knowledge enhanced large model training and inference method and system

    CN122287849A

  • Industrial intelligent question-answering method and system based on context perception and knowledge retrieval

    CN122334525A