A groundwater pollution anomaly detection method based on deep reinforcement learning

By constructing shallow and deep observation sub-matrices and combining reinforcement learning to optimize the operation matrix, the problem of anomaly identification distortion in existing groundwater pollution anomaly detection methods under vertical water guide channels is solved, achieving more accurate anomaly type determination and pollution source tracing analysis.

CN122109480APending Publication Date: 2026-05-29江苏省海洋地质调查院

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
江苏省海洋地质调查院
Filing Date
2026-04-28
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing groundwater pollution anomaly detection methods are unable to distinguish between anomaly types under different formation mechanisms in the presence of vertical water flow channels, leading to distorted anomaly identification results and inaccurate pollution source tracing.

Method used

A deep reinforcement learning-based approach is used to construct shallow and deep observation sub-matrices. By combining the vertical mixing matrix and the vertical compression feature matrix with reinforcement learning to optimize the operation matrix, the single inflow phenomenon caused by vertical water guiding channels is identified, and groundwater pollution anomaly detection results are generated.

Benefits of technology

It improves the targeting and accuracy of anomaly identification, enhances the distinguishability of anomaly responses under different formation mechanisms, reduces the risk of misjudgment and omission, and improves the scientific nature of pollution source tracing analysis and risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122109480A_ABST
    Figure CN122109480A_ABST
Patent Text Reader

Abstract

The application discloses a groundwater pollution anomaly detection method based on deep reinforcement learning, and relates to the technical field of anomaly detection, comprising the following steps: constructing a shallow observation submatrix and a deep observation submatrix based on a monitoring well in a groundwater monitoring area, and constructing a vertical mixing matrix; performing vertical compression construction on the vertical mixing matrix to obtain a vertical compression feature matrix; obtaining a response matrix based on the deep observation submatrix, and adjusting an operation matrix corresponding to the deep observation submatrix based on reinforcement learning and the response matrix to obtain an optimized operation matrix; determining a reinforcement response average value based on the optimized operation matrix, and determining an anomaly type of all deep monitoring wells based on the reinforcement response average value to obtain a groundwater pollution anomaly type; and the application improves the accuracy of anomaly identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of anomaly detection technology, and in particular to a groundwater pollution anomaly detection method based on deep reinforcement learning. Background Technology

[0002] Groundwater, as an important freshwater resource, is widely used in urban and rural water supply, agricultural irrigation, industrial production, and ecological environment maintenance. To ensure the safety of the groundwater environment, multiple monitoring wells at different depths are typically deployed within a certain spatial area to conduct long-term continuous monitoring of water level, water quality, and related indicators. Abnormal changes are identified through time series analysis, correlation analysis, and statistical comparison. In the context of actual engineering construction and long-term development and utilization, the structure of groundwater aquifers is often disturbed by human activities. Numerous abandoned small-diameter boreholes, old geological exploration boreholes, and old pipe pile holes may remain in the area. If these structures are not completely backfilled or properly sealed, they may form vertical water-guiding channels, creating strong vertical connections between previously relatively independent aquifers. When there is non-point source or multi-point pollution in the shallow layer, polluted water may preferentially enter the deeper aquifers along these vertical channels, resulting in a concentrated inflow phenomenon in the deep monitoring wells. This causes multiple shallow pollution sources to appear as a single anomalous response in the deep observation data.

[0003] Existing groundwater pollution anomaly detection methods are mostly based on the analysis of single-well time series variation amplitude, statistical threshold discrimination, or simple correlation. They usually assume that deep observation results can directly reflect the spatial distribution of shallow pollution sources. In the presence of vertical water diversion channels, multiple shallow pollution sources form a concentrated response at deep monitoring wells, causing a deviation between the intensity of deep anomalies and the actual spatial distribution of pollution sources. This leads to distorted anomaly identification results or inaccurate pollution source tracing. Existing technologies lack targeted analysis mechanisms when dealing with anomalies caused by vertical short-circuit single-sink effects, making it difficult to distinguish anomaly types under different formation mechanisms, and easily leading to misjudgments in risk assessment and remediation decisions. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies that make it difficult to distinguish between anomaly types under different formation mechanisms, and to propose a groundwater pollution anomaly detection method based on deep reinforcement learning.

[0005] To address the problems existing in the prior art, the present invention adopts the following technical solution: A groundwater pollution anomaly detection method based on deep reinforcement learning includes: S1. Based on the monitoring wells in the groundwater monitoring area, construct shallow observation sub-matrix and deep observation sub-matrix, and construct a vertical hybrid matrix; S2. Perform vertical compression on the vertical mixing matrix to obtain the vertically compressed feature matrix; S3. Obtain the response matrix based on the deep observation submatrix, and adjust the operation matrix corresponding to the deep observation submatrix based on reinforcement learning and the response matrix to obtain the optimized operation matrix. S4. Determine the average value of the enhanced response based on the optimized operation matrix, and determine the anomaly type of all deep monitoring wells based on the average value of the enhanced response to obtain the groundwater pollution anomaly type. S5. Generate groundwater pollution anomaly detection results based on the groundwater pollution anomaly type.

[0006] Preferably, constructing shallow observation sub-matrix and deep observation sub-matrix includes: All monitoring wells within the groundwater monitoring area were divided into shallow and deep monitoring wells. Based on the observed values ​​of monitoring indicators from shallow monitoring wells, a shallow observation sub-matrix is ​​constructed; A deep observation submatrix is ​​constructed based on the observed values ​​of monitoring indicators from deep monitoring wells.

[0007] Preferably, constructing a vertical blending matrix includes: Based on the shallow observation sub-matrix, read the time series of shallow monitoring wells; Based on the deep observation sub-matrix, read the time series of deep monitoring wells; Correlation analysis was performed on the time series of shallow and deep monitoring wells to obtain the correlation coefficient. A vertical mixing matrix is ​​constructed based on the correlation coefficient.

[0008] Preferably, the vertical compression feature matrix is ​​obtained, including: Determine the sum of the absolute values ​​of the rows in the vertical mixing matrix; The row normalization value is determined based on the matrix elements of each row in the vertical mixing matrix and the sum of the absolute values ​​of the rows. Construct a normalized matrix based on the row normalized values; Determine the vertical compression eigenvalues ​​of the normalized matrix; A vertically compressed feature matrix is ​​constructed based on the vertically compressed eigenvalues.

[0009] Preferably, the response matrix is ​​obtained based on the deep observation submatrix, including: Based on the deep observation submatrix, construct the operation matrix; Set the matrix elements of the operation matrix according to the preset initialization rules; The response matrix is ​​obtained by performing matrix multiplication on the operation matrix and the vertical compression feature matrix.

[0010] Preferably, the optimized operation matrix is ​​obtained, including: Based on the vertical compression eigenvalues ​​corresponding to deep monitoring wells in the response matrix and vertical compression eigenvalue matrix, the values ​​of matrix elements in the operation matrix are evaluated to obtain the evaluation results. Based on the reinforcement learning and evaluation results, the matrix elements of the operation matrix are adjusted to obtain the optimized operation matrix.

