A Big Data-Based Method and System for Monitoring Watershed Ecological Security
By deeply integrating ecological environment and ecosystem monitoring, and optimizing the selection of cluster centers and parameter settings, the problems of one-sidedness and inaccuracy in traditional watershed ecological security monitoring have been solved, thereby improving the comprehensiveness and accuracy of watershed ecological security monitoring and providing a scientific basis for decision-making.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIV
- Filing Date
- 2024-12-07
- Publication Date
- 2026-05-26
AI Technical Summary
Traditional watershed ecological security monitoring methods often separate ecological environment and ecosystem analysis, neglecting the complex interrelationship between the two. This leads to one-sided analysis, incorrect cluster center selection, improper data point allocation, and inappropriate built-in parameter settings, resulting in insufficient accuracy of monitoring results.
By deeply integrating ecological environment monitoring and ecosystem monitoring, and introducing neighboring domain similarity, standard deviation adjustment distance and allocation coefficient, the selection of cluster centers is optimized. Dynamic adaptation factors and individual symbiotic updates are used to improve the optimal parameters of the prediction model, thereby enhancing the comprehensiveness and accuracy of the monitoring model.
It has significantly improved the comprehensiveness, depth and accuracy of watershed ecological security monitoring, ensuring the accuracy and timeliness of monitoring results, and providing a scientific and reliable basis for decision-making in the sustainable management of watershed ecology.
Smart Images

