Real-time water quality information system based on AI design and its operation method
An AI-based system using LLM and a heterogeneous graph structure automates outlier detection and interpretation in real-time water quality systems, improving efficiency and accuracy of data verification.
Patent Information
- Application Number
- KR1020250083264
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2026-11-11
- Estimated Expiration
- 2045-06-24
AI Technical Summary
Manual verification of water quality data in real-time systems is time-consuming and relies heavily on human intuition, lacking efficiency and consistency in identifying and interpreting outliers.
An AI-based real-time water quality information system utilizing a Large Language Model (LLM) and a heterogeneous graph structure to preprocess data, detect outliers, and provide natural language analysis, incorporating relationships between variables and temporal dynamics.
Reduces manual workload by providing rapid, explainable outlier detection and interpretation, enhancing the accuracy and efficiency of water quality data verification.
Smart Images

Figure 112025070640468-PAT00005_ABST
Abstract
Description
Technology Field
[0001] Data observed in real time using sensors and the like is accumulating, containing many outliers. These data undergo a screening and verification process by experts using statistical methods. When AI inference results, such as LLM (Large Language Model), are comprehensively utilized in this process, additional decision-making information regarding existing screening data can be provided, thereby eliminating uncertainty in the screening and verification of outliers. The present invention relates to an AI-based real-time water quality information system, and more specifically, to an AI-based real-time water quality information screening and verification system utilizing LLM (Large Language Model), which includes visualization considering relationships between variables, temporal relationships, and relationships between modals based on a heterogeneous graph structure (Graph Neural Network), and a method of operation thereof. Background Technology
[0003] In order to provide real-time water quality information of rivers and lakes to the public, it is necessary to disclose unconfirmed and confirmed data obtained from automatic monitoring networks.
[0004] At this stage, valid data is selected prior to the disclosure of finalized data. Automatic verification is performed within the scope where verification is possible, such as for measurement range, regional range, and fluctuation rate. Subsequently, the data is selected through manual verification by water system managers, which involves reclassifying normal data as abnormal or abnormal data as normal.
[0005] In this regard, Fig. 1 shows the automatic verification step in the business network of a conventional real-time water quality information system.
[0006] More specifically, in Step 1 (Status Code), data is classified into normal (OK) and abnormal (1) based on the status code matched to each measurement value resulting from the Corporation's inspection. In Step 2 (Measurement Range), data exceeding the range are selected from the OK data according to the measurement range capable of being measured by the measuring device. In Step 3 (Regional Range), data exceeding the maximum and minimum values of the normal data (last 5 years) produced by each measurement station are selected from the OK data. At this time, the upper and lower limits are automatically calculated within the system, and the person in charge of each water system can decide whether to apply them to the system each year. In Step 4 (Detection Limit), device detection limits can be set for each item. However, since values below the device detection limit are not considered abnormal data, this step may be omitted if necessary. In Step 5 (Variation Rate), the average of the last 50 data points from the OK data is compared with the current time measurement value, and data exceeding 100% is selected. Here, Variation Rate = | Current Time Measurement Value - Average of Previous 50 Measurement Values | / Average of the previous 50 measurements. In step 6 (outlier detection), data selection (6) is performed through statistical analysis among the OK data. At this time, selection (the last 25) can be done using Dixon's Q test (EPA, 2006). As a method to determine whether the extreme value of a sample is an outlier, it can be performed under the assumption that the remaining data, excluding the expected outlier, follow a normal distribution.
[0007] The status code setting table used in the aforementioned Step 1 is as follows.
[0008] situation cord detail Subcategories division note normal - normal OK automatic - Power failure A Measurement station main power A0 automatic KEPCO Power Outage and Abnormal Power Supply to Metering Stations UPS / AVR Power A1 automatic UPS / AVR abnormal Others (Power Outage Related) A2 automatic Other situations equivalent to a power outage Under inspection / maintenance B Maintenance of measuring instruments B0 passivity Measuring instrument repair Repair of water collection facilities B1 passivity Repair of water intake facilities such as intake pumps and piping Measurement instrument parts replacement B2 passivity Replacement of sensors, motors, and other parts Measuring Instrument Overhaul Cleaning B3 passivity Regular overhaul cleaning of measuring instruments Measuring instrument inspection (regular, occasional) B4 passivity Measuring instrument cleaning, reagent replacement, gas replacement, and other inspections Inspection and maintenance of transmission equipment and dedicated lines B5 passivity - Data Logger Inspection / Maintenance B6 passivity - Data Logger Program Inspection / Maintenance B7 passivity - Equipment malfunction C Measuring device malfunction C0 automatic Some manual (measuring instrument systems, programs, etc.) Measuring instrument calibration error C1 automatic Partially manual (measuring instrument autocalibration error) Abnormal sample supply for measuring instruments C2 automatic Partially manual (e.g., no sample input to the measuring instrument) Abnormal reagent supply to measuring instruments C3 automatic Partial manual (e.g., lack of reagent in the measuring instrument) Abnormal gas supply to measuring device C4 automatic Partially manual (e.g., gas not entering the meter) Abnormal water sampling facility C5 automatic Some manual (abnormal intake pumps, etc.) Abnormal power supply to measuring device C6 automatic Partial manual (measurement power abnormal) Exceeding the measuring range of the measuring instrument C7 automatic Exceeding the valid measurement range entered into the measuring device Other abnormalities C8 automatic Partially manual (biological monitoring device biological characteristics abnormal) Communications D Other communication errors D0 passivity - No reception (measurement device ↔ data logger) D1 automatic Abnormal communication between the measuring device and the data logger Non-reception (data logger ↔ communication server) D2 automatic Abnormal communication between data logger and communication server Received (Communication Server ↔ Integration Server) D3 automatic Abnormal communication between the communication server and the integration server Operation error (data logger) D4 automatic Data logger 5-minute data calculation errors, etc. Under correction E Automatic correction E0 automatic Automatic calibration of measuring instruments Manual correction E1 passivity Manual calibration of measuring instruments Quality control E2 passivity Quality control, such as quality testing test drive F test drive F1 passivity Test operation of measuring instruments, etc. after completion of the measuring station Driving suspension G Operation Stoppage (Test Run and Measuring Equipment) G1 passivity Suspension of operation of measuring stations and measuring instruments due to natural disasters, etc. Retransmission H data retransmission H0 automatic Retransmit measurement data after resolving abnormalities such as dedicated lines
[0009] Although not illustrated in the diagram, in the subsequent Step 7 (Seasonal Range), data exceeding the seasonal range among the OK data can be selected. This is similar to the regional range, and the user can optionally decide whether to perform it. The setting method allows for the establishment of upper and lower limits by referring to the average and outlier values of the relevant region. Subsequently, the manual verification step proceeds.
[0010] In Step 8 (Manual Screening), data can be screened (V) if it is determined to be abnormal among the OK data by referring to the following: measurement station operation inspection logs written by the station manager, analysis of manual measurement network data (same and nearby points), analysis of upstream and downstream water quality among automatic measurement network data, analysis of dam and weir discharge volumes, river water levels and flow rates, precipitation data, etc.
[0011] Figures 2a and 2b show an interface provided to a user by a conventional real-time water quality information system. Through the illustrated interface, the water system manager can write the reason for selection in the memo writing field of the last column of each row when creating a memo, and the selection is initially confirmed and graphs can be viewed when clicking to save the selected data. Additionally, when viewing data, a function is provided to view graphs after selecting the water system, monitoring station, measurement item, and search period. Furthermore, the water system manager can review, select, or preserve measurement values that appear as outliers in the graph.
[0012] Meanwhile, this manual verification by water system managers takes a relatively long time, as it is carried out based on knowledge and experience by referring to data from not only the relevant automatic measurement network but also related interconnected measurement networks.
[0013] Therefore, it is time for an AI model that can reduce the workload of water system managers by supporting the data selection process in so-called real-time water quality information systems, which select and verify real-time observed water quality data. Prior art literature
[0014] KR10-2748052 (Title of Invention: Device and Method for Predicting Supply Volume and Water Quality Based on Artificial Intelligence Deep Learning) The problem to be solved
[0015] Embodiments of the present invention provide an AI-designed real-time water quality information system and a method of operation thereof, which includes visualization considering relationships between variables, temporal relationships, and relationships between modals based on a heterogeneous graph structure.
[0016] Meanwhile, other unspecified objects of the present invention will be further considered to the extent that they can be easily inferred from the following detailed description and effects. means of solving the problem
[0018] A method of operation of an AI-designed real-time water quality information system according to one embodiment may include: a step of preprocessing multivariate time-series water quality data; a step of deriving outlier probability and integrated influence from the multivariate time-series water quality data by applying an outlier detection model; a step of converting the outlier probability and integrated influence and the multivariate time-series water quality data used therein into a predefined prompt form, and then generating a natural language response analysis result through an LLM model; and a step of providing the natural language response analysis result to a user along with the outlier probability and integrated influence.
[0019] The above preprocessing step may include a step of performing data embedding of a heterogeneous graph structure by connecting a plurality of measurement networks.
[0020] The above preprocessing step may include a step of checking whether there are missing values in the multivariate time series water quality data in which the input sequence is set, and performing missing value interpolation processing thereon.
[0021] The step of performing the above data embedding involves generating data of the heterogeneous graph structure by connecting not only the linked measurement network (first measurement network) but also the associated automatic measurement network (second measurement network), wherein the first measurement network includes data nodes from multiple sources including external linked data—the external linked data includes one or more of external meteorological data and nearby hydrological data—and the second measurement network may include upstream and downstream locations or watershed connections between each water quality measurement station represented as a node and each water quality measurement station represented as an edge, as a connection structure between multiple automatic measurement networks installed within the same water system.
[0022] The data of the above heterogeneous graph structure includes different types of nodes, including two or more of water quality monitoring station nodes, weather information providing nodes, and dam operation nodes, and the semantic connection between them can be defined as edges.
[0023] The above derivation step may include: a step of designing an outlier detection model that applies a heterogeneous graph attention network to the heterogeneous graph structure to calculate a first influence between measurement networks and a second influence between variables, and derives the integrated influence as the influence between each measurement network / variable obtained by integrating them; and a step of setting a threshold that determines the outlier of the return value of the outlier detection model.
[0024] The above variables may include one or more of electrical conductivity, turbidity, precipitation, flow rate, and water level.
[0025] The above derivation step may further include a step of setting metrics applied according to the length / pattern / data distribution of outliers to verify the performance of the above outlier detection model.
[0026] The generating step may include: converting the outlier probability and the integrated influence and the multivariate time series water quality data used therein into a structured text format in JSON format; and performing prompting through in-context learning and thought chain techniques.
[0027] The steps provided above may include a first GUI area displaying the outlier probability, a second GUI area visualizing and displaying the key variables related to the integrated influence in a graph form, a third GUI area visualizing and displaying the key variables related to the integrated influence in a table form, and a fourth GUI area visualizing and displaying the natural language response analysis results in a paragraph form.
[0028] In addition, one or more non-transient computer-readable storage media according to one embodiment may store instructions that, when executed by one or more computers, cause one or more computers to perform the operations of the individual methods.
[0029] In addition, as a real-time water quality information system based on AI design according to one embodiment, it may include: a processor that preprocesses multivariate time-series water quality data, applies an outlier detection model to derive outlier probability and integrated influence from said multivariate time-series water quality data, converts said outlier probability and integrated influence and said multivariate time-series water quality data used therein into a predefined prompt form, and generates a natural language response analysis result through an LLM model; and a display that provides said natural language response analysis result to a user along with said outlier probability and said integrated influence. Effects of the invention
[0031] This technology can provide an AI-designed real-time water quality information system and a method of operation thereof, which includes visualization considering relationships between variables, temporal relationships, and relationships between modals based on a heterogeneous graph structure.
[0032] In addition, this technology allows users to visualize and verify item- / time-specific outliers and their influence derived from an outlier detection AI model with just a simple click on the desired data in the data selection window, and enables users to check the analysis results through an LLM model.
[0033] In addition, this technology can consider the correlation between variables and the flow of time, and can provide an explainable outlier detection model for interpreting results.
[0034] In addition, this technology can provide an AI model capable of deriving the probability of normality / abnormality and interpreting the basis thereof. Brief explanation of the drawing
[0036] FIG. 1 is a diagram showing the automatic verification step in the business network of a conventional real-time water quality information system. FIGS. 2A and 2B are drawings showing an interface provided to a user by a conventional real-time water quality information system. FIG. 3 is a flowchart illustrating the operation method of an AI design-based real-time water quality information system according to one embodiment over time. FIG. 4 is a diagram showing a connection structure between automatic measurement networks applied according to one embodiment. FIG. 5 is a diagram showing a composite connection structure between a linked / automatic measurement network applied according to one embodiment. FIG. 6 is a diagram showing an example of a multivariate outlier detection model result performed by a real-time water quality information system according to one embodiment. FIGS. 7A and FIGS. 7B are drawings illustrating examples of model results provided to a user according to one embodiment. FIG. 8 is a block diagram showing the overall configuration and data flow of an AI design-based real-time water quality information system according to one embodiment. FIG. 9 is a drawing illustrating an example of a hardware implementation of a system according to one embodiment. Specific details for implementing the invention
[0037] The most preferred embodiment of the present invention is described below. In the drawings, thicknesses and spacings are depicted for convenience of explanation and may be exaggerated compared to their actual physical thicknesses. In describing the present invention, known components unrelated to the essence of the invention may be omitted. It should be noted that in assigning reference numbers to the components of each drawing, identical components are assigned the same number as much as possible, even if they are shown in different drawings.
[0039] A real-time water quality information system based on AI design according to one embodiment can replace the manual verification step described in FIGS. 1 to 2b.
[0040] That is, after the screening step carried out by the statistical method of steps 1 through 7 described in FIGS. 1 to 2b, the AI design-based real-time water quality information system according to one embodiment performs additional analysis based on AI, thereby providing an analysis based on AI that previously relied on the intuition of water system managers as an AI-based LLM model, which can reduce uncertainty in outlier detection and data verification.
[0041] To this end, an AI design-based real-time water quality information system according to one embodiment (hereinafter simply referred to as the "real-time water quality information system" or more simply the "system") applies an outlier model capable of classifying data into normal and abnormal values in order to select certain normal data from original data (undetermined data), and as part of this, considers the relationships between variables, temporal relationships, and relationships between modals based on a heterogeneous graph structure.
[0042] The following describes a real-time water quality information system based on AI design according to one embodiment in more detail.
[0044] FIG. 3 is a flowchart illustrating the operation method of an AI design-based real-time water quality information system according to one embodiment over time.
[0045] As illustrated in the drawings, a method of operation of a real-time water quality information system according to one embodiment includes the steps of: preprocessing multivariate time-series water quality data (S10); deriving outlier probabilities and major influencing factors from multivariate time-series water quality data by applying an outlier detection model (S20); converting the outlier probabilities and major influencing factors and the multivariate time-series water quality data used therein into a predefined prompt form, and then generating natural language response analysis results through an LLM model (S30); and providing the natural language response analysis results to a user along with the outlier probabilities and major influencing factors (S40). Each step may be referred to in order as the data processing step (S10), the outlier detection model step (S20), the LLM model step (S30), and the result step (S40).
[0046] A data processing step (S10) according to one embodiment may include a missing value processing process and a data embedding process.
[0047] First, the missing value processing process of step (S10) can be performed as follows.
[0048] Since time series data is continuous data where previous data influences the current data, an Input Sequence is set to determine how much of the previous data to use during training.
[0049] Since data from a specific period prior to the input sequence is required, the data must be free of missing values. However, due to various circumstances (such as observatory equipment errors or data omissions), missing values may exist; these missing values may be present only at a specific time or over a certain period. Without missing value interpolation, a single missing value at a specific time could render data equivalent to the length of the input sequence unusable; therefore, appropriate handling of missing values is necessary depending on the duration over which they appear.
[0050] According to one embodiment, the best performing missing value method can be selected and utilized by employing basic missing value processing such as Interpolate and LinAR (Improving Linear Interpolation of Missing Hydrological Data by Applying Integrated Autoregressive Models), MICE (Multivariate Imputation by Chained Equations in R) considering multiple variables, KNNImputer, and deep learning models (SAITS (Self-Attention-based Imputation for Time Series), BRITS (Bidirectional Recurrent Imputation for Time Series), etc.). Table 2 below shows an implementation example of the missing value interpolation result.
[0051] Applied algorithm Number of remaining missing values RMSE SAITS 0 7.826861 MICE_Linear 0 7.916221 pchip 4459 14.16726 linear 4459 14.30208 slinear 13702 14.35609 TimeMixer 0 14.58911 KNN 0 14.82389 akima 13702 19.38483 nearest 13702 20.74768 spline 4459 29.51253 cubicspline 4459 39.06516 cubic 13702 39.20692 Pad 4459 39.30687 Zero 13702 39.45531 quadratic 13702 41.40509 polynomial 13702 41.40509
[0052] Next, the data embedding process of step (S10) can be performed as follows. Meanwhile, before examining the data embedding process, we examine the manual verification process of the water system manager as a prerequisite. Note that the purpose of the present invention is to provide an AI-based LLM model for analysis that relies on the intuition of the water system manager in the past. Table 3 below shows the results of the water system manager survey, and as can be seen from the table, it can be confirmed that the existing manual verification is performed by referring to related automatic / linked measurement network data.
[0053] number Survey Survey Summary 2-2 Reference Standards 1. All referenced data from the previous time. 2. Other measurement items, external linked data, and data from other measurement stations all showed 3 people each. 3-1-1 Reference Items and Methods for Total Phosphorus Screening 1. Everyone places the greatest importance on external precipitation (rainfall) data. 2. Next, total nitrogen, total organic carbon, and electrical conductivity are referenced. 3. Chlorophyll-a, pH, and DO are also referenced to some extent. 4. In Nakdong River-2, the relationship with rainfall and turbidity is considered important due to the characteristics of total phosphorus, which is heavily affected by turbid water. 3-1-2 3-2-1 Reference Items and Methods for Turbidity Screening All prioritize external precipitation (rainfall) data. Reference items differ when selecting [nearby water level data / discharge data], [electrical conductivity, flow rate, nearby dam / weir data], and [rainfall turbidity inflow - total phosphorus, TOC, EC / foreign matter inflow due to algal bloom - Chl-a, pH, DO, total phosphorus]. 3-2-2 3-3-1 Reference Items and Methods for Chlorophyll-a Screening Hydrogen ion concentration and dissolved oxygen appeared commonly. Next, water temperature, total organic carbon, turbidity, and total phosphorus appeared. In the Geum River and Nakdong River-2, water temperature was considered the most important, followed by hydrogen ion concentration and dissolved oxygen. In the case of the Han River, external precipitation and external meteorological temperature data were also utilized. 3-3-2 3-4 Reference previous time range 1. It varies from a minimum of 1 day to 5 years, and mostly refers to data in short monthly units. 2. In the case of outliers, refers to data in yearly units. 3. Only in the case of Nakdong River-2 is data from the same month of the previous year compared. 3-5 Reference other measurement stations Utilizing measurement data from both the upstream and downstream of the relevant measurement station. 3-6 Reference External Linked Materials Nakdong River-2, Han River: Refer to the same items from other nearby measurement stations. 5 Forms of AI utilization There are opinions regarding the correlation analysis between measurement items by station in Geumgang.
[0054] That is, as shown in Table 3 above, just as normal / abnormal verification is performed by considering the correlation between various variables in manual verification, data configuration in the data embedding process that can take this into account is required. Accordingly, according to one embodiment, data of a heterogeneous graph structure can be generated by connecting not only the linked measurement network but also the associated automatic measurement network.
[0055] Below, we will examine this in more detail with reference to FIGS. 4 and FIGS. 5.
[0056] According to one embodiment, for the verification of real-time water quality information and outlier detection, a graph-based data structure design is included that can reflect both the structural correlation between water quality measurement networks and the influence of external environmental variables.
[0057] FIG. 4 shows a connection structure between automatic measurement networks applied according to one embodiment. In the drawing, the connection relationship between the Han River automatic measurement networks is illustrated as an example.
[0058] Each automatic monitoring network located within a water system independently measures water quality parameters (e.g., turbidity, total phosphorus, chlorophyll-a, etc.), but influences one another based on physical upstream-downstream relationships or watershed characteristics. Accordingly, to reflect these structural relationships, a real-time water quality information system according to one embodiment sets each automatic monitoring network as a node and configures connections between adjacent monitoring networks as edges. This can be viewed as a homogeneous graph design.
[0059] This structure is effective for training anomaly detection models that reflect time-series interdependence, given that water quality anomalies in a specific measurement network can be correlated with measurements in adjacent measurement networks.
[0060] FIG. 5 shows a composite connection structure between a linked / automatic measurement network applied according to one embodiment.
[0061] Actual water quality anomalies are often influenced not only by internal data of the measurement network but also by external meteorological data (e.g., precipitation, temperature, etc.) and nearby hydrological data (e.g., inflow, outflow, water level, etc.). Accordingly, a real-time water quality information system according to one embodiment additionally designs a heterogeneous graph structure that includes external linked data in addition to the automatic measurement network. This structure includes different types of nodes, such as water quality measurement station nodes, meteorological information provision nodes, and dam operation nodes, and defines the semantic connection relationships between them as edges.
[0062] This heterogeneous graph structure enables the model to learn the correlations between multiple factors affecting a single water quality parameter, thereby allowing for explainable outlier detection and interpretation beyond simple detection.
[0063] By integrating the structures of Figures 4 and 5 described above and applying them to graph-based anomaly detection models based on multivariate time-series water quality data (such as GDN (Graph Neural Network-Based Anomaly Detection in Multivariate Time Series), MTAD-GAT (Multivariate Time-series Anomaly Detection via Graph Attention Network), and MST-GAT (A Multimodal Spatial-Temporal Graph Attention Network for Time Series Anomaly Detection)), a high-precision anomaly detection model can be implemented that reflects all of the correlation between variables, time flow, positional relationships between measurement networks, and external influencing factors.
[0065] Furthermore, the outlier detection model step (S20) according to one embodiment may include a model design process and a model application and evaluation process.
[0066] First, the model design process of step (S20) can be performed as follows.
[0067] To convert indeterminate data into determinate data, only normal data must be ultimately selected. Therefore, an outlier detection model capable of classifying original data into normal and abnormal data can be utilized.
[0068] Existing statistical techniques such as z-scores and IQRs detect outliers based only on univariate time series data, and ARIMA and distance-based models cannot account for complex relationships between variables (relationships between linked and automatic measurement networks). Accordingly, a real-time water quality information system according to one embodiment designs a model based on Heterogeneous Graph Attention Networks to learn the relationships of multivariate time series data and provide explanatory power for the results. As can be seen in the following table, the Heterogeneous Graph Attention Networks prediction model is suitable for application to multivariate time series data.
[0069] Validation data R2 Score Target Item Gangcheon Neungseo Danyang Bokha Stream Yangpyeong Yeoju circumference Pyeongchang River Heungcheon average Chlorophyll-a 0.9615 0.9752 0.9066 0.9563 0.9466 0.9486 0.9491 Total 0.9003 0.9395 0.8767 0.8884 0.9239 0.9466 0.9684 0.9206 Turbidity 0.8866 0.7481 0.3491 0.8642 0.3852 0.8843 0.6863 Test Data R2 Score Target Item Gangcheon Neungseo Danyang Bokha Stream Yangpyeong Yeoju circumference Pyeongchang River Heungcheon average Chlorophyll-a 0.9431 0.2012 0.8983 0.6066 0.8806 0.0252 0.5927 Total 0.8772 0.9343 0.9319 0.6863 0.8410 0.5630 0.9684 0.8289 Turbidity 0.8131 0.7657 0.8927 0.8936 0.5540 0.7369 0.7760
[0070] In a Heterogeneous Graph Attention Network, the overall influence is calculated by combining the attention between measurement networks and the attention between variables, so that when the total influence is set to 1, the influence between each measurement network / variable can be calculated. Table 5 below shows an implementation example of the training process of a Heterogeneous Graph Attention Network, and Table 6 shows an example of attention in a Heterogeneous Graph Attention Network.
[0071]
[0072] Semantic-level Semantic-level Attention Node-level Node-level Attention Full Attention Icheon_Ground Weather 0.3 Precipitation 0.9 0.27 Ground temperature 0.1 0.03 Chungju Dam 0.1 inflow 0.5 0.05 Low water level 0.5 0.05 Gangcheon 0.2 Total 0.2 0.04 Turbidity 0.8 0.16 Yeoju 0.4 Total 0.1 0.04 Turbidity 0.9 0.36 total 1 - - 1
[0073] As shown in Table 6 above, by applying a heterogeneous graph attention network to a heterogeneous graph structure, the first influence between measurement networks (first attention; Semantic-level Attention) and the second influence between variables (second attention; Node-level Attention) can be calculated, and the integrated influence (Full Attention) can be derived as the influence between each measurement network / variable obtained by integrating them. Based on this structure, one can consider a GDN model that performs outlier detection by considering the relationships between variables through the graph structure, an MTAD-GAT model that adds temporal relationships, and an MST-GAT model that considers the relationships between modals (between automatic / linked measurement networks). Through this, an outlier detection model can be designed that considers the relationships between variables, the flow of time, and additional relationships (between automatic / linked measurement networks).
[0074] FIG. 6 shows an example of a multivariate outlier detection model result performed by a real-time water quality information system according to one embodiment.
[0075] Referring to the diagram, rather than classifying a sudden increase in 'turbidity' as an outlier, the determination of an outlier status can be made by utilizing changes in correlated values such as precipitation, flow rate, water level, and electrical conductivity. Overall, 'turbidity' shows a pattern of increasing after a certain period following an increase in 'precipitation,' and flow rate and water level also increase alongside precipitation, exhibiting a similar pattern. Therefore, using an outlier detection model, it can be determined that the green area, despite the significant increase in turbidity, is highly likely to represent normal data. However, in the red area, although precipitation increased significantly, turbidity showed little change after a certain period; since this differs from the existing pattern, it can be determined that it is highly likely to be an outlier.
[0076] Next, the model application and evaluation process of step (S20) can be performed as follows.
[0077] In deep learning, the results of outlier detection models include whether something is normal or abnormal and its probability through supervised learning, and the predicted value through unsupervised learning.
[0078] At this point, it is necessary to set a threshold to determine what probability should be considered an outlier and from which value to consider it an outlier based on the difference between the predicted value and the actual value. Thresholds range from basic methods using the mean and variance (z-score) to IQR, methods combining the median and IQR (GDN model), and Dynamic Thresholding that varies according to changes in value (Detecting Spacecraft Anomalies Using LSTMs and Nonparametric Dynamic Thresholding, Anomaly Detection for Unmanned Aerial Vehicle Sensor Data Using a Stacked Recurrent Autoencoder Method with Dynamic Thresholding, Anomaly Detection in Streams with Extreme Value Theory).
[0079] In addition, to verify the performance of the outlier detection model, various metrics can be applied depending on the length and pattern of outliers, data distribution, etc.
[0080] In this way, appropriate thresholds and metrics can be set according to the distribution and pattern of outliers.
[0082] Furthermore, in the LLM model step (S30) according to one embodiment, the outlier probability and integrated influence and the multivariate time series water quality data used therein are converted into a predefined prompt form, and then a natural language response analysis result is generated through the LLM model.
[0083] According to one embodiment, the outlier detection results and the data used can be converted into a certain JSON format.
[0084] Consistent and accurate interpretations can be generated through In-context Learning and Chain of Thought techniques. These two techniques can include the following content in the prompt.
[0085] In other words, In-context Learning techniques can include an explanation of how JSON keys and values are structured, as well as examples of what kind of response should be produced based on the JSON data.
[0086] In addition, the Chain of Thought technique can include a step-by-step explanation of how the answer derived from the JSON data is inferred.
[0087] Finally, in the result step (S40) according to one embodiment, the natural language response analysis result is provided to the user along with the outlier probability and the integrated influence.
[0088] FIG. 7a shows an example of a model result provided to a user according to one embodiment. As illustrated in the figure, the user can visualize and verify the item / time-specific outliers and their influence derived from the outlier detection AI model with just a simple click of the desired data in the data selection window (visualization of key variables in the form of graphs, and output of key variables and their influence in the form of tables), and the user can verify the analysis results through an LLM model.
[0089] For example, as illustrated in FIG. 7b, the model results can be provided to the user by including a first GUI area (GUI1) displaying outlier probabilities, a second GUI area (GUI2) visualizing and displaying key variables related to integrated influence in a graph form, a third GUI area (GUI3) visualizing and displaying key variables related to integrated influence in a table form, and a fourth GUI area (GUI4) visualizing and displaying natural language response analysis results in a paragraph form.
[0090] According to the above-described embodiment, a real-time water quality information system based on AI design and a method of operation thereof can be provided, which includes visualization considering relationships between variables, temporal relationships, and relationships between modals based on a heterogeneous graph structure. Additionally, an explainable outlier detection model can be provided for interpreting results, and an AI model can be provided that considers correlations between variables and the flow of time, derives probabilities regarding normal / abnormal conditions, and interprets the basis thereof.
[0092] FIG. 8 is a block diagram showing the overall configuration and data flow of an AI design-based real-time water quality information system according to one embodiment.
[0093] As illustrated in the drawing, the user side, the interface layer, and the real-time water quality information system are depicted from the left side of the drawing. Additionally, the library and execution environment are depicted at the bottom.
[0094] The user views the XAI (Explainable AI)-based analysis results regarding the analysis of water quality data outliers.
[0095] The interface layer retrieves water quality data stored in the database based on user queries and enables it to be passed to the outlier detection model.
[0096] The real-time water quality information system largely performs data preprocessing, anomaly detection model processing, and LLM model processing. In order, this corresponds to the aforementioned data processing step (S10), anomaly detection model step (S20), and LLM model step (S30). Additionally, the real-time water quality information system provides analysis results and detection results to the interface layer. This corresponds to the aforementioned result step (S40).
[0097] In data preprocessing, raw data is prepared for outlier detection, and external data (weather, hydrology, etc.) is integrated as part of the linked measurement network data merging process. Additionally, as part of the data embedding and transformation process, the data is converted into a PyTorch tensor format to be configured suitable for input to a GNN model.
[0098] The outlier detection model processing determines the presence of outliers based on multivariate time series and graphs. It extracts outlier data, calculates outlier probabilities, and processes outliers by item and time. Additionally, it extracts attention, integrates attention by batch and head, and processes influence by item and time. The result can be output as a combination of outliers and influence by item and time. Finally, the detection result is output to the interface layer.
[0099] In LLM model processing, detection results are converted into JSON format. The LLM model interprets the results via a predefined prompt, generates a natural language response, and outputs it to the interface layer as a message.
[0100] Real-time water quality monitoring systems can be operated in a model server environment using libraries such as Python, Pandas, PyTorch, and PyTorch-Geometric, and Ollama can be applied as an LLM environment.
[0102] FIG. 9 is a diagram illustrating an example of a hardware implementation of a system according to one embodiment. A system (1000) according to one embodiment may include a processor (1010), a memory (1020), and a display (1030).
[0103] The processor (1010) can preprocess multivariate time-series water quality data and apply an outlier detection model to derive outlier probabilities and integrated influences from the multivariate time-series water quality data. To this end, the processor (1010) can perform data embedding of a heterogeneous graph structure by connecting multiple measurement networks.
[0104] Additionally, the processor (1010) can convert the outlier probability and integrated influence and the multivariate time series water quality data used therein into a predefined prompt form, and then generate natural language response analysis results through an LLM model.
[0105] However, the operation of the processor (1010) is not limited to this, and it may also perform the operations described in FIGS. 1 to 8.
[0106] The memory (1020) can store multivariate time-series water quality data. The memory (1020) can temporarily or permanently store data required to perform a method according to one embodiment. For example, the memory (1020) can store an outlier detection model, a first influence between measurement networks, a second influence between variables, an influence between each measurement network / variable (i.e., integrated influence), a threshold, a metric, etc.
[0107] The display (1030) can provide the user with the natural language response analysis results along with outlier probabilities and integrated influence. The display can be implemented using known LCD, LED, OLED display devices, etc.
[0108] The embodiments described above may be implemented as hardware components, software components, and / or combinations of hardware and software components. For example, the devices, methods, and components described in the embodiments may be implemented using a general-purpose computer or a special-purpose computer, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing unit may execute an operating system (OS) and software applications executed on said operating system. Additionally, the processing unit may access, store, manipulate, process, and generate data in response to the execution of the software. For ease of understanding, the processing unit may be described as being used as a single unit, but those skilled in the art will understand that the processing unit may include multiple processing elements and / or multiple types of processing elements. For example, the processing unit may include multiple processors or one processor and one controller. In addition, other processing configurations, such as parallel processors, are also possible.
[0109] The term "module" as used in the present invention may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit, for example. A module may be a component formed integrally, or a minimum unit of said component or a part thereof that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an Application-Specific Integrated Circuit (ASIC).
[0110] Software may include computer programs, code, instructions, or a combination of one or more of these, and may configure a processing unit to operate as desired or command the processing unit independently or collectively. Software and / or data may be permanently or temporarily embodied in any type of machine, component, physical device, virtual equipment, computer storage medium or device, or transmitted signal wave in order to be interpreted by the processing unit or to provide instructions or data to the processing unit. Software may be distributed over networked computer systems and may be stored or executed in a distributed manner. Software and data may be stored on computer-readable recording media.
[0111] The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may store program instructions, data files, data structures, etc., either alone or in combination, and the program instructions recorded on the medium may be those specifically designed and configured for the embodiment or may be those known and available to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, and flash memory. Examples of program instructions include machine code, such as that generated by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc.
[0112] The hardware device described above may be configured to operate as one or more software modules to perform the operation of the embodiment, and vice versa.
[0113] Although the embodiments have been described above with reference to the limited drawings, those skilled in the art can apply various technical modifications and variations based thereon. For example, suitable results may be achieved even if the described techniques are performed in a different order than described, and / or if the components of the described system, structure, device, circuit, etc. are combined or assembled in a form different from described, or replaced or substituted by other components or equivalents.
[0114] Therefore, other implementations, other embodiments, and equivalents to the claims also fall within the scope of the claims set forth below.
[0115] Although the technical concept of the present invention has been specifically described according to the preferred embodiments above, it should be noted that the above-mentioned embodiments are for illustrative purposes only and are not intended to be limiting. Furthermore, a person skilled in the art will understand that various embodiments are possible within the scope of the technical concept of the present invention. Explanation of the symbols
[0117] 100, 1000: AI-designed real-time water quality information system 1010 : Processor 1020 : Memory 1030 : Display
Claims
Claim 1 A method of operation for an AI-designed real-time water quality information system comprising: a step of preprocessing multivariate time-series water quality data; a step of deriving outlier probabilities and integrated influences from the multivariate time-series water quality data by applying an outlier detection model; a step of converting the outlier probabilities, integrated influences, and the multivariate time-series water quality data used therein into a predefined prompt form, and then generating natural language response analysis results through an LLM model. The method includes the step of providing the above natural language response analysis results to a user along with the above outlier probability and the above integrated influence; wherein the preprocessing step includes the step of performing data embedding of a heterogeneous graph structure by connecting a plurality of measurement networks; and the step of performing data embedding generates data of the above heterogeneous graph structure by connecting not only a linked measurement network (first measurement network) but also an associated automatic measurement network (second measurement network), wherein the first measurement network includes data nodes from a plurality of sources including external linked data—the external linked data includes one or more of external meteorological data and nearby hydrological data—, and the second measurement network is a connection structure between a plurality of automatic measurement networks installed within the same water system, including upstream and downstream locations or watershed connections between each water quality measurement station represented as a node and each water quality measurement station represented as an edge, and the deriving step is the above outlier detection model that applies a heterogeneous graph attention network to the above heterogeneous graph structure to calculate the first influence between measurement networks and the second influence between variables, and derives the above integrated influence as the influence between each measurement network / variable obtained by integrating them. A method comprising: a step of designing; and a step of setting a threshold for determining an outlier of the return value of the outlier detection model; wherein the variable includes one or more of electrical conductivity, turbidity, precipitation, flow rate, and water level. Claim 2 delete Claim 3 A method according to claim 1, wherein the preprocessing step comprises the step of checking whether there are missing values in the multivariate time series water quality data in which the input sequence is set and performing missing value interpolation processing thereon. Claim 4 delete Claim 5 A method according to claim 1, wherein the data of the heterogeneous graph structure includes different types of nodes, including two or more of water quality monitoring station nodes, weather information providing nodes, and dam operation nodes, and the semantic connection relationships between them are defined as edges. Claim 6 delete Claim 7 delete Claim 8 The method according to claim 1, wherein the deriving step further comprises the step of setting a metric applied according to the length / pattern / data distribution of the outliers to verify the performance of the outlier detection model. Claim 9 A method according to claim 1, wherein the generating step comprises: a step of converting the outlier probability and the integrated influence and the multivariate time series water quality data used therein into a JSON format as a structured text format; and a step of performing prompting through in-context learning and thought chain techniques. Claim 10 A method according to claim 1, wherein the step provided comprises a first GUI area displaying the outlier probability, a second GUI area visualizing and displaying the key variables related to the integrated influence in a graph form, a third GUI area visualizing and displaying the key variables related to the integrated influence in a table form, and a fourth GUI area visualizing and displaying the natural language response analysis results in a paragraph form. Claim 11 One or more non-transient computer-readable storage media storing instructions that, when executed by one or more computers, cause one or more computers to perform the operations of any one of the individual methods of claims 1, 3, 5 and 8 through 10. Claim 12 A processor for a real-time water quality information system based on AI design, which preprocesses multivariate time-series water quality data, applies an outlier detection model to derive outlier probabilities and integrated influences from the multivariate time-series water quality data, converts the outlier probabilities, integrated influences, and the multivariate time-series water quality data used therein into a predefined prompt format, and generates natural language response analysis results through an LLM model; and a display that provides the above natural language response analysis results to a user along with the above outlier probability and the above integrated influence; wherein the preprocessing includes performing data embedding of a heterogeneous graph structure by connecting a plurality of measurement networks, and the data embedding generates data of the above heterogeneous graph structure by connecting not only a linked measurement network (first measurement network) but also an associated automatic measurement network (second measurement network), wherein the first measurement network includes data nodes from a plurality of sources including external linked data—the above external linked data includes one or more of external meteorological data and nearby hydrological data—, and the second measurement network is a connection structure between a plurality of automatic measurement networks installed within the same water system, including upstream and downstream locations or watershed connections between each water quality measurement station represented as a node and each water quality measurement station represented as an edge, and the derivation designs the above outlier detection model that applies a heterogeneous graph attention network to the above heterogeneous graph structure to calculate a first influence between measurement networks and a second influence between variables, and derives the above integrated influence as the influence between each measurement network / variable obtained by integrating them, and the above outlier detection A system comprising setting a threshold for determining outliers in the return values of a model, wherein the variables include one or more of electrical conductivity, turbidity, precipitation, flow rate, and water level.
Citation Information
Patent Citations
Water pollution tracing method based on graph attention neural network
CN119251014A
Deep-learning based persona specific insight generator
WO2024181975A1