[0011] Preferably, determining the average reinforcement response based on the optimized operation matrix includes: Matrix multiplication is performed on the optimized operation matrix and the deep observation submatrix to obtain the anomaly detection matrix; Read the enhanced response time series of deep monitoring wells from the anomaly detection matrix; Determine the intensity value of the reinforcement response based on the reinforcement response time series; The set of second eigenvalues ​​is obtained by summing up all the reinforcement response intensity values; Determine the average reinforcement response of the second eigenvalue set.

[0012] Preferably, the types of groundwater pollution anomalies obtained include: The vertical compression characteristic values ​​corresponding to deep monitoring wells are summarized to obtain the first characteristic value set; Determine the vertically compressed average value of the first eigenvalue set; Based on the vertical compression characteristic value, vertical compression average value, enhanced response intensity value, and enhanced response average value corresponding to the deep monitoring wells, the anomaly type of all deep monitoring wells is determined to obtain the groundwater pollution anomaly type; Among them, the abnormal groundwater pollution types are either vertical short-circuit single sink dominant or non-vertical short-circuit single sink dominant.

[0013] Preferably, generating groundwater pollution anomaly detection results includes: The enhanced response time series of deep monitoring wells are correlated with the groundwater pollution anomaly types corresponding to the deep monitoring wells to form anomaly records; Based on all abnormal records, generate groundwater pollution anomaly detection results.

[0014] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention constructs a shallow observation sub-matrix, a deep observation sub-matrix, and a vertical hybrid matrix, and further forms a vertical compression matrix to quantify the degree of correlation between shallow and deep layers. This allows the spatial information that was originally compressed in the deep monitoring data to be structurally characterized, thereby effectively identifying the single inflow phenomenon caused by the vertical water channel, avoiding the distortion problem caused by judging solely based on the amplitude of deep anomalies, and improving the pertinence and accuracy of anomaly identification.

[0015] 2. This invention introduces a dynamic adjustment mechanism based on the response matrix. By iteratively optimizing the operation matrix through reinforcement learning, the response differences of deep monitoring wells under different vertical connectivity are amplified and expressed. This enables the anomaly judgment results to simultaneously reflect the intensity of time change and the degree of vertical convergence, enhances the distinguishability of anomaly responses under different formation mechanisms, and improves the reliability of groundwater pollution anomaly classification.

[0016] 3. Based on the average value of the enhanced response and the average value of the vertical compression, this invention determines the anomaly type of deep monitoring wells and generates anomaly records and outputs detection results. This makes the detection results not only include information on the intensity of the anomaly, but also clarify the category of the anomaly formation mechanism. This provides a more targeted basis for pollution source tracing analysis and risk assessment, reduces the risk of misjudgment and omission, and improves the scientific nature of groundwater environmental management decisions. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating a groundwater pollution anomaly detection method based on deep reinforcement learning, as provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0019] This embodiment provides a groundwater pollution anomaly detection method based on deep reinforcement learning. (See also...) Figure 1 Specifically, including: S1. Based on the monitoring wells in the groundwater monitoring area, construct shallow observation sub-matrix and deep observation sub-matrix, and construct a vertical hybrid matrix; In embodiments of the present invention, constructing shallow observation sub-matrix and deep observation sub-matrix includes: All monitoring wells within the groundwater monitoring area were divided into shallow and deep monitoring wells. A groundwater monitoring area refers to a spatially defined survey area for groundwater environmental monitoring, within which groundwater recharge, runoff, and discharge conditions are relatively consistent and monitoring wells are installed. A monitoring well is a well drilled within the groundwater monitoring area to obtain groundwater level and quality information and has sampling or measurement functions. Stratification refers to the process of classifying monitoring wells into different hydrogeological strata based on the burial depth data of the monitoring wells and the location of the aquifer where the water intake section of the monitoring well is located.

[0020] Shallow monitoring wells refer to monitoring wells whose water intake section is located in the upper aquifer or near-surface groundwater system. Their observation results mainly reflect the impact of surface recharge and shallow pollution input on groundwater. Deep monitoring wells refer to monitoring wells whose water intake section is located in the lower aquifer or confined aquifer. Their observation results mainly reflect the response of deep groundwater systems under vertical recharge and interlayer connectivity conditions.

[0021] After obtaining basic data on all monitoring wells within the groundwater monitoring area, the borehole columnar section data, well structure data, and water intake depth records for each monitoring well were first compiled to clarify the wellhead elevation, well depth, and depth range of the filter pipe for each monitoring well. Then, combined with the hydrogeological profile data and aquifer stratification data of the monitoring area, the aquifer numbers and spatial locations corresponding to different depth ranges were determined. Subsequently, the water intake depth range of each monitoring well was matched one by one with the aquifer stratification data to determine which aquifer the water intake section was mainly located in. Within the groundwater monitoring area, when the water intake section is located in the upper aquifer or an aquifer directly affected by surface recharge, the monitoring well is classified as a shallow monitoring well; when the water intake section is located in the lower aquifer or a confined aquifer, the monitoring well is classified as a deep monitoring well; for monitoring wells whose water intake section spans two aquifers, the length of the water intake section is compared with the overlap length of each aquifer, and the aquifer with the larger overlap length is taken as the stratum to which the monitoring well belongs, thereby completing the stratum division of all monitoring wells in the groundwater monitoring area and obtaining shallow and deep monitoring wells.

[0022] Based on the observed values ​​of monitoring indicators from shallow monitoring wells, a shallow observation sub-matrix is ​​constructed; First, all shallow monitoring well numbers obtained after stratigraphic division are compiled, and a shallow monitoring well index sequence is established according to the well number order. Simultaneously, all monitoring times within the monitoring period are compiled and a monitoring time index sequence is established according to chronological order. Then, for each shallow monitoring well, the corresponding monitoring index observation values ​​are obtained at each monitoring time. This acquisition includes sample collection or online reading at the same monitoring time, and the obtained monitoring index observation values ​​are recorded, forming an original record table containing the well number, monitoring time, and monitoring index values. Next, the original record table is organized. The monitoring index observation values ​​of the same shallow monitoring well at different monitoring times are arranged according to the monitoring time order, and the monitoring index observation values ​​of different shallow monitoring wells are arranged according to the well number order. Using the shallow monitoring well index sequence as rows and the monitoring time index sequence as columns, the corresponding monitoring index observation values ​​are filled into the corresponding positions, thus forming a shallow observation sub-matrix with shallow monitoring wells as rows and monitoring times as columns.

[0023] A deep observation submatrix is ​​constructed based on the observed values ​​of monitoring indicators from deep monitoring wells.

[0024] First, all deep monitoring well numbers obtained after stratigraphic division are compiled, and a deep monitoring well index sequence is established according to the well number order. Simultaneously, the same monitoring time index sequence as the shallow observation submatrix is ​​used to ensure consistency in the time dimension. Then, for each deep monitoring well, the corresponding monitoring indicator observation values ​​are obtained at each monitoring time, and these values ​​are recorded to form an original record table containing the well number, monitoring time, and monitoring indicator values. Next, the original record table is organized. The monitoring indicator observation values ​​of the same deep monitoring well at different monitoring times are arranged according to the monitoring time order, and the monitoring indicator observation values ​​of different deep monitoring wells are arranged according to the well number order. Using the deep monitoring well index sequence as rows and the monitoring time index sequence as columns, the corresponding monitoring indicator observation values ​​are filled into the corresponding positions, thus forming a deep observation submatrix with deep monitoring wells as rows and monitoring times as columns.

