Abnormal state early warning method and system applied to online monitoring of groundwater

By using dynamic causal state partitioning reconstruction and finite state machine model, abnormal states in groundwater monitoring data are identified, solving the problem of delayed response to progressive anomalies in existing technologies and realizing early anomaly identification and location warning.

CN122245075APending Publication Date: 2026-06-19GUIZHOU UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUIZHOU UNIV
Filing Date
2026-05-21
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing online groundwater monitoring systems are unable to effectively identify and utilize the progressive process dynamics evolution trends and their causal logical correlation characteristics in the monitoring data, resulting in a lag in response to progressive anomaly evolution.

Method used

By acquiring continuous monitoring records from a group of groundwater monitoring wells, dynamic causal state partitioning is reconstructed, a finite state machine model is generated, illegal transition segments that violate causal semantic rules are identified, and groundwater abnormal state early warning instructions are generated.

Benefits of technology

It enables early identification and location warning of process anomalies hidden in monitoring data, overcomes the shortcomings of single threshold over-limit alarm methods, and improves the response capability to gradual anomaly evolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122245075A_ABST
    Figure CN122245075A_ABST
Patent Text Reader

Abstract

This application discloses an abnormal state early warning method and system for groundwater online monitoring. The method reconstructs the continuous groundwater level and quality data collected from various monitoring points using dynamic causal partitioning, transforming the continuous monitoring curve into a sequence of dynamic causal state segments composed of segments with a single internal dynamic change trend. Then, based on the trend transition direction between segments, a finite state machine model representing state transition rules is generated. Next, by invoking a preset set of irreversible causal semantic rules, pattern semantic violation identification processing is performed on the state transition paths in the finite state machine model, identifying illegal transition segments that violate the causal logic of groundwater's natural evolution. Based on the temporal and spatial location information of the illegal transition segments, an abnormal groundwater state early warning command containing the illegal geographic coordinates is generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data analysis technology, and in particular to an abnormal state early warning method and system for online groundwater monitoring. Background Technology

[0002] Online groundwater monitoring is a crucial technological means to ensure the utilization of groundwater resources and the prevention of pollution. With the development of sensor technology, Internet of Things (IoT) communication technology, and cloud computing platforms, groundwater monitoring networks have evolved from the early stage of periodic manual sampling and analysis to a stage of high-density, high-frequency online monitoring consisting of a large number of automated monitoring wells.

[0003] In existing technologies, typical online monitoring systems deploy multi-parameter sensors, such as water level gauges, conductivity probes, turbidimeters, and specific ion-selective electrodes, within a cluster of monitoring wells. These sensors continuously acquire real-time values ​​of groundwater level depth and various water quality indicators according to a preset acquisition cycle, and then aggregate the collected data to a central monitoring platform via a wireless transmission network. The central monitoring platform is typically equipped with an early warning module based on rule engines or statistical process control. This module performs real-time threshold discrimination on the received monitoring data stream. However, existing online monitoring and early warning methods based on fixed thresholds can only passively respond to events where groundwater level or water quality values ​​exceed limits. They cannot effectively identify and utilize the gradual process dynamics and causal relationships inherent in the monitoring data. Summary of the Invention

[0004] This application provides an abnormal state early warning method and system for groundwater online monitoring, which is used to effectively identify and utilize the progressive process dynamics evolution trend and causal logical correlation characteristics contained in the monitoring data.

[0005] This application provides, in one aspect, an abnormal state early warning method for groundwater online monitoring, applied to an abnormal state early warning system, the method comprising: Obtain a set of continuous monitoring records corresponding to each monitoring point within the groundwater monitoring well group. The set of continuous monitoring records includes continuous water level monitoring curves and continuous water quality monitoring curves arranged in the order of collection time. Based on the dynamic causal state partitioning reconstruction process, the continuous water level monitoring curve is divided into multiple water level dynamic causal state segments and the continuous water quality monitoring curve is divided into multiple water quality dynamic causal state segments, thereby obtaining a dynamic causal state segment sequence corresponding to the monitoring point. A finite state machine model is generated based on the water level causal transition directions between adjacent water level causal state segments and the water quality causal transition directions between adjacent water quality causal state segments in the causal state segment sequence; wherein, the state nodes in the finite state machine model correspond to the water level causal state segments and the water quality causal state segments, and the directed transition edges in the finite state machine model correspond to the water level causal transition directions and the water quality causal transition directions; The state transition path of the monitoring point under continuous acquisition time sequence is extracted by the finite state machine model, and the state transition path is subjected to pattern semantic violation identification processing by calling the preset irreversible causal semantic rule set, thereby generating a violation transition segment in the state transition path that violates any irreversible causal semantic rule in the irreversible causal semantic rule set. Based on the temporal position of the illegal transition fragment in the state transition path, and the fragment characteristics of the water level dynamics causal state fragment and the water quality dynamics causal state fragment corresponding to the illegal transition fragment, an early warning command for groundwater anomaly state containing the illegal geographic coordinate point marker is generated.

[0006] One embodiment of this application provides an abnormal state early warning system, including: A processor; a storage device having a computer program stored thereon; a network interface for providing network communication functions; when the computer program is executed by the processor, the processor enables the processor to implement any of the aforementioned abnormal state early warning methods for online groundwater monitoring.

[0007] One embodiment of this application provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements the steps of the abnormal state early warning method applied to online monitoring of groundwater.

[0008] Therefore, the embodiments of this application have the following beneficial effects: the method, from the dual perspectives of process dynamics and causal logic constraints, can identify and locate the process abnormality patterns hidden in the monitoring data in the early stage, and overcome the shortcomings of the single threshold over-limit alarm method in responding to the gradual abnormal evolution. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1This is a flowchart illustrating an abnormal state early warning method for online groundwater monitoring, provided as an embodiment of this application.

[0011] Figure 2 This is a schematic diagram of the basic structure of an abnormal state early warning system provided in an embodiment of this application.

[0012] Figure 3 This is a functional block diagram of an abnormal state early warning device provided in an embodiment of this application. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0014] Please see Figure 1 , Figure 1 This is a flowchart of an abnormal state early warning method for groundwater online monitoring provided in an embodiment of this application. The method can be executed by an abnormal state early warning system or jointly executed by an abnormal state early warning system and a server. The method may include steps 110-150.

[0015] This application provides an abnormal state early warning method for groundwater online monitoring. This method targets a groundwater monitoring well group consisting of multiple monitoring points distributed across different hydrogeological units and equipped with automatic water level gauges and multi-parameter water quality probes. By performing dynamic causal state partitioning reconstruction on continuously collected groundwater level and quality values ​​from each monitoring point, the continuous monitoring curve is transformed into a sequence of dynamic causal state segments composed of segments with a single internal dynamic change trend. Then, a finite state machine model representing state transition rules is generated based on the trend transition direction between segments. Based on this, a preset set of irreversible causal semantic rules is invoked to perform pattern semantic violation identification processing on the state transition paths in the finite state machine model. Violational transition segments that violate the causal logic of natural groundwater evolution are identified, and groundwater abnormal state early warning instructions containing violation geographic coordinate markers are generated based on the temporal and spatial location information of the violation transition segments. This method, from the dual perspectives of process dynamics and causal logic constraints, enables early identification and location warning of process-related abnormal patterns hidden in the monitoring data, overcoming the shortcomings of single threshold over-limit alarm methods that are slow to respond to gradual abnormal evolution.

[0016] In this embodiment, an online monitoring network of a regional groundwater monitoring well group is used as a specific application scenario. This monitoring well group includes multiple monitoring points numbered P1, P2, up to Pn. The geographical coordinates of each monitoring point are pre-calibrated and stored in the monitoring point attribute database during system initialization. Each monitoring point acquires groundwater level and groundwater quality values ​​at fixed collection intervals (which can be pre-configured according to actual monitoring needs). The groundwater quality values ​​can be numerical representations obtained by quantifying conductivity, turbidity, specific pollutant concentrations, or comprehensive water quality indicators. The raw data collected from each monitoring point are aggregated in real-time or near real-time to an abnormal state early warning system or cloud monitoring platform via a wireless transmission network. The abnormal state early warning processing logic deployed in the abnormal state early warning system or cloud monitoring platform executes the method provided in this embodiment. It should be noted that the specific algorithms, data structures, and model configurations involved in this embodiment are all illustrative examples intended to help understand the technical concept of this application and do not constitute a limitation on the scope of protection of this application.

[0017] Step 110: Obtain the set of continuous monitoring records corresponding to each monitoring point in the groundwater monitoring well group. The set of continuous monitoring records includes continuous water level monitoring curves and continuous water quality monitoring curves arranged in the order of collection time.

[0018] In this embodiment, each monitoring point in the monitoring network is assigned a globally unique point identifier, denoted as Pid. The mapping relationship between this identifier and the geographic coordinates of the monitoring point is stored in the monitoring point attribute database. For any monitoring point Pk, the abnormal state early warning system reads all the original acquisition records generated by that monitoring point within a specified backtracking time window from the time-series database or real-time data stream processing engine it is connected to. The original acquisition records exist in the form of a tuple, namely, a timestamp T and the monitoring value V at the corresponding time. For groundwater level monitoring, this value is the groundwater level depth or groundwater level elevation, uniformly denoted as groundwater level value W. For groundwater quality monitoring, this value is the measurement result of one selected water quality indicator, uniformly denoted as groundwater quality value Q.

[0019] The abnormal state early warning system correlates the timestamp sequence of the same monitoring point with the groundwater level numerical sequence to form a continuous water level monitoring curve arranged in the acquisition time sequence, denoted as WCurvek, where each element corresponds to a groundwater level acquisition time sequence node. Similarly, the abnormal state early warning system correlates the timestamp sequence with the groundwater quality numerical sequence to form a continuous water quality monitoring curve arranged in the acquisition time sequence, denoted as QCurvek, where each element corresponds to a groundwater quality acquisition time sequence node. Because groundwater level sensors and groundwater quality sensors may experience incomplete synchronization of sampling times, inconsistent data upload delays, or missing data in certain acquisition cycles during actual deployment, time sequence alignment verification and missing value interpolation preprocessing are performed after acquiring the raw data.

[0020] The specific method of time sequence alignment verification is as follows: using the timestamp sequence of the continuous water level monitoring curve as the reference sequence, a sliding window matching is performed on the timestamp sequence of the continuous water quality monitoring curve. The collection records with time deviations less than the preset alignment tolerance threshold are regarded as the same collection time sequence node. Isolated water quality collection records that cannot be aligned are discarded or interpolated and resampled according to their relative positions in the water level timestamp sequence.

[0021] The missing value imputation preprocessing adopts the piecewise linear interpolation method. The specific process is as follows: For the target timestamp Ttarget to be imputed, the two acquisition time-series nodes that are closest to Ttarget and have valid monitoring values ​​are found in the continuous water level monitoring curve or the continuous water quality monitoring curve, respectively. The timestamp of the preceding node is Tprev and the monitoring value is Vprev, and the timestamp of the following node is Tnext and the monitoring value is Vnext. Then, the interpolation result at time Ttarget is obtained by dividing the difference between Vprev and Vnext by the difference between Tnext and Tprev, multiplying it by the difference between Ttarget and Tprev, and then adding it to Vprev.

[0022] After the above preprocessing, complete and continuous water level and water quality monitoring curves are obtained in the time dimension. The storage structure of the continuous monitoring record set adopts a key-value pair list format indexed by timestamps to ensure the traceability of the acquisition time sequence and the integrity of the numerical sequence required for subsequent dynamic trend analysis.

[0023] After acquiring and preprocessing the continuous monitoring record sets of each monitoring point, step 120 is performed to reconstruct the dynamic causal state partition for each continuous monitoring curve.