Figure CN119647777B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of ecological security information processing technology, specifically a watershed ecological security monitoring method and system based on big data. Background Technology
[0002] A big data-based watershed ecological security monitoring method and system utilizes big data technology to collect, process, and analyze ecological security data within a watershed, enabling real-time monitoring of the watershed's ecological security status. This method comprehensively and in real-time monitors the watershed's ecological environment through big data, identifying potential ecological risks and taking timely preventative measures to ensure the health and sustainability of the watershed ecosystem. However, traditional watershed ecological security monitoring methods suffer from the problem of separating ecological environment and ecosystem analysis, neglecting the complex interrelationship between the two, leading to one-sided analysis and an inability to comprehensively and accurately assess the watershed's ecological security status. Existing clustering methods in watershed ecosystem monitoring models suffer from technical problems such as incorrect cluster center selection and improper data point allocation, resulting in insufficient accuracy in watershed ecosystem monitoring results. Furthermore, existing models for watershed ecological environment monitoring suffer from technical problems such as improper built-in parameter settings, leading to inaccurate prediction model output results. Summary of the Invention
[0003] To address the above-mentioned shortcomings and overcome the deficiencies of existing technologies, this invention provides a big data-based method and system for monitoring watershed ecological security. Traditional watershed ecological security monitoring methods often separate ecological environment and ecosystem analysis, neglecting their complex interrelationships and leading to one-sided analysis. This results in an inability to comprehensively and accurately assess the watershed's ecological security status. This solution creatively integrates ecological environment monitoring and ecosystem monitoring, overcoming the limitations of traditional single-dimensional analysis of watershed ecological security. Through this comprehensive assessment, the comprehensiveness, depth, and accuracy of watershed ecological security monitoring are significantly improved, ensuring the accuracy and timeliness of monitoring results. This provides a scientific and reliable basis for sustainable watershed ecological management. Furthermore, this invention addresses the limitations of existing clustering methods used in watershed ecosystem monitoring models. The technical problem of insufficient accuracy in watershed ecosystem monitoring results due to incorrect cluster center selection and improper data point allocation is addressed by this innovative solution. This solution introduces adjacency domain similarity, standard deviation adjusted distance, and allocation coefficients to more accurately define local density and distance, optimize the cluster center selection process, and effectively solve the data point allocation problem, thereby improving the accuracy of clustering results and resolving the technical issue of inaccurate watershed ecosystem monitoring results. Furthermore, addressing the technical problem of inaccurate prediction model outputs due to improper built-in parameter settings in existing models applicable to watershed ecological environment monitoring, this solution employs an improved algorithm for obtaining optimal prediction model parameters using dynamic adaptation factors, opposing individuals, and individual symbiotic updates. This optimal parameter combination enhances the accuracy of model output results, leading to more accurate watershed ecological environment monitoring results.
[0004] The technical solution adopted by this invention is as follows: This invention provides a watershed ecological security monitoring method based on big data, which includes the following steps:
[0005] Step S1: Data Acquisition;
[0006] Step S2: Data preprocessing;
[0007] Step S3: Watershed ecological environment monitoring;
[0008] Step S4: Watershed ecosystem monitoring;
[0009] Step S5: Hyperparameter optimization;
[0010] Step S6: Comprehensive monitoring of the watershed ecology.
[0011] Further, in step S1, the data collection specifically involves acquiring raw watershed ecological security monitoring data from the government's ecological environment monitoring platform. This raw watershed ecological security monitoring data includes historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data, and real-time ecosystem monitoring data. Both historical and real-time environmental monitoring data include water quality data, air quality data, soil data, and climate data. The historical environmental monitoring data also includes historical ecological environment monitoring status. Both historical and real-time ecosystem monitoring data include the number of biological species, the distribution of biological species, watershed vegetation coverage, watershed habitat area, watershed ecological function data, and ecological carrying capacity. The data includes: historical ecosystem monitoring data, watershed ecosystem monitoring status; water quality data, including pH, dissolved oxygen concentration, chemical oxygen demand, ammonia nitrogen concentration, heavy metal content, and turbidity; air quality data, including fine particulate matter concentration, inhalable particulate matter concentration, carbon dioxide concentration, nitrogen oxide concentration, and sulfur dioxide concentration; soil data, including soil moisture, soil pH, soil organic matter content, and soil temperature; climate data, including temperature, humidity, precipitation, and wind speed; and watershed ecosystem monitoring status, including healthy ecosystem, ecological stress, mild ecological degradation, and severe ecological status. The watershed ecosystem monitoring status is used as a data label, which is not considered during clustering but only used for selecting cluster labels.
[0012] Further, in step S2, the data preprocessing is used to perform data cleaning, standardization, data integration, and feature selection on the raw data of watershed ecological security monitoring to obtain preliminary data of watershed ecological security monitoring; the data cleaning is to handle missing values, outliers, and duplicate values; the standardization is to standardize the data based on the minimax normalization method; the data integration is to merge and unify the raw data of watershed ecological security monitoring from different sources and formats; the feature selection is to use correlation analysis to select the most relevant and representative features of ecological environment monitoring and ecosystem monitoring from the raw data of watershed ecological security monitoring.
[0013] Further, in step S3, the watershed ecological environment monitoring includes establishing a watershed ecological environment monitoring model, training the watershed ecological environment monitoring model, and real-time monitoring of the watershed ecological environment; specifically, it includes the following steps:
[0014] Step S31: Establish a watershed ecological environment monitoring model, which specifically includes the following steps:
[0015] Step S311: Initialize model parameters, set the model input vector dimension and output vector dimension;
[0016] Step S312: Design the input layer, expressed by the following formula:
[0017] ;
[0018] In the formula, This represents the overall input data for a multidimensional time series, including time series data for four dimensions: soil, air, water quality, and climate. Represents soil time series data, Represents air time series data, Represents water quality time series data, Represents climate time series data;
[0019] Step S313: Share the LSTM layer, specifically by extracting key features from the overall input data time series and generating a shared feature vector, which includes the following steps:
[0020] Step S3131: LSTM unit output calculation, specifically, based on the current input data, the hidden state from the previous time step, and the cell state, calculate the hidden state using the following formula:
[0021] ;
[0022] In the formula, Indicates the function that executes the unit. This indicates the hidden state at the current moment. This represents the input data at the current moment. This indicates the hidden state from the previous moment. This indicates the state of the cell unit at the previous moment;
[0023] Step S3132: Aggregation of shared feature vectors, specifically, aggregating the hidden states of all time steps into shared feature vectors; the formula used is as follows:
[0024] ;
[0025] In the formula, This represents the shared feature vector, where T represents the total number of time steps in the time series data, and t represents the index of the time step. This indicates the weighting parameter for adjusting the time position;
[0026] Step S314: Divide into multi-task branches, with each task branch corresponding to a single dimension of pollution state monitoring. Independent fully connected layers and activation functions are used, as shown in the following formula:
[0027] ;
[0028] ;
[0029] ;
[0030] ;
[0031] In the formula, This indicates the monitoring results of the soil monitoring task branch. This represents the weight matrix of the soil monitoring task branches. This represents the bias term parameter of the soil monitoring task branch. express Activation function This indicates the monitoring results of the air monitoring task branch. This represents the weight matrix of the air monitoring task branches. This represents the bias parameter of the air monitoring task branch. express Activation function This indicates the monitoring results of the water quality monitoring task branch. This represents the weight matrix of the water quality monitoring task branches. This represents the bias term parameter of the water quality monitoring task branch. express Activation function This represents the monitoring results of the climate monitoring mission branch. This represents the weight matrix of the climate monitoring task branches. The bias term parameter represents the branch of the climate monitoring mission. express Activation function;
[0032] Step S315: Overall pollution status monitoring output, specifically, selecting the most severe pollution status from the output results of the four task branches to determine the overall pollution status of the watershed, using the following formula:
[0033] ;
[0034] In the formula, This indicates the overall pollution status monitoring output results;
[0035] Step S32: Training the watershed ecological environment monitoring model, specifically, using historical environmental monitoring data from the preliminary watershed ecological security monitoring data as input data to train the watershed ecological environment monitoring model, and obtaining the trained watershed ecological environment monitoring model;
[0036] Step S33: Real-time monitoring of the watershed's ecological environment. Specifically, the real-time environmental monitoring data in the preliminary data of the watershed's ecological security monitoring is used as the input data for the trained watershed ecological environment monitoring model to obtain the current watershed ecological environment monitoring status results.
[0037] Further, in step S4, the watershed ecosystem monitoring includes establishing a watershed ecosystem monitoring model, training the watershed ecosystem monitoring model, and real-time monitoring of the watershed ecosystem status; specifically, it includes the following steps:
[0038] Step S41: Establish a watershed ecosystem monitoring model, which specifically includes the following steps:
[0039] Step S411: Calculate the distance between sample data points, specifically by adjusting the distance using the standard deviation. The sample data points are the data values of various ecological parameters in the historical ecosystem monitoring data and the real-time ecosystem monitoring data. The formula used is as follows:
[0040] ;
[0041] ;
[0042] In the formula, The distance between samples i and j is represented by m, where m represents the number of features for each sample, and n represents the number of samples. This represents the weight of the k-th feature. This represents the value of sample i on the k-th feature. This represents the value of sample j on the k-th feature. This represents the value of sample l on the k-th feature. This represents the average of k features across all samples. This represents the sum of the standard deviations of all features. The standard deviation represents the characteristics of a sample.
[0043] Step S412: Calculate the similarity of the adjacency regions between sample data points, expressed by the following formula:
[0044] ;
[0045] ;
[0046] ;
[0047] In the formula, Let i represent the nearest neighbor set of sample i. Let j represent the nearest neighbor set of sample j. This represents the distance between samples q and p. Let i be the k-th nearest neighbor of sample i. Let j represent the k-th nearest neighbor of sample j. Show sample i and The distance between them Indicates sample j and The distance between them K represents the similarity of the adjacency regions between sample i and sample j, and K represents the number of nearest neighbors.
[0048] Step S413: Calculate the local density of the sample data points, expressed by the following formula:
[0049] ;
[0050] In the formula, This represents the local density of sample i;
[0051] Step S414: Calculate the relative distance; the formula used is as follows:
[0052] ;
[0053] In the formula, This represents the distance between sample i and the nearest point with higher density. This represents the local density of sample j. This represents the distance between samples i and p. This represents the distance between samples j and q. Represents the maximum value among all samples excluding sample i. value, This represents the distance between sample j and the nearest point with higher density;
[0054] Step S415: Calculate the decision value, expressed by the following formula:
[0055] ;
[0056] In the formula, Indicates the decision value. Represents the local density of the sample. This represents the distance between a sample data point and the nearest point with a higher density;
[0057] Step S416: Select core data points, specifically by sorting the decision values in descending order and selecting the top 10% of the sample points based on the decision values as core data points;
[0058] Step S417: Allocate core data points. Specifically, initialize sample queue Q, add the selected core data points to sample queue Q, and if Q is not empty, pop the cluster center point p from queue Q and obtain the K nearest neighbor samples. Calculate the similarity of the adjacency regions between sample p and its K nearest neighbors. For each unassigned sample q relative to sample p, if If q is assigned to the cluster to which p belongs;
[0059] Step S418: Allocate the remaining sample data points; specifically including the following steps:
[0060] Step S4181: Construct the assignment matrix, specifically by finding all unassigned sample data points. If the number of unassigned sample data points h is greater than 0, then construct a matrix of size [missing information]. Assignment matrix M; Indicates the number of clusters;
[0061] Step S4182: Calculate the allocation coefficients, the specific formula is as follows:
[0062] ;
[0063] In the formula, Indicates sample p pairs The allocation coefficient, Let j represent the j-th nearest neighbor of sample point p. Indicates sample p and The distance;
[0064] Step S4183: Fill the matrix, specifically for each unassigned sample data point. Iterate through its K nearest neighbors If sample data points nearest neighbor If it has already been assigned to a cluster, then The allocation coefficients are added to matrix M. row correspondence In the column belonging to the cluster, otherwise distribute the coefficients evenly. Add evenly to matrix M The rows correspond to the columns of all clusters;
[0065] Step S4184: Obtain the maximum value of the matrix, specifically by finding the maximum value max(M) in matrix M and its corresponding row r and column c, and then obtaining the second largest value in row r. ;
[0066] Step S4185: Assign sample data points, specifically if If the data points in the corresponding r rows are assigned to the c-th cluster, then the assignment is stopped.
[0067] Step S4186: Neighbor selection strategy, specifically, if there are still unassigned sample data points, then select the nearest assigned point based on its distance from the assigned points and assign it to the cluster;
[0068] Step S42: Watershed ecosystem monitoring model training, specifically, using historical ecosystem monitoring data and historical ecological environment monitoring status from the preliminary watershed ecological security monitoring data to train the watershed ecosystem monitoring model, and obtain the trained watershed ecosystem monitoring model;
[0069] Step S43: Real-time monitoring of the watershed ecosystem status. Specifically, the real-time ecosystem monitoring data in the preliminary watershed ecological security monitoring data and the current watershed ecological environment monitoring status results are used as input data for the trained watershed ecosystem monitoring model to obtain the current watershed ecosystem monitoring status results.
[0070] Furthermore, in step S5, the hyperparameter optimization specifically includes the following steps:
[0071] Step S51: Initialize parameters, specifically by constructing initial algorithm parameters; the initial algorithm parameters include population size N, maximum number of iterations t. max Search for the lower limit lb and the upper limit ub;
[0072] Step S52: Initialize the population, which specifically includes the following steps:
[0073] Step S521: Initialize the search individual, specifically by initializing the search individual at a random position within the feasible search space, using the following formula:
[0074] ;
[0075] In the formula, Indicates the position of the i-th individual. Indicates being between A random number that is uniformly distributed within a range;
[0076] Step S522: Generate the same number of opposing search individuals; the formula is expressed as follows:
[0077] ;
[0078] In the formula, Indicates the position of the i-th opposing search entity;
[0079] Step S523: Select the initial population, specifically by calculating the fitness value f of individuals in the population. i The performance of the watershed ecosystem monitoring model established based on individual location is used as the fitness value of the individual. The initial search individuals and the opposing search individuals are sorted in descending order according to the fitness value, and the N search individuals with the best fitness value are selected to form the initial population.
[0080] Step S53: Population division, specifically, sorting the search individuals in the initial population according to their fitness values from best to worst, defining the individual fa with the best fitness and its position X. a The second-best fit individual fb and its location X b The third-best fittest individual fc and its location X c fa, fb, and fc are classified as hunting individuals;
[0081] Step S54: Obtain the dynamic adaptation factor using the following formula:
[0082] ;
[0083] In the formula, This represents the dynamic adaptation factor, used to control the exploration and development capabilities of the search individual; t represents the number of iterations. express Randomness parameters within a certain range;
[0084] Step S55: Update the location of the searched individual; the formula used is as follows:
[0085] ;
[0086] ;
[0087] ;
[0088] ;
[0089] In the formula, This indicates the position of the candidate search individual after moving towards fa. This indicates the position of the candidate search individual after moving to fb. This indicates the position of the candidate search individual after moving towards fc. This indicates the position of the candidate search individual in the t-th generation of the population. This indicates the position of the candidate search individual in the (t+1)th generation of the population. , and This represents a randomness parameter within the range [0,1].
[0090] Step S56: Calculate the Euclidean distance between the candidate search individual and other search individuals; the formula used is as follows:
[0091] ;
[0092] In the formula, This represents the distance function between candidate search individuals and other search individuals. Indicates the location of other individuals being searched;
[0093] Step S57: Reciprocal update, specifically selecting the distance to candidate search individuals. The furthest other searched individuals are considered as symbiotic individuals; the formula used is as follows:
[0094] ;
[0095] ;
[0096] In the formula, This indicates the position of the candidate search individual in the (t+1)th generation of the population after the reciprocal update. and This represents a randomness parameter within the range [0,1]. This indicates the position of the symbiotic individual in the population of generation t. This indicates the position of the candidate symbiotic individual in the population at generation t+1 after the mutual update. This indicates the position of the individual with the best fitness value in the population at generation t. This represents the advantage factor, specifically a constant.
[0097] Step S58: Co-existent update, using the following formula:
[0098] ;
[0099] In the formula, This indicates the position of the candidate search individual in the (t+1)th generation of the population after the symbiotic update. This represents a randomness parameter within the range [0,1].
[0100] Step S59: Select the update, specifically by comparing the fitness values of the candidate search individuals with those of the candidate search individuals after the co-update, and selecting the search individual with the higher fitness value; the formula used is as follows:
[0101] ;
[0102] In the formula, This indicates the position of the final searched individual in this iteration. This indicates that it is a fitness function;
[0103] Step S510: Search determination, specifically by constructing search termination conditions, determining the optimal individual position, and obtaining the optimal individual position data settings;
[0104] The search termination conditions include threshold termination and iteration termination;
[0105] The threshold termination specifically involves setting a fitness threshold, whereby the individual fitness value f... iWhen the fitness threshold is exceeded, the hyperparameter search is complete.
[0106] The term "iteration termination" specifically refers to terminating the iteration and obtaining the optimal individual position when the maximum number of iterations is reached.
[0107] The optimal individual location is the parameter combination of the watershed ecological environment monitoring model.
[0108] Furthermore, in step S6, the comprehensive monitoring of the watershed ecology specifically involves comprehensively identifying the ecological environment status and ecosystem status of the watershed based on the current monitoring results of the watershed's ecological environment and ecosystem status, assessing the overall ecological security status of the watershed, and proposing targeted protection measures and optimization suggestions based on the monitoring results.
[0109] The technical solution adopted by the present invention is as follows: The present invention provides a watershed ecological security monitoring system based on big data, including a data acquisition module, a data preprocessing module, a watershed ecological environment monitoring module, a watershed ecosystem monitoring module, a hyperparameter optimization module, and a watershed ecological comprehensive monitoring module;
[0110] The data acquisition module obtains raw watershed ecological security monitoring data from the government's ecological environment monitoring platform by collecting historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data, and real-time ecosystem monitoring data, and then sends the raw watershed ecological security monitoring data to the data preprocessing module.
[0111] The data preprocessing module receives data sent by the data acquisition module and performs data cleaning, standardization, data integration, and feature selection on the raw data of the watershed ecological security monitoring to obtain preliminary data of the watershed ecological security monitoring. The preliminary data of the watershed ecological security monitoring is then sent to the watershed ecological environment monitoring module and the watershed ecosystem monitoring module.
[0112] The watershed ecological environment monitoring module receives preliminary watershed ecological security monitoring data sent by the data preprocessing module, establishes a watershed ecological environment monitoring model to monitor the watershed ecological environment, obtains the current watershed ecological environment monitoring status results, and sends the current watershed ecological environment monitoring status results to the watershed ecosystem monitoring module and the watershed ecological comprehensive monitoring module.
[0113] The watershed ecosystem monitoring module receives preliminary watershed ecological security monitoring data sent by the data preprocessing module and current watershed ecological environment monitoring status results sent by the watershed ecological environment monitoring module. It then establishes a watershed ecosystem monitoring model and trains the model. After training, it inputs the current watershed ecological environment monitoring status results and real-time ecosystem monitoring data into the monitoring model to perform real-time monitoring of the watershed ecosystem status, obtains the current watershed ecosystem monitoring status results, and sends the current watershed ecosystem monitoring status results to the watershed comprehensive ecological monitoring module.
[0114] The hyperparameter optimization module obtains the optimal combination of parameters for the watershed ecological environment monitoring model by establishing a search algorithm, and sends the optimal combination of parameters for the watershed ecological environment monitoring model to the watershed ecological environment monitoring module.
[0115] The comprehensive watershed ecological monitoring module receives monitoring results from the watershed ecological environment monitoring module and the watershed ecosystem monitoring module, and can comprehensively assess the overall ecological security status of the watershed through the two monitoring results.
[0116] The beneficial effects achieved by the present invention using the above solution are as follows:
[0117] (1) In view of the problem that traditional watershed ecological security monitoring methods separate ecological environment and ecosystem analysis, ignore the complex relationship between the two, and lead to one-sided analysis, which makes it impossible to comprehensively and accurately assess the watershed ecological security status, this scheme creatively integrates ecological environment monitoring and ecosystem monitoring, solves the limitation of single-dimensional analysis of watershed ecological security. Through this comprehensive assessment, the comprehensiveness, depth and accuracy of watershed ecological security monitoring are significantly improved, ensuring the accuracy and timeliness of monitoring results, thereby providing a scientific and reliable decision-making basis for sustainable watershed ecological management.
[0118] (2) In view of the technical problems of insufficient accuracy of watershed ecosystem monitoring results due to incorrect cluster center selection and improper data point allocation in the existing clustering methods applicable to watershed ecosystem monitoring models, this solution innovatively introduces adjacency domain similarity, standard deviation adjustment distance and allocation coefficient, so as to more accurately define local density and distance, optimize the cluster center selection process, effectively solve the data point allocation problem, improve the accuracy of clustering results, and thus solve the technical problem of insufficient accuracy of watershed ecosystem monitoring results.
[0119] (3) In view of the technical problem that the existing models applicable to watershed ecological environment monitoring have improper built-in parameter settings, resulting in inaccurate prediction model output results, this solution adopts the algorithm of dynamic adaptation factor, opposing individuals and individual symbiotic update to obtain the optimal parameters of the prediction model, obtain the optimal parameter combination, improve the accuracy of the model output results, and thus make the watershed ecological environment monitoring results more accurate. Attached Figure Description
[0120] Figure 1 A flowchart illustrating a watershed ecological security monitoring method based on big data provided by this invention;
[0121] Figure 2 A schematic diagram of a watershed ecological security monitoring system based on big data provided by the present invention;
[0122] Figure 3 This is a flowchart illustrating the process of watershed ecological environment monitoring in step S3.
[0123] Figure 4 This is a flowchart illustrating the process of monitoring the watershed ecosystem in step S4.
[0124] Figure 5 A flowchart illustrating the hyperparameter optimization process in step S5;
[0125] Figure 6 A flowchart illustrating the process of establishing a watershed ecosystem monitoring model for step S41;
[0126] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation
[0127] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0128] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the system or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0129] Example 1, see Figure 1 This invention provides a watershed ecological security monitoring method based on big data, which includes the following steps:
[0130] Step S1: Data collection, specifically, obtaining raw data for watershed ecological security monitoring by collecting historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data, and real-time ecosystem monitoring data from the government's ecological environment monitoring platform;
[0131] Step S2: Data preprocessing, specifically, involves cleaning, standardizing, integrating, and selecting features from the raw data of the watershed ecological security monitoring to obtain preliminary data for watershed ecological security monitoring;
[0132] Step S3: Watershed ecological environment monitoring, specifically, monitoring the watershed ecological environment by establishing a watershed ecological environment monitoring model to obtain the current watershed ecological environment monitoring status results;
[0133] Step S4: Watershed ecosystem monitoring, specifically, by establishing a watershed ecosystem monitoring model and training the model, inputting the current watershed ecological environment monitoring status results and real-time ecosystem monitoring data into the trained monitoring model to perform real-time monitoring of the watershed ecosystem status, and obtaining the current watershed ecosystem monitoring status results;
[0134] Step S5: Hyperparameter optimization, specifically, obtaining the optimal combination of parameters for the watershed ecological environment monitoring model by establishing a search algorithm;
[0135] Step S6: Comprehensive monitoring of the watershed ecology, specifically, based on the current monitoring results of the watershed's ecological environment and ecosystem, a comprehensive assessment of the overall ecological security status of the watershed is conducted, and targeted ecological protection measures and optimization suggestions are proposed.
[0136] Example 2, see Figure 1 and Figure 2This embodiment is based on the above embodiment. In step S1, the data acquisition specifically involves collecting raw watershed ecological security monitoring data from the government's ecological environment monitoring platform. The raw watershed ecological security monitoring data includes historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data, and real-time ecosystem monitoring data. Both historical and real-time environmental monitoring data include water quality data, air quality data, soil data, and climate data. The historical environmental monitoring data also includes historical ecological environment monitoring status. Both historical and real-time ecosystem monitoring data include the number of biological species, the distribution of biological species, watershed vegetation coverage, watershed biological habitat area, watershed ecological function data, and other data. The data includes: ecological carrying capacity data; historical ecosystem monitoring data, including watershed ecosystem monitoring status; water quality data, including pH, dissolved oxygen concentration, chemical oxygen demand, ammonia nitrogen concentration, heavy metal content, and turbidity; air quality data, including fine particulate matter concentration, inhalable particulate matter concentration, carbon dioxide concentration, nitrogen oxide concentration, and sulfur dioxide concentration; soil data, including soil moisture, soil pH, soil organic matter content, and soil temperature; climate data, including temperature, humidity, precipitation, and wind speed; and watershed ecosystem monitoring status, including healthy ecology, ecological stress, mild ecological degradation, and severe ecological status. The watershed ecosystem monitoring status is used as a data label, which is not considered during clustering but only used for selecting cluster labels.
[0137] Example 3, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S2, the data preprocessing is used to clean, standardize, integrate, and select features from the raw data of watershed ecological security monitoring to obtain preliminary data of watershed ecological security monitoring. The data cleaning is to handle missing values, outliers, and duplicate values. The standardization is to standardize the data based on the minimum-max normalization method. The data integration is to merge and unify the raw data of watershed ecological security monitoring from different sources and formats. The feature selection is to use correlation analysis to select the most relevant and representative features of ecological environment monitoring and ecosystem monitoring from the raw data of watershed ecological security monitoring.
[0138] Example 4, see Figure 1 , Figure 2 and Figure 3 This embodiment is based on the above embodiment. In step S3, the watershed ecological environment monitoring includes establishing a watershed ecological environment monitoring model, training the watershed ecological environment monitoring model, and real-time monitoring of the watershed ecological environment; specifically, it includes the following steps:
[0139] Step S31: Establish a watershed ecological environment monitoring model, which specifically includes the following steps:
[0140] Step S311: Initialize model parameters, set the model input vector dimension and output vector dimension;
[0141] Step S312: Design the input layer, expressed by the following formula:
[0142] ;
[0143] In the formula, This represents the overall input data for a multidimensional time series, including time series data for four dimensions: soil, air, water quality, and climate. Represents soil time series data, Represents air time series data, Represents water quality time series data, Represents climate time series data;
[0144] Step S313: Share the LSTM layer, specifically by extracting key features from the overall input data time series and generating a shared feature vector, which includes the following steps:
[0145] Step S3131: LSTM unit output calculation, specifically, based on the current input data, the hidden state from the previous time step, and the cell state, calculate the hidden state using the following formula:
[0146] ;
[0147] In the formula, Indicates the function that executes the unit. This indicates the hidden state at the current moment. This represents the input data at the current moment. This indicates the hidden state from the previous moment. This indicates the state of the cell unit at the previous moment;
[0148] Step S3132: Aggregation of shared feature vectors, specifically, aggregating the hidden states of all time steps into shared feature vectors; the formula used is as follows:
[0149] ;
[0150] In the formula, This represents the shared feature vector, where T represents the total number of time steps in the time series data, and t represents the index of the time step. This indicates the weighting parameter for adjusting the time position;
[0151] Step S314: Divide into multi-task branches, with each task branch corresponding to a single dimension of pollution state monitoring. Independent fully connected layers and activation functions are used, as shown in the following formula:
[0152] ;
[0153] ;
[0154] ;
[0155] ;
[0156] In the formula, This indicates the monitoring results of the soil monitoring task branch. This represents the weight matrix of the soil monitoring task branches. This represents the bias term parameter of the soil monitoring task branch. express Activation function This indicates the monitoring results of the air monitoring task branch. This represents the weight matrix of the air monitoring task branches. This represents the bias parameter of the air monitoring task branch. express Activation function This indicates the monitoring results of the water quality monitoring task branch. This represents the weight matrix of the water quality monitoring task branches. This represents the bias term parameter of the water quality monitoring task branch. express Activation function This represents the monitoring results of the climate monitoring mission branch. This represents the weight matrix of the climate monitoring task branches. The bias term parameter represents the branch of the climate monitoring mission. express Activation function;
[0157] Step S315: Overall pollution status monitoring output, specifically, selecting the most severe pollution status from the output results of the four task branches to determine the overall pollution status of the watershed, using the following formula:
[0158] ;
[0159] In the formula, This indicates the overall pollution status monitoring output results;
[0160] Step S32: Training the watershed ecological environment monitoring model, specifically, using historical environmental monitoring data from the preliminary watershed ecological security monitoring data as input data to train the watershed ecological environment monitoring model, and obtaining the trained watershed ecological environment monitoring model;
[0161] Step S33: Real-time monitoring of the watershed's ecological environment. Specifically, the real-time environmental monitoring data in the preliminary data of the watershed's ecological security monitoring is used as the input data for the trained watershed ecological environment monitoring model to obtain the current watershed ecological environment monitoring status results. The current watershed ecological environment monitoring status results include the overall pollution status of the watershed, soil pollution status, air pollution status, water pollution status, and climate pollution status. The pollution status categories are healthy, lightly polluted, moderately polluted, and heavily polluted.
[0162] Example 5, see Figure 1 , Figure 2 , Figure 4 and Figure 6 This embodiment is based on the above embodiment. In step S4, the watershed ecosystem monitoring includes establishing a watershed ecosystem monitoring model, training the watershed ecosystem monitoring model, and real-time monitoring of the watershed ecosystem status; specifically, it includes the following steps:
[0163] Step S41: Establish a watershed ecosystem monitoring model, which specifically includes the following steps:
[0164] Step S411: Calculate the distance between sample data points, where the sample data points are the data values of various ecological parameters in the historical ecosystem monitoring data and the real-time ecosystem monitoring data. The formula used is as follows:
[0165] ;
[0166] ;
[0167] In the formula, The distance between samples i and j is represented by m, where m represents the number of features for each sample, and n represents the number of samples. This represents the weight of the k-th feature. This represents the value of sample i on the k-th feature. This represents the value of sample j on the k-th feature. This represents the value of sample l on the k-th feature. This represents the average of k features across all samples. This represents the sum of the standard deviations of all features. The standard deviation represents the characteristics of a sample.
[0168] Step S412: Calculate the similarity of the adjacency regions between sample data points, expressed by the following formula:
[0169] ;
[0170] ;
[0171] ;
[0172] In the formula, Let i represent the nearest neighbor set of sample i. Let j represent the nearest neighbor set of sample j. This represents the distance between samples q and p. Let i be the k-th nearest neighbor of sample i. Let j represent the k-th nearest neighbor of sample j. Show sample i and The distance between them Indicates sample j and The distance between them K represents the similarity of the adjacency regions between sample i and sample j, and K represents the number of nearest neighbors.
[0173] Step S413: Calculate the local density of the sample data points, expressed by the following formula:
[0174] ;
[0175] In the formula, This represents the local density of sample i;
[0176] Step S414: Calculate the relative distance; the formula used is as follows:
[0177] ;
[0178] In the formula, This represents the distance between sample i and the nearest point with higher density. This represents the local density of sample j. This represents the distance between samples i and p. This represents the distance between samples j and q. Represents the maximum value among all samples excluding sample i. value, This represents the distance between sample j and the nearest point with higher density;
[0179] Step S415: Calculate the decision value, expressed by the following formula:
[0180] ;
[0181] In the formula, Indicates the decision value. Represents the local density of the sample. This represents the distance between a sample data point and the nearest point with a higher density;
[0182] Step S416: Select core data points, specifically by sorting the decision values in descending order and selecting the top 10% of the sample points based on the decision values as core data points;
[0183] Step S417: Allocate core data points. Specifically, initialize sample queue Q, add the selected core data points to sample queue Q, and if Q is not empty, pop the cluster center point p from queue Q and obtain the K nearest neighbor samples. Calculate the similarity of the adjacency regions between sample p and its K nearest neighbors. For each unassigned sample q relative to sample p, if If q is assigned to the cluster to which p belongs;
[0184] Step S418: Allocate the remaining sample data points; specifically including the following steps:
[0185] Step S4181: Construct the assignment matrix, specifically by finding all unassigned sample data points. If the number of unassigned sample data points h is greater than 0, then construct a matrix of size [missing information]. Assignment matrix M; Indicates the number of clusters;
[0186] Step S4182: Calculate the allocation coefficients, the specific formula is as follows:
[0187] ;
[0188] In the formula, Indicates sample p pairs The allocation coefficient, Let j represent the j-th nearest neighbor of sample point p. Indicates sample p and The distance;
[0189] Step S4183: Fill the matrix, specifically for each unassigned sample data point. Iterate through its K nearest neighbors If sample data points nearest neighbor If it has already been assigned to a cluster, then The allocation coefficients are added to matrix M. row correspondence In the column belonging to the cluster, otherwise distribute the coefficients evenly. Add evenly to matrix M The rows correspond to the columns of all clusters;
[0190] Step S4184: Obtain the maximum value of the matrix, specifically by finding the maximum value max(M) in matrix M and its corresponding row r and column c, and then obtaining the second largest value in row r. ;
[0191] Step S4185: Assign sample data points, specifically if If the data points in the corresponding r rows are assigned to the c-th cluster, then the assignment is stopped.
[0192] Step S4186: Neighbor selection strategy, specifically, if there are still unassigned sample data points, then select the nearest assigned point based on its distance from the assigned points and assign it to the cluster;
[0193] Step S42: Watershed ecosystem monitoring model training, specifically, using historical ecosystem monitoring data and historical ecological environment monitoring status from the preliminary watershed ecological security monitoring data to train the watershed ecosystem monitoring model, and obtain the trained watershed ecosystem monitoring model;
[0194] Step S43: Real-time monitoring of the watershed ecosystem status. Specifically, the real-time ecosystem monitoring data in the preliminary watershed ecological security monitoring data and the current ecological environment monitoring status results are used as input data for the trained watershed ecosystem monitoring model to obtain the current watershed ecosystem monitoring status results.
[0195] By performing the above operations, this solution addresses the technical problems of insufficient accuracy in watershed ecosystem monitoring results caused by incorrect cluster center selection and improper data point allocation in existing clustering methods applicable to watershed ecosystem monitoring models. It innovatively introduces adjacency domain similarity, standard deviation adjusted distance, and allocation coefficients to more accurately define local density and distance, optimize the cluster center selection process, and effectively solve the data point allocation problem, thereby improving the accuracy of clustering results and resolving the technical issue of inaccurate watershed ecosystem monitoring results.
[0196] Example 6, see Figure 1 , Figure 2 and Figure 5 This embodiment is based on the above embodiment. In step S5, the hyperparameter optimization specifically includes the following steps:
[0197] Step S51: Initialize parameters, specifically by constructing initial algorithm parameters; the initial algorithm parameters include population size N, maximum number of iterations t. max Search for the lower limit lb and the upper limit ub;
[0198] Step S52: Initialize the population, which specifically includes the following steps:
[0199] Step S521: Initialize the search individual, specifically by initializing the search individual at a random position within the feasible search space, using the following formula:
[0200] ;
[0201] In the formula, Indicates the position of the i-th individual. Indicates being between A random number that is uniformly distributed within a range;
[0202] Step S522: Generate the same number of opposing search individuals; the formula is expressed as follows:
[0203] ;
[0204] In the formula, Indicates the position of the i-th opposing search entity;
[0205] Step S523: Select the initial population, specifically by calculating the fitness value f of individuals in the population. i The performance of the watershed ecosystem monitoring model established based on individual location is used as the fitness value of the individual. The initial search individuals and the opposing search individuals are sorted in descending order according to the fitness value, and the N search individuals with the best fitness value are selected to form the initial population.
[0206] Step S53: Population division, specifically, sorting the search individuals in the initial population according to their fitness values from best to worst, defining the individual fa with the best fitness and its position X. a The second-best fit individual fb and its location X b The third-best fittest individual fc and its location X c fa, fb, and fc are classified as hunting individuals;
[0207] Step S54: Obtain the dynamic adaptation factor using the following formula:
[0208] ;
[0209] In the formula, This represents the dynamic adaptation factor, used to control the exploration and development capabilities of the search individual; t represents the number of iterations. express Randomness parameters within a certain range;
[0210] Step S55: Update the location of the searched individual; the formula used is as follows:
[0211] ;
[0212] ;
[0213] ;
[0214] ;
[0215] In the formula, This indicates the position of the candidate search individual after moving towards fa. This indicates the position of the candidate search individual after moving to fb. This indicates the position of the candidate search individual after moving towards fc. This indicates the position of the candidate search individual in the t-th generation of the population. This indicates the position of the candidate search individual in the (t+1)th generation of the population. , and This represents a randomness parameter within the range [0,1].
[0216] Step S56: Calculate the Euclidean distance between the candidate search individual and other search individuals; the formula used is as follows:
[0217] ;
[0218] In the formula, This represents the distance function between candidate search individuals and other search individuals. Indicates the location of other individuals being searched;
[0219] Step S57: Reciprocal update, specifically selecting the distance to candidate search individuals. The furthest other searched individuals are considered as symbiotic individuals; the formula used is as follows:
[0220] ;
[0221] ;
[0222] In the formula, This indicates the position of the candidate search individual in the (t+1)th generation of the population after the reciprocal update. and This represents a randomness parameter within the range [0,1]. This indicates the position of the symbiotic individual in the population of generation t. This indicates the position of the candidate symbiotic individual in the population at generation t+1 after the mutual update. This indicates the position of the individual with the best fitness value in the population at generation t. This represents the advantage factor, specifically a constant.
[0223] Step S58: Co-existent update, using the following formula:
[0224] ;
[0225] In the formula, This indicates the position of the candidate search individual in the (t+1)th generation of the population after the symbiotic update. This represents a randomness parameter within the range [0,1].
[0226] Step S59: Select the update, specifically by comparing the fitness values of the candidate search individuals with those of the candidate search individuals after the co-update, and selecting the search individual with the higher fitness value; the formula used is as follows:
[0227] ;
[0228] In the formula, This indicates the position of the final searched individual in this iteration. This indicates that it is a fitness function;
[0229] Step S510: Search determination, specifically by constructing search termination conditions, determining the optimal individual position, and obtaining the optimal individual position data settings;
[0230] The search termination conditions include threshold termination and iteration termination;
[0231] The threshold termination specifically involves setting a fitness threshold, whereby the individual fitness value f... i When the fitness threshold is exceeded, the hyperparameter search is complete.
[0232] The term "iteration termination" specifically refers to terminating the iteration and obtaining the optimal individual position when the maximum number of iterations is reached.
[0233] The optimal individual location is the parameter combination of the watershed ecological environment monitoring model.
[0234] By performing the above operations, this solution addresses the technical problem of inaccurate prediction model outputs due to improper built-in parameter settings in existing models applicable to watershed ecological environment monitoring. It employs an improved algorithm to obtain the optimal parameters for the prediction model using dynamic adaptation factors, opposing individuals, and individual symbiotic updates. This approach achieves the optimal parameter combination, enhancing the accuracy of the model outputs and thus making the watershed ecological environment monitoring results more accurate.
[0235] Example 7, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S6, the comprehensive monitoring of the watershed ecology specifically involves comprehensively identifying the ecological environment status and ecosystem status of the watershed based on the current monitoring results of the watershed ecological environment and the current monitoring results of the watershed ecosystem, assessing the overall ecological security status of the watershed, and proposing targeted protection measures and optimization suggestions based on the monitoring results.
[0236] By performing the above operations, this solution addresses the problem of traditional watershed ecological security monitoring methods that separate ecological environment and ecosystem analysis, neglecting the complex interrelationship between the two and leading to one-sided analysis. This results in an inability to comprehensively and accurately assess the watershed's ecological security status. This solution creatively integrates ecological environment monitoring and ecosystem monitoring, solving the limitations of analyzing watershed ecological security from a single dimension. Through this comprehensive assessment, the comprehensiveness, depth, and accuracy of watershed ecological security monitoring are significantly improved, ensuring the accuracy and timeliness of monitoring results. This provides a scientific and reliable basis for decision-making in the sustainable management of watershed ecology.
[0237] Example 8, see Figure 1 and Figure 2 Based on the above embodiments, this embodiment provides a watershed ecological security monitoring system based on big data, including a data acquisition module, a data preprocessing module, a watershed ecological environment monitoring module, a watershed ecosystem monitoring module, a hyperparameter optimization module, and a comprehensive watershed ecological monitoring module.
[0238] The data acquisition module obtains raw watershed ecological security monitoring data from the government's ecological environment monitoring platform by collecting historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data, and real-time ecosystem monitoring data, and then sends the raw watershed ecological security monitoring data to the data preprocessing module.
[0239] The data preprocessing module receives data sent by the data acquisition module and performs data cleaning, standardization, data integration, and feature selection on the raw data of the watershed ecological security monitoring to obtain preliminary data of the watershed ecological security monitoring. The preliminary data of the watershed ecological security monitoring is then sent to the watershed ecological environment monitoring module and the watershed ecosystem monitoring module.
[0240] The watershed ecological environment monitoring module receives preliminary watershed ecological security monitoring data sent by the data preprocessing module, establishes a watershed ecological environment monitoring model to monitor the watershed ecological environment, obtains the current watershed ecological environment monitoring status results, and sends the current watershed ecological environment monitoring status results to the watershed ecosystem monitoring module and the watershed ecological comprehensive monitoring module.
[0241] The watershed ecosystem monitoring module receives preliminary watershed ecological security monitoring data sent by the data preprocessing module and current watershed ecological environment monitoring status results sent by the watershed ecological environment monitoring module. It then establishes a watershed ecosystem monitoring model and trains the model. After training, it inputs the current watershed ecological environment monitoring status results and real-time ecosystem monitoring data into the monitoring model to perform real-time monitoring of the watershed ecosystem status, obtains the current watershed ecosystem monitoring status results, and sends the current watershed ecosystem monitoring status results to the watershed comprehensive ecological monitoring module.
[0242] The hyperparameter optimization module obtains the optimal combination of parameters for the watershed ecological environment monitoring model by establishing a search algorithm, and sends the optimal combination of parameters for the watershed ecological environment monitoring model to the watershed ecological environment monitoring module.
[0243] The comprehensive watershed ecological monitoring module receives monitoring results from the watershed ecological environment monitoring module and the watershed ecosystem monitoring module, and can comprehensively assess the overall ecological security status of the watershed through the two monitoring results.
[0244] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0245] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention.
[0246] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A watershed ecological security monitoring method based on big data, characterized in that: The method includes the following steps: Step S1: Data collection, specifically, obtaining raw data for watershed ecological security monitoring by collecting historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data, and real-time ecosystem monitoring data from the government's ecological environment monitoring platform; Step S2: Data preprocessing, specifically, involves cleaning, standardizing, integrating, and selecting features from the raw data of the watershed ecological security monitoring to obtain preliminary data for watershed ecological security monitoring; Step S3: Watershed ecological environment monitoring, specifically, by combining multi-task learning and LSTM, a watershed ecological environment monitoring model is established using ecological environment data from multiple dimensions of the watershed to comprehensively monitor the watershed ecological environment and obtain the current watershed ecological environment monitoring status results; Step S4: Watershed ecosystem monitoring, specifically, by using a clustering algorithm that adjusts the distance and assignment coefficient based on the similarity of the adjacent domain, standard deviation, and the clustering coefficient, a watershed ecosystem monitoring model is established and trained. The current watershed ecological environment monitoring status results and real-time ecosystem monitoring data are input into the trained monitoring model to perform real-time monitoring of the watershed ecosystem status and obtain the current watershed ecosystem monitoring status results. The establishment of the watershed ecosystem monitoring model specifically includes the following steps: Step S411: Calculate the distance between sample data points, specifically by adjusting the distance using the standard deviation. The sample data points are the data values of various ecological parameters in the historical ecosystem monitoring data and the real-time ecosystem monitoring data. The formula used is as follows: ; ; In the formula, The distance between samples i and j is represented by m, where m represents the number of features for each sample, and n represents the number of samples. This represents the weight of the k-th feature. This represents the value of sample i on the k-th feature. This represents the value of sample j on the k-th feature. This represents the value of sample l on the k-th feature. This represents the average of k features across all samples. This represents the sum of the standard deviations of all features. The standard deviation represents the characteristics of a sample. Step S412: Calculate the similarity of the adjacency regions between sample data points, expressed by the following formula: ; ; ; In the formula, Let i represent the nearest neighbor set of sample i. Let j represent the nearest neighbor set of sample j. This represents the distance between samples q and p. Let i be the k-th nearest neighbor of sample i. Let j represent the k-th nearest neighbor of sample j. Show sample i and The distance between them Indicates sample j and The distance between them K represents the similarity of the adjacency regions between sample i and sample j, and K represents the number of nearest neighbors. Step S413: Calculate the local density of the sample data points; Step S414: Calculate the relative distance; Step S415: Calculate the decision value; Step S416: Select core data points; Step S417: Allocate core data points; Step S418: Allocate the remaining sample data points. The specific formula for calculating the allocation coefficient is as follows: ; In the formula, Indicates sample p pairs The allocation coefficient, Let j represent the j-th nearest neighbor of sample point p. Indicates sample p and The distance; When filling the matrix, specifically for each unassigned sample data point... Iterate through its K nearest neighbors If sample data points nearest neighbor If it has already been assigned to a cluster, then The allocation coefficients are added to matrix M. row correspondence In the column belonging to the cluster, otherwise distribute the coefficients evenly. Add evenly to matrix M The rows correspond to the columns of all clusters. Indicates the number of clusters; Step S5: Hyperparameter optimization, specifically, adopting dynamic adaptation factors, opposing individuals and individual symbiotic updates to improve the algorithm for obtaining the optimal parameters of the monitoring model, and obtaining the optimal solution combination of parameters of the watershed ecological environment monitoring model; Step S6: Comprehensive monitoring of the watershed ecology, specifically, based on the current monitoring results of the watershed's ecological environment and ecosystem, a comprehensive assessment of the overall ecological security status of the watershed is conducted, and targeted ecological protection measures and optimization suggestions are proposed.
2. The watershed ecological security monitoring method based on big data according to claim 1, characterized in that: In step S3, the watershed ecological environment monitoring includes establishing a watershed ecological environment monitoring model, training the watershed ecological environment monitoring model, and real-time monitoring of the watershed ecological environment; specifically, it includes the following steps: Step S31: Establish a watershed ecological environment monitoring model, which specifically includes the following steps: Step S311: Initialize model parameters, set the model input vector dimension and output vector dimension; Step S312: Design the input layer, expressed by the following formula: ; In the formula, This represents the overall input data for a multidimensional time series, including time series data for four dimensions: soil, air, water quality, and climate. Represents soil time series data, Represents air time series data, Represents water quality time series data, Represents climate time series data; Step S313: Share the LSTM layer, specifically by extracting key features from the overall input data time series and generating a shared feature vector, which includes the following steps: Step S3131: LSTM unit output calculation, specifically, based on the current input data, the hidden state from the previous time step, and the cell state, calculate the hidden state using the following formula: ; In the formula, Indicates the function that executes the unit. This indicates the hidden state at the current moment. This represents the input data at the current moment. This indicates the hidden state from the previous moment. This indicates the state of the cell unit at the previous moment; Step S3132: Aggregation of shared feature vectors, specifically, aggregating the hidden states of all time steps into shared feature vectors; the formula used is as follows: ; In the formula, This represents the shared feature vector, where T represents the total number of time steps in the time series data, and t represents the index of the time step. This indicates the weighting parameter for adjusting the time position; Step S314: Divide into multi-task branches, with each task branch corresponding to a single dimension of pollution state monitoring. Independent fully connected layers and activation functions are used, as shown in the following formula: ; ; ; ; In the formula, This indicates the monitoring results of the soil monitoring task branch. This represents the weight matrix of the soil monitoring task branches. This represents the bias term parameter of the soil monitoring task branch. express Activation function This indicates the monitoring results of the air monitoring task branch. This represents the weight matrix of the air monitoring task branches. This represents the bias parameter of the air monitoring task branch. express Activation function This indicates the monitoring results of the water quality monitoring task branch. This represents the weight matrix of the water quality monitoring task branches. This represents the bias term parameter of the water quality monitoring task branch. express Activation function This represents the monitoring results of the climate monitoring mission branch. This represents the weight matrix of the climate monitoring task branches. The bias term parameter represents the branch of the climate monitoring mission. express Activation function; Step S315: Overall pollution status monitoring output, specifically, selecting the most severe pollution status from the output results of the four task branches to determine the overall pollution status of the watershed, using the following formula: ; In the formula, This indicates the overall pollution status monitoring output results; Step S32: Training the watershed ecological environment monitoring model, specifically, using historical environmental monitoring data from the preliminary watershed ecological security monitoring data as input data to train the watershed ecological environment monitoring model, and obtaining the trained watershed ecological environment monitoring model; Step S33: Real-time monitoring of the watershed's ecological environment. Specifically, the real-time environmental monitoring data in the preliminary data of the watershed's ecological security monitoring is used as the input data for the trained watershed ecological environment monitoring model to obtain the current watershed ecological environment monitoring status results.
3. The watershed ecological security monitoring method based on big data according to claim 1, characterized in that: In step S4, the watershed ecosystem monitoring includes establishing a watershed ecosystem monitoring model, training the watershed ecosystem monitoring model, and real-time monitoring of the watershed ecosystem status; specifically, it includes the following steps: Step S41: Establish a watershed ecosystem monitoring model, which specifically includes the following steps: Step S411: Calculate the distance between sample data points; Step S412: Calculate the similarity of the neighboring regions between sample data points; Step S413: Calculate the local density of the sample data points, expressed by the following formula: ; In the formula, This represents the local density of sample i; Step S414: Calculate the relative distance; the formula used is as follows: ; In the formula, This represents the distance between sample i and the nearest point with higher density. This represents the local density of sample j. This represents the distance between samples i and p. This represents the distance between samples j and q. Represents the maximum value among all samples excluding sample i. value, This represents the distance between sample j and the nearest point with higher density; Step S415: Calculate the decision value, expressed by the following formula: ; In the formula, Indicates the decision value. Represents the local density of the sample. This represents the distance between a sample data point and the nearest point with a higher density; Step S416: Select core data points, specifically by sorting the decision values in descending order and selecting the top 10% of the sample points based on the decision values as core data points; Step S417: Allocate core data points. Specifically, initialize sample queue Q, add the selected core data points to sample queue Q, and if Q is not empty, pop the cluster center point p from queue Q and obtain the K nearest neighbor samples. Calculate the similarity of the adjacency regions between sample p and its K nearest neighbors. For each unassigned sample q relative to sample p, if If q is assigned to the cluster to which p belongs; Step S418: Allocate the remaining sample data points; specifically including the following steps: Step S4181: Construct the assignment matrix, specifically by finding all unassigned sample data points. If the number of unassigned sample data points h is greater than 0, then construct a matrix of size [missing information]. Assignment matrix M; Step S4182: Calculate the allocation coefficients; Step S4183: Fill the matrix; Step S4184: Obtain the maximum value of the matrix, specifically by finding the maximum value max(M) in matrix M and its corresponding row r and column c, and then obtaining the second largest value in row r. ; Step S4185: Assign sample data points, specifically if If the data points in the corresponding r rows are assigned to the c-th cluster, then the assignment is stopped. Step S4186: Neighbor selection strategy, specifically, if there are still unassigned sample data points, then select the nearest assigned point based on its distance from the assigned points and assign it to the cluster; Step S42: Watershed ecosystem monitoring model training, specifically, using historical ecosystem monitoring data and historical ecological environment monitoring status from the preliminary watershed ecological security monitoring data to train the watershed ecosystem monitoring model, and obtain the trained watershed ecosystem monitoring model; Step S43: Real-time monitoring of the watershed ecosystem status. Specifically, the real-time ecosystem monitoring data in the preliminary watershed ecological security monitoring data and the current watershed ecological environment monitoring status results are used as input data for the trained watershed ecosystem monitoring model to obtain the current watershed ecosystem monitoring status results.
4. The watershed ecological security monitoring method based on big data according to claim 1, characterized in that: In step S5, the hyperparameter optimization specifically includes the following steps: Step S51: Initialize parameters, specifically by constructing initial algorithm parameters; the initial algorithm parameters include population size N, maximum number of iterations t. max Search for the lower limit lb and the upper limit ub; Step S52: Initialize the population, which specifically includes the following steps: Step S521: Initialize the search individual, specifically by initializing the search individual at a random position within the feasible search space, using the following formula: ; In the formula, Indicates the position of the i-th individual. Indicates being between A random number that is uniformly distributed within a range; Step S522: Generate the same number of opposing search individuals; the formula is expressed as follows: ; In the formula, Indicates the position of the i-th opposing search entity; Step S523: Select the initial population, specifically by calculating the fitness value f of individuals in the population. i The performance of the watershed ecosystem monitoring model established based on individual location is used as the fitness value of the individual. The initial search individuals and the opposing search individuals are sorted in descending order according to the fitness value, and the N search individuals with the best fitness value are selected to form the initial population. Step S53: Population division, specifically, sorting the search individuals in the initial population according to their fitness values from best to worst, defining the individual fa with the best fitness and its position X. a The second-best fit individual fb and its location X b The third-best fittest individual fc and its location X c fa, fb, and fc are classified as hunting individuals; Step S54: Obtain the dynamic adaptation factor using the following formula: ; In the formula, This represents the dynamic adaptation factor, used to control the exploration and development capabilities of the search individual; t represents the number of iterations. express Randomness parameters within a certain range; Step S55: Update the location of the searched individual; the formula used is as follows: ; ; ; ; In the formula, This indicates the position of the candidate search individual after moving towards fa. This indicates the position of the candidate search individual after moving to fb. This indicates the position of the candidate search individual after moving towards fc. This indicates the position of the candidate search individual in the t-th generation of the population. This indicates the position of the candidate search individual in the (t+1)th generation of the population. , and This represents a randomness parameter within the range [0,1]. Step S56: Calculate the Euclidean distance between the candidate search individual and other search individuals; the formula used is as follows: ; In the formula, This represents the distance function between candidate search individuals and other search individuals. Indicates the location of other individuals being searched; Step S57: Reciprocal update, specifically selecting the distance to candidate search individuals. The furthest other searched individuals are considered as symbiotic individuals; the formula used is as follows: ; ; In the formula, This indicates the position of the candidate search individual in the (t+1)th generation of the population after the reciprocal update. and This represents a randomness parameter within the range [0,1]. This indicates the position of the symbiotic individual in the population of generation t. This indicates the position of the candidate symbiotic individual in the population at generation t+1 after the mutual update. This indicates the position of the individual with the best fitness value in the population at generation t. This represents the advantage factor, specifically a constant. Step S58: Co-existent update, using the following formula: ; In the formula, This indicates the position of the candidate search individual in the (t+1)th generation of the population after the symbiotic update. This represents a randomness parameter within the range [0,1]. Step S59: Select the update, specifically by comparing the fitness values of the candidate search individuals with those of the candidate search individuals after the co-update, and selecting the search individual with the higher fitness value; the formula used is as follows: ; In the formula, This indicates the position of the final searched individual in this iteration. This indicates that it is a fitness function; Step S510: Search determination, specifically by constructing search termination conditions, determining the optimal individual position, and obtaining the optimal individual position data settings; The search termination conditions include threshold termination and iteration termination; The threshold termination specifically involves setting a fitness threshold, whereby the individual fitness value f... i When the fitness threshold is exceeded, the hyperparameter search is complete. The term "iteration termination" specifically refers to terminating the iteration and obtaining the optimal individual position when the maximum number of iterations is reached. The optimal individual location is the parameter combination of the watershed ecological environment monitoring model.
5. The watershed ecological security monitoring method based on big data according to claim 1, characterized in that: In step S6, the comprehensive monitoring of the watershed ecology specifically involves comprehensively identifying the ecological environment status and ecosystem status of the watershed based on the current monitoring results of the watershed's ecological environment and ecosystem, assessing the overall ecological security status of the watershed, and proposing targeted protection measures and optimization suggestions based on the monitoring results.
6. The watershed ecological security monitoring method based on big data according to claim 1, characterized in that: In step S1, the data collection specifically involves acquiring raw watershed ecological security monitoring data from the government's ecological environment monitoring platform. This raw watershed ecological security monitoring data includes historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data, and real-time ecosystem monitoring data. Both historical and real-time environmental monitoring data include water quality data, air quality data, soil data, and climate data. The historical environmental monitoring data also includes historical ecological environment monitoring status. Both historical and real-time ecosystem monitoring data include the number of biological species, the distribution of biological species, watershed vegetation coverage, watershed habitat area, watershed ecological function data, and ecological carrying capacity data. The historical ecosystem monitoring data also includes the watershed ecosystem monitoring status; the water quality data includes water pH, dissolved oxygen concentration, chemical oxygen demand, ammonia nitrogen concentration, heavy metal content, and turbidity; the air quality data includes fine particulate matter concentration, inhalable particulate matter concentration, carbon dioxide concentration, nitrogen oxide concentration, and sulfur dioxide concentration; the soil data includes soil moisture, soil pH, soil organic matter content, and soil temperature; the climate data includes temperature, humidity, precipitation, and wind speed; and the watershed ecosystem monitoring status includes healthy ecology, ecological stress, mild ecological degradation, and severe ecological status. The watershed ecosystem monitoring status is used as a data label, which is not considered during clustering but only used when selecting cluster labels.
7. The watershed ecological security monitoring method based on big data according to claim 1, characterized in that: In step S2, the data preprocessing is used to clean, standardize, integrate, and select features from the raw data of watershed ecological security monitoring to obtain preliminary data for watershed ecological security monitoring; the data cleaning process removes missing values, outliers, and duplicate values; the standardization process is based on the min-max normalization method to standardize the data. The data integration refers to merging and unifying the raw data from watershed ecological security monitoring from different sources and formats; The feature selection method involves using correlation analysis to select the most relevant and representative features from the raw data of watershed ecological security monitoring.
8. A watershed ecological security monitoring system based on big data, used to implement the watershed ecological security monitoring method based on big data as described in any one of claims 1-7, characterized in that: It includes a data acquisition module, a data preprocessing module, a watershed ecological environment monitoring module, a watershed ecosystem monitoring module, a hyperparameter optimization module, and a comprehensive watershed ecological monitoring module.
9. A watershed ecological security monitoring system based on big data according to claim 8, characterized in that: The data acquisition module obtains raw watershed ecological security monitoring data from the government's ecological environment monitoring platform by collecting historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data, and real-time ecosystem monitoring data, and then sends the raw watershed ecological security monitoring data to the data preprocessing module. The data preprocessing module receives data sent by the data acquisition module and performs data cleaning, standardization, data integration, and feature selection on the raw data of the watershed ecological security monitoring to obtain preliminary data of the watershed ecological security monitoring. The preliminary data of the watershed ecological security monitoring is then sent to the watershed ecological environment monitoring module and the watershed ecosystem monitoring module. The watershed ecological environment monitoring module receives preliminary watershed ecological security monitoring data sent by the data preprocessing module, establishes a watershed ecological environment monitoring model to monitor the watershed ecological environment, obtains the current watershed ecological environment monitoring status results, and sends the current watershed ecological environment monitoring status results to the watershed ecosystem monitoring module and the watershed ecological comprehensive monitoring module. The watershed ecosystem monitoring module receives preliminary watershed ecological security monitoring data sent by the data preprocessing module and current watershed ecological environment monitoring status results sent by the watershed ecological environment monitoring module. It then establishes a watershed ecosystem monitoring model and trains the model. After training, it inputs the current watershed ecological environment monitoring status results and real-time ecosystem monitoring data into the monitoring model to perform real-time monitoring of the watershed ecosystem status, obtains the current watershed ecosystem monitoring status results, and sends the current watershed ecosystem monitoring status results to the watershed comprehensive ecological monitoring module. The hyperparameter optimization module obtains the optimal combination of parameters for the watershed ecological environment monitoring model by establishing a search algorithm, and sends the optimal combination of parameters for the watershed ecological environment monitoring model to the watershed ecological environment monitoring module. The comprehensive watershed ecological monitoring module receives monitoring results from the watershed ecological environment monitoring module and the watershed ecosystem monitoring module, and can comprehensively assess the overall ecological security status of the watershed through the two monitoring results.