[0025] The monitoring index observation value refers to the groundwater monitoring index value obtained by actual measurement from the corresponding monitoring well at each monitoring time. The monitoring index is a water quality index or comprehensive index used to characterize the groundwater pollution status. The shallow observation sub-matrix refers to a data matrix formed by arranging the monitoring index observation values ​​of all shallow monitoring wells at each monitoring time according to the well number and the monitoring time, where each row corresponds to one shallow monitoring well and each column corresponds to one monitoring time. The deep observation sub-matrix refers to a data matrix formed by arranging the monitoring index observation values ​​of all deep monitoring wells at each monitoring time according to the well number and the monitoring time, where each row corresponds to one deep monitoring well and each column corresponds to one monitoring time.

[0026] In an embodiment of the present invention, constructing a vertical blending matrix includes: Based on the shallow observation sub-matrix, read the time series of shallow monitoring wells; The time series of shallow monitoring wells refers to the data sequence obtained by selecting the entire row of data corresponding to a shallow monitoring well from the shallow observation submatrix and arranging it in the order of monitoring time. This sequence reflects the process of the monitoring indicators of the shallow monitoring well changing over time during the monitoring period.

[0027] Obtain the row and column indices of the shallow observation submatrix, where the row index corresponds to the arrangement order of the shallow monitoring well numbers and the column index corresponds to the chronological order of the monitoring times. Determine the row position of the target shallow monitoring well in the shallow observation submatrix based on the shallow monitoring well number, and read the matrix element values ​​column by column from that row in order of column index to form a data sequence arranged chronologically by monitoring time. Pair the data sequence with the corresponding monitoring time list to obtain a shallow monitoring well time series record containing the monitoring time and the observed monitoring index values. When the shallow observation submatrix has missing measurement markers for certain monitoring times, retain the corresponding monitoring time and the missing measurement markers in the time series record, so that the shallow monitoring well time series is consistent with the monitoring time represented by the column index, thereby completing the reading of the shallow monitoring well time series.

[0028] Based on the deep observation sub-matrix, read the time series of deep monitoring wells; The time series of deep monitoring wells refers to the data sequence obtained by selecting the entire row of data corresponding to a certain deep monitoring well from the deep observation submatrix and arranging it in the order of monitoring time. This sequence reflects the process of the monitoring indicators of the deep monitoring well changing over time during the monitoring period.

[0029] Obtain the row and column indices of the deep observation submatrix, where the row index corresponds to the arrangement order of the deep monitoring well numbers, and the column index corresponds to the chronological order of the monitoring times consistent with the shallow observation submatrix. Then, determine the row position of the target deep monitoring well in the deep observation submatrix based on the deep monitoring well number, and read the matrix element values ​​column by column from that row according to the column index order, forming a data sequence arranged chronologically by monitoring time. Next, pair the data sequence with the corresponding monitoring time list to obtain a deep monitoring well time series record containing the monitoring time and the observed monitoring index values. When the deep observation submatrix has missing measurement markers for certain monitoring times, retain the corresponding monitoring time and the missing measurement markers in the time series record, ensuring that the deep monitoring well time series is consistent with the monitoring times represented by the column index, thus completing the reading of the deep monitoring well time series.

[0030] Correlation analysis was performed on the time series of shallow and deep monitoring wells to obtain the correlation coefficient. Correlation processing refers to the process of calculating the correlation between the time series of shallow monitoring wells and the time series of deep monitoring wells, which is used to measure whether the changes in the monitoring indicators of the two wells show synchronous or opposite changes; the correlation coefficient refers to the numerical result obtained by the correlation calculation, which is used to characterize the degree of correlation between the changes in the monitoring indicators of shallow monitoring wells and deep monitoring wells within the monitoring period.

[0031] The time series corresponding to the target shallow monitoring wells are selected from the shallow observation sub-matrix, and the time series corresponding to the target deep monitoring wells are selected from the deep observation sub-matrix. The data are aligned according to the monitoring time indices of the two types of time series to ensure a correspondence between them at the same monitoring time. Then, missing data processing is performed on the aligned time series. If a missing data marker exists in either the shallow or deep time series for any monitoring time, the corresponding paired data for that monitoring time is removed, and the removal record is retained, thus forming a set of paired observations consisting of several valid monitoring times. The paired shallow observations are then calculated separately. The arithmetic mean of the shallow well and the arithmetic mean of the deep well are calculated. Then, the difference between the shallow well and the arithmetic mean, and the difference between the deep well and the arithmetic mean, are calculated at each effective monitoring time to obtain two sets of centered sequences. The sum of the products of the two sets of centered sequences at each effective monitoring time is used as the numerator of the covariance. Simultaneously, the sum of squares of the two sets of centered sequences is calculated, and the square root is taken as the standard deviation component for each. Finally, the covariance numerator is divided by the product of the two standard deviation components to obtain the correlation coefficient between the target shallow well and the target deep well within the monitoring period. This correlation coefficient is then output as the result of the correlation processing.

[0032] A vertical mixing matrix is ​​constructed based on the correlation coefficient.

[0033] The vertical hybrid matrix refers to a data matrix formed by arranging the correlation coefficients between multiple deep monitoring wells and multiple shallow monitoring wells according to the correspondence between deep and shallow monitoring wells. Each row corresponds to a deep monitoring well, each column corresponds to a shallow monitoring well, and the matrix elements are the correlation coefficients of the corresponding deep and shallow well pairs. It is used to reflect the overall distribution of the correlation relationship between shallow monitoring wells and deep monitoring wells.

[0034] All shallow monitoring well numbers are compiled to form a shallow monitoring well index sequence, and all deep monitoring well numbers are compiled to form a deep monitoring well index sequence. Using the deep monitoring well index sequence as the row index and the shallow monitoring well index sequence as the column index, a two-dimensional matrix is ​​created in the computer with the number of rows equal to the number of deep monitoring wells and the number of columns equal to the number of shallow monitoring wells, serving as a vertical hybrid matrix. Then, according to the order of the deep and shallow monitoring well index sequences, each deep monitoring well is sequentially paired with each shallow monitoring well to form a well pair. The corresponding deep and shallow time series are read from each well pair, and monitoring is completed. Alignment and missing data removal are performed, and the correlation coefficient of the well pair is calculated according to the correlation processing flow. Then, the correlation coefficient is written into the vertical mixing matrix at the position of the matrix element corresponding to the row index of the deep monitoring well and the column index of the shallow monitoring well, so that each matrix element of the vertical mixing matrix represents the correlation coefficient between a pair of deep and shallow monitoring wells. When a well pair is empty in the available monitoring time set, the well pair is recorded as uncalculated and the missing data mark at the corresponding position is retained in the vertical mixing matrix. Finally, the traversal and filling of all deep and shallow well pairs is completed to obtain the vertical mixing matrix with deep monitoring wells as rows, shallow monitoring wells as columns, and correlation coefficients as matrix elements.

