Deep learning-based pollutant into-sea flux monitoring and predicting method
Through a deep learning-based pollutant flux monitoring method, using the TCN model and Pearson correlation analysis, the pollutant areas to be analyzed are dynamically screened, which solves the problem of poor prediction effect of traditional methods in complex environments and achieves high-precision and efficient pollutant flux prediction into the sea.
Patent Information
- Application Number
- CN202511158857.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-08-19
AI Technical Summary
Traditional methods for predicting pollutant flux into the sea have limitations when processing long-term series data, especially under the influence of complex terrain, extreme climate and human activities, where the prediction effect is not ideal. In addition, the statistical regression model assumes a linear relationship between the data, which deviates greatly from the actual situation.
A deep learning-based pollutant flux monitoring and prediction method for entering the sea is adopted. By collecting historical water flow and pollutant concentration data, a TCN model is constructed. Combined with Pearson correlation analysis and multi-source time series data, the pollutant areas to be analyzed are dynamically screened, and a one-dimensional causal convolutional network is used to capture long-term and short-term time series dependencies, to perform flow and concentration predictions, and finally calculate the pollutant flux into the sea.
It improves the accuracy and stability of pollutant flux predictions into the sea, reduces blind spots and redundant areas, ensures data accuracy and model versatility, shortens response time, and improves the timeliness and operability of pollution prevention and control.
Smart Images