[0024] Step 120: Based on the dynamic causal state partitioning reconstruction process, the continuous water level monitoring curve is divided into multiple water level dynamic causal state segments and the continuous water quality monitoring curve is divided into multiple water quality dynamic causal state segments, thereby obtaining a sequence of dynamic causal state segments corresponding to the monitoring points.

[0025] The core idea of ​​the dynamic causal state partitioning reconstruction process is that the dynamic evolution of the groundwater system is not driven by isolated numerical exceedance events, but rather manifests as a process with a continuous and consistent trend of change within a certain time interval. Therefore, this step does not directly perform threshold discrimination on the original numerical sequence, but first extracts the first-order dynamic trend direction of the curve, and then, based on the persistence and turning points of the trend direction on the time axis, adaptively divides the originally continuous monitoring curve into multiple continuous segments with a single dynamic change state within each segment. This process consists of several sub-steps, which will be explained one by one below.

[0026] Step 121: Extract the groundwater level value corresponding to each groundwater level collection time node in the continuous water level monitoring curve, and extract the groundwater quality value corresponding to each groundwater quality collection time node in the continuous water quality monitoring curve.

[0027] For the pre-processed continuous water level monitoring curve WCurvek, the anomaly warning system iterates through all its timestamps Ti and their corresponding groundwater level values ​​Wi, extracting each pair (Ti, Wi) as a data point into a temporary data buffer. For the continuous water quality monitoring curve QCurvek, the anomaly warning system similarly iterates through all its timestamps Tj and their corresponding groundwater quality values ​​Qj, extracting each pair (Tj, Qj) into a temporary data buffer.

[0028] Since time-series alignment was performed in step 110, water level and water quality have a one-to-one synchronization relationship in the timestamp dimension. That is, for the same data collection time-series node index, water level and water quality values ​​correspond to the same physical moment. The extracted numerical sequence will serve as the basic input for dynamic trend analysis. Subsequent trend direction determination and boundary delineation are based on the adjacent difference relationship of this numerical sequence on the time axis.

[0029] Step 122: Extract the first-order dynamic change trend of the groundwater level value along the acquisition time sequence to obtain the groundwater level dynamic change trend direction of the continuous monitoring curve between adjacent groundwater level acquisition time sequence nodes. The groundwater level dynamic change trend direction includes the water level rising trend direction, the water level falling trend direction, and the water level stabilization trend direction.

[0030] For any pair of adjacent acquisition time-series nodes in the WCurvek continuous water level monitoring curve, the timestamp of the preceding node is denoted as Ti, and the groundwater level value is denoted as Wi; the timestamp of the following node is denoted as Ti+1, and the groundwater level value is denoted as Wi+1. The abnormal state early warning system first calculates the numerical difference within this adjacent interval, i.e., subtracting Wi from Wi+1 to obtain the difference value ΔWi. Due to the inherent measurement noise and quantization error in the actual operation of groundwater monitoring instruments, directly judging non-zero differences as an upward or downward trend will introduce a large number of spurious trend reversals caused by noise.

[0031] To suppress such interference, this application introduces a minimum variation resolution, denoted as εw, that is adapted to the accuracy level of the water level monitoring sensor and the natural fluctuation amplitude of groundwater levels. The minimum variation resolution εw is determined as follows: the measurement accuracy index calibrated by the water level monitoring sensor at the factory is obtained, and a weighted calculation is performed based on the standard deviation of water level fluctuations at the monitoring point over a specified period. The larger of the two values ​​is taken as the actual value of εw. After calculating the difference value ΔWi, the abnormal state early warning system compares the absolute value of ΔWi with εw. When the absolute value of ΔWi is less than εw, the direction of the groundwater level dynamic change trend within the adjacent acquisition time interval is determined to be a stable water level trend, denoted by the trend symbol StableW. When ΔWi is greater than or equal to εw, it is determined to be a rising water level trend, denoted by the trend symbol RisingW. When ΔWi is less than or equal to a negative value of εw, it is determined to be the direction of the water level decline trend, which is represented by the trend marker FallingW. This identification process is performed pairwise along the acquisition time sequence of the entire continuous water level monitoring curve, thereby generating a trend direction marker sequence DirSeqW that matches the length of the original water level numerical sequence. Each marker in this sequence corresponds to an adjacent interval.

[0032] Step 123: Extract the first-order dynamic change trend of the groundwater quality values ​​along the collection time sequence to obtain the dynamic change trend direction of the groundwater quality between adjacent groundwater quality collection time sequence nodes of the continuous monitoring curve. The dynamic change trend direction of the groundwater quality includes the direction of the water quality concentration increase, the direction of the water quality concentration decrease, and the direction of the water quality concentration stability.

[0033] Using a similar processing logic to step 122, for any adjacent data acquisition time-series node pair (Tj, Qj) and (Tj+1, Qj+1) in the continuous water quality monitoring curve QCurvek, the abnormal state early warning system calculates the water quality numerical difference ΔQj within this adjacent interval, i.e., Qj+1 minus Qj. For the specific water quality indicator being monitored, the system pre-sets a corresponding minimum variation resolution εq. The determination of εq needs to comprehensively consider the measurement accuracy of the water quality monitoring sensor, the background fluctuation range of the water quality indicator under natural conditions, and the detection limit requirements for the indicator in relevant environmental quality standards. The specific value of εq can be read from the preset indicator resolution mapping table according to the selected water quality indicator type during the system initialization phase, or it can be configured by maintenance personnel based on actual operating experience.

[0034] After calculating the difference value ΔQj, the abnormal state early warning system compares the absolute value of ΔQj with εq. When the absolute value of ΔQj is less than εq, the direction of groundwater quality dynamics change within the adjacent acquisition time interval is determined to be a stable trend in water quality concentration, denoted by the trend marker StableQ. When ΔQj is greater than or equal to εq, it is determined to be an upward trend in water quality concentration, denoted by the trend marker RisingQ. When ΔQj is less than or equal to a negative value of εq, it is determined to be a downward trend in water quality concentration, denoted by the trend marker FallingQ. This identification process is performed pairwise along the acquisition time sequence direction of the entire continuous water quality monitoring curve, generating a trend direction marker sequence DirSeqQ that matches the length of the original water quality numerical sequence.

[0035] Step 124: Based on the continuous interval of the groundwater level dynamic change trend direction in the continuous acquisition time sequence, the continuous monitoring curve of the water level is divided into causal state boundary processing, and the continuous groundwater level acquisition time sequence node sequence with the same groundwater level dynamic change trend direction is divided into a water level dynamic causal state segment.

[0036] After obtaining the trend direction marker sequence DirSeqW, the anomaly warning system scans the sequence along the time axis to identify the boundary locations where the trend direction changes. The scanning process starts with the first marker in the trend direction marker sequence, sequentially reading and comparing the trend direction markers of two adjacent positions. If the trend direction marker at the current position is the same as the trend direction marker at the next position, the scanning continues. If the trend direction marker at the current position is different from the trend direction marker at the next position, a causal boundary is marked between the two positions.

[0037] Taking the upward trend of water level as an example, if multiple consecutive RisingW markers appear in the trend direction marker sequence, and the preceding marker of this consecutive RisingW sequence is StableW or FallingW, and the following marker is also StableW or FallingW, then the starting position of this consecutive RisingW sequence is the first RisingW occurrence after the previous trend reversal point, and the ending position is the last RisingW occurrence of this RisingW sequence. All groundwater level acquisition time series nodes covered between this starting position and the ending position are aggregated into an independent causal state segment of water level dynamics. Within the continuous interval corresponding to this segment, the continuous water level monitoring curve shows continuous groundwater level rise behavior, and it no longer contains trend direction reversals.

[0038] Following the same boundary delineation rules, the abnormal state early warning system performs boundary delineation on the continuous marked sequences corresponding to the upward trend, downward trend, and stable trend of water level, respectively. This ultimately divides the entire continuous water level monitoring curve into several interconnected water level dynamic causal state segments. Each water level dynamic causal state segment is assigned a unique water level causal state segment identifier IDw, and the system records the segment's starting acquisition time sequence TstartW, ending acquisition time sequence TendW, and a list of node identifiers for all groundwater level acquisition time sequence nodes contained within that segment.

[0039] Step 125: Based on the continuous interval of the groundwater quality dynamic change trend direction in the continuous acquisition time sequence, the continuous water quality monitoring curve is divided into causal state boundaries, and the continuous groundwater quality acquisition time sequence node sequence with the same groundwater quality dynamic change trend direction is divided into a water quality dynamic causal state segment.

[0040] Using the same boundary delineation logic as in step 124, the abnormal state early warning system scans the water quality trend direction marker sequence DirSeqQ along the time axis to identify the duration intervals of the three trend direction markers: RisingQ, FallingQ, and StableQ. Whenever the trend direction markers at two adjacent locations change, a causal state boundary is marked at the point of change. Taking the upward trend direction of water quality concentration as an example, consecutive RisingQ marker sequences are aggregated into a water quality dynamic causal state segment, whose internal behavior is uniformly characterized as a continuous increase in groundwater quality concentration.

[0041] According to this rule, the entire continuous water quality monitoring curve is divided into several interconnected water quality dynamic causal state segments. Each water quality dynamic causal state segment is assigned a unique water quality causal state segment identifier IDq, and the starting acquisition time sequence TstartQ, the ending acquisition time sequence TendQ, and the node identifier list of all groundwater quality acquisition time sequence nodes contained within the segment are recorded in the entire curve.

[0042] Step 126: Combine the water level dynamics causal state fragments and the water quality dynamics causal state fragments to generate a dynamics causal state fragment sequence and traverse it to obtain dynamic description parameters.

[0043] After obtaining separate sets of causal state fragments for water level and water quality, they need to be integrated into a unified monitoring point perspective to form a fragmented representation that can fully describe the joint dynamic evolution process of the monitoring point over time. Simultaneously, the intensity of change within each fragment needs to be quantitatively characterized to provide reference fragment features when generating early warning commands. This step is further refined into the following sub-steps.

[0044] Step 1261: Arrange all the water level dynamic causal state segments according to the start and end acquisition time sequences corresponding to the water level dynamic causal state segments to obtain a water level dynamic causal state segment set; arrange all the water quality dynamic causal state segments according to the start and end acquisition time sequences corresponding to the water quality dynamic causal state segments to obtain a water quality dynamic causal state segment set.

[0045] The abnormal state early warning system creates two linear list structures to hold water level dynamics causal state segments and water quality dynamics causal state segments, respectively. For the water level dynamics causal state segment set SegsW, the starting acquisition time sequence TstartW of each segment is extracted from all water level dynamics causal state segments obtained in step 124. Using the ascending order of TstartW as the sorting basis, the segments are inserted into the corresponding positions in the SegsW list. Since the boundary partitioning rules ensure that adjacent segments are connected end-to-end on the time axis without overlap, after arranging according to the ascending order of the starting acquisition time sequence, the i-th segment and the (i+1)-th segment in the SegsW list are strictly continuous in time. For the water quality dynamic causal state fragment set SegsQ, it is also arranged in ascending order based on the starting acquisition time sequence TstartQ of each fragment to obtain a list of water quality fragments that are sequentially continuous on the time axis. At this time, SegsW and SegsQ independently describe the fragmented representation of the trend of water level and water quality on the time axis, but the two are not necessarily completely aligned on the time boundary, because the turning point of water level trend and the turning point of water quality trend may occur at different specific times.

[0046] Step 1262: Using the location identifier of the monitoring point as an index, combine the water level dynamic causal state fragment set and the water quality dynamic causal state fragment set into a dynamic causal state fragment sequence corresponding to the monitoring point.