[0035] S2. Perform vertical compression on the vertical mixing matrix to obtain the vertically compressed feature matrix; In an embodiment of the present invention, the vertical compression feature matrix is ​​obtained, including: Determine the sum of the absolute values ​​of the rows in the vertical mixing matrix; The row absolute sum refers to the sum of the absolute values ​​of all matrix elements in a certain row of the vertical mixing matrix. It is used to represent the overall correlation strength between the deep monitoring well and all shallow monitoring wells.

[0036] First, obtain the row and column indices of the vertical blending matrix, where the row index corresponds to the deep monitoring well and the column index corresponds to the shallow monitoring well. Then, traverse the vertical blending matrix row by row. When traversing to the target row corresponding to any deep monitoring well, read the matrix elements at each column position in that row in sequence, take the absolute value of each matrix element and sum them up. The summation process covers all the column indices of the shallow monitoring wells corresponding to that row, and obtain the absolute value sum of the row for that target row. Then, establish a correspondence between the absolute value sum of the row and the deep monitoring well index of the target row and record it as a row absolute value sum sequence, so that each item in the row absolute value sum sequence corresponds to a deep monitoring well.

[0037] The row normalization value is determined based on the matrix elements of each row in the vertical mixing matrix and the sum of the absolute values ​​of the rows. The row normalized value refers to the value obtained by dividing each element of a matrix in a row by the absolute value of that row, and is used to represent the relative proportion of the correlation strength between the deep monitoring well and each shallow monitoring well in the whole.

[0038] Read the vertical mixing matrix and the previously determined row absolute values ​​and sequences, and process the vertical mixing matrix row by row. For any target row corresponding to a deep monitoring well, read the row absolute value sum of the target row, and simultaneously read the matrix elements at each column position within the target row. Divide each matrix element by the row absolute value sum of the target row to obtain the row normalization value corresponding to each shallow monitoring well. When the row absolute value sum of the target row is zero, retain the row normalization value of the target row as a missing detection indicator and record the non-normalization state of the target row. Write the obtained row normalization values ​​into the row normalization result table according to the column index order of the original target row, so that each row corresponds to a deep monitoring well and each column corresponds to a shallow monitoring well, thereby completing the determination of the row normalization value of each row of the vertical mixing matrix.

[0039] Construct a normalized matrix based on the row normalized values; A normalized matrix is ​​a matrix formed by arranging the normalized values ​​of each row according to their original row and column index positions, where the sum of the matrix elements in each row is one. It is used to eliminate the influence of differences in the overall correlation strength between monitoring wells of different depths.

[0040] First, obtain the row normalization result table output from the row normalization value determination step, and read its row index and column index, where the row index corresponds to the arrangement order of deep monitoring wells and the column index corresponds to the arrangement order of shallow monitoring wells. Then, construct a two-dimensional matrix with the same dimension as the row normalization result table in the computer as the normalization matrix, and write data row by row according to the row index. For any target row corresponding to a deep monitoring well, read the row normalization value of the target row at the column index position of each shallow monitoring well in sequence, and write the row normalization value into the corresponding matrix element position of the normalization matrix in column index order, so that each row of the normalization matrix completely corresponds to the relative correlation distribution between a deep monitoring well and all shallow monitoring wells. When there is a missing detection mark in the row normalization result table, retain the missing detection mark at the corresponding position in the normalization matrix and record the row index and column index of the missing detection position, thereby completing the construction of the normalization matrix.

[0041] Determine the vertical compression eigenvalues ​​of the normalized matrix; The vertical compression characteristic value refers to a value used to characterize the degree of concentration of a deep monitoring well and multiple shallow monitoring wells under vertical hydraulic connection conditions. This value reflects the concentration state of shallow groundwater converging towards the deep monitoring well under the action of the vertical channel. When multiple shallow monitoring wells show a relatively concentrated influence on the same deep monitoring well, the value is relatively high, indicating that the deep monitoring well has a significant convergence effect under vertical connectivity conditions. When the influence of shallow monitoring wells on the deep monitoring well is dispersed or weak, the value is relatively low.

[0042] Read the normalized matrix and its row indices, and traverse the normalized matrix row by row according to the row indices. For any target row corresponding to a deep monitoring well, read the normalized matrix elements of the target row at each shallow monitoring well column index position in turn, perform a square operation on each matrix element and accumulate them. The accumulation process covers all shallow monitoring well column indices corresponding to the target row, thereby obtaining the vertical compressed feature value corresponding to the target row. When the target row contains a missing detection marker, remove the matrix element corresponding to the missing detection position and record the removal position. Perform square accumulation based on the remaining valid matrix elements to obtain the corresponding vertical compressed feature value. Establish a correspondence between the vertical compressed feature values ​​obtained for each target row and the corresponding deep monitoring well row index and output it as a vertical compressed feature value sequence.

[0043] A vertically compressed feature matrix is ​​constructed based on the vertically compressed eigenvalues.

[0044] The vertical compression feature matrix refers to a matrix structure composed of the vertical compression feature values ​​corresponding to each deep monitoring well as the main elements. This matrix is ​​used to describe the distribution of the degree of convergence of different deep monitoring wells in the monitoring area under vertical connectivity conditions, thereby reflecting the vertical influence pattern of shallow groundwater on deep groundwater.

[0045] Obtain the vertical compression feature value sequence and its corresponding deep monitoring well row index sequence, where each item in the vertical compression feature value sequence corresponds to a deep monitoring well. Then, determine the number of rows and columns of the matrix based on the length of the deep monitoring well row index sequence, construct a square matrix as the vertical compression feature matrix, and set both the row and column indices of the square matrix to the deep monitoring well row index sequence. Next, traverse the vertical compression feature value sequence item by item according to the deep monitoring well row index sequence. For any target index corresponding to a deep monitoring well, write the vertical compression feature value corresponding to that target index into... In the vertical compression feature matrix, the row and column positions that are the same as the target index are set so that the diagonal matrix elements are equal to the vertical compression feature values ​​corresponding to each deep monitoring well. After assigning values ​​to the diagonal elements corresponding to all deep monitoring wells, all matrix elements in the vertical compression feature matrix except for the diagonal positions are traversed, and the matrix elements at the off-diagonal positions are set to zero. This results in a vertical compression feature matrix with deep monitoring wells as row and column indices, the vertical compression feature values ​​corresponding to each deep monitoring well as the diagonal elements, and the remaining positions set to zero.

[0046] It should be noted that when there are abandoned small-diameter boreholes or vertical water-guiding channels formed by old boreholes, multiple shallow pollution sources will converge into the same deep monitoring well along this vertical channel. This results in spatial information compression in the deep monitoring data, meaning that the locational differences of multiple shallow sources are weakened or even disappeared in the deep response. When analyzing relationships based solely on correlation coefficients or single well pairs, it is difficult to reflect the overall concentration of the correlation distribution between a certain deep monitoring well and all shallow monitoring wells. Therefore, it is necessary to further measure the normalized vertical mixing relationship, extract the concentration state of the correlation distribution between each deep monitoring well and shallow monitoring wells into comparable values, and express it uniformly in matrix form. By constructing a vertical compression feature matrix, the differences in the vertical convergence degree corresponding to different deep monitoring wells can be characterized at the overall level, thereby identifying deep monitoring wells significantly affected by the vertical short-circuit single sink effect, providing a structured basis for subsequent anomaly judgment.

