A method and system for assessing cumulative risk of water environment in a watershed based on an environmental space facility network
Patent Information
- Application Number
- CN202611225340.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-27
AI Technical Summary
但层次分析法等主观赋权方法依赖专家经验确定权重,一旦确定则相对静态,无法根据设施运行状态的时序动态变化进行自适应调整,导致权重分配与设施实际风险贡献之间产生严重偏差,评估结果时效性不足,难以支撑累积风险的实时监测与动态预警,成为制约流域水环境精细化管理的技术瓶颈
1、本发明通过构建多维设施属性特征向量库,并利用机器学习算法建立特征向量与风险贡献度之间的非线性映射模型,能够依据环境设施运行状态的时序变化自动调整权重分配,有效克服传统层次分析法等主观赋权方法权重静态固化的弊端,显著提升风险评估的准确性和自适应性。
Smart Images

Figure REF-OBJ-1786600674552-000002 
Figure REF-OBJ-1786600674552-000003 
Figure REF-OBJ-1786600674552-000004
Abstract
Description
Technical Field
[0001] This invention belongs to the field of environmental monitoring technology, specifically relating to a method and system for assessing the cumulative risk of watershed water environment based on an environmental spatial facility network. Background Technology
[0002] In the cumulative risk assessment of watershed water environment, the environmental facility network covers various types such as monitoring stations, sewage treatment plants, and sewage outlets. Each facility has significant differences in attributes such as treatment capacity, monitoring accuracy, years of operation, and failure rate. The key to achieving reliable assessment is to accurately quantify the dynamic contribution of each facility to the cumulative risk based on its multidimensional attribute characteristics.
[0003] Common methods for assessing the cumulative risk of watershed water environment generally utilize traditional weighting techniques such as the Analytic Hierarchy Process (AHP) and fuzzy comprehensive evaluation to assign weights to environmental facility indicators, thereby determining the risk level based on the weighted fusion results. However, subjective weighting methods such as the AHP rely on expert experience to determine the weights, which are relatively static once determined and cannot be adaptively adjusted according to the dynamic changes in the facility's operational status over time. This leads to a serious discrepancy between the weight allocation and the actual risk contribution of the facilities, resulting in insufficient timeliness of the assessment results. This makes it difficult to support real-time monitoring and dynamic early warning of cumulative risks, becoming a technical bottleneck restricting the refined management of watershed water environment. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method and system for assessing the cumulative risk of watershed water environment based on an environmental spatial facility network, which can effectively solve the problems mentioned in the background technology.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides a method for assessing the cumulative risk of watershed water environment based on an environmental spatial facility network, the method comprising the following steps: A multi-dimensional facility attribute feature vector library is constructed. Multi-source heterogeneous raw data containing environmental monitoring stations, sewage treatment plants and sewage outlets are obtained from the environmental spatial facility network. The multi-source heterogeneous raw data is standardized and mapped to a multi-dimensional feature space containing facility type dimension, capacity dimension and status dimension. The continuous numerical features in the capacity dimension and the status dimension are subjected to min-max normalization. The normalized vectors of each dimension are concatenated to form the multi-dimensional feature vector of each environmental facility. Based on the multidimensional facility attribute feature vector library, a nonlinear mapping model between feature vectors and risk contribution is established using machine learning algorithms. The predicted risk contribution value of each environmental facility is output, and the predicted risk contribution value is mapped to the corresponding dynamic weight according to the preset weight mapping rules. A streaming computing engine is deployed to monitor update events of environmental facility operation data. When the data update event is captured, the update of the multidimensional facility attribute feature vector library and the incremental learning or full retraining of the nonlinear mapping model are triggered to obtain the updated dynamic weights. Establish a cumulative risk calculation model, maintain time series data of historical risk status, use the risk decay function to perform time dimension decay calculation on historical risk status, and weight and fuse the real-time risk status at the current moment with the historical risk status after decay calculation to obtain the cumulative risk value at the current moment. The risk attenuation function adopts an exponential attenuation form, and the attenuation rate is set differently according to the type and operating status of the environmental facility. Different types of environmental facilities correspond to different basic attenuation coefficients, and the same facility corresponds to different attenuation rate adjustment factors under different operating states. When the operating conditions of an environmental facility undergo a significant change of a preset type, the attenuation rate adjustment factor of the facility is automatically adjusted.
[0006] On the other hand, the present invention provides a watershed water environment cumulative risk assessment system based on an environmental spatial facility network. The multi-dimensional facility attribute feature vector library construction module is used to obtain multi-source heterogeneous raw data from the environmental space facility network, and to perform standardization and normalization splicing on the multi-source heterogeneous raw data to form multi-dimensional feature vectors of each environmental facility. The dynamic weight allocation model construction module is used to establish and train a nonlinear mapping model between feature vectors and risk contribution based on the multi-dimensional facility attribute feature vector library using machine learning algorithms, and output dynamic weights. The time-series data stream processing and real-time update module is used to deploy a streaming computing engine to listen for data update events and trigger the dynamic update of the multi-dimensional facility attribute feature vector library and the nonlinear mapping model. The cumulative risk calculation model is used to maintain the time series data of historical risk states and to perform time-dimensional decay calculations on historical risk states using a risk decay function. The calculation results are then weighted and fused with the current real-time risk state to obtain the cumulative risk value at the current moment.
[0007] In summary, this application includes at least one of the following beneficial technical effects: 1. This invention constructs a multi-dimensional facility attribute feature vector library and uses machine learning algorithms to establish a nonlinear mapping model between feature vectors and risk contribution. It can automatically adjust the weight allocation according to the temporal changes in the operating status of environmental facilities, effectively overcoming the drawbacks of static and fixed weights in traditional subjective weighting methods such as the analytic hierarchy process, and significantly improving the accuracy and adaptability of risk assessment.
[0008] 2. This invention deploys a streaming computing engine to continuously monitor update events of environmental facility operation data. When a data update is captured, it automatically triggers the update of the feature vector library and incremental learning or full retraining of the model. Combined with a smooth transition strategy, it realizes the synchronous update of weights and evaluation results, thereby forming a complete closed loop from data collection to model recalculation, ensuring the timeliness of evaluation results.
[0009] 3. This invention establishes a cumulative risk calculation model. By maintaining time-series data of historical risk status, it uses an exponential decay function to calculate the time-dimensional decay of historical risks, and then weights and merges the decayed historical risks with the current real-time risks. This makes the assessment results include both immediate risk information and reflect the continuous impact of historical risks, providing reliable decision support for the refined management of watershed water environment. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of the overall technical solution for a watershed water environment cumulative risk assessment method based on environmental spatial facility networks.
[0011] Figure 2 This is a schematic diagram illustrating the construction of a multidimensional facility attribute feature vector library.
[0012] Figure 3 This is a schematic diagram illustrating the framework of dynamic weight allocation based on machine learning algorithms.
[0013] Figure 4 This is a schematic diagram of data flow for time-series data stream processing and real-time update mechanisms.
[0014] Figure 5 This is a schematic diagram illustrating the time-dimensional accumulation and decay calculation process for the cumulative risk calculation model.
[0015] Figure 6 This is a schematic diagram of the hierarchical early warning logic of the dynamic risk early warning mechanism. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the following description is provided in conjunction with the appendix. Figure 1 To be continued Figure 6 Specific embodiments are provided to further illustrate the present invention in detail.
[0017] Firstly, this invention provides a method for assessing the cumulative risk of watershed water environment based on an environmental spatial facility network. This method constructs a multi-dimensional facility attribute feature vector library, integrating facility type attribute information, capacity attribute information, and status attribute information to form a structured feature representation. Based on the multi-dimensional facility attribute feature vector library, a nonlinear mapping model between feature vectors and risk contribution is established using machine learning algorithms to achieve dynamic weight allocation. Time-series data stream processing technology is introduced to receive real-time updates of environmental facility operation data, triggering a dynamic recalculation process of weights and dynamically adjusting the risk assessment results. A cumulative risk calculation model is established, fusing historical risk status with the current real-time risk status to achieve time-dimensional accumulation and attenuation calculation of cumulative risk. A dynamic risk early warning mechanism is constructed, comparing and analyzing the real-time updated cumulative risk value with a preset threshold to trigger tiered early warning signals. Specifically, it includes the following steps.
[0018] The first step, S1, involves constructing a multidimensional facility attribute feature vector library. In the aforementioned method for assessing the cumulative risk of watershed water environment based on environmental spatial facility networks, the construction of the multidimensional facility attribute feature vector library specifically includes the following steps.
[0019] Step S101: Obtaining basic data sources for environmental facilities. The various environmental facilities in the environmental spatial facility network mainly include environmental monitoring stations, wastewater treatment plants, and sewage outlets. The basic data sources for environmental monitoring stations cover monitoring capability data, specifically including parameters such as the types of monitoring indicators, sampling frequency, detection limits, and data transmission methods.
[0020] The basic data sources for wastewater treatment plants cover treatment process parameters, specifically including design treatment capacity, actual treatment volume, influent water quality characteristics, effluent water quality standards, sludge treatment methods, and process operational stability. The basic data sources for discharge outlets cover discharge inventory data, specifically including outlet location coordinates, discharge method, discharge time period, main pollutant types, discharge concentration fluctuation range, and historical violation records.
[0021] The aforementioned basic data sources are aggregated through the data acquisition interface of the environmental space facility network to form a multi-source heterogeneous raw dataset. This aggregation process needs to be compatible with the data transmission protocols and reporting formats of different facilities to ensure that data from monitoring stations, wastewater treatment plants, and discharge outlets can be uniformly entered into subsequent processing flows.
[0022] Step S102 involves standardizing the basic data sources, including data cleaning, missing value imputation, and outlier handling for various basic data sources. The data cleaning process includes removing duplicate records, correcting formatting errors, and verifying the logical consistency of the data.
[0023] Missing values were imputed using either mean imputation based on facility type grouping or interpolation based on adjacent time series data. When there were at least three valid samples of similar facilities within the same type group, mean imputation was used; when there were fewer than three samples within the group, linear interpolation of adjacent time series data of the facility itself was used for imputation.
[0024] Outlier handling employs a confidence interval method based on statistical distribution. For parameters following a normal distribution, the confidence interval boundary is the mean plus or minus three standard deviations; values exceeding this boundary are marked as outliers. For parameters not following a normal distribution, the interquartile range (IVR) method is used to determine the confidence interval boundary; values less than the first quartile minus 1.5 IVR or greater than the third quartile plus 1.5 IVR are marked as outliers. Outlier correction involves replacing the parameter with the nearest valid value at the confidence interval boundary.
[0025] After data cleaning, a unified data coding system is established to eliminate format differences between different data sources. The data coding system adopts a hierarchical structure design. The first layer is the facility category code, which uses a two-digit code to identify different facility types, where 01 represents an environmental monitoring station, 02 represents a wastewater treatment plant, and 03 represents a sewage outlet.
[0026] The second layer is attribute dimension encoding, using two-digit codes to identify different attribute dimensions, where 01 represents the capability dimension and 02 represents the state dimension. The third layer is specific parameter encoding, using three-digit codes to identify the specific parameters under each attribute dimension. After the above encoding process, information from different data sources can be integrated and compared within the same semantic framework.
[0027] Step S103 involves mapping the data to the multidimensional feature space and constructing feature vectors. This process maps the standardized data to the multidimensional feature space, forming a structured feature vector representation. The multidimensional feature space comprises three main dimensions: facility type, capability, and status.
[0028] The facility type dimension uses one-hot encoding to represent different facility categories. The number of bits in the one-hot encoding matches the number of facility categories. Each facility category corresponds to a unique encoding vector, in which only the dimension corresponding to that facility category has a value of 1, and the other dimensions have a value of 0.
[0029] The capacity dimension uses continuous numerical values to represent the facility's processing capacity and monitoring accuracy. Processing capacity is quantified by design scale or actual processing volume, and monitoring accuracy is quantified by detection limit or relative standard deviation.
[0030] The status dimension uses continuous numerical values to represent the facility's operational lifespan and failure rate. Operational lifespan is quantified by the length of time the facility has been in use, and failure rate is quantified by the number of failures or the percentage of failure duration per unit of time.
[0031] The vectors of the three dimensions mentioned above differ significantly in their original dimensions and numerical ranges. In one-hot encoded vectors, each dimension takes the value of 0 or 1. The capability dimension typically has a larger value, while the state dimension's value falls somewhere in between. If these three are directly concatenated without normalization, the larger feature dimension will dominate in subsequent distance calculations and weight updates in the machine learning model, causing the smaller but equally important feature dimensions to fail to play their due role.
[0032] Therefore, before performing vector concatenation, each continuous numerical feature in the capability and state dimensions is subjected to min-max normalization, linearly scaling the value of each feature to the range of 0 to 1. The normalization formula is:
[0033] in The original value for a certain feature dimension. This is the minimum value of this characteristic across all facilities. This represents the maximum value of this characteristic across all facilities. These are the normalized feature values, dimensionless, ranging from 0 to 1. The one-hot encoded vector is already in the 0-1 range and requires no further normalization. After normalization, the one-hot encoded vectors for facility type, capability, and state dimensions maintain the same magnitude.
[0034] Then, the vectors of the above three dimensions are horizontally concatenated along the vector dimension direction to form the complete multidimensional feature vector of the facility. The specific concatenation method is as follows: Let the one-hot encoded vector of the facility type dimension be of length... row vectors ,in The total number of facility categories; the normalized vector for the capability dimension is of length [missing information]. row vectors ,in The number of feature parameters for the capability dimension; the normalized vector for the state dimension has a length of row vectors ,in This represents the number of feature parameters in the state dimension. The concatenated feature vector forms the complete multidimensional feature vector. Represented as:
[0035] The total dimension length of this complete multidimensional feature vector is The value range of each element in the vector is between 0 and 1.
[0036] The multidimensional feature vector library is stored in a structured data table format, where each row corresponds to a unique identifier for an environmental facility and its corresponding complete multidimensional feature vector, and each column corresponds to a feature dimension. This storage structure supports efficient vector retrieval and similarity calculation, providing standardized data input for subsequent machine learning model training.
[0037] Step S1 completes the construction of the multi-dimensional facility attribute feature vector library. Starting from the original data collection, this feature vector library undergoes standardization, missing data imputation, anomaly correction, unified encoding, normalization scaling, and vector concatenation to ultimately form a structured data input for machine learning models. The quality of the feature vector library directly determines the accuracy and reliability of subsequent dynamic weight allocation. Once the feature vector library is constructed, it can be used as input to enter the training phase of the dynamic weight allocation model based on machine learning algorithms.
[0038] The next step is step S2 in the method of this embodiment: construction of a dynamic weight allocation model based on machine learning algorithm. In the above-mentioned watershed water environment cumulative risk assessment method based on environmental space facility network, the establishment of a nonlinear mapping model between feature vector and risk contribution based on machine learning algorithm specifically includes the following steps.
[0039] Step S201: Preparation of the historical sample dataset. This involves preparing a historical sample dataset for model training. The dataset contains multi-dimensional feature vectors of multiple environmental facilities and risk contribution labels for each facility. The risk contribution labels are obtained by combining expert scoring with historical risk event statistics.
[0040] The expert evaluation process involves inviting professionals from fields such as environmental science, hydrology, and environmental engineering to subjectively assess the risk contribution of a facility based on factors such as its type, capacity, and operational status. The historical risk event statistics process calculates objective indicators of the facility's risk contribution based on objective records of the number of accidents, instances of excessive emissions, and environmental damage incidents that occurred during the facility's historical operation.
[0041] The expert scoring results are weighted and integrated with the statistical results of historical risk events to form a comprehensive risk contribution rating. For the first... Each environmental facility is assessed by experts. The value ranges from 0 to 100 points; let the objective index be... Similarly, it is normalized to the range of 0 to 100 points. (Comprehensive labeled value) The calculation formula is:
[0042] in The fusion weight for expert ratings ranges from 0.3 to 0.5. This applies when historical risk event records are complete and the sample size is sufficient. Take 0.3; when historical records are incomplete or the sample size is insufficient, Take 0.5.
[0043] Step S202 involves the partitioning and preprocessing of the historical sample dataset. The dataset is divided into a training subset and a validation subset using stratified random sampling to ensure consistency in the distribution of facility types and risk contribution rates between the training and validation subsets. The ratio of the training subset to the validation subset is set at 8:2.
[0044] Before model training, the training subset is divided for cross-validation, and a k-fold cross-validation method is used to prevent model overfitting. During cross-validation, the training subset is divided into k non-overlapping subsets. Each time, k-1 subsets are used for model training, and the remaining subset is used for model validation. The average performance index of the model is obtained through iterative calculation.
[0045] Step S203 involves training the random forest algorithm model. This step uses the random forest algorithm to train a nonlinear mapping model between feature vectors and risk contribution. The random forest algorithm constructs multiple decision trees and takes the average prediction result of each decision tree as the final output, achieving effective fitting of complex nonlinear relationships in a high-dimensional feature space.
[0046] The decision tree construction process employs a recursive splitting strategy, selecting splitting features and a splitting threshold in the feature space of each node. The selection of splitting features is based on the Gini impurity minimization criterion. Let the sample set contained in the current node be... The number of samples is The sample proportions for each category are as follows: Then the impurity of Gini The calculation formula is:
[0047] in The total number of risk contribution categories. For category In the sample set The frequency of occurrence of nodes. Gini impurity measures the degree of class mixing in a node sample; the smaller the value, the purer the node.
[0048] For a certain candidate segmentation feature and their corresponding segmentation thresholds , sample set Divided into left subset and right subset Weighted Gini impurity after segmentation The calculation formula is:
[0049] Iterate through all candidate features and their possible segmentation thresholds, and select the one that makes them suitable for segmentation. The segmentation feature with the smallest value and the segmentation threshold are used as the segmentation parameters for the current node.
[0050] The depth of the decision tree is adjusted based on the size and feature dimensions of the training data. During the construction of each decision tree, a subset of samples is drawn from the original training set using random sampling with replacement, and features are randomly selected from the subset of each candidate feature for splitting.
[0051] The output of the random forest algorithm is the predicted risk contribution value of each environmental facility. This predicted value is normalized and used as the basis for the dynamic weight allocation of environmental facilities. The normalization adopts the min-max normalization method in step S103, which linearly scales the predicted risk contribution value to the interval between 0 and 1.
[0052] The calculation process for dynamic weights is as follows: The predicted risk contribution values of each facility are sorted, the interval between adjacent predicted values is calculated, a weight demarcation point is set based on the interval size, and the predicted risk contribution value of each facility is mapped to the corresponding weight interval. The dynamic weight value ranges from 0 to 1.
[0053] Step S204: Alternative training scheme for the gradient boosting tree algorithm. As an alternative to the random forest algorithm, the gradient boosting tree algorithm can also be used to establish a nonlinear mapping model between feature vectors and risk contribution. The gradient boosting tree algorithm gradually improves the model's prediction accuracy by iteratively optimizing the loss function. In each iteration, it fits the residual of the current model and adds the newly generated decision tree to the model set.
[0054] The gradient boosting tree algorithm uses either mean squared error loss or Huber loss as its loss function. Mean squared error loss function The formula is:
[0055] in The total number of training samples. For the first Risk contribution rating of each sample For the current model to the th The predicted value for each sample. Mean squared error loss is suitable for scenarios where the risk contribution label values follow a normal distribution.
[0056] Huber loss function The formula is:
[0057] in This is the threshold parameter for the Huber loss. The Huber loss uses linear growth instead of quadratic growth when the prediction error is large, which can reduce the excessive influence of outliers on model training and is suitable for scenarios with outlier labeled values.
[0058] The gradient boosting tree algorithm outputs predicted risk contributions for each environmental facility. Integrating these predicted values with the output of the random forest algorithm can further improve the stability and accuracy of the model's predictions.
[0059] The ensemble fusion method employs a weighted average strategy, setting fusion weights based on the performance of the two algorithms on the validation subset. Let the coefficient of determination of the random forest algorithm on the validation subset be... The coefficient of determination of the gradient boosting tree algorithm on the validation subset is 1. Fusion weights in the Random Forest algorithm The calculation formula is:
[0060] Fusion weights in gradient boosting tree algorithm The calculation formula is:
[0061] The final predicted value after the fusion of the two algorithms The weighted sum of the predictions from each algorithm:
[0062] in The risk contribution prediction value output by the random forest algorithm. This represents the predicted risk contribution value output by the gradient boosting tree algorithm.
[0063] Coefficient of determination The calculation formula is:
[0064] in To verify the mean of the risk contribution label values for all samples in the subset.
[0065] Step S205 involves generating and updating the dynamic weight allocation scheme. The multi-dimensional feature vector of the environmental facility to be evaluated is input into the trained mapping model, and the model outputs a predicted contribution value of that facility to the cumulative risk. Based on the predicted contribution value and the preset weight mapping rules, the dynamic weight allocation scheme for each environmental facility is calculated.
[0066] The weighting mapping rule is as follows: Let the predicted risk contribution value of a certain facility be... The value ranges from 0 to 100. When the predicted value... When the value is greater than or equal to 80, the dynamic weight The value is 0.9; when the predicted value When the value is greater than or equal to 60 and less than 80, the dynamic weight The value is 0.7; when the predicted value When the value is greater than or equal to 40 and less than 60, the dynamic weights The value is 0.5; when the predicted value When the value is greater than or equal to 20 and less than 40, the dynamic weights The value is 0.3; when the predicted value When less than 20, dynamic weight The value is 0.1.
[0067] The above mapping rules ensure that high-risk facilities receive larger weight values, while low-risk facilities receive smaller weight values but are not completely ignored.
[0068] The dynamic weight allocation scheme's update mechanism works in conjunction with time-series data stream processing technology to achieve real-time dynamic adjustment of weights in subsequent steps.
[0069] In summary, step S2 completes the construction of the dynamic weight allocation model based on machine learning algorithms. This model uses the multi-dimensional facility attribute feature vector library constructed in step S1 as input, and establishes a non-linear mapping relationship between feature vectors and risk contribution through random forest or gradient boosting tree algorithms, ultimately outputting a dynamic weight allocation scheme for each environmental facility. Compared to traditional subjective weighting methods such as the analytic hierarchy process (AHP), the machine learning model can automatically adjust weights according to the temporal changes in facility operating status, avoiding evaluation bias caused by fixed weights. After the dynamic weight allocation is completed, the weight results can be input into subsequent time-series data stream processing and cumulative risk calculation stages.
[0070] The next step is step S3, time-series data stream processing and real-time update mechanism. In the above-mentioned watershed water environment cumulative risk assessment method based on environmental spatial facility network, time-series data stream processing technology is introduced to support the real-time update of dynamic weights and assessment results, specifically including the following steps.
[0071] Step S301, Deployment and Configuration of the Streaming Computing Engine: Deploy the streaming computing engine to continuously monitor update events of the environment's operational data. The streaming computing engine adopts a distributed architecture design, comprising three functional layers: a data access layer, a stream processing layer, and a data output layer.
[0072] The data access layer collects data update events in real time from various data sources within the environmental space facility network. These data update events include changes in facility operational status, pollutant emission monitoring data, and fluctuations in processing capacity. The data access layer supports message queue protocols, data subscription protocols, and event stream protocols, enabling it to interface with different types of facility data acquisition systems.
[0073] The stream processing layer performs real-time parsing, filtering, transformation, and aggregation on received data update events. It employs an architecture combining stateless and stateful computing nodes. Stateless nodes handle data cleaning and format conversion, while stateful nodes handle window aggregation and state maintenance.
[0074] The data output layer pushes the processing results to the downstream model update module and risk assessment module in a streaming push mode, so that the downstream modules can continuously receive real-time updated data without actively polling.
[0075] Step S302: Monitoring and capturing data update events. The streaming computing engine uses an event-driven architecture to continuously monitor update events of environmental facility operation data. Triggering conditions include periodic data reported by data acquisition devices, abnormal events triggered by changes in the status of environmental facilities, and data updates manually entered by users. After detecting a new data update event, the streaming computing engine immediately extracts the facility identifier, timestamp, data type, and data value from the event.
[0076] Data update events are processed asynchronously. After an event is captured, it is first written to an event buffer queue. The background processing thread then retrieves the events from the queue sequentially for further processing to handle sudden high-frequency data reporting scenarios.
[0077] Step S303: Real-time update of the feature vector library. After the streaming computing engine detects a data update event, it extracts the feature information of the updated data and integrates it into the existing multi-dimensional facility attribute feature vector library. The update process includes: locating the existing record of the facility in the feature vector library based on the facility identifier; parsing the data type and numerical range of the updated data; mapping the updated data to the corresponding feature dimensions; replacing or correcting the affected dimensions in the original feature vector; and updating the timestamp of the feature vector library to reflect the timeliness of the data.
[0078] The feature vector library is updated incrementally, modifying only the changed feature dimensions while retaining the unaffected dimensions. For example, when a wastewater treatment plant's capacity is adjusted from 50,000 tons per day to 45,000 tons per day, only the corresponding capacity value in the capacity dimension is updated, while the other dimensions remain unchanged.
[0079] Step S304: Recalculation and Incremental Learning of the Mapping Model. The data update event triggers the recalculation process of the mapping model, and the incremental learning method is used to update the mapping relationship between the feature vector and the risk contribution.
[0080] When the scale of updated data is small, an online learning strategy can be used to fine-tune the existing model directly, using only the newly received sample data to make minor adjustments to the model parameters, without having to reprocess all the historical data.
[0081] When the scale of updated data is large or model performance deteriorates, a full retraining process is triggered. Performance degradation is determined by using the latest data within a recent time window as a validation set, calculating the current model's prediction error on that validation set, and determining if the error has increased by more than 20% compared to the previous evaluation period. This threshold can be adjusted within the range of 15% to 25%. Full retraining retrains the model using a complete dataset consisting of historical data and newly received data.
[0082] The incremental learning process records model update version information and performance metrics. Version information includes the model number, training timestamp, and training data cutoff time; performance metrics include the model's prediction error and coefficient of determination on the validation set. If the prediction error of the new version model on the validation set increases by more than 20% compared to the previous version, the new version is automatically abandoned and reverted to the previous stable version, while a model update anomaly notification is sent to administrators.
[0083] Step S305: Synchronous update of weight allocation scheme and assessment results. Based on the updated mapping relationship, recalculate the weight allocation scheme of each environmental facility and synchronously update the cumulative risk assessment results of the watershed water environment.
[0084] The weight allocation scheme is updated using a smooth transition strategy to avoid sudden weight changes impacting downstream applications. The smooth transition strategy includes a gradual transition mode and a rollback mode.
[0085] The incremental mode gradually adjusts the weights to the target value within a preset time window. The time window length can be configured from 5 to 30 minutes, depending on the data update frequency.
[0086] The rollback mode automatically reverts to the previous stable version when abnormal data or model fluctuations are detected. The fluctuation detection criterion is that the change in the weight value output by the current version of the model compared to the previous stable version exceeds 0.3, triggering the rollback. The system continues to use the weight scheme of the previous stable version, and records the abnormal event for subsequent investigation.
[0087] The update of the cumulative risk assessment results includes the recalculation of the current instantaneous risk value and the historical cumulative risk value to ensure that the assessment results are consistent with the latest data.
[0088] In summary, step S3 completes the construction of the time-series data stream processing and real-time update mechanism. This mechanism, based on a streaming computing engine, uses event-driven triggering and incremental updates as its primary strategy, achieving a complete closed loop from data acquisition, feature vector updates, model recalculation to the synchronous update of weights and evaluation results. With this mechanism, the dynamic weight allocation model possesses real-time responsiveness; weights can dynamically and adaptively adjust according to changes in facility operating status, thus ensuring the timeliness and accuracy of cumulative risk assessment results in the time-series dimension. After completing the real-time update of the time-series data stream processing, the dynamic weights and updated feature vectors can be used as input to the subsequent cumulative risk calculation model for risk accumulation and attenuation calculations in the time dimension.
[0089] In step S4, the establishment of the cumulative risk calculation model, in the above-mentioned watershed water environment cumulative risk assessment method based on environmental space facility network, specifically includes the following steps.
[0090] Step S401: Maintenance of historical risk status time series data. This involves maintaining the historical risk status time series data. The time series data records the cumulative risk value at each moment and the corresponding environmental facility operating conditions. The time series data is stored using a distributed time series database, with data organized chronologically, maintaining continuity and consistency between adjacent time points.
[0091] Step S402: Definition and parameter setting of the risk decay function. The risk decay function is defined to describe the gradual reduction of historical risk over time. The environmental system possesses a certain degree of self-repair capability, and historically accumulated risks gradually weaken over time. The decay rate of the risk decay function is related to the facility type and its operating status. Different types of facilities correspond to different basic decay rates; facilities in good operating condition decay faster, while facilities in abnormal operating conditions decay slower.
[0092] The risk decay function is expressed in an exponential decay form. For the th Environmental facilities, risk attenuation function Defined as:
[0093] in The time interval, in hours, is the elapsed period from the moment the historical risk value was recorded to the current calculation time. For the first The basic attenuation coefficient for each facility is dimensionless and ranges from 0.01 to 0.10, depending on the facility type. For the first The attenuation rate adjustment factor for each facility, dimensionless, ranging from 0.5 to 1.5, with a default value of 1.0, for facilities in good operating condition. Take the larger value; facilities with abnormal operating status. Take the smaller value; This is the base of the natural logarithm. The fundamental attenuation coefficient. The larger the value, the faster the historical risk decays.
[0094] The above-mentioned exponential decay form strictly follows the first-order degradation kinetics of pollutants in environmental hydraulics, i.e., pollutant concentration... Over time The rate of change is proportional to the current concentration, and its mathematical form is: Solving this differential equation yields It can accurately depict the natural reduction trend of risks over time under normal operating conditions. The foundation attenuation coefficients for different types of environmental facilities. The settings are based on the differences in the environmental persistence of pollutants emitted: environmental monitoring stations themselves do not directly emit pollutants, and the regional environmental background risk reflected by their monitoring data is affected by natural factors such as climate and hydrology, and decays relatively quickly. The preferred value range is 0.08 to 0.10; the effluent from wastewater treatment plants still contains a certain concentration of residual pollutants, and some pollutants (such as heavy metals and recalcitrant organic matter) have a long environmental persistence in the receiving water body. The preferred value range is 0.03 to 0.06; industrial wastewater or domestic sewage directly discharged from the sewage outlet has a high concentration of pollutants, and some persistent organic pollutants and heavy metals can remain in the sediment for a long time and continue to be released. The preferred value range is 0.01 to 0.03. Half-life This represents the time interval corresponding to the risk decay coefficient decreasing to half of its initial value, calculated using the following formula: This half-life range covers different timescales from hours to days, and can adapt to the actual decay characteristics of different types of environmental risks.
[0095] It should be noted that the items listed in this embodiment... and The specific value range is a preferred default threshold derived from statistical regression of historical hydrological and water quality data of typical watersheds, and is not a unique fixed value. In actual deployment, the system supports local adaptation of the above parameters through a combination of empirical calibration using historical monitoring data and numerical simulation calibration, ensuring that the attenuation curve accurately matches the actual watershed's water environment capacity and self-purification ability. For newly established watershed monitoring systems that do not yet have sufficient historical data accumulation, the above default threshold can be used as the initial value. After the system has accumulated at least 6 months of effective monitoring data, the parameters can be iteratively calibrated by comparing the cumulative risk value output by the model with the actual water quality data from the monitoring sections of the watershed.
[0096] Step S403: Weighted fusion calculation of accumulated risk over time. The real-time risk status at the current moment is weighted and fused with the historical risk status to calculate the accumulated risk value at the current moment.
[0097] For the An environmental facility, at the current moment Cumulative risk value The calculation formula is:
[0098] in This is the current calculation time; For the first The dynamic weight of each facility at the current moment is dimensionless and ranges from 0 to 1. It is derived from the dynamic weight allocation result in step S2. For the first The real-time risk contribution of each facility at the current moment, expressed in points, is calculated based on the facility's current monitoring data and operational status. This marks the starting point for historical risk records. For historical moments, in discrete time steps To iterate through all historical moments at intervals; For the first Each facility at time intervals The risk decay coefficient is calculated according to the exponential decay function defined in step S402 and is dimensionless. For the first The facility at a historical moment The cumulative risk value, in points, is read from the time series database.
[0099] half life This represents the time interval corresponding to the attenuation coefficient decreasing to half of its initial value, calculated using the following formula: .
[0100] Step S404, the dynamic adjustment mechanism of the risk attenuation coefficient, adjusts the risk attenuation coefficient to reflect the accelerated accumulation effect of sudden events on cumulative risk when significant changes occur in facility operating conditions. Significant changes in operating conditions include facility failures, excessive emissions, and torrential rains / floods. Appropriate attenuation rate adjustment factors are set according to the type and severity of the change. This allows for a corresponding adjustment to the duration of the impact of historical risks. The specific adjustment mechanism is as follows.
[0101] (a) Continuous Damped Response to Facility Failure or Decreased Treatment Efficiency. When the streaming engine detects a shutdown of critical equipment in the wastewater treatment plant, interruption of data transmission from monitoring stations, or a decrease in treatment efficiency, the system does not use a preset fixed adjustment rate for tiered adjustments. Instead, it introduces an operational efficiency damping coefficient for continuous adjustment. Define real-time treatment efficiency. With design efficiency The ratio is .when When this time, it is considered to be in normal operating condition and no adjustment is required. ;when At that time, the system follows the continuous damping function to Make corrections, specifically by adopting... Calculations are performed in the form of, among which The preset sensitivity factor ranges from 1.0 to 2.0, and users can set it in the system configuration interface according to the facility type. This continuous mapping mechanism ensures that the initial impact of a decrease in processing efficiency is small, and the impact increases non-linearly when processing efficiency deteriorates significantly, avoiding abrupt errors caused by fixed-rate tiered adjustments. The above function form is only one feasible implementation of continuous mapping. Those skilled in the art can use piecewise linear fitting or interpolation lookup methods based on historical data to replace it, depending on the watershed characteristics, all of which can achieve similar technical effects in avoiding abrupt changes in a fixed threshold.
[0102] (ii) Nonlinear mapping adjustment for excessive emission concentrations. For excessive concentrations in wastewater discharge from outlets or wastewater treatment plant effluent, a defined method is used to determine the measured concentration. Compared with standard limits The ratio is the number of times the standard is exceeded. The system uses a continuous mapping method to correlate the excess factor with the correction amount of the attenuation rate adjustment factor. When At that time, emissions are considered to meet standards and no adjustments are required. ;when At that time, the system operates according to the nonlinear damping function. Make corrections, specifically by adopting... Calculations are performed in the form of, among which This is a watershed characteristic coefficient, with a default value range of 0.2 to 0.5. Users can adjust it in the system configuration interface according to the flow velocity, water volume, and self-purification capacity of the receiving water body. This continuous mapping method ensures that the rate of decline of historical risk decreases continuously and smoothly with the degree of exceedance of discharge concentration, avoiding unreasonable jumps caused by artificially dividing the exceedance interval. The above function form is only one feasible implementation of continuous mapping. Those skilled in the art can use piecewise linear fitting or interpolation lookup table methods based on historical data to replace it according to the watershed characteristics, all of which can achieve similar technical effects in avoiding abrupt changes in fixed thresholds.
[0103] (III) Real-time hydrological coupling adaptation mechanism for rainstorm and flood events. For rainstorm and flood events, the system does not set a single attenuation direction, but instead couples real-time hydrological monitoring data (including flow and water level) of the basin for bidirectional judgment. First, the dilution-dominant response during the peak flood period.
[0104] When a sharp rise in water level or flow is detected in the basin and the water level is in a rising phase, the system determines that the dilution and diffusion of pollutants by large-volume runoff is dominant, and historical risks are reduced more rapidly. At this time, the attenuation rate adjustment factor can be increased; specifically, this can be achieved by... Calculations are performed in the form of, among which For real-time traffic, This refers to the multi-year average flow rate or the warning flow rate. This is the dilution strength coefficient, with a value ranging from 0.1 to 0.3.
[0105] The larger the flood flow, the faster the historical risk is washed away and diluted, and the more significant the acceleration of its attenuation. Secondly, the endogenous release during the receding flood period dominates the response. When the flood peak has passed and the water level enters a slow receding phase, the system determines that the hydrodynamic force has weakened. The bottom sediment and shoreline deposits washed up during the flood begin to slowly settle and release endogenous pollutants. At this time, the rate of attenuation of historical risk slows down relatively, and the system automatically... The adjustment will be lowered. The specific reduction amount will be determined based on real-time suspended solids concentration monitoring data or the timeline of the flood receding phase. The value should not be less than 0.7 times the current value to ensure that the adjustment range is within a reasonable range.
[0106] This two-way coupling mechanism follows the principles of hydrology and river dynamics, avoiding physical errors caused by setting a single direction. For application scenarios that do not yet have the conditions for real-time flow monitoring, the system supports using rainfall data as a substitute input parameter for the above judgment, or allows managers to manually set the current flood stage (rising stage or receding stage) through the system interface based on flood forecast information, to ensure that the mechanism is operable under different data conditions.
[0107] A tiered recovery strategy after the triggering conditions are eliminated. This strategy applies once the aforementioned triggering conditions are eliminated (including completion of facility repairs, restoration of emission concentrations below standard limits, and the end of the flood receding phase). The value needs to be restored from the adjusted state to the normal state. The restoration strategy adopts a tiered implementation method. During the initial deployment phase of the system or when historical data accumulation is insufficient, a linear gradual strategy is adopted by default, that is, gradually reducing the value within a preset time window. The system will be restored to normal values. The time window length is set to 6 to 72 hours depending on the event type. Users can adjust this in the system configuration interface as needed.
[0108] After the system has accumulated at least 3 months of valid monitoring data, it supports switching to the exponential progressive recovery mode, whose recovery curve follows... ,in The time elapsed after the system returned to normal, expressed in hours. This is the water environment self-purification recovery rate constant, ranging from 0.02 to 0.08. Users can adjust this value in the system configuration interface according to the actual self-purification capacity of the receiving water body. This index-based recovery mode simulates the real evolution trajectory of a receiving water body after the pollution source is cut off, initially showing rapid improvement followed by stabilization. The system verifies the effectiveness and fine-tunes parameters by comparing the output differences of the two strategies in the background. Administrators can select the recovery strategy suitable for their site based on the actual application results.
[0109] Step S405: Output and application of cumulative risk calculation results. The cumulative risk calculation model outputs the cumulative risk contribution of each environmental facility and the overall cumulative risk index of the watershed. The cumulative risk contribution of each environmental facility is the one calculated in step S403. The overall cumulative risk index of the watershed The calculation employs a weighted aggregation strategy:
[0110] in This represents the total number of environmental facilities within the watershed. For the first The dynamic weight of each facility at the current moment is dimensionless; For the first The cumulative risk value of each facility at the current moment, expressed in points.
[0111] The cumulative risk calculation results are output to the downstream early warning and visualization modules through the data interface, providing data support for risk management decisions of the watershed water environment.
[0112] In summary, the cumulative risk calculation model in step S4 is now complete. This model maintains historical risk status through a time-series database, describes the time decay law of risk using an exponential decay function, calculates the cumulative risk value at the current moment using a weighted fusion method, and supports dynamic adjustment of the decay coefficient under abnormal operating conditions. This model transforms the risk assessment results at discrete moments into a cumulative risk metric over a continuous time dimension, ensuring that the assessment results include both immediate risk information and reflect the continued impact of historical risks.
[0113] Finally, step S5, the construction of a dynamic risk early warning mechanism, specifically includes the following steps in the watershed water environment cumulative risk assessment method based on environmental space facility network.
[0114] Step S501: Setting multi-level early warning thresholds. Multi-level early warning thresholds are set according to the needs of watershed water environment management, with each threshold corresponding to a different risk level. The process of setting early warning thresholds includes the following steps: collecting historical risk event data and risk management experience of the watershed water environment; analyzing the risk value distribution range corresponding to different risk levels; setting initial values for each level of early warning threshold based on the distribution range; and correcting the early warning thresholds through backtesting of historical data and expert review.
[0115] The backtesting verification method for the early warning threshold is as follows: Historical risk event data is substituted into the early warning judgment logic sequentially, recording the cumulative risk value corresponding to each event and its relative relationship with the early warning threshold at each level. Statistics are compiled on instances where the threshold was triggered before actual historical risk events occurred and instances where the threshold was falsely triggered during normal periods. Based on this, the threshold setting is adjusted to keep the false alarm rate within a reasonable range. The control standard for the false alarm rate is determined according to the required level of precision in watershed management, with a typical control range of 10% to 20%.
[0116] Step S502 involves real-time monitoring and trend analysis of cumulative risk values. This involves monitoring the changing trend of cumulative risk values in real time and generating a corresponding warning signal when the cumulative risk value exceeds the corresponding warning threshold. The real-time monitoring process includes four stages: data acquisition, risk calculation, threshold comparison, and warning determination.
[0117] The data acquisition stage obtains the latest cumulative risk values from the cumulative risk calculation model. The risk calculation stage preprocesses the acquired values, including outlier filtering and trend smoothing. The threshold comparison stage compares the preprocessed values with warning thresholds at various levels to determine the current risk level. The warning determination stage generates warning signals based on the risk level and warning rules.
[0118] The trend analysis process employs time series analysis methods, including moving average calculation, trend slope calculation, and inflection point detection.
[0119] Moving averages are used to eliminate the interference of short-term fluctuations on trend judgment, and the width of the moving window is adjusted according to the speed of risk evolution.
[0120] Trend slope calculation is used to quantify the rate of change of risk. For two adjacent time points... and ,in The corresponding cumulative risk values are respectively and trend slope The calculation formula is:
[0121] in and The unit is cents. The unit is hours, and the slope is... The unit is minutes per hour.
[0122] Inflection point detection is used to identify turning points in the direction of risk changes. The criteria are as follows: when the trend slope sign changes from positive to negative in two consecutive adjacent time periods, it is identified as an inflection point from rising to falling; when it changes from negative to positive, it is identified as an inflection point from falling to rising.
[0123] Step S503: Associating the early warning signal with the Geographic Information System (GIS). This involves associating the early warning signal with the GIS to achieve precise location of the risk area. The GIS stores spatial data of the watershed's water environment, including the spatial location of environmental facilities, river network topology, and the distribution of sensitive areas.
[0124] The geographic association process for early warning signals includes the following steps: querying the spatial coordinates of the facility that triggered the early warning based on its identifier; determining the affected water area based on the spatial location of the facility and the topological relationship of the river network; overlaying the spatial boundary of the affected water area onto the geographic information system base map; and generating a visualized early warning map containing the early warning level, facility information, and affected area.
[0125] Step S504: Triggering of tiered emergency response measures. The corresponding emergency response measures are triggered based on the warning level. The triggering logic of the emergency response measures matches the warning level, forming a complete warning-response closed loop.
[0126] The emergency response measures corresponding to different warning levels include the following: For low-level warnings, the measures are routine patrols, initiating the patrol task assignment process, dispatching patrol personnel to conduct on-site inspections of relevant environmental facilities, confirming whether the facilities are operating normally, recording the patrol results, and reporting them to the risk management system.
[0127] The measures corresponding to a medium-level warning include special inspections, initiating the special inspection task assignment process, organizing professional and technical personnel to conduct in-depth inspections of relevant environmental facilities, analyzing the causes of risks, assessing the development trend of risks, and formulating targeted risk control plans. The measures corresponding to a high-level warning include emergency response, activating emergency response plans, mobilizing emergency resources, and implementing actions such as emergency shutdowns, production restrictions, pollutant interception, and emergency response to control the expansion of risks and reduce environmental damage.
[0128] Step S505: Management of Early Warning Information Release and Feedback. Early warning information is released through a multi-channel push mechanism, including mobile application push notifications, SMS notifications, emails, and system messages. The scope of early warning information push is set according to the warning level: low-level warnings are pushed to daily management personnel, medium-level warnings to department heads and safety management personnel, and high-level warnings to unit leaders and government regulatory departments.
[0129] The feedback management of early warning information includes three stages: early warning confirmation, progress reporting, and early warning cancellation. The early warning confirmation stage requires the receiving personnel to confirm and respond to the early warning information. The progress reporting stage requires the handling personnel to report the progress of the handling regularly. The early warning cancellation stage is determined automatically by the system or confirmed manually. When the accumulated risk value falls below the early warning threshold and remains below it for at least three consecutive sampling periods, the early warning status is automatically cancelled, and an early warning cancellation notification is generated and pushed to relevant personnel.
[0130] In step S5, the dynamic risk early warning mechanism uses multi-level early warning thresholds as the judgment benchmark, real-time monitoring and trend analysis as input sources, and achieves spatial risk location through a geographic information system. It triggers tiered emergency responses based on the early warning level and is complemented by a multi-channel information dissemination and feedback management closed loop. The dynamic risk early warning mechanism transforms the numerical values output by the cumulative risk calculation model into actionable risk management actions, ensuring that the assessment results are ultimately translated into early warning signals for management personnel and handling instructions for on-site personnel. Once the dynamic risk early warning mechanism is constructed, a complete methodological chain is formed, encompassing data collection, weight allocation, risk calculation, and early warning response.
[0131] For ease of understanding, the following is a specific application example. In a water environment risk management scenario for a certain watershed, a total of 3 environmental monitoring stations, 5 sewage treatment plants, and 12 sewage outlets are deployed within the watershed, with various facilities distributed along the main stream and major tributaries of the watershed.
[0132] First, following step S1, a multi-dimensional facility attribute feature vector library is constructed. The basic data of each environmental facility are integrated and standardized to form a unified multi-dimensional feature vector representation. Second, following step S2, a random forest mapping model is trained using historical sample datasets to assess the risk contribution of each environmental facility within the watershed. Based on the assessment results, a dynamic weight allocation scheme is generated. The results show that wastewater treatment plants with large designed treatment capacity but whose actual treatment volume is nearing saturation, as well as sewage outlets with high historical discharge volumes located in sensitive water areas, obtain higher predicted risk contribution values.
[0133] Then, following step S3, time-series data stream processing technology is introduced. When a wastewater treatment plant reports an abnormal event indicating a decrease in treatment capacity, the streaming computing engine captures the event and triggers a feature vector library update process, updating the facility's treatment capacity feature value to the latest value. After the feature vector library is updated, a mapping model recalculation process is triggered, and the model outputs an increase in the facility's predicted risk contribution value. Based on the updated predicted value, the facility's dynamic weights are adjusted, and the watershed cumulative risk comprehensive index is recalculated after the weight adjustment. The cumulative risk comprehensive index shows an upward trend; when the increase exceeds the preset warning threshold, this method automatically generates a medium-level warning signal.
[0134] Next, following step S4, the cumulative risk of the watershed is calculated using a time-weighted fusion model. The model records the current cumulative risk value as the historical risk status and combines it with the immediate risk contribution to calculate the new cumulative risk value. For the abnormally operating facility with reduced treatment capacity, its attenuation rate adjustment factor is set to a smaller value, making the contribution of historical risk to the current cumulative risk value more persistent. The cumulative risk calculation results show that although the event of reduced treatment capacity at the wastewater treatment plant was detected in a timely manner and emergency measures were taken, the cumulative risk value remains at a high level and requires continued monitoring.
[0135] Finally, the dynamic risk early warning mechanism established in step S5 is triggered, sending a medium-level early warning signal to relevant department heads and safety management personnel. The early warning information includes the location of the facility triggering the warning, the warning level, the scope of impact, and recommended response measures. The early warning information is correlated with watershed spatial data through a geographic information system to generate a visual early warning map, which is displayed on the large screen of the watershed management command center. Upon receiving the early warning information, relevant departments initiate a special inspection, conducting an in-depth inspection and troubleshooting of the wastewater treatment plant, and formulating and implementing a fault repair plan. After the fault repair is completed, the accumulated risk value gradually decreases, and this method automatically lifts the early warning status and archives the handling process.
[0136] It needs to be further clarified that all empirical parameters involved in the above embodiments of this method (including but not limited to) initial grading value, Dilution strength coefficient Watershed characteristic coefficients Sensitivity factor Recovery rate constant and The lower limit threshold (which can be adjusted) is not a fixed mathematical constant, but an adjustable parameter that can be configured locally according to the specific characteristics of the target watershed.
[0137] When implementing this invention, those skilled in the art can dynamically calibrate and optimize the above parameters based on the specific hydrological characteristics of the target watershed (including annual average flow and water level fluctuations), background pollutant concentrations, and historical aquatic ecological response data, using the system's built-in empirical calibration module or offline training module. For newly established monitoring stations lacking sufficient historical data, the system supports using the preferred default values provided by this invention as initial parameters. After the accumulated operational data meets the statistical confidence requirements (usually no less than 6 months), the parameters can be iteratively optimized through a background calibration process.
[0138] The core of this invention is the basic calculation framework for time-domain weighted fusion of historical risks based on the exponential decay function, and the control logic for adaptively correcting the decay rate by coupling real-time operating conditions of the facilities with hydrological and meteorological data. Any scheme based on this framework and logic that only makes adaptive adjustments to each empirical parameter to conform to local conditions is an equivalent alternative to this invention and does not depart from the scope of protection of this invention.
[0139] On the other hand, the watershed water environment cumulative risk assessment system based on environmental space facility networks disclosed in this invention includes: The multi-dimensional facility attribute feature vector library construction module is used to obtain multi-source heterogeneous raw data from the environmental space facility network, and to perform standardization and normalization of the multi-source heterogeneous raw data to form multi-dimensional feature vectors for each environmental facility. The dynamic weight allocation model building module is used to establish and train a nonlinear mapping model between feature vectors and risk contribution based on a multi-dimensional facility attribute feature vector library and machine learning algorithms, and output dynamic weights. The time-series data stream processing and real-time update module is used to deploy a streaming computing engine to listen for data update events and trigger dynamic updates of the multi-dimensional facility attribute feature vector library and nonlinear mapping model. The cumulative risk calculation model is used to maintain the time series data of historical risk states and to perform time-dimensional decay calculations on historical risk states using a risk decay function. The calculation results are then weighted and fused with the current real-time risk state to obtain the cumulative risk value at the current moment.
[0140] It will be apparent to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects.
[0141] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for assessing the cumulative risk of watershed water environment based on environmental spatial facility networks, characterized in that, include: A multi-dimensional facility attribute feature vector library is constructed. Multi-source heterogeneous raw data containing environmental monitoring stations, sewage treatment plants and sewage outlets are obtained from the environmental spatial facility network. The multi-source heterogeneous raw data is standardized and mapped to a multi-dimensional feature space containing facility type dimension, capacity dimension and status dimension. The continuous numerical features in the capacity dimension and the status dimension are subjected to min-max normalization. The normalized vectors of each dimension are concatenated to form the multi-dimensional feature vector of each environmental facility. Based on the multidimensional facility attribute feature vector library, a nonlinear mapping model between feature vectors and risk contribution is established using machine learning algorithms. The predicted risk contribution value of each environmental facility is output, and the predicted risk contribution value is mapped to the corresponding dynamic weight according to the preset weight mapping rules. A streaming computing engine is deployed to monitor update events of environmental facility operation data. When the data update event is captured, the update of the multidimensional facility attribute feature vector library and the incremental learning or full retraining of the nonlinear mapping model are triggered to obtain the updated dynamic weights. Establish a cumulative risk calculation model, maintain time series data of historical risk status, use the risk decay function to perform time dimension decay calculation on historical risk status, and weight and fuse the real-time risk status at the current moment with the historical risk status after decay calculation to obtain the cumulative risk value at the current moment. The risk attenuation function adopts an exponential attenuation form, and the attenuation rate is set differently according to the type and operating status of the environmental facility. Different types of environmental facilities correspond to different basic attenuation coefficients, and the same facility corresponds to different attenuation rate adjustment factors under different operating states. When the operating conditions of an environmental facility undergo a significant change of a preset type, the attenuation rate adjustment factor of the facility is automatically adjusted.
2. The method for assessing the cumulative risk of watershed water environment based on environmental spatial facility networks according to claim 1, characterized in that, The standardization process for the aforementioned multi-source heterogeneous raw data specifically includes: Outlier processing is performed on the multi-source heterogeneous raw data. For parameters that follow a normal distribution, the confidence interval boundary is the mean plus or minus 3 times the standard deviation. Values exceeding the confidence interval boundary are marked as outliers. For parameters that do not follow a normal distribution, the confidence interval boundary is determined by the interquartile range method, that is, values that are less than the first quartile minus 1.5 times the interquartile range or greater than the third quartile plus 1.5 times the interquartile range are marked as outliers; For values marked as anomalous, the nearest valid value of the parameter corresponding to the marked anomalous value on the boundary of the confidence interval is used to replace it.
3. The method for assessing the cumulative risk of watershed water environment based on environmental spatial facility networks according to claim 1, characterized in that, Establishing a nonlinear mapping model between feature vectors and risk contribution using machine learning algorithms, specifically including: The random forest algorithm is used to train the nonlinear mapping model between feature vectors and risk contribution, and the gradient boosting tree algorithm is used to train the nonlinear mapping model between feature vectors and risk contribution, and the gradient boosting tree mapping model is constructed. Calculate the determination coefficients of the random forest mapping model and the gradient boosting tree mapping model on the validation subset, and determine the fusion weights corresponding to the random forest mapping model and the gradient boosting tree mapping model based on the determination coefficients; The outputs of the random forest mapping model and the gradient boosting tree mapping model are integrated and fused using a weighted averaging strategy to obtain the predicted risk contribution value.
4. The method for assessing the cumulative risk of watershed water environment based on environmental spatial facility networks according to claim 1, characterized in that, Triggering updates to the multidimensional facility attribute feature vector library and incremental learning or full retraining of the nonlinear mapping model specifically includes: Based on the existing records of the target environmental facility in the multidimensional facility attribute feature vector library, the incremental update strategy is adopted to modify only the feature dimensions that have changed. When the updated data size is less than a preset threshold, an online learning strategy is used to fine-tune the nonlinear mapping model. When the prediction error of the nonlinear mapping model on new data within the most recent time window increases by more than 20% compared to the previous evaluation period, a full retraining process is triggered.
5. The method for assessing the cumulative risk of watershed water environment based on environmental spatial facility networks according to claim 1, characterized in that, The risk decay function adopts an exponential decay form, and the risk decay function is defined as follows: in, For the first Environmental facilities at time intervals Risk attenuation coefficient The basic attenuation coefficient is set according to the type of environmental facility, and its value ranges from 0.01 to 0.
10. This is an adjustment factor for the attenuation rate, set according to the operating status of the environmental facilities, with a value ranging from 0.5 to 1.
5. is the base of the natural logarithm.
6. The method for assessing the cumulative risk of watershed water environment based on environmental spatial facility networks according to claim 1, characterized in that, After obtaining the cumulative risk value at the current moment, it also includes: Establish a dynamic risk early warning mechanism and set multi-level early warning thresholds; Monitor the changing trend of the cumulative risk value in real time, and calculate the trend slope of the cumulative risk value; When the cumulative risk value exceeds the corresponding warning threshold in the multi-level warning threshold, a warning signal of the corresponding level is generated, and the warning signal is associated with the geographic information system to determine the affected water area and realize the spatial positioning of the risk area.
7. The method for assessing the cumulative risk of watershed water environment based on environmental spatial facility networks according to claim 6, characterized in that, The dynamic risk warning mechanism also includes the triggering of tiered emergency response measures, specifically including: When the warning level is low, a routine patrol task is triggered, and patrol personnel are dispatched to conduct on-site inspections of relevant environmental facilities to confirm whether the environmental facilities are operating normally. When the warning level is medium, a special inspection task is triggered, and professional and technical personnel are organized to analyze the causes of the risk and formulate a risk control plan. When the warning level is high, emergency response tasks are triggered, the emergency response plan is activated, and emergency resources are mobilized.
8. The method for assessing the cumulative risk of watershed water environment based on environmental spatial facility networks according to claim 1, characterized in that, The updated dynamic weights are obtained, specifically using a smooth transition strategy for weight updates. This smooth transition strategy includes: The progressive mode gradually adjusts the weights to the target value within a preset time window; In rollback mode, when the updated dynamic weights are detected to have a change of more than 0.3 compared to the previous stable version, the system automatically rolls back to the weight scheme of the previous stable version.
9. The method for assessing the cumulative risk of watershed water environment based on environmental spatial facility networks according to claim 1, characterized in that, The standardization process for the aforementioned multi-source heterogeneous raw data also includes: Missing values are imputed in the multi-source heterogeneous raw data. When there are no less than 3 valid samples of the same type of environmental facility in the group of the target environmental facility, the group mean is used for imputation. When the number of samples in the group is less than 3, linear interpolation of adjacent time periods of the target environmental facility's own historical time series data is used to fill the gap.
10. A watershed water environment cumulative risk assessment system based on an environmental spatial facility network, characterized in that, For implementing the watershed water environment cumulative risk assessment method based on environmental spatial facility networks as described in any one of claims 1 to 9, the watershed water environment cumulative risk assessment system based on environmental spatial facility networks comprises: The multi-dimensional facility attribute feature vector library construction module is used to obtain multi-source heterogeneous raw data from the environmental space facility network, and to perform standardization and normalization splicing on the multi-source heterogeneous raw data to form multi-dimensional feature vectors of each environmental facility. The dynamic weight allocation model construction module is used to establish and train a nonlinear mapping model between feature vectors and risk contribution based on the multi-dimensional facility attribute feature vector library using machine learning algorithms, and output dynamic weights. The time-series data stream processing and real-time update module is used to deploy a streaming computing engine to listen for data update events and trigger the dynamic update of the multi-dimensional facility attribute feature vector library and the nonlinear mapping model. The cumulative risk calculation model is used to maintain the time series data of historical risk states and to perform time-dimensional decay calculations on historical risk states using a risk decay function. The calculation results are then weighted and fused with the current real-time risk state to obtain the cumulative risk value at the current moment.