[0047] To enable correlation analysis between water level and water quality changes within a unified timeframe, the anomaly warning system performs a time interval alignment operation. Specifically, the system acquires the boundary timestamp sets of all segments in the water level dynamic causal state segment set SegsW and the boundary timestamp sets of water quality, takes the union of these two sets, and sorts the timestamps in the union in ascending order to obtain a unified time segmentation sequence. Based on this unified time segmentation sequence, the time axis is re-divided into a series of consecutive time intervals, with the start and end times of each interval derived from adjacent timestamps in the union.

[0048] For each unified time interval, the abnormal state early warning system retrieves the dominant water level dynamic causal state fragment for the longest duration within that time interval from the water level dynamic causal state fragment set SegsW, and the dominant water quality dynamic causal state fragment for the longest duration within that time interval from the water quality dynamic causal state fragment set SegsQ. The retrieved water level fragments and water quality fragments are paired and stored as a combined element in the dynamic causal state fragment sequence SeqPk corresponding to the monitoring point Pk. SeqPk is an ordered data structure where each position corresponds to a unified time interval, and the element at that position contains a reference or copy of a water level dynamic causal state fragment and a reference or copy of a water quality dynamic causal state fragment.

[0049] Thus, SeqPk achieves a collaborative piecewise representation of water level and water quality dynamic states on a unified time axis. For each unified time interval, the abnormal state early warning system assigns a segment sequence number, denoted as IdxSeg, to that interval, with the number incrementing from 1 in chronological order.

[0050] Step 1263: Traverse each groundwater dynamic causal state segment in the dynamic causal state segment sequence, extract the groundwater level values ​​corresponding to all groundwater level acquisition time sequence nodes in the node set covered by the groundwater dynamic causal state segment, calculate the cumulative change of groundwater level and the average rate of change of groundwater level within the duration of the groundwater dynamic causal state segment, and record the cumulative change of groundwater level and the average rate of change of groundwater level as the groundwater level dynamic description parameters of the groundwater dynamic causal state segment.

[0051] For each water level dynamic causal state segment SgWm in the dynamic causal state segment sequence SeqPk, the abnormal state early warning system obtains its start acquisition time series TstartW and end acquisition time series TendW based on the time range attribute recorded in the segment. Subsequently, it retrieves the groundwater level values ​​Wstart and Wend corresponding to time TstartW from the list of node identifiers covered by the segment. The cumulative change in groundwater level ΔWacc is calculated by subtracting Wstart from Wend; this parameter, in units of length, characterizes the overall magnitude of groundwater level change within the segment's duration. The average rate of change in groundwater level Vw is calculated by dividing ΔWacc by the duration ΔTW = TendW - TstartW; this parameter, in units of water level change divided by time, characterizes the intensity of groundwater level change within the segment's duration. The abnormal state early warning system records ΔWacc and Vw as a key-value pair in the groundwater level dynamics description parameter attribute of this causal state segment of water level dynamics, denoted as ParamW={ΔWacc, Vw}. These two parameters quantitatively characterize the water level dynamics features within this segment from the dimensions of total volume and rate, respectively.

[0052] Step 1264: Traverse each water quality dynamic causal state segment in the dynamic causal state segment sequence, extract the groundwater quality values ​​corresponding to all groundwater quality collection time sequence nodes in the node set covered by the water quality dynamic causal state segment, calculate the cumulative change of groundwater quality and the average change rate of groundwater quality within the duration interval of the water quality dynamic causal state segment, and record the cumulative change of groundwater quality and the average change rate of groundwater quality as the groundwater quality dynamic description parameters of the water quality dynamic causal state segment.

[0053] For each water quality dynamic causal state segment SgQn in the causal state segment sequence SeqPk, the anomaly warning system acquires its start acquisition time TstartQ and end acquisition time TendQ, and reads the groundwater quality value Qstart corresponding to time TstartQ and the groundwater quality value Qend corresponding to time TendQ. The cumulative change in groundwater quality ΔQacc is calculated by subtracting Qstart from Qend. This parameter, in units of water quality index concentration, characterizes the overall magnitude of groundwater quality concentration change during the segment's duration. The average rate of change in groundwater quality Vq is calculated by dividing ΔQacc by the duration ΔTQ = TendQ - TstartQ. This parameter, in units of concentration change divided by time, characterizes the severity of groundwater quality concentration change during the segment's duration. The anomaly warning system records ΔQacc and Vq as a key-value pair in the groundwater quality dynamic description parameter attribute of this water quality dynamic causal state segment, denoted as ParamQ = {ΔQacc, Vq}.

[0054] At this point, step 120 is complete. After the above processing, the originally continuous monitoring curve is transformed into a structured kinetic causal state segment sequence SeqPk. Each element in the sequence simultaneously contains information on the trend direction of water level and water quality within the corresponding time interval, segment identification information, and kinetic description parameters that quantitatively describe the total amount and rate of change. Then, step 130 is initiated to construct a finite state machine model characterizing the state transition laws.

[0055] Step 130: Generate a finite state machine model based on the water level causal state transition directions between adjacent water level causal state segments and the water quality causal state transition directions between adjacent water quality causal state segments in the causal state segment sequence; wherein, the state nodes in the finite state machine model correspond to the water level causal state segments and the water quality causal state segments, and the directed transition edges in the finite state machine model correspond to the water level causal state transition directions and the water quality causal state transition directions.

[0056] The finite state machine model provides a directed graph-based abstract representation of the hydrogeochemical dynamic evolution of monitoring sites. In this model, each state node represents the joint dynamic state of the groundwater system at the monitoring site within a specific time period. This joint dynamic state is jointly defined by the causal segments of water level dynamics and water quality dynamics within that time period. The directed transition edges in the model depict the path and direction of transformation from one joint dynamic state to the next temporally adjacent joint dynamic state. The attributes of the directed transition edges include the direction of change in water level trends and the direction of change in water quality trends. By constructing the finite state machine model, the evolutionary process, originally existing as a sequence of fragments, is transformed into a state network structure that can be efficiently accessed and queried by graph traversal algorithms. The specific implementation of this step is further refined into the following sub-steps.

[0057] Step 131: Read the water level causal state segment identifier and the segment sequence number of the water level causal state segment in the continuous water level monitoring curve for each water level causal state segment from the causal state segment sequence; and read the water quality causal state segment identifier and the segment sequence number of the water quality causal state segment in the continuous water quality monitoring curve for each water quality causal state segment from the causal state segment sequence.

[0058] In step 1262, each element in the kinetic causal state segment sequence SeqPk has been assigned a unique segment sequence number IdxSeg, and the water level kinetic causal state segment contained in this element has its unique water level causal state segment identifier IDw, and the water quality kinetic causal state segment contained in this element has its unique water quality causal state segment identifier IDq. The abnormal state early warning system traverses all elements of SeqPk. For the i-th element, it reads its segment sequence number i and extracts the water level segment identifier IDwi and the water quality segment identifier IDqi from this element. This operation establishes the correspondence between the segment sequence number and the water level and water quality segment identifiers, providing an index basis for subsequently determining adjacent segment pairs.

[0059] Step 132: Determine adjacent water level dynamic causal state fragment pairs according to the fragment sequence number of the water level dynamic causal state fragments. The adjacent water level dynamic causal state fragment pairs consist of sequentially adjacent preceding water level dynamic causal state fragments and subsequent water level dynamic causal state fragments.

[0060] Since the elements in SeqPk are arranged in chronological order according to a unified time interval, their segment sequence numbering strictly follows the principle of temporal increment. The abnormal state early warning system can quickly locate two temporally consecutive causal state segments of water level dynamics by sequentially scanning the segment sequence numbers. Specifically, for segment SgWi with sequence number i and segment SgWi+1 with sequence number i+1, since their corresponding unified time intervals are contiguous on the time axis, they constitute a pair of adjacent causal state segments of water level dynamics. The abnormal state early warning system extracts adjacent water level segments pair by pair from the first element of SeqPk to the second-to-last element, forming a set of adjacent causal state segments of water level dynamics.

[0061] Step 133: For each pair of adjacent water level dynamic causal state segments, extract the groundwater level dynamic change trend direction of the preceding water level dynamic causal state segment and the groundwater level dynamic change trend direction of the subsequent water level dynamic causal state segment. Determine the water level causal state transition direction of the adjacent water level dynamic causal state segment based on the transformation process from the groundwater level dynamic change trend direction of the preceding water level dynamic causal state segment to the groundwater level dynamic change trend direction of the subsequent water level dynamic causal state segment.

[0062] For each pair of adjacent water level dynamic causal state segments (SgWi, SgWi+1) obtained from step 132, the abnormal state early warning system reads the intrinsic trend direction marker DirWi assigned to the preceding segment SgWi in step 122, and the intrinsic trend direction marker DirWi+1 of the following segment SgWi+1. The water level causal state transition direction is defined as a directed change pattern from DirWi to DirWi+1. The value space of the trend direction marker is {RisingW, FallingW, StableW}, so theoretically there are multiple possible combinations of directed change patterns. For example, if DirWi is StableW and DirWi+1 is FallingW, then the water level causal state transition direction of this segment pair can be encoded as StableW to FallingW. If DirWi is RisingW and DirWi+1 is RisingW, then the transition direction is RisingW continuing. The abnormal state early warning system assigns an enumerated encoding value, TransWCode, to each actual transition direction and stores this encoding value in association with the corresponding fragment pair. The water level causal state transition direction records the turning characteristics of groundwater level dynamics at the fragment boundary and is one of the core features upon which semantic violation detection relies.

[0063] Step 134: Determine adjacent water quality dynamics causal state fragment pairs according to the fragment sequence number of the water quality dynamics causal state fragments. The adjacent water quality dynamics causal state fragment pairs consist of sequentially adjacent preceding water quality dynamics causal state fragments and subsequent water quality dynamics causal state fragments.

[0064] Using the same method as in step 132, the abnormal state early warning system sequentially scans and extracts adjacent water quality dynamic causal state segment pairs based on the segment sequence number of each element in the dynamic causal state segment sequence SeqPk. For segment SgQj with sequence number j and segment SgQj+1 with sequence number j+1, since they are sequentially linked on the same time axis, they constitute a set of adjacent water quality dynamic causal state segment pairs. The abnormal state early warning system traverses SeqPk to form a set of adjacent water quality dynamic causal state segment pairs.

[0065] Step 135: For each pair of adjacent water quality dynamic causal state segments, extract the groundwater dynamic change trend direction of the preceding water quality dynamic causal state segment and the groundwater dynamic change trend direction of the subsequent water quality dynamic causal state segment. Determine the water quality causal state transition direction of the adjacent water quality dynamic causal state segment based on the transformation process from the groundwater dynamic change trend direction of the preceding water quality dynamic causal state segment to the groundwater dynamic change trend direction of the subsequent water quality dynamic causal state segment.

[0066] For each pair of adjacent water quality dynamic causal state segments (SgQj, SgQj+1), the abnormal state early warning system extracts the trend direction label DirQj of the preceding segment SgQj and the trend direction label DirQj+1 of the following segment SgQj+1. The value space of DirQj and DirQj+1 is {RisingQ, FallingQ, StableQ}.

[0067] The causal transition direction of water quality describes the transition mode from DirQj to DirQj+1, such as from StableQ to RisingQ, from RisingQ to RisingQ continuation, or from FallingQ to StableQ. The abnormal state early warning system assigns an enumerated type code value TransQCode to each actual water quality transition direction and stores it in association with the corresponding fragment pair. This process allows the dynamic inflection points of water quality parameters to be explicitly encoded, providing structured information for cross-modal joint analysis in the finite state machine model.