[0047] It should be noted that vertical water-guiding channels refer to vertically connected pathways with high permeability formed in the structure of groundwater aquifers and impermeable layers. These pathways are usually formed by abandoned small-diameter boreholes, old exploration holes, construction-related holes, or incompletely backfilled wells. They may contain loose backfill material, pores, or voids, making the vertical flow resistance of groundwater significantly lower than that of the surrounding undisturbed strata. This allows for direct connection between different aquifers that were originally hydraulically weak. When pollutants are present in the shallow layer, the polluted water can preferentially migrate downwards along this channel and enter the deeper aquifers, affecting the quality of the deep groundwater.

[0048] S3. Obtain the response matrix based on the deep observation submatrix, and adjust the operation matrix corresponding to the deep observation submatrix based on reinforcement learning and the response matrix to obtain the optimized operation matrix. In an embodiment of the present invention, the response matrix is ​​obtained based on the deep observation submatrix, including: Based on the deep observation submatrix, construct the operation matrix; An operation matrix is ​​a two-dimensional data structure used to weight or adjust deep observation data during data processing. Its row index corresponds to the deep monitoring well, the column index corresponds to the monitoring time, and the matrix elements represent the intensity of the effect on the corresponding well and the corresponding time observation value.

[0049] Read the row and column indices of the deep observation submatrix, where the row index corresponds to the arrangement order of the deep monitoring wells and the column index corresponds to the chronological order of the monitoring times, and record the number of deep monitoring wells and the number of monitoring times. Then, using the number of deep monitoring wells as the number of rows and the number of monitoring times as the number of columns, construct a two-dimensional matrix with the same dimensions as the deep observation submatrix as the operation matrix. Set the row index of the operation matrix to the row index of the deep monitoring wells and the column index of the operation matrix to the column index of the monitoring times, so that each row in the operation matrix corresponds to one deep monitoring well and each column corresponds to one monitoring time, thereby completing the structure construction of the operation matrix and making it consistent with the deep observation submatrix in terms of row and column dimensions.

[0050] Set the matrix elements of the operation matrix according to the preset initialization rules; It should be noted that the preset initialization rule refers to the explicit assignment method used to assign initial values ​​to each matrix element before the operation matrix is ​​calculated and processed. This assignment method is determined before the data processing begins and is used to ensure that the operation matrix has a complete and computable initial state. The initialization rule can be reflected in the use of a consistent assignment method for all matrix elements, or in the sequential assignment according to the arrangement order of deep monitoring wells and monitoring times, so that the operation matrix has a unified starting condition in subsequent iterations or optimization processes.

[0051] When setting the matrix elements of the operation matrix according to the preset initialization rule, the preset initialization rule is explicitly defined as the equal-weight initialization rule, that is, all matrix elements in the operation matrix are assigned the same value of one. First, the constructed operation matrix and its corresponding row index and column index are read, where the row index corresponds to the deep monitoring well and the column index corresponds to the monitoring time. Then, the operation matrix is ​​traversed row by row according to the row index, and in each row, it is traversed column by column according to the column index, and the matrix element currently traversed is assigned the value of one, so that the matrix element corresponding to any deep monitoring well at any monitoring time position is one. After completing the traversal of all row indexes and column indexes, the operation matrix is ​​checked element by element to confirm that each matrix element has been assigned the value of one, thereby completing the setting of the matrix elements of the operation matrix based on the equal-weight initialization rule.

[0052] The response matrix is ​​obtained by performing matrix multiplication on the operation matrix and the vertical compression feature matrix.

[0053] The response matrix is ​​the result matrix obtained by performing matrix multiplication on the operation matrix and the vertical compression feature matrix. This matrix is ​​used to represent the comprehensive response of deep groundwater after considering the effects of vertical connectivity and data weighting.

[0054] First, read the operation matrix and the vertical compression feature matrix, and verify that their row and column indices correspond to the same set of deep monitoring well sequences. Verify that the number of rows in the operation matrix equals the number of deep monitoring wells and its number of columns equals the number of monitoring times. Verify that the vertical compression feature matrix is ​​a square matrix with deep monitoring wells as its row and column indices and has the same dimension as the operation matrix. Then, using the row indices of the operation matrix as the row indices of the response matrix and the column indices of the operation matrix as the column indices of the response matrix, construct a two-dimensional matrix with the same dimension as the operation matrix in the computer as the response matrix. Next, traverse the response matrix row by row according to its row indices and column by column within each row, for any deep... For each deep monitoring well, the target row and the target column corresponding to any monitoring time are used to calculate the matrix elements of the response matrix according to the matrix multiplication rules. Specifically, the diagonal matrix element in the vertical compression feature matrix that is the same as the target row is used as the vertical compression value corresponding to the deep monitoring well. This vertical compression value is then multiplied by the matrix element of the operation matrix at the target row and target column position. The resulting product is written as the matrix element of the response matrix at the target row and target column position. After traversing and writing all deep monitoring well row indices and all monitoring time column indices, a response matrix with the same dimension as the operation matrix and whose matrix elements are the product of the corresponding deep monitoring well operation matrix element and the vertical compression value of the deep monitoring well is obtained.

[0055] In the process of groundwater seepage and pollutant migration, the pollution response intensity of a deep monitoring well depends on the degree of hydraulic connectivity between the well and the upper aquifer, as well as the intensity of external forces acting on the well at different times. When the vertical connectivity is high, pollutants in the upper water body are more likely to migrate downwards along the vertical water-guiding channels, thus amplifying the water quality change amplitude of the deep monitoring well. The vertical compression value reflects the degree of convergence of the deep monitoring well under vertical connectivity conditions. The matrix elements in the operation matrix reflect the processing weight or intensity of the data of the deep monitoring well at each monitoring time. Therefore, multiplying the vertical compression value with the operation matrix element at the corresponding monitoring time is equivalent to superimposing the influence of vertical connectivity on the original time dimension processing intensity. This results in a deeper monitoring well with a higher degree of vertical connectivity producing a larger comprehensive response value under the same operating conditions, thus forming a response matrix that simultaneously reflects the effects of time and vertical connectivity. Each element in this matrix represents the response degree of a deep monitoring well at a certain monitoring time after comprehensively considering the degree of vertical connectivity.

[0056] In an embodiment of the present invention, the optimized operation matrix is ​​obtained, including: Based on the vertical compression eigenvalues ​​corresponding to deep monitoring wells in the response matrix and vertical compression eigenvalue matrix, the values ​​of matrix elements in the operation matrix are evaluated to obtain the evaluation results. The evaluation result refers to the quantitative reflection of the effect of the current operation matrix value after comprehensively considering the vertical connectivity and time response intensity. This result is used to represent the actual performance of the current data processing method in amplifying or differentiating the response of deep monitoring wells.