Figure CN120744679A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ocean flux monitoring, and in particular to a method for monitoring and predicting pollutant flux into the sea based on deep learning. Background Art
[0002] Pollutant flux into the sea refers to the amount of a certain pollutant entering the marine environment through input channels such as rivers within a certain area per unit time. However, traditional pollutant flux into the sea prediction methods face some difficulties in practical applications, especially when dealing with long time series data, which have certain limitations. Traditional pollutant flux into the sea prediction methods mostly rely on physical numerical models or statistical regression models. These models are mainly based on the hydrological processes and meteorological changes in the basin to derive predictions of flux into the sea. Common physical numerical models include hydrological models, meteorological models, etc., which usually require a large number of parameters and accurate boundary conditions and initial conditions for accurate modeling.
[0003] In practical applications, obtaining accurate boundary and initial conditions is often challenging, especially in complex terrain, climate conditions, and the influence of human activity. This results in these models performing poorly in environments with complex terrain, extreme climates, and dense human activity. Statistical regression models, on the other hand, rely on statistical relationships between data, often assuming a linear relationship or fixed distribution pattern, which can deviate significantly from reality.
[0004] In summary, the development of a pollutant flux prediction method based on the TCN model aims to overcome the limitations of existing technologies and improve prediction accuracy and efficiency. Summary of the Invention
[0005] Based on this, it is necessary to provide a deep learning-based method for monitoring and predicting the flux of pollutants into the sea to solve at least one of the above technical problems.
[0006] To achieve the above objectives, a deep learning-based method for monitoring and predicting pollutant flux into the sea is provided, the method comprising the following steps: Step S1: collecting historical water flow data of a target area based on a first time interval; collecting historical pollutant concentration data of the target area based on a second time interval; and determining a pollutant analysis area based on the historical water flow data and the historical pollutant concentration data; Step S2: obtaining regional water samples based on the pollutant-to-be-analyzed area; processing the regional water samples to obtain nitrite concentration data, ammonia nitrogen concentration data, and nitrate concentration data, respectively, and combining them with historical water flow data as a model training set; Step S3: Preprocess the model training set to obtain a standardized model training set, and use the real-time collected water flow data as the model test set; use the standardized model training set and the model test set to train the TCN model, and use the trained TCN model to predict the flow and pollutant concentration of the pollutant to be analyzed area to obtain water flow prediction data and pollutant concentration prediction data; Step S4: Calculate the pollutant flux into the sea prediction value based on the water flow prediction data and the pollutant concentration prediction data to perform the pollutant flux into the sea monitoring prediction operation.
[0007] Preferably, determining the pollutant analysis area based on historical water flow data and historical pollutant concentration data in step S1 includes: Taking the highest and lowest values of the historical pollutant concentration data as the center, determine the location of the first monitoring station and the location of the second monitoring station closest to the highest and lowest values respectively; Analyze the monitoring radius of the monitoring station according to the position of the first monitoring station and the position of the second monitoring station to obtain the monitoring radius of the first monitoring station and the monitoring radius of the second monitoring station; Determine an initial pollutant to-be-analyzed area between the first monitoring station location and the second monitoring station location based on the first monitoring station monitoring radius and the second monitoring station monitoring radius; Calculate the Pearson correlation coefficient between historical water flow data and historical pollutant concentration data; The Pearson correlation coefficient is compared with the preset correlation threshold. When the Pearson correlation coefficient is greater than or equal to the preset correlation threshold, the position of the third monitoring station is determined based on the Pearson correlation coefficient, and the initial pollutant area to be analyzed is secondary screened according to the position of the third monitoring station to obtain the pollutant area to be analyzed.
[0008] Preferably, determining the location of the third monitoring station based on the Pearson correlation coefficient, and secondary screening the initial pollutant analysis area according to the location of the third monitoring station includes: Gridding the initial pollutant analysis area and determining the Pearson correlation coefficient of each grid cell in the initial pollutant analysis area; Grid cells with a Pearson correlation coefficient greater than or equal to a preset correlation threshold are screened to obtain pollutant transport sensitive areas; Based on the regional edge of the pollutant transport sensitive area, determine the location of the third monitoring station closest to the edge; The cross-section location collected by the third monitoring station is obtained based on the location of the third monitoring station, and the velocity gradient of the river section is calculated in combination with the historical water flow to determine the spatial range of pollutant migration; The pollutant migration space range and the initial pollutant analysis area are used to perform regional intersection calculation to obtain the pollutant analysis area.
[0009] Preferably, when the Pearson correlation coefficient is less than a preset correlation threshold, the method further includes: When the Pearson correlation coefficient is less than a preset correlation threshold, the initial pollutant analysis area determined based on the first monitoring station location and the second monitoring station location is divided into a number of grid cells of equal size; For each grid cell, the difference between the average historical pollutant concentration of the corresponding monitoring station and the overall historical average concentration of the target area is calculated to obtain the concentration deviation value of the grid cell; All grid cells whose concentration deviation values are greater than a preset deviation threshold are screened as high-concentration candidate cells, where the preset deviation threshold is greater than the global average concentration + 2 times the standard deviation; Perform spatial cluster analysis on high-concentration candidate units to extract adjacent pollutant cluster sub-regions with consistent deviations; Based on the extracted pollutant cluster sub-region, its outer polygon boundary is used as the pollutant analysis area.
[0010] Preferably, obtaining a regional water sample based on the pollutant to be analyzed area in step S2 includes: Determine the geographical boundaries of the pollutant analysis area and use the GPS positioning system to mark the sampling point locations. The spacing between sampling points should be controlled within the range of 50m to 200m. The sampling depth is selected based on the water depth and water flow conditions of the area to be analyzed for pollutants. The sampling depth in shallow water areas is 0.3m to 0.5m, and the sampling depth in deep water areas is 1.0m to 3.0m. When the water flow rate exceeds 0.5m / s, an anti-disturbance sampler is used to ensure sample integrity. The volume of water samples collected ranges from 500mL to 2L. The sampling bottles are made of polyethylene or glass. The bottles must be pre-acid-washed and rinsed with deionized water to avoid secondary contamination. The pre-acid-washing step is to soak them in a 1:1 HNO3 solution for 30 minutes. During the sampling process, environmental condition data, including water temperature, pH value, and dissolved oxygen concentration, were recorded and timestamped to obtain regional water samples.
[0011] Preferably, in step S2, processing the regional water samples to obtain nitrite concentration, ammonia nitrogen concentration, and nitrate concentration data respectively includes: When using the N-1-naphthylethylenediamine spectrophotometric method to determine nitrite content, the detection wavelength is set to 540nm. If the measured concentration is 0.02mg / L to 1.0mg / L and the color reaction time does not exceed 10 minutes, the nitrite concentration data is considered stable. If color drift occurs or the interference peak shift is greater than ±5nm, the test is invalid. When using the Nessler's reagent colorimetric method to detect ammonia nitrogen concentration, at a measurement wavelength of 425nm, if the ammonia nitrogen concentration is stable between 0.1mg / L and 10mg / L, and the correlation coefficient R² between the colorimetric absorbance curve and the standard curve is greater than 0.98, the test data is considered valid ammonia nitrogen concentration. If the concentration exceeds 15mg / L or the reagent color development is incomplete, dilution and re-testing are required. When ultraviolet spectrometry or ion chromatography is used to determine nitrate concentration, the concentration range is 0.5 mg / L to 20 mg / L, the ratio of the absorbance between 220 nm and 275 nm must be greater than 1.5, and the background correction value must not exceed 0.05 to be confirmed as valid nitrate concentration data; if the deviation of two consecutive test results is greater than ±1.0 mg / L, an abnormal flag is triggered.
[0012] Preferably, in step S3, training the TCN model using the standardized model training set and the model test set includes: Construct a TCN model structure, which includes an input layer, a causal convolutional layer, a dilated convolutional layer, and an output layer. The input layer receives the time series in the standardized model training set. The shape of the input tensor is (B, T, F), where B is the batch size, T is the number of time steps, and F is the number of features. Based on the causal convolution layer, the time dimension of the input tensor is padded with (K-1) zeros on the left side to obtain the first model training data, where K is the convolution kernel size; Based on the dilated convolution layer, a dilation factor D is introduced into the first model training data to capture the time dependency, thereby obtaining the second model training data, where the dilation factor D represents the interval between the convolution kernels when processing the first model training data; The second model training data is subjected to multi-layer convolution and activation transformation through the activation function, and the task type of the transformation result is determined. When the task type is a classification task, the output layer is used followed by the Softmax function to generate a probability distribution to obtain a probability distribution result. When the task type is a regression task, the output layer is used to directly output the predicted value. The shape of the output tensor in the output layer is (B, T, C), where C is the number of output channels. The model accuracy is evaluated on the probability distribution results or predicted values according to the model test set to obtain the trained TCN model.
[0013] Preferably, the causal convolutional layer further includes: Each residual block contains two causal convolutional layers, each of which is followed by an activation function and a regularization layer; In the first layer of causal convolution, the convolution kernel size is K, the dilation factor is D, and the number of output channels is C. After the convolution output, the nonlinear feature is introduced through the ReLU activation function, and its calculation formula is: ; Where, is the input value, is the maximum value function; Set the Dropout regularization layer after the activation function, and the random dropout ratio is 0.2; The convolution kernel size and dilation factor of the second layer of causal convolution are the same as those of the first layer, that is, the convolution kernel size K and dilation factor D do not change; The input tensor of the residual block is directly added to the second layer causal convolution output through a skip connection, where the output of the residual block is defined by the following formula: ; Where, is the final output of the residual block, is the input tensor, is the first layer of convolution operation, To apply nonlinear activation function, It is the second convolution operation.
[0014] Preferably, the task types for determining the transformation result include: A classification task is considered when any of the following conditions occurs: the label format of the second model training data is a discrete category index, and the number of categories is greater than 1; the number of channels C in the last dimension of the output tensor matches the number of categories, and the value range is mainly between 0 and 1; the tensor features after convolution and activation transformation meet the probability distribution characteristics; When the following conditions occur at the same time, it is determined to be a regression task: the labels of the second model training data are continuous real values, and the last dimension C of the output tensor is 1; the output value range after convolution and activation transformation is not limited to 0, 1, specifically Fluctuates within the range; the output tensor does not meet the probability normalization characteristics.
[0015] Preferably, in step S4, calculating the predicted value of pollutant flux into the sea based on the water flow prediction data and the pollutant concentration prediction data includes: The pollutant flux into the sea is calculated based on the water flow prediction data and pollutant concentration prediction data according to the sea flux calculation formula. The sea flux calculation formula is as follows: ; in for The instantaneous flux of pollutants into the sea at any given moment, for Time-of-day pollutant concentration forecast data, for Water flow forecast data at all times, For the moment.
[0016] The present invention has the following beneficial effects: First aspect: The present invention constructs a training set based on multi-source time-series hydrological and water quality data (flow, nitrite, ammonia nitrogen, nitrate). Compared with single concentration or flow prediction methods, it can fully explore the mutual influence and coupling relationship between various factors, and effectively improve the overall prediction accuracy and stability of the model for pollutant flux into the sea, especially when the pollutant concentration fluctuates drastically or the flow is abnormal, it can still maintain a high prediction robustness.
[0017] The second aspect: In step S1, by combining the positioning of historical extreme value sites with Pearson correlation analysis, the pollutant analysis area can be dynamically screened and finely delineated, which can accurately lock the sensitive area of pollutant migration, avoiding the blind spots and redundant areas of the traditional single fixed monitoring range, thereby significantly improving the economy and spatiotemporal resolution of regional sampling and prediction.
[0018] The third aspect: In step S2, a stratified sampling scheme is designed according to the water depth, flow rate and anti-disturbance characteristics of the sampler, and strict detection deviation and quality control thresholds are set for each chemical analysis method (ammonium molybdate spectrophotometry, naphthylethylenediamine spectrophotometry, Nessler reagent colorimetry, ultraviolet spectroscopy or ion chromatography). This can effectively ensure the accuracy and consistency of the data, provide high-quality input for model training, and reduce the prediction error caused by sample abnormalities.
[0019] Fourthly, the one-dimensional causal convolutional network (TCN) used in step S3, combined with dilated convolution and residual structure, can not only capture long-term and short-term temporal dependencies, but also avoid the gradient vanishing problem of recurrent networks. It automatically switches between classification and regression outputs according to the label type, making the model both universal and adaptive, greatly improving the computational efficiency and accuracy in real-time online prediction scenarios.
[0020] Fifth aspect: In step S4, the instantaneous flux into the sea is directly calculated using the predicted flow and concentration data. The formula is simple and clear ( ), no additional parameter fitting is required during the calculation process, which facilitates rapid deployment in the monitoring and early warning system, realizing the "prediction-calculation-alarm-feedback" closed loop, significantly shortening the response time, and improving the timeliness and operability of pollution prevention and control. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A schematic diagram of the steps of a deep learning-based method for monitoring and predicting pollutant flux into the sea; Figure 2 A flowchart of the steps of a deep learning-based method for monitoring and predicting pollutant flux into the sea provided in one embodiment of the present application; Figure 3This is an example diagram of the structure of a TCN model for a deep learning-based pollutant flux monitoring and prediction method provided in one embodiment of the present application; Figure 4 A comparison chart of the instantaneous nitrite flux into the sea results of the deep learning-based pollutant flux monitoring and prediction method provided in one embodiment of the present application; Figure 5 A comparison chart of the instantaneous nitrate flux into the sea results of the deep learning-based pollutant flux monitoring and prediction method provided in one embodiment of the present application; Figure 6 A comparison chart of ammonia nitrogen instantaneous flux into the sea results from a deep learning-based pollutant flux monitoring and prediction method provided in one embodiment of the present application; The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0022] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. It is obvious that the embodiments described are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts are within the scope of protection of the present invention.
[0023] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor and / or microcontroller approaches.
[0024] It should be understood that although the terms "first," "second," and the like may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used solely to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the scope of the exemplary embodiments. The term "and / or" as used herein includes any and all combinations of one or more of the listed associated items.
[0025] To achieve this, please refer to Figures 1 to 6 A method for monitoring and predicting pollutant flux into the sea based on deep learning, the method comprising the following steps: Step S1: collecting historical water flow data of a target area based on a first time interval; collecting historical pollutant concentration data of the target area based on a second time interval; and determining a pollutant analysis area based on the historical water flow data and the historical pollutant concentration data; In one embodiment, the first time interval can be set to 15 minutes, and high-frequency continuous observation stations arranged on the coastline are used to automatically record the instantaneous flow value at the intertidal zone section at 15-minute intervals starting from 00:00 on February 1, 2024. The instantaneous flow value collected by each observation station is calibrated with UTC time and stored in sequence in the database table WaterFlowHistory to generate a water flow time series dataset from 00:00 on February 1, 2024 to the cutoff time.
[0026] The second time interval can also be set to 4 hours. Through the automatic water quality analyzer installed in the same observation station network, for example, starting from 00:00 on November 1, 2022, sampling is carried out at 4-hour intervals and the concentrations of pollutants such as suspended particulate matter (TSS), chemical oxygen demand (COD) and heavy metal content are measured online. The pollutant concentration values at each time point are stored in the water quality management system together with the corresponding metadata such as sampling time, sampling depth, instrument model, etc. in the record format PollutionConcHistory.
[0027] Calculate the maximum value MaxFlow and the minimum value MinFlow of the flow value at each moment in the water flow time series dataset, calculate the maximum value MaxConc and the minimum value MinConc of each pollutant index in the pollutant concentration time series dataset, and use (MaxFlow, MinFlow) and (MaxConc, MinConc) as the centers, respectively, search for the locations of the monitoring stations closest to these four center values, determine the first monitoring site A and the second monitoring site B, use the coastal section where the sites A and B are located as the boundary of the pollutant analysis area, draw a polygonal monitoring area, and mark all sub-section observation points in the domain as the pollutant analysis area.
[0028] Step S2: obtaining regional water samples based on the pollutant-to-be-analyzed area; processing the regional water samples to obtain nitrite concentration data, ammonia nitrogen concentration data, and nitrate concentration data, respectively, and combining them with historical water flow data as a model training set; In one embodiment, the sampling interval is determined to be once every six hours, starting from the date when the sample collection work begins and continuing until the required total sample volume is collected. A number of equidistant sampling points are pre-selected within the demarcated polygonal monitoring area. The sampling ship or unmanned sampling platform operates according to the predetermined route. After arriving at each sampling point, water samples are extracted from half a meter below the water surface. The raw water collected each time is placed in a dedicated sampling bottle, and a label is affixed to the bottle with the sampling date, specific time and sampling point number. The bottle is stored at a low temperature in a refrigerator or ice pack on site and kept below four degrees Celsius when transported back to the laboratory.
[0029] The classic colorimetric analysis method can be used to react the water sample with a nitrite color developer, and the absorbance at the corresponding wavelength can be read with a spectrophotometer to obtain the nitrite concentration. The Kjeldahl nitrogen determination method can be used to treat the water sample. After heating and digestion, the amount of ammonia generated can be measured by titration or an automatic nitrogen meter and converted into ammonia nitrogen content. The ion chromatography method can be used to inject the water sample into the chromatographic system, separate it through an ion exchange column, detect the peak area, and directly read the nitrate concentration. Each sample item should be measured in parallel for at least three times, and the average of the three results should be taken as the final concentration data; at the same time, blank samples and standard spiked samples should be used to verify the accuracy of the analysis method.
[0030] The four nutrient concentrations obtained at each sampling time point are matched one by one with the flow monitoring values at the same time point and location. The flow values and four nutrient concentrations obtained at each sampling time are organized into a complete record in chronological order and stored in a spreadsheet or database. All records are arranged in sequence to form a training set table containing flow data and nutrient concentration data, which can be directly used for subsequent machine learning model training or statistical analysis.
[0031] Step S3: Preprocess the model training set to obtain a standardized model training set, and use the real-time collected water flow data as the model test set; use the standardized model training set and the model test set to train the TCN model, and use the trained TCN model to predict the flow and pollutant concentration of the pollutant to be analyzed area to obtain water flow prediction data and pollutant concentration prediction data; In one embodiment, the training set is checked for data points that were not collected or failed to be measured. These missing values are then filled with the average of two consecutive measurements from the same monitoring point. Upper and lower limits are then applied to each record. If a value exceeds the normal range of historical flow or concentration variations (for example, flow exceeding the local tidal extreme or ammonia nitrogen concentration exceeding the upper limit of environmental regulations), it is removed or replaced with a nearby reasonable value. A "minimum-maximum normalization" method is used to map all flow and concentration data to a value between 0 and 1: the historical maximum and minimum values for each monitoring indicator are found; the minimum value is subtracted from the original value, and then divided by the "maximum value minus the minimum value" to obtain the normalized value. This process ensures that data for different indicators are on the same scale, facilitating rapid convergence during model training.
[0032] The first 80% of all the standardized data obtained is divided into chronological order as data for model training. The remaining 20% of historical data, together with the latest traffic data collected in real time, is used as input for model performance testing and online prediction after training. The real-time traffic data must simultaneously undergo the same minimum-maximum normalization processing to ensure consistency with the scale of the training set.
[0033] The Temporal Convolutional Network (TCN) employs a core approach of one-dimensional convolution and dilated convolution to capture long-term dependencies, making it more efficient to train than traditional recurrent networks. The input layer accepts traffic flow and four normalized concentration values for several consecutive hours or days. Three layers of dilated convolution are stacked, each with a kernel size of 3 and dilation factors (i.e., the expansion of the receptive field) of 1, 2, and 4, respectively. Each convolution layer is followed by batch normalization and ReLU activation, and terminated with a fully connected layer that maps the network output to predicted traffic flow and concentration values for several future moments.
[0034] In the Python environment, you can choose TensorFlow or PyTorch framework, use mean squared error (MSE) as the loss function, Adam as the optimizer, and set the learning rate to 0.001 initially. During training, the batch size for each iteration is set to 32, with a maximum of 100 training cycles. Performance is evaluated on the test set after every 10 cycles. If the test error does not decrease significantly in three consecutive evaluations, training is stopped early.
[0035] The latest flow and concentration values collected and normalized in real time are input into the trained network, and the network can output the flow forecast values and four nutrient concentration forecast values for a period of time in the future. The standardized forecast values output by the network are reverse mapped according to the highest and lowest values recorded, and restored to actual physical quantities, obtaining forecast data that can be directly applied to environmental monitoring and early warning.
[0036] Step S4: Calculate the pollutant flux into the sea prediction value based on the water flow prediction data and the pollutant concentration prediction data to perform the pollutant flux into the sea monitoring prediction operation.
[0037] In one embodiment, the flow rate prediction value at each sampling time in several future time periods is obtained from the model output in cubic meters per second, and the concentration prediction value of each pollutant (such as nitrite, ammonia nitrogen, and nitrate) at each sampling time in the same time period is simultaneously obtained in milligrams per liter.
[0038] Convert the flow rate of "cubic meters per second" into "liters per second" (one cubic meter equals one thousand liters) to match the concentration unit. For each moment, multiply the flow rate (liters per second) at that moment by the concentration of each pollutant (milligrams per liter) to obtain the instantaneous flux of the pollutant at that moment, in milligrams per second. If kilogram or ton-level flux is required, first convert milligrams to kilograms (one million milligrams equals one kilogram), and then accumulate or average.
[0039] Set a monitoring period (for example, one day or one week), add the instantaneous flux at each moment in the period according to the time interval to obtain the cumulative flux of the period in milligrams or kilograms. If you need to obtain the average flux, divide the cumulative flux by the total number of seconds in the period to obtain the average value of milligrams per second or kilograms per second.
[0040] The cumulative flux and average flux of each pollutant are organized into a table with columns such as time period, flow prediction value, concentration prediction value, instantaneous flux, cumulative flux, etc., and exported as a spreadsheet or database record.
[0041] Preferably, determining the pollutant analysis area based on historical water flow data and historical pollutant concentration data in step S1 includes: Step S11: taking the highest value and the lowest value of the historical pollutant concentration data as the center, determining the location of the first monitoring station and the location of the second monitoring station closest to the highest value and the lowest value respectively; Step S12: Analyze the monitoring radius of the monitoring station according to the position of the first monitoring station and the position of the second monitoring station to obtain the monitoring radius of the first monitoring station and the monitoring radius of the second monitoring station; Step S13: determining an initial pollutant to-be-analyzed area between the first monitoring station location and the second monitoring station location based on the monitoring radius of the first monitoring station and the monitoring radius of the second monitoring station; Step S14: Calculating the Pearson correlation coefficient between the historical water flow data and the historical pollutant concentration data; Step S15: Compare the Pearson correlation coefficient with the preset correlation threshold. When the Pearson correlation coefficient is greater than or equal to the preset correlation threshold, the position of the third monitoring station is determined based on the Pearson correlation coefficient, and the initial pollutant area to be analyzed is secondary screened according to the position of the third monitoring station to obtain the pollutant area to be analyzed.
[0042] In one embodiment, see Figure 2 , in the historical concentration records of all monitoring stations, find the monitoring stations with the highest and lowest pollutant concentrations respectively; if there are multiple stations with the same concentration, select the station closest to the coastline as the first monitoring station, and the second closest as the second monitoring station. The extreme concentrations must be based on data from at least one full year (daily sampling frequency is not less than once a day), otherwise they may be distorted due to seasonality or occasional events. If the extreme value stations are distributed in both estuaries and sea areas, the stations in the estuary area should be selected first to ensure that the correlation between the predicted area and the flux into the sea is maximized.
[0043] According to the design manual of the monitoring instrument, determine the effective coverage radius of water quality monitoring at a single site (the recommended range is 1km to 5km), and record the effective coverage radius of the first monitoring station and the second monitoring station as the "first monitoring radius" and "second monitoring radius" respectively. The coverage radius must not exceed half of the distance between adjacent monitoring stations to avoid excessive area overlap and resulting in data redundancy.
[0044] In another embodiment, two circles are drawn with the first monitoring station and the second monitoring station as the centers and their respective monitoring radii as the radii, and the common intersection area of the two circles is taken as the "initial area to be analyzed". If the two circles have no intersection, the center point of the shortest line between the two circles is connected, and the center point is used as the center of a new circle with a radius half of the sum of the two original radii to form a third circle and then take the intersection. The shape of the area can be directly generated using the "Circle Intersection" tool in GIS software (such as ArcGIS and QGIS).
[0045] In another embodiment, within the initial area to be analyzed, the number of synchronous sampling pairs of historical water flow and historical pollutant concentration is counted (recommended to be no less than 100 pairs), and the Pearson correlation coefficient is calculated using common statistical software (such as R, Pandas+SciPy in Python) to measure the degree of linear correlation between flow changes and concentration changes. The calculated correlation coefficient is compared with a threshold: if the correlation coefficient is less than the threshold, the initial area to be analyzed is retained and no new monitoring stations are added; if the correlation coefficient is greater than or equal to the threshold, the monitoring station with the second highest flow-concentration correlation in the area is selected from all candidate monitoring stations as the third monitoring station. With the third monitoring station as the center of the circle, its monitoring radius is determined in the same way as the above radius, and then the intersection with the initial area to be analyzed is taken to obtain the final "pollutant area to be analyzed". If there is no station with the second highest correlation (i.e., only two stations have data), the intersection of the two stations is directly used as the final area.
[0046] Preferably, determining the location of the third monitoring station based on the Pearson correlation coefficient, and secondary screening the initial pollutant analysis area according to the location of the third monitoring station includes: Gridding the initial pollutant analysis area and determining the Pearson correlation coefficient of each grid cell in the initial pollutant analysis area; Grid cells with a Pearson correlation coefficient greater than or equal to a preset correlation threshold are screened to obtain pollutant transport sensitive areas; Based on the regional edge of the pollutant transport sensitive area, determine the location of the third monitoring station closest to the edge; The cross-section location collected by the third monitoring station is obtained based on the location of the third monitoring station, and the velocity gradient of the river section is calculated in combination with the historical water flow to determine the spatial range of pollutant migration; The pollutant migration space range and the initial pollutant analysis area are used to perform regional intersection calculation to obtain the pollutant analysis area.
[0047] In one embodiment, the initial area to be analyzed is divided into small grids, each with an area of approximately 0.1 to 0.5 square kilometers. The Pearson correlation coefficient is calculated at the center of each grid based on historical flow and concentration data, and sensitive grids with correlation coefficients greater than or equal to a preset threshold (recommended 0.7) are retained to form a pollutant transfer sensitive area; a third monitoring station is selected outside the edge of the sensitive area and at the shortest distance from the monitoring station, and its cross-sectional position is read. The flow velocity gradient is calculated using the flow and width data of the adjacent cross-sections, thereby estimating the pollutant migration range in the upstream and downstream directions; the migration range is intersected with the initial area to be analyzed to obtain the final pollutant migration area to be analyzed.
[0048] In another embodiment, the extension distance can be determined by multiplying the 95th percentile flow velocity gradient by the longest forecast period (e.g., 24 hours) to avoid over-extension. At the same time, the regional intersection operation can be completed through the "polygon intersection" tool in the GIS software. The result must be checked for surface shape to ensure that there are no broken or redundant small pieces.
[0049] Preferably, when the Pearson correlation coefficient is less than a preset correlation threshold, the method further includes: When the Pearson correlation coefficient is less than a preset correlation threshold, the initial pollutant analysis area determined based on the first monitoring station location and the second monitoring station location is divided into a number of grid cells of equal size; For each grid cell, the difference between the average historical pollutant concentration of the corresponding monitoring station and the overall historical average concentration of the target area is calculated to obtain the concentration deviation value of the grid cell; All grid cells whose concentration deviation values are greater than a preset deviation threshold are screened as high-concentration candidate cells, where the preset deviation threshold is greater than the global average concentration + 2 times the standard deviation; Perform spatial cluster analysis on high-concentration candidate units to extract adjacent pollutant cluster sub-regions with consistent deviations; Based on the extracted pollutant cluster sub-region, its outer polygon boundary is used as the pollutant analysis area.
[0050] In one embodiment, when the Pearson correlation coefficient is lower than a pre-set correlation threshold, the area to be analyzed is preferably delineated a second time in the following manner: the initial area with the first and second monitoring stations as the center and the respective monitoring radii as the radius is divided into a number of grids of equal area (it is recommended that the area of each grid be controlled between 0.2 and 0.5 square kilometers to ensure that each grid contains at least 50 historical concentration records); for each grid, the difference between its average concentration and the historical average concentration of the entire area is calculated, and high-concentration candidate grids with a difference greater than "the global average concentration plus two standard deviations" (if the standard deviation is significantly higher due to outliers, the outliers can be removed or the data window can be extended); then these candidate grids are spatially clustered (the DBSCAN algorithm can be used, with a minimum cluster size of not less than three adjacent grids to avoid interference from isolated points), and adjacent pollutant aggregation sub-areas with consistent concentration deviations are extracted; finally, the outer polygon boundary of the sub-area is used as the final pollutant area to be analyzed. In this method, the grid size, deviation threshold and clustering parameters should be appropriately adjusted based on the actual data density and on-site distribution to ensure that each step has sufficient sample support and can reflect the local pollution characteristics.
[0051] Preferably, obtaining a regional water sample based on the pollutant to be analyzed area in step S2 includes: Determine the geographical boundaries of the pollutant analysis area and use the GPS positioning system to mark the sampling point locations. The spacing between sampling points should be controlled within the range of 50m to 200m. The sampling depth is selected based on the water depth and water flow conditions of the area to be analyzed for pollutants. The sampling depth in shallow water areas is 0.3m to 0.5m, and the sampling depth in deep water areas is 1.0m to 3.0m. When the water flow rate exceeds 0.5m / s, an anti-disturbance sampler is used to ensure sample integrity. The volume range of water samples collected is 500mL~2L. The sampling bottle is made of polyethylene or glass. The bottle needs to be pre-cleaned with acid and rinsed with deionized water to avoid secondary contamination. The pre-cleaning is done by using a 1:1 Soak in solution for 30 minutes; During the sampling process, environmental condition data, including water temperature, pH value, and dissolved oxygen concentration, were recorded and timestamped to obtain regional water samples.
[0052] In one embodiment, in actual operation, special attention should be paid to the following points: when calibrating GPS, the signal should be stable and accurate to ensure that the position error of each sampling point does not exceed ±5m; the spacing between sampling points should be between 50m and 200m, taking into account both regional representativeness and work efficiency; secondly, the water depth and flow rate should be accurately judged. In shallow water areas (≤1m), sampling can be carried out at 0.3m to 0.5m, and in deep water areas (>1m), multiple depths should be selected within the range of 1.0m to 3.0m to reflect the vertical changes of the water body; when the flow rate exceeds 0.5m / s, a device with an anti-interference device must be used. The sampler should be used to prevent rapid flow from causing sample turbidity or loss. In addition, the material of the sampling bottle should match the analysis item. Polyethylene or glass bottles should be soaked in 1:1 nitric acid for 30 minutes, rinsed thoroughly with deionized water and air-dried naturally to prevent metal or organic residues. The sampling volume should be controlled at 500mL~2L, which can meet the analysis requirements and be easy to carry. Environmental parameters (such as water temperature, pH, dissolved oxygen) and precise time must be recorded each time sampling is performed. The instrument must be calibrated daily. Sampling personnel should wear powder-free gloves and avoid contact of the bottle mouth with any contaminants to ensure sample quality and data comparability.
[0053] Preferably, in step S2, processing the regional water samples to obtain nitrite concentration, ammonia nitrogen concentration, and nitrate concentration data respectively includes: When using the N-1-naphthylethylenediamine spectrophotometric method to determine nitrite content, the detection wavelength is set to 540nm. If the measured concentration is 0.02mg / L to 1.0mg / L and the color reaction time does not exceed 10 minutes, the nitrite concentration data is considered stable. If color drift occurs or the interference peak shift is greater than ±5nm, the test is invalid. When using the Nessler's reagent colorimetric method to detect ammonia nitrogen concentration, at a measurement wavelength of 425nm, if the ammonia nitrogen concentration is stable between 0.1mg / L and 10mg / L, and the correlation coefficient R² between the colorimetric absorbance curve and the standard curve is greater than 0.98, the test data is considered valid ammonia nitrogen concentration. If the concentration exceeds 15mg / L or the reagent color development is incomplete, dilution and re-testing are required. When ultraviolet spectrometry or ion chromatography is used to determine nitrate concentration, the concentration range is 0.5 mg / L to 20 mg / L, the ratio of the absorbance between 220 nm and 275 nm must be greater than 1.5, and the background correction value must not exceed 0.05 to be confirmed as valid nitrate concentration data; if the deviation of two consecutive test results is greater than ±1.0 mg / L, an abnormal flag is triggered.
[0054] In one embodiment, in actual measurements, the concentration range, wavelength, and deviation limits should be strictly controlled according to the method specifications: nitrite colorimetry should be 0.02–1.0 mg / L at a wavelength of 540 nm, with color development of <10 min. If color drift or peak position shift >±5 nm, the measurement is invalid. Ammonia nitrogen determination should be maintained at 0.1–10 mg / L at 425 nm, with a standard curve correlation coefficient >0.98. If >15 mg / L or incomplete color development occurs, dilution and re-testing are required. For nitrate quantification using UV or ion chromatography, the absorbance ratio at 220 nm / 275 nm must be >1.5, with background correction ≤0.05. Two consecutive results with a deviation of >±1.0 mg / L should be flagged as abnormal and re-tested. All reagents and instruments should be kept clean and calibrated promptly, and records of re-testing or dilution of samples below the detection limit or with abnormal values should be kept.
[0055] Preferably, in step S3, training the TCN model using the standardized model training set and the model test set includes: Construct a TCN model structure, which includes an input layer, a causal convolutional layer, a dilated convolutional layer, and an output layer. The input layer receives the time series in the standardized model training set. The shape of the input tensor is (B, T, F), where B is the batch size, T is the number of time steps, and F is the number of features. Based on the causal convolution layer, the time dimension of the input tensor is padded with (K-1) zeros on the left side to obtain the first model training data, where K is the convolution kernel size; Based on the dilated convolution layer, a dilation factor D is introduced into the first model training data to capture the time dependency, thereby obtaining the second model training data, where the dilation factor D represents the interval between the convolution kernels when processing the first model training data; The second model training data is subjected to multi-layer convolution and activation transformation through the activation function, and the task type of the transformation result is determined. When the task type is a classification task, the output layer is used followed by the Softmax function to generate a probability distribution to obtain a probability distribution result. When the task type is a regression task, the output layer is used to directly output the predicted value. The shape of the output tensor in the output layer is (B, T, C), where C is the number of output channels. The model accuracy is evaluated on the probability distribution results or predicted values according to the model test set to obtain the trained TCN model.
[0056] In one embodiment, see Figure 3 , the constructed TCN model structure is as follows: 1. Input Layer: The input layer receives time series data. The input tensor has the shape (B, T, F), where B is the batch size, representing the number of time series samples input at a time; T is the number of time steps, representing the length of each time series; and F is the number of features, representing the feature dimensions of each time step. The input layer converts the raw time series data into a multidimensional tensor format suitable for convolution operations. This conversion process ensures that the model can effectively process features from different time steps in subsequent convolution operations.
[0057] Causal convolution layer: Causal convolution ensures that the model's output at time step t depends only on the current and previous time steps t, t-1, t-2, ..., and does not use information from future time steps. Zero padding is used to pad the time dimension of the input tensor with (K-1) zeros on the left, where K is the convolution kernel size, to keep the output tensor the same length as the input tensor in the time dimension. This prevents leakage of future information and effectively learns historical dependencies in time series.
[0058] Dilated Convolution Layer: Dilated convolution increases the receptive field of the convolution kernel by introducing a dilation factor D, thereby capturing longer temporal dependencies. The dilation factor D represents the interval at which the convolution kernel samples the input data. For example, D=1 represents standard convolution, while D=2 means the convolution kernel samples every other time step. The dilation factor increases exponentially with network depth, for example, D=1, 2, 4, 8, etc. This allows the model to efficiently process long sequences of data without sacrificing computational efficiency.
[0059] 2. Output Layer: The output layer is typically a fully connected layer or a convolutional layer, which maps the final output of the TCN to the target dimension. The output tensor has a shape of (B, T, C), where C is the number of output channels. For classification tasks, the output layer is followed by a Softmax function to generate a probability distribution; for regression tasks, the predicted value is directly output.
[0060] In another embodiment, after data preprocessing is completed, the model training phase is entered. The input data is passed to the model (e.g. Figure 1 ) and is processed through a series of convolutional layers and dilated convolutional layers. Convolutional layers extract local temporal features, while dilated convolutional layers capture longer-term dependencies by increasing the receptive field. At each layer, the convolution operation calculates features on the data by sliding the convolution kernel, while using residual connections to add the input and output to accelerate training and prevent gradient vanishing. Activation functions (such as ReLU) are applied at each layer to help introduce nonlinearity. After multiple layers of convolution and activation transformations, higher-level features are gradually extracted from the data, and the results are finally calculated through the output layer. This process, through the stacking of multiple convolutional layers, enables the model to gradually learn complex patterns and long-term dependencies in time series.
[0061] Preferably, the causal convolutional layer further includes: Each residual block contains two causal convolutional layers, each of which is followed by an activation function and a regularization layer; In the first layer of causal convolution, the convolution kernel size is K, the dilation factor is D, and the number of output channels is C. After the convolution output, the nonlinear feature is introduced through the ReLU activation function, and its calculation formula is: ; Where, is the input value, is the maximum value function; Set the Dropout regularization layer after the activation function, and the random dropout ratio is 0.2; The convolution kernel size and dilation factor of the second layer of causal convolution are the same as those of the first layer, that is, the convolution kernel size K and dilation factor D do not change; The input tensor of the residual block is directly added to the second layer causal convolution output through a skip connection, where the output of the residual block is defined by the following formula: ; Where, is the final output of the residual block, is the input tensor, is the first layer of convolution operation, To apply nonlinear activation function, It is the second convolution operation.
[0062] 2. In one embodiment, residual blocks: Each residual block consists of two causal convolutional layers, each followed by an activation function (e.g., ReLU) and a regularization layer (e.g., Dropout). Residual blocks use skip connections to directly add input to output, avoiding the vanishing gradient problem and accelerating model training. The specific structure of a residual block includes the following components: the input tensor first passes through a first layer of causal convolution with a kernel size of K, a dilation factor of D, and C output channels. A ReLU activation function is then added after the first convolution layer to introduce nonlinearity, as given by the formula: f(x) = max(0, x). Next, a Dropout layer is applied to randomly drop neurons to prevent overfitting. In our model, two layers of Dropout = 0.2 are used. Next, the input tensor passes through a second layer of causal convolution with the same kernel size and dilation factor as the first layer. Finally, the input of the residual block is summed with the output of the second convolutional layer to produce the final output. The output formula of the residual block is: Output=Activation(Conv2(Activation(Conv1(Input))))+Input.
[0063] Preferably, the task types for determining the transformation result include: A classification task is considered when any of the following conditions occurs: the label format of the second model training data is a discrete category index, and the number of categories is greater than 1; the number of channels C in the last dimension of the output tensor matches the number of categories, and the value range is mainly between 0 and 1; the tensor features after convolution and activation transformation meet the probability distribution characteristics; When the following conditions occur at the same time, it is determined to be a regression task: the labels of the second model training data are continuous real values, and the last dimension C of the output tensor is 1; the output value range after convolution and activation transformation is not limited to 0, 1, specifically Fluctuates within the range; the output tensor does not meet the probability normalization characteristics.
[0064] In one embodiment, in actual judgment, it should be noted that: the classification task label must be a discrete index and the number of categories must be greater than one, the number of model output channels must be consistent with the number of categories, and the output value distribution must be approximately probabilistic (i.e., the sum of each channel is 1 and falls within the range of 0–1); the regression task label must be a continuous real number and the output channel must be 1, the output value can span a large range (far exceeding 0–1), and no probability normalization is performed; in addition, it is necessary to ensure that the convolution and activation layers do not introduce unexpected normalization operations (such as Softmax) that affect the regression scenario, and to check label consistency before the classification scenario to prevent misjudgment.
[0065] Preferably, in step S4, calculating the predicted value of pollutant flux into the sea based on the water flow prediction data and the pollutant concentration prediction data includes: The pollutant flux into the sea is calculated based on the water flow prediction data and pollutant concentration prediction data according to the sea flux calculation formula. The sea flux calculation formula is as follows: ; in for The instantaneous flux of pollutants into the sea at any given moment, for Time-of-day pollutant concentration forecast data, for Water flow forecast data at all times, For the moment.
[0066] In one embodiment, multiple convolutional layers and dilated convolutional layers are stacked together in a TCN. The output of each layer is passed as input to the next layer, all the way to the final layer. Each layer extracts progressively higher-order features and further expands the receptive field. After all convolutional layers (including dilated convolutions and residual connections), there is typically a fully connected layer or other type of output layer. The output layer calculates the final prediction based on the features learned by the network.
[0067] In another embodiment, see Figure 4-Figure 6 The prediction of the flux into the sea is achieved by predicting the flow rate and pollutant concentration respectively, and then using the formula: Multiply the predicted results to get the final flux into the sea, for The instantaneous flux of pollutants into the sea at any given moment, for Time-of-day pollutant concentration forecast data, for Water flow forecast data at all times, This method effectively avoids the complexity of directly predicting ocean fluxes, while leveraging the relationship between flow and pollutant concentration. The predicted flow and pollutant concentration are multiplied to produce the final ocean flux forecast. In this way, the model captures the changing trends of flow and pollutant concentration separately, and then uses the multiplicative relationship between them to produce a forecast of the instantaneous ocean flux of pollutants.
[0068] The present invention is therefore intended to be illustrative and non-restrictive in all respects, with the scope of the invention being defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the application documents are intended to be embraced therein.
[0069] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features disclosed herein.
Claims
1. A method for monitoring and predicting pollutant flux into the sea based on deep learning, characterized in that: The following steps are involved: Step S1: collecting historical water flow data of a target area based on a first time interval; collecting historical pollutant concentration data of the target area based on a second time interval; and determining a pollutant analysis area based on the historical water flow data and the historical pollutant concentration data; Step S2: obtaining regional water samples based on the pollutant-to-be-analyzed area; processing the regional water samples to obtain nitrite concentration data, ammonia nitrogen concentration data, and nitrate concentration data, respectively, and combining them with historical water flow data as a model training set; Step S3: Preprocess the model training set to obtain a standardized model training set, and use the real-time collected water flow data as the model test set; use the standardized model training set and the model test set to train the TCN model, and use the trained TCN model to predict the flow and pollutant concentration of the pollutant to be analyzed area to obtain water flow prediction data and pollutant concentration prediction data; Step S4: Calculate the pollutant flux into the sea prediction value based on the water flow prediction data and the pollutant concentration prediction data to perform the pollutant flux into the sea monitoring prediction operation.
2. The method for monitoring and predicting pollutant flux into the sea based on deep learning according to claim 1 is characterized in that: In step S1, determining the pollutant analysis area based on historical water flow data and historical pollutant concentration data includes: Taking the highest and lowest values of the historical pollutant concentration data as the center, determine the location of the first monitoring station and the location of the second monitoring station closest to the highest and lowest values respectively; Analyze the monitoring radius of the monitoring station according to the position of the first monitoring station and the position of the second monitoring station to obtain the monitoring radius of the first monitoring station and the monitoring radius of the second monitoring station; Determine an initial pollutant to-be-analyzed area between the first monitoring station location and the second monitoring station location based on the first monitoring station monitoring radius and the second monitoring station monitoring radius; Calculate the Pearson correlation coefficient between historical water flow data and historical pollutant concentration data; The Pearson correlation coefficient is compared with the preset correlation threshold. When the Pearson correlation coefficient is greater than or equal to the preset correlation threshold, the position of the third monitoring station is determined based on the Pearson correlation coefficient, and the initial pollutant area to be analyzed is secondary screened according to the position of the third monitoring station to obtain the pollutant area to be analyzed.
3. The method for monitoring and predicting pollutant flux into the sea based on deep learning according to claim 2 is characterized in that: The location of the third monitoring station was determined based on the Pearson correlation coefficient, and the initial pollutant analysis areas were screened again based on the location of the third monitoring station, including: Gridding the initial pollutant analysis area and determining the Pearson correlation coefficient of each grid cell in the initial pollutant analysis area; Grid cells with a Pearson correlation coefficient greater than or equal to a preset correlation threshold are screened to obtain pollutant transport sensitive areas; Based on the regional edge of the pollutant transport sensitive area, determine the location of the third monitoring station closest to the edge; The cross-section location collected by the third monitoring station is obtained based on the location of the third monitoring station, and the velocity gradient of the river section is calculated in combination with the historical water flow to determine the spatial range of pollutant migration; The pollutant migration space range and the initial pollutant analysis area are used to perform regional intersection calculation to obtain the pollutant analysis area.
4. The method for monitoring and predicting pollutant flux into the sea based on deep learning according to claim 2 is characterized in that: When the Pearson correlation coefficient is less than the preset correlation threshold, it also includes: When the Pearson correlation coefficient is less than a preset correlation threshold, the initial pollutant analysis area determined based on the first monitoring station location and the second monitoring station location is divided into a number of grid cells of equal size; For each grid cell, the difference between the average historical pollutant concentration of the corresponding monitoring station and the overall historical average concentration of the target area is calculated to obtain the concentration deviation value of the grid cell; All grid cells whose concentration deviation values are greater than a preset deviation threshold are screened as high-concentration candidate cells, where the preset deviation threshold is greater than the global average concentration + 2 times the standard deviation; Perform spatial cluster analysis on high-concentration candidate units to extract adjacent pollutant cluster sub-regions with consistent deviations; Based on the extracted pollutant cluster sub-region, its outer polygon boundary is used as the pollutant analysis area.
5. The method for monitoring and predicting pollutant flux into the sea based on deep learning according to claim 1 is characterized in that: In step S2, obtaining a regional water sample based on the pollutant to be analyzed area includes: Determine the geographical boundaries of the pollutant analysis area and use the GPS positioning system to mark the sampling point locations. The spacing between sampling points should be controlled within the range of 50m to 200m. The sampling depth is selected based on the water depth and water flow conditions of the area to be analyzed for pollutants. The sampling depth in shallow water areas is 0.3m to 0.5m, and the sampling depth in deep water areas is 1.0m to 3.0m. When the water flow rate exceeds 0.5m / s, an anti-disturbance sampler is used to ensure sample integrity. The volume of water samples collected ranges from 500mL to 2L. The sampling bottles are made of polyethylene or glass. The bottles must be pre-acid-washed and rinsed with deionized water to avoid secondary contamination. The pre-acid-washing step is to soak them in a 1:1 HNO3 solution for 30 minutes. During the sampling process, environmental condition data, including water temperature, pH value, and dissolved oxygen concentration, were recorded and timestamped to obtain regional water samples.
6. The method for monitoring and predicting pollutant flux into the sea based on deep learning according to claim 1 is characterized in that: In step S2, the regional water samples are processed to obtain nitrite concentration, ammonia nitrogen concentration, and nitrate concentration data, including: When using the N-1-naphthylethylenediamine spectrophotometric method to determine nitrite content, the detection wavelength is set to 540nm. If the measured concentration is 0.02mg / L to 1.0mg / L and the color reaction time does not exceed 10 minutes, the nitrite concentration data is considered stable. If color drift occurs or the interference peak shift is greater than ±5nm, the test is invalid. When using the Nessler's reagent colorimetric method to detect ammonia nitrogen concentration, at a measurement wavelength of 425nm, if the ammonia nitrogen concentration is stable between 0.1mg / L and 10mg / L, and the correlation coefficient R² between the colorimetric absorbance curve and the standard curve is greater than 0.98, the test data is considered valid ammonia nitrogen concentration. If the concentration exceeds 15mg / L or the reagent color development is incomplete, dilution and re-testing are required. When ultraviolet spectrometry or ion chromatography is used to determine nitrate concentration, the concentration range is 0.5 mg / L to 20 mg / L, the ratio of the absorbance between 220 nm and 275 nm must be greater than 1.5, and the background correction value must not exceed 0.05 to be confirmed as valid nitrate concentration data; if the deviation of two consecutive test results is greater than ±1.0 mg / L, an abnormal flag is triggered.
7. The method for monitoring and predicting pollutant flux into the sea based on deep learning according to claim 1 is characterized in that: Training the TCN model using the standardized model training set and the model test set in step S3 includes: Construct a TCN model structure, which includes an input layer, a causal convolutional layer, a dilated convolutional layer, and an output layer. The input layer receives the time series in the standardized model training set. The shape of the input tensor is (B, T, F), where B is the batch size, T is the number of time steps, and F is the number of features. Based on the causal convolution layer, the time dimension of the input tensor is padded with (K-1) zeros on the left side to obtain the first model training data, where K is the convolution kernel size; Based on the dilated convolution layer, a dilation factor D is introduced into the first model training data to capture the time dependency, thereby obtaining the second model training data, where the dilation factor D represents the interval between the convolution kernels when processing the first model training data; The second model training data is subjected to multi-layer convolution and activation transformation through the activation function, and the task type of the transformation result is determined. When the task type is a classification task, the output layer is used followed by the Softmax function to generate a probability distribution to obtain a probability distribution result. When the task type is a regression task, the output layer is used to directly output the predicted value. The shape of the output tensor in the output layer is (B, T, C), where C is the number of output channels. The model accuracy is evaluated on the probability distribution results or predicted values according to the model test set to obtain the trained TCN model.
8. The method for monitoring and predicting pollutant flux into the sea based on deep learning according to claim 7 is characterized in that: The causal convolutional layer also includes: Each residual block contains two causal convolutional layers, each of which is followed by an activation function and a regularization layer; In the first layer of causal convolution, the convolution kernel size is K, the dilation factor is D, and the number of output channels is C. After the convolution output, the nonlinear feature is introduced through the ReLU activation function, and its calculation formula is: ; Where, is the input value, is the maximum value function; Set the Dropout regularization layer after the activation function, and the random dropout ratio is 0.2; The convolution kernel size and dilation factor of the second layer of causal convolution are the same as those of the first layer, that is, the convolution kernel size K and dilation factor D do not change; The input tensor of the residual block is directly added to the second layer causal convolution output through a skip connection, where the output of the residual block is defined by the following formula: ; Where, is the final output of the residual block, is the input tensor, is the first layer of convolution operation, To apply nonlinear activation function, It is the second convolution operation.
9. The method for monitoring and predicting pollutant flux into the sea based on deep learning according to claim 7, characterized in that: The types of tasks for determining transformation results include: A classification task is considered when any of the following conditions occurs: the label format of the second model training data is a discrete category index, and the number of categories is greater than 1; the number of channels C in the last dimension of the output tensor matches the number of categories, and the value range is mainly between 0 and 1; the tensor features after convolution and activation transformation meet the probability distribution characteristics; When the following conditions occur at the same time, it is determined to be a regression task: the labels of the second model training data are continuous real values, and the last dimension C of the output tensor is 1; the output value range after convolution and activation transformation is not limited to 0, 1, specifically Fluctuates within the range; the output tensor does not meet the probability normalization characteristics.
10. The method for monitoring and predicting pollutant flux into the sea based on deep learning according to claim 1, characterized in that: Calculating the predicted value of pollutant flux into the sea based on the water flow prediction data and the pollutant concentration prediction data in step S4 includes: The pollutant flux into the sea is calculated based on the water flow prediction data and pollutant concentration prediction data according to the sea flux calculation formula. The sea flux calculation formula is as follows: ; in for The instantaneous flux of pollutants into the sea at any given moment, for Time-of-day pollutant concentration forecast data, for Water flow forecast data at all times, For the moment.
Citation Information
Patent Citations
Basin pollutant flux prediction method based on LSTM-BP space-time combination model
CN111639748A
Method and system for predicting remaining useful life of industrial equipment, and electronic device
WO2021000556A1
Cited By
Intelligent deduction and submerging probability visualization system and method for dike breach collapse potential and medium
CN121302937A