[0068] Step 136: Combining the causal transition direction of water level and the causal transition direction of water quality, create a set of state nodes and a set of directed transition edges for the finite state machine model. Generate a finite state machine model using the set of state nodes and the set of directed transition edges, and record the mapping relationship.

[0069] After obtaining the causal transition directions of water level and water quality of adjacent fragment pairs, a directed graph structure representing the dynamic evolution of monitoring point Pk can be constructed. This step is further subdivided into sub-processes of constructing state nodes, constructing directed transition edges and synthetic models and establishing mapping indexes.

[0070] Step 1361: Create a set of state nodes for the finite state machine model. Each state node in the set corresponds to a pair of the water level dynamics causal state segments and the water quality dynamics causal state segments. The pairing is based on the fact that the segment sequence number of the water level dynamics causal state segment is the same as the segment sequence number of the water quality dynamics causal state segment.

[0071] In the causal state sequence SeqPk, the water level causal state segment and the water quality causal state segment located at the same position (i.e., with the same segment sequence number IdxSeg) correspond to the same unified time interval. They jointly describe the joint dynamic state of the monitoring point in the two dimensions of groundwater level and groundwater quality within this time interval. The abnormal state early warning system creates a state node, denoted as Nd, for each element in SeqPk.

[0072] To facilitate unique identification, each state node is assigned a node identifier NodeID. NodeID can be generated by concatenating the monitoring point identifier Pid and the segment sequence number IdxSeg. The data structure of state node Nd includes the following attributes: node identifier NodeID, corresponding segment sequence number IdxSeg, reference or identifier IDw of the associated water level dynamics causal state segment, reference or identifier IDq of the associated water quality dynamics causal state segment, water level trend direction marker DirW, and water quality trend direction marker DirQ. The set of all state nodes constitutes the state node set N={Nd1, Nd2, ..., Ndk} of the finite state machine model, where k equals the total number of elements in SeqPk.

[0073] Step 1362: Create a set of directed transition edges for the finite state machine model. Each directed transition edge in the set points from the state node corresponding to the preceding water level dynamics causal state segment and the preceding water quality dynamics causal state segment to the state node corresponding to the following water level dynamics causal state segment and the following water quality dynamics causal state segment. The transition attributes of the directed transition edge include the water level causal state transition direction and the water quality causal state transition direction.

[0074] Based on the order of elements in the dynamic causal state fragment sequence SeqPk, there is a temporal evolution relationship between the i-th state node Ndi and the (i+1)-th state node Ndi+1. The abnormal state early warning system creates a directed transition edge, denoted as Ei, for each pair of temporally adjacent state nodes. The starting node of the directed transition edge is Ndi, and the ending node is Ndi+1, with the direction pointing from the starting node to the ending node.

[0075] In the data structure of the directed transition edge Ei, the identifiers of the preceding and following state nodes corresponding to the edge are recorded. The water level causal state transition direction TransWi determined in step 133 and the water quality causal state transition direction TransQi determined in step 135 are stored as transition attributes in the attribute set of the edge. The set of all directed transition edges constitutes the set of directed transition edges E={E1, E2, ..., Ek-1} of the finite state machine model.

[0076] Step 1363: Combine the set of state nodes and the set of directed transition edges into a finite state machine model corresponding to the monitoring point. In the finite state machine model, record the mapping relationship between the node identifier of each state node and the water level dynamic causal state segment identifier and the water quality dynamic causal state segment identifier corresponding to the state node. In the finite state machine model, assign a directed transition edge identifier to each directed transition edge and record the correspondence between the directed transition edge identifier and the water level causal state transition direction and the water quality causal state transition direction.

[0077] The set of state nodes N and the set of directed transition edges E are combined to form a directed graph structure GraphPk=(N,E), which is the finite state machine model corresponding to the monitoring point Pk. To ensure good traceability of the model, the abnormal state early warning system establishes a bidirectional mapping index within the model.

[0078] First, a mapping table MapNodeToSeg is established, which maps node identifiers NodeID to water level causal state segment identifiers IDw and water quality causal state segment identifiers IDq. This mapping table enables subsequent processing to quickly locate the corresponding original monitoring curve segment through the status node, thereby obtaining the segment's start time, end time, and dynamic description parameters.

[0079] Secondly, a globally unique directed transition edge identifier, EdgeID, is assigned to each directed transition edge in the finite state machine model. A mapping table, MapEdgeToTrans, is established from EdgeID to the TransWCode (water level causal transition direction) and TransQCode (water quality causal transition direction). This mapping table records the cross-modal trend transition type represented by each edge. At this point, a complete and traceable finite state machine model is constructed and persistently stored in the model library for use in state transition path extraction and violation detection processing.

[0080] After generating finite state machine models for each monitoring point, step 140 is performed to examine the state transition paths in the models in order to identify any abnormal segments that may violate the causal logic of the natural evolution of groundwater.

[0081] Step 140: Extract the state transition path of the monitoring point under continuous acquisition time sequence through the finite state machine model, and call the preset irreversible causal semantic rule set to perform pattern semantic violation identification processing on the state transition path, and generate the illegal transition segment in the state transition path that violates any irreversible causal semantic rule in the irreversible causal semantic rule set.

[0082] The state transition path represents the macroscopic evolution trajectory of the groundwater state at a monitoring point over time. It is a sequence of state nodes that are activated sequentially in the finite state machine model from the initial monitoring period to the latest monitoring period. The core of identifying violations in this path lies in verifying whether its evolution pattern conforms to the irreversible causal logic of the groundwater system under natural hydrogeological conditions or known controllable anthropogenic disturbances.

[0083] For example, under natural conditions, groundwater level rise caused by precipitation infiltration is usually accompanied by a dilution effect on groundwater quality (a decrease or stabilization of water quality concentration). If a segment of rising water level is observed to be closely coupled temporally with a segment of rapid increase in water quality concentration, it may indicate the intrusion of exogenous water bodies carrying pollutants, constituting a violation at the causal semantic level. This step locates the violation segment by calling a pre-built set of irreversible causal semantic rules to perform pattern matching on the transition direction sequence in the state transition path. The specific implementation of this step is further refined into the following sub-steps.

[0084] Step 141: Read the node identifier of each state node in the state node set and the segment sequence number corresponding to the state node from the finite state machine model, and read the previous state node identifier and the next state node identifier connected to each directed transition edge in the directed transition edge set, as well as the water level causal state transition direction and the water quality causal state transition direction of each directed transition edge.

[0085] The abnormal state early warning system traverses the set of state nodes N from the constructed finite state machine model GraphPk, reading the node identifier NodeID and its corresponding segment sequence number IdxSeg for each state node, forming a list corresponding to node numbers and time sequence. Subsequently, the system traverses the set of directed transition edges E, reading the preceding state node identifier NodeIDfrom and the following state node identifier NodeIDto for each directed transition edge Ei, and obtaining the corresponding water level causal state transition direction TransWCode and water quality causal state transition direction TransQCode through the mapping table MapEdgeToTrans. The information obtained provides the basic data for subsequent extraction of state transition paths and construction of transition direction sequences.

[0086] Step 142: Take the state node with the smallest segment sequence number in the finite state machine model as the starting state node, and traverse the state nodes in the finite state machine model sequentially along the direction of the directed transition edge. Arrange the state nodes passed during the traversal in the traversal order to form the state transition path of the monitoring point under continuous acquisition time sequence.

[0087] Because the directed transition edges in the finite state machine model strictly follow the chronological order (i.e., the direction of the edge always points from the state node with the smaller segment sequence number to the state node with the larger segment sequence number), the directed graph is a directed acyclic graph. The abnormal state early warning system first searches for the state node with segment sequence number IdxSeg equal to 1 in the set of state nodes N, and determines it as the starting state node Ndstart.

[0088] Then, with Ndstart as the current node, search for an outgoing edge in the directed transition edge set E that uses the node identifier of the current node as the identifier of the preceding state node. If an outgoing edge exists, move along the outgoing edge to its successor node, add the successor node to the traversal path list, and update the successor node to the current node. Repeat this search and movement process. If the current node does not have an outgoing edge, it indicates that the final state node of the finite state machine model has been reached, and the traversal process ends. The state nodes visited in sequence during the traversal are arranged in the order they were visited, forming an ordered sequence of state nodes. This sequence is the state transition path of the monitoring point Pk under continuous acquisition time sequence, denoted as PathPk. Each state node in PathPk corresponds to a unified time interval. This path macroscopically describes all the joint dynamic states experienced by the monitoring point from the start of the monitoring cycle to the current time and their evolution sequence.

[0089] Step 143: Invoke the preset set of irreversible causal semantic rules. Each irreversible causal semantic rule in the set defines the event occurrence order constraint relationship between the groundwater level dynamics causal state transition direction sequence and the groundwater quality dynamics causal state transition direction sequence. The event occurrence order constraint relationship is used to limit the causal state transition direction combination sequence that should not appear in the normal evolution process that conforms to the natural hydrogeological conditions of groundwater.

[0090] The irreversible causal semantic rule set RuleSet is a predefined set of logical constraints stored in a rule base. Each rule in RuleSet is assigned a unique rule ID, RuleID. Each rule contains two core components: a water level transition pattern subsequence PatternW and a water quality transition pattern subsequence PatternQ, as well as a temporal correspondence constraint between them. PatternW is an ordered sequence composed of water level causal transition direction codes TransWCode, describing the trend change pattern of groundwater level in multiple consecutive state transitions, such as two consecutive "stable to declining" transitions, or "stable to declining" followed by "declining to stable". PatternQ is also an ordered sequence composed of water quality causal transition direction codes TransQCode, describing the trend change pattern of groundwater quality within the same time span. The temporal correspondence constraint specifies the one-to-one correspondence between PatternW and PatternQ in sequence positions, and specific code combinations that are not allowed to appear simultaneously between the two.

[0091] For example, one irreversible causal semantic rule could stipulate that when a "stable to declining water level" transition occurs in PatternW, a "stable to rapidly rising water quality" transition must not occur in the corresponding PatternQ. This is because, under conditions of natural groundwater discharge or normal extraction, a decline in water level accompanied by a rapid increase in water quality concentration often points to the intervention of exogenous pollutants. The rule base can be constructed based on a systematic review of the knowledge of experts in the field of hydrogeology, or it can be semi-automatically generated by automatically mining frequently occurring normal transition patterns from a large amount of historical compliant monitoring data and summarizing abnormal deviation patterns.

[0092] Step 144: Extract the sequence of water level causal state transition directions and the sequence of water quality causal state transition directions between consecutively traversed state nodes from the state transition path. The sequence of water level causal state transition directions is composed of the water level causal state transition directions of each directed transition edge in the state transition path arranged in traversal order. The sequence of water quality causal state transition directions is composed of the water quality causal state transition directions of each directed transition edge in the state transition path arranged in traversal order.

[0093] Based on the traversal order of state nodes in the state transition path PathPk obtained in step 142, the abnormal state early warning system determines the sequence of directed transition edges traversed sequentially on the path. Specifically, for the m-th state node Ndm and the (m+1)-th state node Ndm+1 in PathPk, a directed transition edge is retrieved from the directed transition edge set E that uses the node identifier of Ndm as the preceding node identifier and the node identifier of Ndm+1 as the following node identifier. This edge is the m-th directed transition edge Em on the path. All sequentially retrieved directed transition edges are arranged in ascending order of m to form the edge sequence EdgeSeq.