[0057] Read the operation matrix, response matrix, and vertical compression matrix, and verify that the row indices of all three correspond to the same set of deep monitoring well sequences, and that the column indices of the operation and response matrices correspond to the same set of monitoring time sequences. Then, traverse row by row according to the row indices of the deep monitoring wells. For any target row corresponding to a deep monitoring well, read the diagonal matrix element corresponding to that target row from the vertical compression matrix as the vertical compression value of that deep monitoring well. Simultaneously, read the matrix elements of that target row at all monitoring times from the response matrix as the response time sequence of that deep monitoring well, and read the matrix elements of that target row at all monitoring times from the operation matrix as the operation value sequence of that deep monitoring well. Then, traverse column by column along the monitoring time dimension, and for each monitoring time... The response matrix elements are paired with their corresponding operation matrix elements, and a consistency check is performed using the vertical compression value of the deep monitoring well. Specifically, this involves checking whether the response matrix element is equal to the product of the vertical compression value and the corresponding operation matrix element, and using the deviation of the product as the evaluation metric for the operation matrix element value at that monitoring time. After calculating the evaluation metrics for all monitoring times of the target row, the evaluation metrics for the target row are summarized to form the row evaluation value corresponding to the deep monitoring well, and a correspondence is established between the row evaluation value and the row index of the deep monitoring well. After traversing all the row indices of the deep monitoring wells, the evaluation values ​​of each row are arranged in the order of the deep monitoring well row index to obtain the evaluation result used to represent the quality of the current matrix element value of the operation matrix.

[0058] Based on the reinforcement learning and evaluation results, the matrix elements of the operation matrix are adjusted to obtain the optimized operation matrix.

[0059] Reinforcement learning refers to a learning method that adjusts control strategies through continuous trial and error and feedback. Its core meaning is that in the process of repeated action, subsequent behaviors are continuously modified according to the feedback results of the environment on the current behavior, so that the overall effect gradually tends to be better. In this method, this concept corresponds to the process of dynamically modifying the values ​​of the operation matrix. The optimized operation matrix refers to the matrix state formed after multiple adjustments. The values ​​of each matrix element can more reasonably reflect the response differences of deep monitoring wells under vertical connectivity conditions, making the response degree between different deep monitoring wells clearer, thereby providing a more stable basis for subsequent groundwater pollution anomaly judgment.

[0060] The current operation matrix and its row and column indices are read, along with the corresponding evaluation results. A correspondence is established between the row indices of deep monitoring wells and the evaluation results, as well as between the column indices of monitoring times and the positions of elements in the operation matrix. The evaluation results are then used as reward signals for reinforcement learning, and the values ​​of the current operation matrix elements are used as adjustable objects in the reinforcement learning process. This allows the reinforcement learning process to determine the positions of matrix elements that need adjustment in both the deep monitoring well and monitoring time dimensions. Finally, based on the adjustment instructions output by the reinforcement learning process, the operation matrix is ​​traversed row by row and column by column, and numerical updates are performed on the matrix elements indicated as needing adjustment. The numerical update includes adjusting the values ​​of the matrix elements by increasing or decreasing them, and recording the adjusted deep monitoring well row index, monitoring time column index, and adjusted matrix element values ​​after each adjustment. After completing a full matrix adjustment, the adjusted operation matrix is ​​used as the updated operation matrix, and the response matrix is ​​recalculated based on the updated operation matrix to obtain the evaluation result again, so that the reinforcement learning process can continue to output subsequent adjustment instructions under the new reward signal. The iterative process of matrix element adjustment and evaluation result update is repeated until the evaluation result obtained in two consecutive iterations no longer improves. At this point, the operation matrix obtained is determined as the optimized operation matrix and output.

[0061] S4. Determine the average value of the enhanced response based on the optimized operation matrix, and determine the anomaly type of all deep monitoring wells based on the average value of the enhanced response to obtain the groundwater pollution anomaly type. In an embodiment of the present invention, determining the average value of the enhancement response based on the optimized operation matrix includes: Matrix multiplication is performed on the optimized operation matrix and the deep observation submatrix to obtain the anomaly detection matrix; The anomaly determination matrix refers to the result matrix obtained by performing matrix operations on the optimized operation matrix and the deep observation sub-matrix. This matrix is ​​used to represent the comprehensive response of each deep monitoring well at each monitoring time under the adjusted action intensity conditions.

[0062] Read the optimized operation matrix and the deep observation sub-matrix, and verify that their row indices correspond to the same set of deep monitoring well sequences, and that their column indices correspond to the same set of monitoring time sequences. Also verify that the optimized operation matrix and the deep observation sub-matrix have the same matrix size and are both two-dimensional matrices with deep monitoring wells as rows and monitoring times as columns. Then, using the deep monitoring well row indices as the row indices of the anomaly determination matrix and the monitoring time column indices as the column indices, construct an anomaly determination matrix of the same dimension as the two matrices. Finally, traverse the matrix row by row and column by column. The algorithm iterates column by column. For any deep monitoring well, the target row and target column corresponding to any monitoring time are used to read the matrix elements of the optimized operation matrix at the target row and target column positions. The matrix elements of the deep observation submatrix at the target row and target column positions are also read. The two are multiplied and the product is written into the matrix elements of the anomaly determination matrix at the target row and target column positions. After traversing and writing all deep monitoring well row indices and all monitoring time column indices, the anomaly determination matrix is ​​obtained. Each matrix element of the anomaly determination matrix represents the determination value of the corresponding deep monitoring well at the corresponding monitoring time after the optimization weighting.

[0063] Read the enhanced response time series of deep monitoring wells from the anomaly detection matrix; Enhanced response time series refers to the data sequence formed by reading each row of deep monitoring wells from the anomaly determination matrix. It is used to reflect the response change process of a certain deep monitoring well after enhancement processing throughout the entire monitoring period.

[0064] First, the row and column indices of the anomaly determination matrix are read to confirm that the row index corresponds to the deep monitoring well and the column index corresponds to the monitoring time. Then, for any target deep monitoring well, its corresponding target row is determined based on the position of the deep monitoring well in the row index, and matrix elements are read column by column from the target row in chronological order of the monitoring time column index to form a data sequence arranged in the order of monitoring time. Then, the data sequence is paired with the corresponding monitoring time list to obtain the enhanced response time sequence record of the deep monitoring well containing the monitoring time and determination value. The above reading process is performed sequentially for all deep monitoring wells to obtain the enhanced response time sequence corresponding to each deep monitoring well.

[0065] Determine the intensity value of the reinforcement response based on the reinforcement response time series; The enhanced response intensity value refers to the numerical value obtained by measuring the enhanced response time series as a whole, and is used to represent the overall strength of the response change of the deep monitoring well within the monitoring period.

[0066] Read the enhanced response time series records corresponding to each deep monitoring well, and verify that each record contains a monitoring time and a corresponding judgment value, and that the monitoring time order is consistent. Then, for any deep monitoring well, traverse all monitoring times in its enhanced response time series, read the corresponding judgment value at each time, and take the absolute value of the judgment value to form the absolute judgment value sequence of the deep monitoring well. Then, sum the absolute judgment value sequence and simultaneously count the number of valid monitoring times, where valid monitoring times are monitoring times with judgment values. When a monitoring time has a missing measurement marker, the monitoring time is removed from the number of valid monitoring times and the removal position is recorded. Finally, divide the sum of the absolute judgment value sequence by the number of valid monitoring times to obtain the enhanced response intensity value corresponding to the deep monitoring well.