[0094] Subsequently, the abnormal state early warning system traverses each edge in EdgeSeq, reads its water level causal state transition direction code TransWCode through the mapping table MapEdgeToTrans, and concatenates these codes sequentially according to the edge order to form the water level causal state transition direction sequence SeqTransW. Similarly, it reads the water quality causal state transition direction code TransQCode of each edge and concatenates them sequentially to form the water quality causal state transition direction sequence SeqTransQ. SeqTransW and SeqTransQ have the same sequence length, and the transition directions at the same index position in the sequences correspond to the same directed transition edge in the state transition path, i.e., they are strictly corresponding in time. These two sequences constitute the input feature sequences for pattern semantic violation identification.

[0095] Step 145: Perform pattern matching processing on the sequence of causal transitions of water level and water quality and the sequence of causal transitions of water quality with the event occurrence order constraint relationship specified by each irreversible causal semantic rule in the set of irreversible causal semantic rules.

[0096] The purpose of pattern matching is to search in SeqTransW and SeqTransQ for a subsequence that matches a transition pattern prohibited by any rule in the RuleSet.

[0097] The abnormal state early warning system iterates through each rule in the RuleSet, obtaining the water level transition pattern subsequence PatternWr and the water quality transition pattern subsequence PatternQr for that rule. Let the length of PatternWr be Lr. The abnormal state early warning system uses a sliding window approach on SeqTransW. For each window's starting position p, a continuous subsequence SubSeqWp of length Lr starting from p is extracted from SeqTransW, and simultaneously, a continuous subsequence SubSeqQp of the same position interval and length is extracted from SeqTransQ. SubSeqWp is compared position-by-position with PatternWr, and SubSeqQp is compared position-by-position with PatternQr.

[0098] A match with rule Ruler is determined to have occurred at the window start position p if and only if the code for each transition direction in SubSeqWp is identical to the code at the corresponding position in PatternWr, and the code for each transition direction in SubSeqQp is identical to the code at the corresponding position in PatternQr. If no match is found for any rule in RuleSet, it indicates that the state transition path does not contain a known illegal transition pattern. If a match is successful, the matched rule RuleID, the starting edge index pStart, and the ending edge index pStart+Lr-1 are recorded.

[0099] Step 146: Generate illegal transition description information for the illegal transition fragment based on pattern matching processing.

[0100] Based on the pattern matching results from step 145, this step distinguishes between compliant and non-compliant scenarios and processes them separately, generating corresponding descriptive information.

[0101] Step 1461: When the continuous subsequence in the water level causal transition direction sequence and the continuous subsequence corresponding to the position in the water quality causal transition direction sequence both match the event occurrence order constraint relationship prohibited by any irreversible causal semantic rule, the directed transition edge sequence corresponding to the successfully matched continuous subsequence in the water level causal transition direction sequence is determined as an illegal transition segment.

[0102] Once at least one match is found in step 145, the anomaly warning system records the starting edge index pStart and the ending edge index pEnd corresponding to the match. These two indices define a continuous directed transition edge subsequence in the directed transition edge sequence EdgeSeq. The state transition path segment corresponding to this directed transition edge subsequence is the illegal transition segment, denoted as SegViolation. An illegal transition segment is a specific interval in the state transition path where there is a causal logical anomaly. The water level and water quality transition patterns within this interval jointly violate the causal order constraints that should be followed by the natural evolution of groundwater. There may be multiple illegal transition segments in a state transition path. The anomaly warning system independently marks an illegal transition segment at each successfully matched location.

[0103] Step 1462: When neither the water level causal state transition direction sequence nor the water quality causal state transition direction sequence matches any event occurrence order constraint relationship prohibited by any irreversible causal semantic rule, a path compliance identifier is generated to indicate that the state transition path does not have a pattern semantic violation.

[0104] If no match is found after the sliding window matching process in step 145, it indicates that all state transitions at the monitoring point within the current monitoring period conform to known irreversible causal semantic rules. The abnormal state early warning system generates a specific path compliance identifier, denoted as FlagCompliant, and stores this identifier in association with the monitoring point Pk and the current state transition path PathPk. The existence of the path compliance identifier means that, based on the existing knowledge base, the groundwater dynamics evolution process at this monitoring point does not exhibit causal anomalies.

[0105] Step 1463: For each directed transition edge sequence identified as an illegal transition segment, extract the preceding and following state nodes corresponding to each directed transition edge contained in the illegal transition segment.

[0106] For each illegal transition segment (SegViolation), the segment consists of a continuous edge from index pStart to pEnd in the directed transition edge sequence EdgeSeq. The abnormal state early warning system traverses each directed transition edge Ek in this edge sequence, reading the preceding state node identifier NodeIDfrom and the following state node identifier NodeIDto recorded in its data structure. These state node identifiers will be used to subsequently obtain the associated water level and water quality dynamic causal state segments from the state node set.

[0107] Step 1464: Obtain the water level dynamics causal state fragment and water quality dynamics causal state fragment corresponding to the preceding state node and the water level dynamics causal state fragment and water quality dynamics causal state fragment corresponding to the following state node from the state node set.

[0108] Using the mapping table MapNodeToSeg established in step 1363, the abnormal state early warning system queries the water level causal state segment identifier IDwfrom and the water quality causal state segment identifier IDqfrom associated with the preceding state node using the preceding state node identifier NodeIDfrom. Similarly, it queries IDwto and IDqto using the following state node identifier NodeIDto. Through the segment identifiers, specific water level dynamic causal state segment objects and water quality dynamic causal state segment objects can be further indexed from the dynamic causal state segment sequence SeqPk, thereby obtaining segment features such as their start acquisition time sequence, end acquisition time sequence, and dynamic description parameters.

[0109] Step 1465: Combine the directed transition edge identifier of each directed transition edge contained in the illegal transition segment, the causal transition direction of the water level, the causal transition direction of the water quality, and the rule number of the matched irreversible causal semantic rule into the illegal transition description information of the illegal transition segment.

[0110] For each directed transition edge contained in the illegal transition segment SegViolation, the abnormal state early warning system assembles a structured violation description entry. This entry contains the following fields: EdgeID (directed transition edge identifier), TransWCode (water level causal transition direction code), TransQCode (water quality causal transition direction code), and RuleID (rule number of the matched irreversible causal semantic rule). The description entries of all edges in the illegal transition segment are arranged sequentially and, together with the start edge index pStart and end edge index pEnd of the illegal transition segment, constitute the violation transition description information ViolationInfo for that illegal transition segment. ViolationInfo completely records the location of the violation, the involved transition edges, the transition direction, and the specific rule violated, providing detailed and interpretable information for subsequent generation of early warning commands.

[0111] After identifying the illegal transition segments in the state transition path and generating illegal transition description information, step 150 is entered, where the anomaly discovery at the causal logic level is transformed into a groundwater anomaly state early warning instruction containing spatiotemporal positioning information that can be directly used by on-site operation and maintenance personnel or downstream automation systems.

[0112] Step 150: Based on the temporal position of the illegal transition segment in the state transition path, and the segment characteristics of the water level dynamics causal state segment and the water quality dynamics causal state segment corresponding to the illegal transition segment, generate a groundwater abnormal state early warning command containing the illegal geographic coordinate point marker.

[0113] The purpose of generating early warning instructions is to instantiate abstract causal logic violations into specific geospatial locations and time windows, thereby guiding subsequent on-site verification, encrypted monitoring, or emergency response actions. The specific implementation of this step is further refined into the following sub-steps.

[0114] Step 151: Obtain the preceding and following state nodes corresponding to each directed transition edge contained in the illegal transition segment; extract the water level causal state segment identifier and the water quality causal state segment identifier of the water level dynamics causal state segment corresponding to the preceding state node from the preceding state node; extract the water level causal state segment identifier and the water quality causal state segment identifier of the water quality dynamics causal state segment corresponding to the following state node from the following state node.

[0115] For each identified violation (SegViolation), the abnormal state early warning system, based on the preceding and following state node identifiers extracted in step 1463, again utilizes the mapping table MapNodeToSeg to obtain the water level causal state segment identifier and water quality causal state segment identifier corresponding to the state node at the boundary of the violation segment. Specifically, for the first directed transition edge in the violation segment, the water level causal state segment identifier associated with its preceding state node is denoted as IDwViolationStart, and the water quality causal state segment identifier is denoted as IDqViolationStart. For the last directed transition edge in the violation segment, the water level causal state segment identifier associated with its following state node is denoted as IDwViolationEnd, and the water quality causal state segment identifier is denoted as IDqViolationEnd. These identifiers provide an index entry for subsequently determining the start and end times of the violation.

[0116] Step 152: Based on the water level dynamic causal state segment identifier corresponding to the preceding state node and the water level dynamic causal state segment identifier corresponding to the following state node, read the start and end acquisition timing of the water level dynamic causal state segment corresponding to the preceding state node and the start and end acquisition timing of the water level dynamic causal state segment corresponding to the following state node from the dynamic causal state segment sequence.

[0117] The abnormal state early warning system uses IDwViolationStart as the keyword to retrieve the corresponding water level dynamic causal state segment object in the dynamic causal state segment sequence SeqPk, and reads the start acquisition time sequence TstartWStart and the end acquisition time sequence TendWStart stored in its attributes. Similarly, it uses IDwViolationEnd as the keyword to retrieve the corresponding water level dynamic causal state segment object, and reads its start acquisition time sequence TstartWEnd and the end acquisition time sequence TendWEnd.

[0118] Step 153: Based on the water quality dynamics causal state segment identifier corresponding to the preceding state node and the water quality dynamics causal state segment identifier corresponding to the following state node, read the start and end acquisition timing of the water quality dynamics causal state segment corresponding to the preceding state node and the start and end acquisition timing of the water quality dynamics causal state segment corresponding to the following state node from the dynamics causal state segment sequence.

[0119] Using the same retrieval method as in step 152, the abnormal state early warning system uses IDqViolationStart and IDqViolationEnd as keywords to read the start acquisition time series TstartQStart, end acquisition time series TendQStart, start acquisition time series TstartQEnd, and end acquisition time series TendQEnd of the corresponding water quality dynamics causal state segment objects from SeqPk. Since water level and water quality have a corresponding relationship within a unified time interval, TstartQStart and TstartQStart usually point to the same or very close time, as do TendQEnd and TendQEnd.

[0120] Step 154: The starting acquisition time of the water level dynamic causal state segment corresponding to the preceding state node is taken as the starting time point of the illegal phenomenon of the illegal transition segment, and the ending acquisition time of the water level dynamic causal state segment corresponding to the following state node is taken as the ending time point of the illegal phenomenon of the illegal transition segment.

[0121] Violations in the physical world manifest as a continuous process, rather than isolated points in time. To fully cover the period from the incubation to completion of a violation jump, the anomaly warning system defines the start time point TstartWStart of the water level segment before the first jump in the violation jump segment as TstartViolation, and the end time TendWEnd of the water level segment after the last jump as TendViolation. The resulting violation time window [TstartViolation, TendViolation] fully encompasses the time span corresponding to the violation jump segment and provides a clear time range for subsequent warning information.

[0122] Step 155: Obtain the geographical coordinates of the monitoring point in the groundwater monitoring well group.

[0123] Each monitoring point Pk has its precise geodetic coordinates bound to the monitoring point attribute database during system initialization. The geodetic coordinates can be represented as a combination of longitude (Lon) and latitude (Lat), denoted as CoordinatePk = (LonPk, LatPk). The abnormal status early warning system uses the point identifier Pid of the currently violating monitoring point as the key to query the monitoring point attribute database and obtain the corresponding geographic coordinates of the monitoring point.

[0124] Step 156: Combine the start time of the violation, the end time of the violation, the geographical coordinates of the monitoring point, the identifier of the water level dynamic causal state segment involved in the violation transition segment, the identifier of the water quality dynamic causal state segment involved in the violation transition segment, and the rule number of the irreversible causal semantic rule matched by the violation transition segment into a warning information structure.