[0067] The set of second eigenvalues ​​is obtained by summing up all the reinforcement response intensity values; The second eigenvalue set refers to the data set formed by summing the enhanced response intensity values ​​corresponding to all deep monitoring wells, which is used to reflect the distribution of the overall response level of deep monitoring wells in the monitoring area.

[0068] A complete list of all deep monitoring well numbers is compiled, and the enhanced response intensity value corresponding to each deep monitoring well is read one by one according to the list. The enhanced response intensity values ​​are written into a summary table in the order of well number. Then, the summary table is checked for completeness to confirm that each deep monitoring well corresponds to a unique enhanced response intensity value record. When there is a missing record, the well number is retained and the missing status is marked. Then, all enhanced response intensity values ​​in the summary table are extracted to form a set of aggregate data. The aggregate data contains the enhanced response intensity values ​​of all deep monitoring wells in the monitoring area, thereby obtaining the second feature value set.

[0069] Determine the average reinforcement response of the second eigenvalue set.

[0070] The enhanced response average value refers to the value obtained by averaging all enhanced response intensity values ​​in the second feature value set, and is used to represent the average state of the overall response level of deep monitoring wells in the monitoring area.

[0071] A second feature value set is obtained, and the enhanced response intensity value records corresponding to each deep monitoring well in the set are acquired. Each record is checked to see if it is a calculable value and the missing status is identified. Then, the second feature value set is traversed, and the records in the missing status are removed and the deep monitoring well number corresponding to the removed record is recorded to form a list of valid values ​​composed of all calculable enhanced response intensity values. Then, the enhanced response intensity values ​​in the list of valid values ​​are summed one by one to obtain the total, and the number of elements in the list of valid values ​​is counted as the number of valid wells. Finally, the sum is divided by the number of valid wells to obtain the average enhanced response value of the second feature value set.

[0072] In embodiments of the present invention, groundwater pollution anomaly types are obtained, including: The vertical compression characteristic values ​​corresponding to deep monitoring wells are summarized to obtain the first characteristic value set; The first eigenvalue set refers to the data set formed by summing the vertical compression eigenvalues ​​corresponding to all deep monitoring wells, which is used to reflect the overall distribution of the degree of vertical convergence among different deep monitoring wells in the monitoring area.

[0073] Read the vertical compression matrix and its row and column indices, confirming that both row and column indices correspond to deep monitoring wells and that their order is consistent. Then, traverse the deep monitoring wells item by item according to their row indices. For any target index corresponding to a deep monitoring well, read the diagonal matrix element corresponding to that target index from the vertical compression matrix as the vertical compression value of that deep monitoring well. Establish a correspondence between this vertical compression value and the well number of the deep monitoring well and write it into the summary table. During the traversal, identify missing states. When a diagonal matrix element is a missing identifier, retain the well number of the deep monitoring well and mark the missing state. After traversing all deep monitoring wells, extract all vertical compression value records from the summary table and form a set of data, thereby obtaining the first feature value set containing the vertical compression values ​​of all deep monitoring wells.

[0074] Determine the vertically compressed average value of the first eigenvalue set; The vertical compression average value refers to the value obtained by averaging all vertical compression feature values ​​in the first feature value set, and is used to represent the average level of the overall vertical convergence of deep monitoring wells in the monitoring area.

[0075] The first feature value set is read and the missing state records are identified. The records in the missing state are removed and the corresponding deep monitoring well numbers are recorded to form an effective value list consisting of all calculable vertical compression values. Then, the effective value list is accumulated item by item to obtain the total vertical compression value, and the number of elements in the effective value list is counted as the number of effective wells. Finally, the total vertical compression value is divided by the number of effective wells to obtain the average vertical compression value of the first feature value set.

[0076] Based on the vertical compression characteristic value, vertical compression average value, enhanced response intensity value, and enhanced response average value corresponding to the deep monitoring wells, the anomaly type of all deep monitoring wells is determined to obtain the groundwater pollution anomaly type; Groundwater pollution anomaly type refers to the classification of pollution anomalies exhibited by deep monitoring wells based on the relationship between vertical convergence degree and response intensity relative to the overall average level. It is used to distinguish anomalies dominated by vertical short-circuit convergence from other types of anomalies.

[0077] Read the summary table of vertical compression values ​​and the average vertical compression value corresponding to each deep monitoring well, and read the summary table of enhanced response intensity values ​​and the average enhanced response value corresponding to each deep monitoring well. Verify the consistency of the well number lists in the two summary tables to form a judgment record table indexed by the deep monitoring well number. Then, iterate through the wells by number, reading the corresponding vertical compression value and enhanced response intensity value for each target deep monitoring well, and comparing them with the average vertical compression value and the average enhanced response value respectively. Obtain the comparison results for the well in the vertical compression direction and the comparison results in the enhanced response direction. Then, based on the two comparison results, perform anomaly type determination. If the vertical compression value of the target deep monitoring well is not less than the average vertical compression value and its... When the enhanced response intensity value is not less than the average enhanced response value, the groundwater pollution anomaly type of the target deep monitoring well is determined to be the vertical short-circuit single sink dominant type. When the target deep monitoring well does not meet the aforementioned simultaneous conditions, the groundwater pollution anomaly type of the target deep monitoring well is determined to be the non-vertical short-circuit single sink dominant type. During the determination process, when the vertical compression value or enhanced response intensity value of any target deep monitoring well is missing, the well is recorded as undeterminable and the reason for the missing value is recorded. After completing the traversal and determination of all deep monitoring wells, the well number of each deep monitoring well and its corresponding groundwater pollution anomaly type are written into the determination record table and output, thereby obtaining the groundwater pollution anomaly type result covering all deep monitoring wells.

[0078] Among them, the abnormal groundwater pollution types are either vertical short-circuit single sink dominant or non-vertical short-circuit single sink dominant.

[0079] The vertical short-circuit single-sink dominant type refers to a situation where, when there is a vertical water-guiding channel in the groundwater aquifer structure, multiple shallow polluted water bodies migrate downwards along this channel and converge at the same deep monitoring well location. This causes the pollution response observed by the deep monitoring well to be mainly controlled by the vertical short-circuit effect, resulting in a high response intensity that is difficult to reflect the spatial distribution differences of shallow pollution sources. The non-vertical short-circuit single-sink dominant type refers to a situation where the pollution response of the deep monitoring well does not show a significant vertical convergence phenomenon. Its water quality changes are mainly affected by regional groundwater runoff conditions or dispersed pollution inputs. The deep response can reflect the spatial differences or local influence range of shallow pollution sources to a certain extent.

[0080] It should be noted that, under conditions where there are abandoned small-diameter boreholes or incomplete backfilling of old boreholes forming vertical water-guiding channels, multiple shallow pollution sources may flow into the same deep monitoring well along these channels. This leads to the compression of spatial distribution information in deep observation data, making it difficult for deep anomaly responses to accurately reflect the actual location and quantity of shallow pollution sources. If judgment is made solely based on the magnitude of deep anomalies, it is easy to misjudge the pollution source or underestimate the risk range. Therefore, it is necessary to further distinguish the anomaly formation mechanism based on anomaly identification. By obtaining the types of groundwater pollution anomalies, anomalies dominated by vertical short-circuit single sinks can be distinguished from other types of anomalies, thereby providing a more accurate basis for pollution source tracing analysis, risk assessment, and the formulation of subsequent prevention and control measures.