[0125] The abnormal state early warning system constructs a structured object, denoted as AlertStruct. AlertStruct contains the following fields: AlertStartTime, assigned the value TstartViolation; AlertEndTime, assigned the value TendViolation; AlertLocation, assigned the value CoordinatePk; InvolvedIDwList, assigned a list of identifiers of all water level dynamic causal state segments involved in the illegal transition segment; InvolvedIDqList, assigned a list of identifiers of all water quality dynamic causal state segments involved in the illegal transition segment; and ViolatedRuleID, assigned the RuleID, the rule number of the irreversible causal semantic rule matched in this violation, recorded in step 1465. The AlertStruct structure completely encapsulates the spatiotemporal information of an abnormal state event, the range of monitoring data segments involved, and the violated causal logic rules.

[0126] Step 157: Generate a groundwater anomaly warning command containing the location markers of the violation geographic coordinates based on the warning information structure.

[0127] The abnormal status early warning system serializes the AlertStruct structure into a preset inter-system communication message format. For example, the AlertStruct can be encoded using a lightweight data exchange format in key-value pairs to generate a text string containing all the aforementioned fields. This text string is the groundwater abnormal status early warning command. The early warning command explicitly includes the geographic coordinates of the violation (represented by the AlertLocation field), allowing the monitoring terminal or mobile application receiving the command to visually display the location of the anomaly on an electronic map as a highlighted icon or flashing marker. Simultaneously, the early warning command also includes the start and end times of the violation and the violated rule number, providing crucial information for operations and maintenance personnel to understand the nature and severity of the anomaly.

[0128] After generating an early warning instruction for a single monitoring point, in order to further enhance the ability to perceive and trace regional groundwater anomalies, the method of this application embodiment may further include steps 210 to 240, using a finite state machine model of multiple monitoring points within the well group to perform causal propagation analysis across points, thereby realizing directional source tracing reasoning for hydrogeological anomalies.

[0129] Step 210: Obtain the finite state machine model corresponding to each monitoring point, and extract the water level causal state transition direction sequence and water quality causal state transition direction sequence associated with the illegal transition segment in the groundwater abnormal state early warning instruction as the abnormal causal state transition mode.

[0130] When a monitoring point (denoted as the starting monitoring point Psource) within the monitoring well group triggers the generation of a groundwater anomaly warning command, the anomaly warning system parses the ViolatedRuleID field from the AlertStruct structure corresponding to the warning command, and uses the rule number to look up the corresponding water level transition pattern subsequence PatternWAnomaly and water quality transition pattern subsequence PatternQAnomaly in the rule base.

[0131] Simultaneously, the abnormal state early warning system extracts the actual water level and water quality transition direction sequences involved in the illegal transition segments from InvolvedIDwList and InvolvedIDqList, and compares them with PatternWAnomaly and PatternQAnomaly for confirmation. This ultimately yields water level causal transition direction sequence templates and corresponding water quality causal transition direction sequence templates that accurately reflect the causal logic of this anomaly. This pair of sequence templates is defined as the abnormal causal transition pattern, denoted as AnomalyPattern={TemplateW, TemplateQ}. AnomalyPattern will serve as a query template for searching for similar abnormal signals in the spatial dimension.

[0132] Step 220: Taking the monitoring point corresponding to the illegal geographic coordinate point mark as the starting monitoring point, traverse the finite state machine model corresponding to each of the other monitoring points in the groundwater monitoring well group, and identify the set of directed transition edges that satisfy the causal transition synchronization constraint condition with the abnormal causal transition mode in time from the finite state machine model corresponding to each of the other monitoring points. The causal transition synchronization constraint condition is used to limit the order of occurrence and time delay window of causal transition events between different monitoring points on the same hydrogeological connection path.

[0133] For each monitoring point Pother within the groundwater monitoring well group, excluding the starting monitoring point Psource, the anomaly warning system obtains its finite state machine model GraphPother, which was constructed and persistently stored in step 130. Subsequently, the anomaly warning system performs a subgraph matching query in the directed transition edge set Eother of GraphPother. The query process includes two stages: pattern similarity matching and temporal causal constraint verification. In the pattern similarity matching stage, the anomaly warning system extracts state transition paths from GraphPother and generates its water level causal state transition direction sequence and water quality causal state transition direction sequence according to the method in step 144. Then, using a sliding window matching algorithm similar to that in step 145, it searches for whether there exists a transition direction subsequence that matches TemplateW and TemplateQ in AnomalyPattern.

[0134] If a subsequence highly similar to the abnormal causal state transition pattern is matched in the state transition path of Pother, the directed transition edge subset corresponding to the matched subsequence and its occurrence time window [TstartOther, TendOther] in Pother are recorded. During the temporal causal constraint verification stage, the abnormal state early warning system obtains the starting time point TstartSource of the illegal phenomenon of the illegal transition segment in the starting monitoring point Psource. Then, it determines whether the time difference ΔT = TstartOther - TstartSource between TstartOther and TstartSource falls within the time delay window interval [TminDelay, TmaxDelay] defined by the preset causal state transition synchronization constraint condition. This time delay window interval is a reasonable propagation time range estimated in advance based on the hydrogeological parameters (such as aquifer permeability coefficient, hydraulic gradient, porosity) of the area where the monitoring well group is located and the spatial distance between the monitoring points, through Darcy's law or the theory of groundwater solute transport. Only when ΔT is greater than zero and falls within the time delay window interval is the directed transition edge subset in Pother determined to have a causal propagational relationship with the illegal transition segment in Psource, and it is identified as a directed transition edge subset with a causal relationship.

[0135] Step 230: Based on the temporal distribution of the subset of directed transition edges identified in each of the remaining monitoring points in their respective state transition paths, construct a cross-point causal state propagation directed topology graph with the starting monitoring point as the root node. In the cross-point causal state propagation directed topology graph, the nodes represent monitoring point identifiers, the directed edges represent the causal state propagation relationship from the upstream monitoring point to the downstream monitoring point, and each directed edge carries a propagation delay interval marker.

[0136] The abnormal state early warning system initializes an empty graph structure, GraphProp, to represent the causal propagation relationship across points. First, a root node, NodeSource, representing the starting monitoring point Psource, is created in GraphProp. For each monitoring point Pother, whose subset of directed transition edges with causal relationships was identified in step 220, the abnormal state early warning system creates a node NodeOther representing that point in GraphProp and creates a directed edge EdgeProp from NodeSource to NodeOther. The properties of this directed edge record the actual observed propagation delay ΔT and the corresponding delay window interval [TminDelay, TmaxDelay]. If, during subsequent analysis of other monitoring points, an abnormal signal at a monitoring point Pthird is found to occur later than that of Pother, yet shares a similar pattern with Pother and satisfies the delay constraints, a further directed edge from NodeOther to NodeThird is created, and the corresponding propagation delay information is recorded.

[0137] Through this layer-by-layer expansion, the abnormal state early warning system gradually constructs a cross-point causal propagation directed topology with the earliest monitoring point where the violation occurred as the root node and the possible flow paths of groundwater as the edge directions. This topology intuitively reveals the spatiotemporal propagation sequence of abnormal signals in the monitoring well group.

[0138] Step 240: Based on the cross-point causal propagation directed topology graph, perform pollution source directional inversion inference on the groundwater monitoring well group to generate hydrogeological anomaly tracing instructions.

[0139] After obtaining the directed topological graph GraphProp, which shows the causal propagation across points, the anomaly warning system analyzes the structural features of the graph to invert the source of the anomaly. First, it identifies nodes in GraphProp with an in-degree of zero, that is, nodes that have no other monitoring points pointing to them. These nodes with an in-degree of zero represent the monitoring points at the upstream position in the observed causal propagation chain and are potential anomaly origin regions.

[0140] Secondly, for each directed edge from the upstream node to the downstream node, the apparent propagation velocity of the anomalous signal is calculated using the propagation delay ΔT recorded in the edge attributes and the spatial straight-line distance or streamline distance between the two points. The calculated apparent propagation velocity is then compared with known hydrogeological parameters of the area (such as the empirical range of groundwater flow velocity) to eliminate false propagation edges whose apparent propagation velocity deviates significantly from the physically reasonable range.

[0141] In the filtered topology graph, nodes with an in-degree of zero and their associated upstream regions are inferred to be the most likely sources of pollution. The anomaly early warning system encapsulates the above source tracing inference results with a structured description of the cross-site causal propagation directed topology graph to generate a hydrogeological anomaly source tracing instruction. This instruction includes a recommended list of priority investigation and monitoring points, the timing sequence of anomalous signal reception at each point, and the inferred approximate direction of pollution plume migration, providing a scientific basis for subsequent refined on-site hydrogeological investigations or precise interception of pollution plumes.

[0142] Furthermore, after generating an early warning instruction for a single monitoring point, the method in this application embodiment may also include steps 310 to 340, which involves continuously tracking the evolution trend of the dynamic state after a violation occurs and dynamically adjusting the monitoring frequency to ensure close monitoring of the recovery process after an abnormal event occurs, while avoiding long-term ineffective occupation of monitoring resources.

[0143] Step 310: Parse the water level dynamic causal state fragment identifier and water quality dynamic causal state fragment identifier associated with the preceding and following state nodes corresponding to the illegal transition fragments from the groundwater abnormal state early warning command, and extract the duration interval before the violation and the duration interval after the violation from the dynamic causal state fragment sequence based on the water level dynamic causal state fragment identifier and the water quality dynamic causal state fragment identifier.

[0144] After generating a groundwater anomaly warning command, the abnormal state early warning system parses the water level causal state segment identifier IDwBefore associated with the first preceding state node and the water level causal state segment identifier IDwAfter associated with the last following state node, as well as the corresponding water quality causal state segment identifiers IDqBefore and IDqAfter, from the InvolvedIDwList and InvolvedIDqList fields of the corresponding AlertStruct structure. Using IDwBefore and IDqBefore, the abnormal state early warning system retrieves the corresponding water level and water quality segments from the dynamic causal state segment sequence SeqPk, obtaining their start acquisition time sequence TstartBefore and end acquisition time sequence TendBefore, respectively. The duration interval before the violation occurs is defined as the time period from TstartBefore to the start time of the first directed transition edge in the illegal transition segment. Similarly, using IDwAfter and IDqAfter, the corresponding segment is retrieved to obtain its start acquisition time sequence TstartAfter and end acquisition time sequence TendAfter. The duration of the violation is defined as the period from the termination time of the last directed jump edge in the violation jump segment to TendAfter.

[0145] Step 320: The groundwater level dynamics and groundwater quality dynamics parameters covered during the duration before the violation occurred are used as the baseline dynamics reference parameters, and the groundwater level dynamics and groundwater quality dynamics parameters covered during the duration after the violation occurred are used as the dynamics characterization parameters of the abnormal development.

[0146] For the duration before the violation occurs, the abnormal state early warning system extracts the average rate of change of groundwater level VwBefore and the cumulative change of groundwater level ΔWaccBefore from ParamW of each water level dynamic causal state segment within the interval. It calculates the arithmetic mean of these rates of change as the reference rate of change of groundwater level VwRef, and records the water level value and water quality value at the end of the interval as the reference state.

[0147] Similarly, the average rate of change of groundwater quality, VqBefore, is extracted from ParamQ of each water quality dynamic causal state segment within this interval, and the average value is calculated as the benchmark water quality change rate, VqRef. This set of benchmark values ​​is collectively referred to as the benchmark dynamic reference quantity RefDyn. For the duration interval after the violation, the anomaly early warning system extracts VwAfter and ΔWaccAfter of each water level dynamic causal state segment, and VqAfter and ΔQaccAfter of each water quality dynamic causal state segment within this interval, and calculates their arithmetic averages, VwAnom, ΔWaccAnom, VqAnom, and ΔQaccAnom, respectively. This set of averages is collectively referred to as the anomaly development dynamic characterization quantity, AnomDyn. AnomDyn reflects the intensity and rate of change of the groundwater system at the dynamic level after the violation event.

[0148] Step 330: In the finite state machine model, extend the state transition path backward and traverse the subsequent state nodes that have a directed transition edge connection with the subsequent state node. For each traversed subsequent state node, determine whether the direction of change reflected by the water level dynamics causal state segment and the water quality dynamics causal state segment corresponding to the subsequent state node shows a restorative causal evolution direction that deviates from the abnormal development dynamic characterization quantity relative to the reference dynamic quantity.

[0149] In the finite state machine model GraphPk, the abnormal state early warning system starts with the subsequent state node NdAfter of the illegal transition segment and sequentially visits its subsequent state nodes NdNext1, NdNext2, and so on, until the end of the path, following the direction of the directed transition edge. For each visited subsequent state node NdNext, the trend direction markers DirWNext and DirQNext of the associated water level dynamics causal state segment and the water quality dynamics causal state segment, as well as the corresponding dynamic description parameters ParamWNext and ParamQNext, are extracted. The logic for determining whether a restorative causal state evolution direction is present includes two levels: trend direction judgment and rate comparison.

[0150] At the trend direction level, if the water level change trend represented by AnomDyn is a rapid decline, while DirWNext shows a stable or rising water level, then it initially conforms to the directional characteristics of a restorative trend. At the rate comparison level, the deviation between the average rate of change VwNext in ParamWNext and the benchmark water level change rate VwRef is calculated. If the absolute value of VwNext is significantly smaller than the absolute value of VwAnom in AnomDyn, and its change direction is towards the benchmark state represented by RefDyn, then the establishment of a restorative trend is further confirmed. Combining the results of the trend direction and rate comparison, when it is determined that NdNext shows an evolution direction that deviates from the abnormal development dynamics and regresses towards the benchmark dynamics reference, then the subsequent state node is considered to show a restorative causal evolution direction.

[0151] Step 340: When it is determined that any subsequent state node exhibits a restorative causal evolution direction that deviates from the abnormal development dynamic characterization quantity, an adaptive reconfiguration instruction for monitoring frequency is generated.

[0152] Once a subsequent state node NdRecovery is detected to exhibit a restorative causal state evolution direction for the first time during the traversal process in step 330, the abnormal state early warning system triggers the monitoring frequency adaptive reconfiguration mechanism.

[0153] Specifically, the abnormal state early warning system generates an adaptive reconfiguration command for the monitoring frequency. The destination address of this command is the field data acquisition terminal corresponding to the monitoring point Pk that triggered the early warning, or the upper-level data gateway of that terminal. The command content includes the following reconfiguration parameters: switching the current monitoring frequency from the normal monitoring frequency FreqNormal to the recovery verification monitoring frequency FreqVerify, where the sampling interval of FreqVerify is significantly smaller than that of FreqNormal, in order to achieve intensive observation of the recovery process. The command also includes the start time and duration conditions for the reconfiguration to take effect.

[0154] The sustained condition is set as follows: within the subsequent S consecutive acquisition cycles (S being the pre-configured number of verification cycles), the water level and water quality data acquired in each cycle, after real-time identification in steps 120 to 140, are confirmed to have no new illegal transition segments, and the dynamic trend remains stable in the recovery direction. When this sustained condition is met, the abnormal state early warning system automatically generates a second adaptive reconfiguration command for the monitoring frequency, instructing the field data acquisition terminal to restore the monitoring frequency from FreqVerify to FreqNormal. If abnormal fluctuations are detected again during the recovery verification period, the sustained condition counter in the reconfiguration command is reset to zero and recounted. This mechanism dynamically optimizes the utilization efficiency of monitoring resources while ensuring that no signs of abnormal recurrence are missed.

[0155] Those skilled in the art can directly utilize the mature sliding time window matching function library and standard piecewise linear interpolation algorithm module in existing monitoring data acquisition systems to process data when performing time-series alignment verification and missing value interpolation, ensuring the temporal consistency of water level and water quality sequences. Regarding the setting of the minimum change resolution, a weighted calculation can be performed based on the sensor's factory-calibrated measurement accuracy indicators and the background fluctuation statistics accumulated over long-term operation of the monitoring points, in order to filter out the interference of instrument background noise on trend judgment.

[0156] In the dynamic causal state boundary delineation stage, the moving average smoothing preprocessing method commonly used in time series analysis and the change point scanning logic based on difference sign changes can be introduced to enhance the stability of identifying turning points in water level and water quality trends. When constructing the finite state machine model, the adjacency list storage method in graph data structures can be used to organize state nodes and directed transition edges, and a bidirectional index relationship between nodes and segments, and between edges and transition directions can be established through a key-value pair mapping table. The establishment of the irreversible causal semantic rule set can be based on the natural evolution logic of groundwater recharge, runoff, and discharge cycles within a regional hydrogeological unit. By enumerating the causal combination sequences between groundwater level rise and fall and water quality concentration increase and decrease that cannot coexist under natural conditions, a constraint rule base can be constructed.

[0157] For calculating the time delay window in cross-site propagation analysis, the reasonable upper and lower limits of pollutant propagation time in groundwater can be estimated based on the spatial distance between monitoring points in the well group, empirical values ​​of aquifer permeability coefficients, and average hydraulic gradient, combined with the one-dimensional convection transport equation. The adaptive adjustment function for monitoring frequency can be implemented by calling the remote parameter configuration interface built into the on-site telemetry terminal unit. After an anomaly is triggered, the value of the acquisition interval register can be dynamically modified, and the original acquisition interval parameters can be written back when the recovery conditions are met.

[0158] Please see Figure 2The figure is a schematic diagram of the basic structure of an abnormal state early warning system 200 provided in an embodiment of this application. The abnormal state early warning system 200 includes: a processor 201; a storage device 202 on which a computer program 2020 is stored; and a network interface 203 for providing network communication functions. When the computer program 2020 is executed by the processor 201, the processor 201 implements any of the abnormal state early warning methods applied to online monitoring of groundwater.

[0159] Please see Figure 3 This application provides a functional block diagram of an abnormal state early warning device, which includes: The monitoring record acquisition module is used to acquire the set of continuous monitoring records corresponding to each monitoring point in the groundwater monitoring well group. The set of continuous monitoring records includes the continuous water level monitoring curve and the continuous water quality monitoring curve arranged in the order of acquisition. The partition reconstruction processing module is used to divide the continuous water level monitoring curve into multiple water level dynamic causal state segments and the continuous water quality monitoring curve into multiple water quality dynamic causal state segments based on dynamic causal state partition reconstruction processing, thereby obtaining a sequence of dynamic causal state segments corresponding to the monitoring points. A state machine model generation module is used to generate a finite state machine model based on the water level causal state transition directions between adjacent water level causal state segments and the water quality causal state transition directions between adjacent water quality causal state segments in the causal state segment sequence; wherein, the state nodes in the finite state machine model correspond to the water level causal state segments and the water quality causal state segments, and the directed transition edges in the finite state machine model correspond to the water level causal state transition directions and the water quality causal state transition directions; The illegal transition detection module is used to extract the state transition path of the monitoring point under continuous acquisition time sequence through the finite state machine model, and call the preset irreversible causal semantic rule set to perform pattern semantic violation detection processing on the state transition path, and generate illegal transition fragments in the state transition path that violate any irreversible causal semantic rule in the irreversible causal semantic rule set. The early warning command generation module is used to generate an early warning command for groundwater anomaly status that includes the location markers of the violation geographic coordinates, based on the temporal position of the violation jump segment in the state jump path and the segment characteristics of the water level dynamics causal state segment and the water quality dynamics causal state segment corresponding to the violation jump segment.

[0160] Based on the above, a readable storage medium is provided, on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the above method are implemented.

[0161] Furthermore, it should be noted that this application also provides a computer program product, which may include a computer program that can be stored in a computer-readable storage medium. The processor of the abnormal state early warning system reads the computer program from the computer-readable storage medium, and the processor can execute the computer program, causing the abnormal state early warning system to perform the aforementioned... Figure 1 The methods described in the corresponding embodiments are already known, and therefore will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer program product embodiments related to this application, please refer to the description of the method embodiments of this application.

[0162] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.

Claims

1. An abnormal state early warning method applied to online monitoring of groundwater, characterized in that, The method includes: Obtain a set of continuous monitoring records corresponding to each monitoring point within the groundwater monitoring well group. The set of continuous monitoring records includes continuous water level monitoring curves and continuous water quality monitoring curves arranged in the order of collection time. Based on the dynamic causal state partitioning reconstruction process, the continuous water level monitoring curve is divided into multiple water level dynamic causal state segments and the continuous water quality monitoring curve is divided into multiple water quality dynamic causal state segments, thereby obtaining a dynamic causal state segment sequence corresponding to the monitoring point. A finite state machine model is generated based on the water level causal transition directions between adjacent water level causal state segments and the water quality causal transition directions between adjacent water quality causal state segments in the causal state segment sequence; wherein, the state nodes in the finite state machine model correspond to the water level causal state segments and the water quality causal state segments, and the directed transition edges in the finite state machine model correspond to the water level causal transition directions and the water quality causal transition directions; The state transition path of the monitoring point under continuous acquisition time sequence is extracted by the finite state machine model, and the state transition path is subjected to pattern semantic violation identification processing by calling the preset irreversible causal semantic rule set, thereby generating a violation transition segment in the state transition path that violates any irreversible causal semantic rule in the irreversible causal semantic rule set. Based on the temporal position of the illegal transition fragment in the state transition path, and the fragment characteristics of the water level dynamics causal state fragment and the water quality dynamics causal state fragment corresponding to the illegal transition fragment, an early warning command for groundwater anomaly state containing the illegal geographic coordinate point marker is generated.

2. The method of claim 1, wherein, The dynamic causal state partitioning reconstruction process divides the continuous water level monitoring curve into multiple dynamic causal state segments and the continuous water quality monitoring curve into multiple dynamic causal state segments, obtaining a sequence of dynamic causal state segments corresponding to the monitoring points, including: Extract the groundwater level value corresponding to each groundwater level collection time node in the continuous water level monitoring curve, and extract the groundwater quality value corresponding to each groundwater quality collection time node in the continuous water quality monitoring curve; The groundwater level values ​​are processed by first-order dynamic change trend extraction along the acquisition time sequence to obtain the groundwater level dynamic change trend direction of the continuous monitoring curve between adjacent groundwater level acquisition time sequence nodes. The groundwater level dynamic change trend direction includes the water level rising trend direction, the water level falling trend direction, and the water level stabilization trend direction. The groundwater quality values ​​are processed by first-order dynamic change trend extraction along the collection time sequence to obtain the groundwater quality dynamic change trend direction of the continuous monitoring curve between adjacent groundwater quality collection time nodes. The groundwater quality dynamic change trend direction includes the water quality concentration rising trend direction, the water quality concentration falling trend direction, and the water quality concentration stable trend direction. Based on the continuous interval of the groundwater level dynamic change trend direction in the continuous acquisition time sequence, the continuous groundwater level monitoring curve is divided into a causal state boundary. The continuous groundwater level acquisition time sequence node sequence with the same groundwater level dynamic change trend direction is divided into a groundwater level dynamic causal state segment. Based on the continuous interval of the groundwater quality dynamic change trend direction in the continuous acquisition time sequence, the continuous water quality monitoring curve is divided into causal state boundaries. The continuous groundwater quality acquisition time sequence node sequence with the same groundwater quality dynamic change trend direction is divided into a water quality dynamic causal state segment. By combining the water level dynamics causal state fragments and the water quality dynamics causal state fragments, a dynamics causal state fragment sequence is generated and traversed to obtain dynamic description parameters.