[0081] S5. Generate groundwater pollution anomaly detection results based on the groundwater pollution anomaly type.

[0082] In an embodiment of the present invention, generating groundwater pollution anomaly detection results includes: The enhanced response time series of deep monitoring wells are correlated with the groundwater pollution anomaly types corresponding to the deep monitoring wells to form anomaly records; Read the enhanced response time series records of each deep monitoring well, read the groundwater pollution anomaly type determination records corresponding to each deep monitoring well, and verify that both types of records contain a consistent list of deep monitoring well numbers. Then, traverse the deep monitoring wells one by one according to their well numbers. For any target deep monitoring well, read the enhanced response time series corresponding to the target deep monitoring well from the enhanced response time series records. The enhanced response time series contains the monitoring time and determination value arranged in chronological order of monitoring time. Read the groundwater pollution anomaly type corresponding to the target deep monitoring well from the anomaly type determination records. Then, establish an anomaly record entry with the target deep monitoring well number as the primary key, use the enhanced response time series as the time series field of the anomaly record entry, use the groundwater pollution anomaly type as the type field of the anomaly record entry, and simultaneously write the monitoring time range, data missing label information, and the record generation time to form the anomaly record of the target deep monitoring well. After traversing all deep monitoring wells, obtain an anomaly record set consisting of multiple anomaly records.

[0083] Based on all abnormal records, generate groundwater pollution anomaly detection results.

[0084] The system reads and verifies the integrity of the abnormal records, checking whether each record simultaneously includes the deep monitoring well number, enhanced response time series, and groundwater pollution anomaly type, and marks any records with missing fields. The abnormal record set is then sorted by deep monitoring well number or grouped by anomaly type to form a results list. Each result item corresponds to a deep monitoring well and includes its groundwater pollution anomaly type and corresponding enhanced response time series summary information. The summary information includes the start and end range of monitoring time and records of the change in judgment values ​​over time. The results list is then linked to the row indices of the anomaly judgment matrix, and the corresponding judgment value sequence for each deep monitoring well is added to the anomaly judgment matrix to ensure that the detection results are traceable to the matrix data. Finally, the results list is output as groundwater pollution anomaly detection results, enabling the detection results to indicate the anomaly type of each deep monitoring well within the monitoring area and its response changes during the monitoring period.

[0085] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A groundwater pollution anomaly detection method based on deep reinforcement learning, characterized in that, Includes the following steps: Based on the monitoring wells in the groundwater monitoring area, shallow observation sub-matrices and deep observation sub-matrices are constructed, and a vertical hybrid matrix is ​​also constructed. The vertically compressed feature matrix is ​​constructed by performing vertical compression on the vertical mixing matrix; The response matrix is ​​obtained based on the deep observation submatrix, and the operation matrix corresponding to the deep observation submatrix is ​​adjusted based on reinforcement learning and the response matrix to obtain the optimized operation matrix. The enhanced response average value is determined based on the optimized operation matrix, and the anomaly type is determined for all deep monitoring wells based on the enhanced response average value to obtain the groundwater pollution anomaly type. Based on the type of groundwater pollution anomaly, generate groundwater pollution anomaly detection results.

2. The groundwater pollution anomaly detection method based on deep reinforcement learning according to claim 1, characterized in that, Constructing shallow and deep observation sub-matrices includes: All monitoring wells within the groundwater monitoring area were divided into shallow and deep monitoring wells. Based on the observed values ​​of monitoring indicators from shallow monitoring wells, a shallow observation sub-matrix is ​​constructed; A deep observation submatrix is ​​constructed based on the observed values ​​of monitoring indicators from deep monitoring wells.

3. The groundwater pollution anomaly detection method based on deep reinforcement learning according to claim 2, characterized in that, Constructing the vertical blending matrix includes: Based on the shallow observation sub-matrix, read the time series of shallow monitoring wells; Based on the deep observation sub-matrix, read the time series of deep monitoring wells; Correlation analysis was performed on the time series of shallow and deep monitoring wells to obtain the correlation coefficient. A vertical mixing matrix is ​​constructed based on the correlation coefficient.

4. The groundwater pollution anomaly detection method based on deep reinforcement learning according to claim 1, characterized in that, The vertically compressed feature matrix is ​​obtained, including: Determine the sum of the absolute values ​​of the rows in the vertical mixing matrix; The row normalization value is determined based on the matrix elements of each row in the vertical mixing matrix and the sum of the absolute values ​​of the rows. Construct a normalized matrix based on the row normalized values; Determine the vertical compression eigenvalues ​​of the normalized matrix; A vertically compressed feature matrix is ​​constructed based on the vertically compressed eigenvalues.

5. The groundwater pollution anomaly detection method based on deep reinforcement learning according to claim 1, characterized in that, The response matrix is ​​obtained based on the deep observation submatrix, including: Based on the deep observation submatrix, construct the operation matrix; Set the matrix elements of the operation matrix according to the preset initialization rules; The response matrix is ​​obtained by performing matrix multiplication on the operation matrix and the vertical compression feature matrix.

6. The groundwater pollution anomaly detection method based on deep reinforcement learning according to claim 1, characterized in that, The optimized operation matrix is ​​obtained, including: Based on the vertical compression eigenvalues ​​corresponding to deep monitoring wells in the response matrix and vertical compression eigenvalue matrix, the values ​​of matrix elements in the operation matrix are evaluated to obtain the evaluation results. Based on the reinforcement learning and evaluation results, the matrix elements of the operation matrix are adjusted to obtain the optimized operation matrix.

7. The groundwater pollution anomaly detection method based on deep reinforcement learning according to claim 2, characterized in that, The average value of the enhancement response is determined based on the optimized operation matrix, including: Matrix multiplication is performed on the optimized operation matrix and the deep observation submatrix to obtain the anomaly detection matrix; Read the enhanced response time series of deep monitoring wells from the anomaly detection matrix; Determine the intensity value of the reinforcement response based on the reinforcement response time series; The set of second eigenvalues ​​is obtained by summing up all the reinforcement response intensity values; Determine the average reinforcement response of the second eigenvalue set.

8. The groundwater pollution anomaly detection method based on deep reinforcement learning according to claim 7, characterized in that, The types of groundwater pollution anomalies obtained include: The vertical compression characteristic values ​​corresponding to deep monitoring wells are summarized to obtain the first characteristic value set; Determine the vertically compressed average value of the first eigenvalue set; Based on the vertical compression characteristic value, vertical compression average value, enhanced response intensity value, and enhanced response average value corresponding to the deep monitoring wells, the anomaly type of all deep monitoring wells is determined to obtain the groundwater pollution anomaly type; Among them, the abnormal groundwater pollution types are either vertical short-circuit single sink dominant or non-vertical short-circuit single sink dominant.

9. A groundwater pollution anomaly detection method based on deep reinforcement learning according to claim 2, characterized in that, Generate groundwater pollution anomaly detection results, including: The enhanced response time series of deep monitoring wells are correlated with the groundwater pollution anomaly types corresponding to the deep monitoring wells to form anomaly records; Based on all abnormal records, generate groundwater pollution anomaly detection results.