3. The method of claim 2, wherein, The process of combining the water level dynamics causal state fragments and the water quality dynamics causal state fragments to generate a causal state fragment sequence and traversing it yields dynamic description parameters, including: All the water level dynamic causal state segments are arranged according to the start and end acquisition times corresponding to the water level dynamic causal state segments to obtain a water level dynamic causal state segment set. All the water quality dynamic causal state segments are arranged according to the start and end acquisition times corresponding to the water quality dynamic causal state segments to obtain a water quality dynamic causal state segment set. Using the location identifier of the monitoring point as an index, the water level dynamic causal state fragment set and the water quality dynamic causal state fragment set are combined into a dynamic causal state fragment sequence corresponding to the monitoring point; Traverse each groundwater dynamic causal state segment in the dynamic causal state segment sequence, extract the groundwater level values ​​corresponding to all groundwater level acquisition time sequence nodes in the node set covered by the groundwater dynamic causal state segment, calculate the cumulative change of groundwater level and the average change rate of groundwater level within the duration of the groundwater dynamic causal state segment, and record the cumulative change of groundwater level and the average change rate of groundwater level as the groundwater level dynamic description parameters of the groundwater dynamic causal state segment. Traverse each water quality dynamic causal state segment in the sequence of dynamic causal state segments, extract the groundwater quality values ​​corresponding to all groundwater quality collection time sequence nodes in the node set covered by the water quality dynamic causal state segment, calculate the cumulative change of groundwater quality values ​​and the average change rate of groundwater quality within the duration of the water quality dynamic causal state segment, and record the cumulative change of groundwater quality values ​​and the average change rate of groundwater quality as the groundwater quality dynamic description parameters of the water quality dynamic causal state segment.

4. The method according to any one of claims 1 to 3, characterized in that, The step of generating a finite state machine model based on the water level causal transition direction between adjacent water level causal state segments and the water quality causal transition direction between adjacent water quality causal state segments in the causal state segment sequence includes: Read the water level causal state segment identifier and the segment sequence number of the water level causal state segment in the continuous water level monitoring curve for each water level causal state segment from the causal state segment sequence; and read the water quality causal state segment identifier and the segment sequence number of the water quality causal state segment in the continuous water quality monitoring curve for each water quality causal state segment from the causal state segment sequence. Adjacent water level dynamic causal state fragment pairs are determined according to the fragment sequence number of the water level dynamic causal state fragments. The adjacent water level dynamic causal state fragment pairs consist of sequentially adjacent preceding water level dynamic causal state fragments and subsequent water level dynamic causal state fragments. For each pair of adjacent water level dynamic causal state segments, the direction of groundwater level dynamic change trend of the preceding water level dynamic causal state segment and the direction of groundwater level dynamic change trend of the subsequent water level dynamic causal state segment are extracted. The water level causal state transition direction of the adjacent water level dynamic causal state segment is determined according to the transformation process from the direction of groundwater level dynamic change trend of the preceding water level dynamic causal state segment to the direction of groundwater level dynamic change trend of the subsequent water level dynamic causal state segment. Adjacent water quality dynamics causal state fragment pairs are determined according to the fragment sequence number of the water quality dynamics causal state fragments. The adjacent water quality dynamics causal state fragment pairs consist of sequentially adjacent preceding water quality dynamics causal state fragments and subsequent water quality dynamics causal state fragments. For each pair of adjacent water quality dynamics causal state segments, the direction of groundwater dynamics change trend of the preceding water quality dynamics causal state segment and the direction of groundwater dynamics change trend of the subsequent water quality dynamics causal state segment are extracted. The water quality causal state transition direction of the adjacent water quality dynamics causal state segment is determined according to the transformation process from the direction of groundwater dynamics change trend of the preceding water quality dynamics causal state segment to the direction of groundwater dynamics change trend of the subsequent water quality dynamics causal state segment. By combining the causal transition directions of water level and water quality, a set of state nodes and a set of directed transition edges are created for the finite state machine model. The finite state machine model is generated through the set of state nodes and the set of directed transition edges, and the mapping relationship is recorded.

5. The method of claim 4, wherein, The process of creating a set of state nodes and a set of directed transition edges for the finite state machine model by combining the causal transition directions of water level and water quality, and generating a finite state machine model and recording the mapping relationships through the set of state nodes and the set of directed transition edges, includes: Create a set of state nodes for a finite state machine model. Each state node in the set corresponds to a pair of causal state segments of water level dynamics and causal state segments of water quality dynamics. The pairing is based on the fact that the segment sequence number of the causal state segment of water level dynamics is the same as the segment sequence number of the causal state segment of water quality dynamics. Create a set of directed transition edges for a finite state machine model. Each directed transition edge in the set points from the state node corresponding to the preceding water level dynamics causal state segment and the preceding water quality dynamics causal state segment to the state node corresponding to the following water level dynamics causal state segment and the following water quality dynamics causal state segment. The transition attributes of the directed transition edge include the water level causal state transition direction and the water quality causal state transition direction. The set of state nodes and the set of directed transition edges are combined into a finite state machine model corresponding to the monitoring point. In the finite state machine model, the mapping relationship between the node identifier of each state node and the water level dynamic causal state segment identifier and the water quality dynamic causal state segment identifier corresponding to the state node is recorded. In the finite state machine model, a directed transition edge identifier is assigned to each directed transition edge, and the correspondence between the directed transition edge identifier and the water level causal state transition direction and the water quality causal state transition direction is recorded.

6. The method of claim 1, wherein, The process involves extracting the state transition path of the monitoring point under continuous acquisition time sequence using the finite state machine model, and then calling a preset set of irreversible causal semantic rules to perform pattern semantic violation identification processing on the state transition path, generating a violation transition segment in the state transition path that violates any irreversible causal semantic rule in the set of irreversible causal semantic rules, including: Read the node identifier of each state node in the state node set and the segment sequence number corresponding to the state node from the finite state machine model, and read the previous state node identifier and the next state node identifier connected to each directed transition edge in the directed transition edge set, as well as the water level causal state transition direction and the water quality causal state transition direction of each directed transition edge. The state node with the smallest segment sequence number in the finite state machine model is taken as the starting state node. The state nodes in the finite state machine model are traversed sequentially along the direction of the directed transition edge. The state nodes passed during the traversal are arranged in the traversal order to form the state transition path of the monitoring point under the continuous acquisition sequence. A preset set of irreversible causal semantic rules is invoked. Each irreversible causal semantic rule in the set defines the event occurrence order constraint relationship between the groundwater level dynamics causal state transition direction sequence and the groundwater quality dynamics causal state transition direction sequence. The event occurrence order constraint relationship is used to limit the causal state transition direction combination sequence that must not appear in the normal evolution process that conforms to the natural hydrogeological conditions of groundwater. Extract the water level causal state transition direction sequence and the water quality causal state transition direction sequence between consecutively traversed state nodes from the state transition path. The water level causal state transition direction sequence is composed of the water level causal state transition direction of each directed transition edge in the state transition path arranged in traversal order. The water quality causal state transition direction sequence is composed of the water quality causal state transition direction of each directed transition edge in the state transition path arranged in traversal order. The sequence of causal transitions in water level and water quality is matched with the event occurrence order constraint relationship specified by each irreversible causal semantic rule in the set of irreversible causal semantic rules. The illegal transition description information of the illegal transition fragment is generated based on pattern matching processing.

7. The method of claim 6, wherein, The illegal transition description information generated by the pattern matching process for the illegal transition fragment includes: When the continuous subsequence in the water level causal transition direction sequence and the continuous subsequence at the corresponding position in the water quality causal transition direction sequence both match the event occurrence order constraint relationship prohibited by any irreversible causal semantic rule, the directed transition edge sequence corresponding to the successfully matched continuous subsequence in the water level causal transition direction sequence is determined as an illegal transition segment. When neither the water level causal state transition direction sequence nor the water quality causal state transition direction sequence matches any event occurrence order constraint relationship prohibited by any irreversible causal semantic rule, a path compliance identifier is generated to indicate that the state transition path does not violate pattern semantics. For each directed transition edge sequence identified as an illegal transition segment, extract the preceding and following state nodes corresponding to each directed transition edge contained in the illegal transition segment. Obtain the water level dynamics causal state fragment and water quality dynamics causal state fragment corresponding to the preceding state node and the water level dynamics causal state fragment and water quality dynamics causal state fragment corresponding to the following state node from the set of state nodes; The illegal transition description information of the illegal transition segment is formed by combining the directed transition edge identifier of each directed transition edge contained in the illegal transition segment, the causal transition direction of the water level, the causal transition direction of the water quality, and the rule number of the matched irreversible causal semantic rule.

8. The method according to claim 1 or 6 or 7, characterized in that, The step of generating a groundwater anomaly state early warning command containing the geographic coordinate markers of the violation, based on the temporal position of the violation transition fragment in the state transition path and the fragment characteristics of the corresponding water level dynamics causal state fragment and water quality dynamics causal state fragment, includes: Obtain the preceding and following state nodes corresponding to each directed transition edge contained in the illegal transition segment; extract the water level causal state segment identifier and the water quality causal state segment identifier of the water level dynamics causal state segment corresponding to the preceding state node from the preceding state node; extract the water level causal state segment identifier and the water quality causal state segment identifier of the water quality dynamics causal state segment corresponding to the following state node from the following state node. Based on the water level dynamic causal state segment identifier corresponding to the preceding state node and the water level dynamic causal state segment identifier corresponding to the following state node, the start acquisition sequence and end acquisition sequence of the water level dynamic causal state segment corresponding to the preceding state node and the start acquisition sequence and end acquisition sequence of the water level dynamic causal state segment corresponding to the following state node are read from the dynamic causal state segment sequence. Based on the water quality dynamics causal state segment identifier corresponding to the preceding state node and the water quality dynamics causal state segment identifier corresponding to the following state node, the start and end acquisition times of the water quality dynamics causal state segment corresponding to the preceding state node and the start and end acquisition times of the water quality dynamics causal state segment corresponding to the following state node are read from the dynamics causal state segment sequence. The starting acquisition time of the water level dynamic causal state segment corresponding to the preceding state node is taken as the starting time point of the illegal phenomenon of the illegal transition segment, and the ending acquisition time of the water level dynamic causal state segment corresponding to the following state node is taken as the ending time point of the illegal phenomenon of the illegal transition segment. Obtain the geographical coordinates of the monitoring points within the groundwater monitoring well group; The following information is combined into a warning information structure: the start time of the violation, the end time of the violation, the geographical coordinates of the monitoring point, the identifier of the water level dynamic causal state segment involved in the violation transition segment, the identifier of the water quality dynamic causal state segment involved in the violation transition segment, and the rule number of the irreversible causal semantic rule matched by the violation transition segment. Based on the aforementioned warning information structure, a groundwater anomaly warning command containing the location markers of the violation geographic coordinates is generated.

9. An abnormal state early warning system characterized by, include: A processor; a storage device having a computer program stored thereon; a network interface for providing network communication functions; when the computer program is executed by the processor, the processor enables the processor to implement the abnormal state early warning method for groundwater online monitoring as described in any one of claims 1-8.

10. A readable storage medium, characterized by, The readable storage medium stores a program or instructions, which, when executed by a processor, implement the abnormal state early warning method for online groundwater monitoring as described in any one of claims 1-8.