Basin ecological safety monitoring method and system based on big data
By deeply integrating ecological environment and ecosystem monitoring in basin ecological security monitoring, and using innovative clustering methods and parameter optimization algorithms, the problem of insufficient one-sidedness and accuracy of traditional monitoring methods is solved, and a more comprehensive, deep and accurate basin ecological security monitoring is achieved.
Patent Information
- Application Number
- CN202411792596.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-07
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-07
AI Technical Summary
Traditional basin ecological security monitoring methods separate the ecological environment and ecosystem analysis, ignoring the complex relationship between the two, resulting in one-sided analysis and inability to comprehensively and accurately evaluate the ecological security status of the basin. The clustering method in the existing model has errors in clustering center selection and improper data point allocation, resulting in insufficient accuracy of monitoring results. Improper built-in parameter settings also lead to inaccurate output results of the prediction model.
By integrating ecological environment monitoring and ecosystem monitoring depth, adjacency domain similarity, standard deviation adjustment distance and allocation coefficient are used to optimize the selection of cluster centers and data point allocation, and the algorithm for obtaining optimal parameters of the prediction model is improved.
It significantly improves the comprehensiveness, depth and accuracy of basin ecological security monitoring, ensures the accuracy and timeliness of monitoring results, and provides a scientific and reliable decision-making basis for the sustainable ecological management of basin.
Smart Images

Figure CN119647777A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ecological security information processing, and specifically relates to a watershed ecological security monitoring method and system based on big data. Background Art
[0002] A method and system for monitoring watershed ecological security based on big data is a method for collecting, processing and analyzing ecological security data within the watershed using big data technology, and monitoring the ecological security status of the watershed in real time. The ecological environment of the watershed is monitored comprehensively and in real time by means of big data to identify potential ecological risks, take preventive measures in a timely manner, and ensure the health and sustainability of the watershed ecosystem. However, in traditional watershed ecological security monitoring methods, there is a problem of separating ecological environment from ecosystem analysis, ignoring the complex relationship between the two, resulting in one-sided analysis, and thus being unable to comprehensively and accurately assess the ecological security status of the watershed. In existing clustering methods applicable to watershed ecosystem monitoring models, there are technical problems such as incorrect selection of cluster centers and improper allocation of data points, which lead to insufficient accuracy of watershed ecosystem monitoring results. In existing models applicable to watershed ecological environment monitoring, there is a technical problem of improper built-in parameter settings, which leads to inaccurate output results of prediction models. Summary of the invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a watershed ecological security monitoring method and system based on big data. In view of the problem that the traditional watershed ecological security monitoring method separates the ecological environment from the ecosystem analysis, ignores the complex relationship between the two, leads to one-sided analysis, and thus cannot comprehensively and accurately evaluate the ecological security status of the watershed. This solution creatively integrates ecological environment monitoring and ecosystem monitoring, solves the limitation of traditional single-dimensional analysis of watershed ecological security. Through this comprehensive and integrated evaluation, the comprehensiveness, depth and accuracy of watershed ecological security monitoring are significantly improved, ensuring the accuracy and timeliness of the monitoring results, thereby providing a scientific and reliable decision-making basis for the sustainable management of watershed ecology; in view of the problems existing in the clustering method applicable to the watershed ecosystem monitoring model In order to solve the technical problem of inaccurate results of watershed ecosystem monitoring due to incorrect selection of cluster centers and improper allocation of data points, this solution innovatively introduces adjacent domain similarity, standard deviation adjusted distance and allocation coefficient to more accurately define local density and distance, optimize the selection process of cluster centers, and effectively solve the problem of data point allocation, improve the accuracy of clustering results, and thus solve the technical problem of inaccurate results of watershed ecosystem monitoring; in view of the technical problem that the existing models suitable for watershed ecological environment monitoring have improper built-in parameter settings, resulting in inaccurate output results of the prediction model, this solution adopts dynamic adaptive factors, opposing individuals and individual symbiotic updates to improve the algorithm for obtaining the optimal parameters of the prediction model, obtain the optimal parameter combination, and improve the accuracy of the model output results, so as to make the watershed ecological environment monitoring results more accurate.
[0004] The technical solution adopted by the present invention is as follows: The present invention provides a watershed ecological security monitoring method based on big data, which includes the following steps:
[0005] Step S1: data collection;
[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 watershed ecology.
[0011] Further, in step S1, the data collection is specifically to obtain the original data of watershed ecological security monitoring from the government ecological environment monitoring platform by collecting; the original data of watershed ecological security monitoring includes historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data and real-time ecosystem monitoring data; the historical environmental monitoring data and real-time environmental monitoring data both include water quality data, air quality data, soil data and climate data; the historical environmental monitoring data also includes historical ecological environment monitoring status; the historical ecosystem monitoring data and real-time ecosystem monitoring data both include the number of biological species, biological species distribution, watershed vegetation coverage, watershed biological habitat area, watershed ecological function data and ecological carrying capacity data; the historical ecosystem monitoring data also includes the monitoring status of the watershed ecosystem; 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 particle concentration, inhalable particle 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; the watershed ecosystem monitoring status includes healthy ecology, ecological pressure, mild ecological degradation and severe ecological status. The watershed ecosystem monitoring status is used as a data label. The data label is not considered during clustering and is only used when selecting cluster labels.
[0012] Furthermore, in step S2, the data preprocessing is used to perform data cleaning, standardization, data integration and feature selection on the original data of watershed ecological security monitoring to obtain preliminary data of watershed ecological security monitoring; the data cleaning is to process missing values, outliers and duplicate values; the standardization is to standardize the data based on the maximum and minimum normalization method; the data integration is to merge and unify the original data of watershed ecological security monitoring from different sources and formats; the feature selection is to use the correlation analysis method to select the most relevant and representative features of ecological environment monitoring and ecosystem monitoring from the original 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, the following steps are included:
[0014] Step S31: Establishing a watershed ecological environment monitoring model, specifically including the following steps:
[0015] Step S311: Initialize model parameters and set model input vector dimensions and output vector dimensions;
[0016] Step S312: Design the input layer. The formula used is as follows:
[0017] ;
[0018] In the formula, Represents the overall input data of the multidimensional time series, including time series data of four dimensions: soil, air, water quality, and climate. represents soil time series data, represents the air time series data, represents water quality time series data, Represents climate time series data;
[0019] Step S313: Sharing the LSTM layer, specifically extracting key features from the overall input data time series and generating a shared feature vector, specifically includes the following steps:
[0020] Step S3131: LSTM unit output calculation, specifically, based on the current input data, the hidden state and cell state at the previous moment, the hidden state is calculated. The formula used is as follows:
[0021] ;
[0022] In the formula, Indicates the unit runs the function, Indicates the hidden state at the current moment, Represents the input data at the current moment, It indicates the hidden state at the previous moment. Indicates the cell state at the previous moment;
[0023] Step S3132: Aggregation of shared feature vectors, specifically aggregating the hidden states of all time steps into a shared feature vector; the formula used is as follows:
[0024] ;
[0025] In the formula, represents the shared feature vector, T represents the total number of time steps of the time series data, t represents the time step index, Represents the time position adjustment weight parameter;
[0026] Step S314: Divide the task branches into multiple branches, specifically each task branch corresponds to a dimension of pollution status monitoring, using an independent fully connected layer and activation function, the formula used is as follows:
[0027] ;
[0028] ;
[0029] ;
[0030] ;
[0031] In the formula, Indicates the monitoring results of the soil monitoring task branch, represents the weight matrix of the soil monitoring task branch, represents the bias parameter of the soil monitoring task branch, express Activation function, Indicates the monitoring results of the air monitoring task branch, represents the weight matrix of the air monitoring task branch, represents the bias parameter of the air monitoring task branch, express Activation function, Indicates the monitoring results of the water quality monitoring task branch, represents the weight matrix of the water quality monitoring task branch, represents the bias parameter of the water quality monitoring task branch, express Activation function, represents the monitoring results of the climate monitoring task branch, represents the weight matrix of the climate monitoring task branch, represents the bias parameter of the climate monitoring task branch, express Activation function;
[0032] Step S315: Overall pollution status monitoring output, specifically, selecting the most serious pollution status among the output results of the four task branches to determine the overall pollution status of the basin, the formula used is as follows:
[0033] ;
[0034] In the formula, Indicates the overall pollution status monitoring output;
[0035] Step S32: training a watershed ecological environment monitoring model, specifically using the historical environmental monitoring data in the preliminary watershed ecological security monitoring data as input data to train the watershed ecological environment monitoring model to obtain a trained watershed ecological environment monitoring model;
[0036] Step S33: Real-time monitoring of the watershed ecological environment, specifically, using the real-time environmental monitoring data in the preliminary data of the watershed ecological security monitoring as input data of 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, the following steps are included:
[0038] Step S41: Establishing a watershed ecosystem monitoring model, specifically including the following steps:
[0039] Step S411: Calculate the distance between sample data points, specifically using standard deviation to adjust the distance. The sample data points are 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, represents the distance between samples i and j, m represents the number of features of each sample, and n represents the number of samples. represents the weight of the kth feature, represents the value of sample i on the kth feature, represents the value of sample j on the kth feature, represents the value of sample l on the kth feature, represents the average value of k features in all samples, represents the sum of the standard deviations of all features, Indicates the standard deviation of sample characteristics;
[0043] Step S412: Calculate the adjacent domain similarity between sample data points. The formula is as follows:
[0044] ;
[0045] ;
[0046] ;
[0047] In the formula, represents the nearest neighbor set of sample i, represents the nearest neighbor set of sample j, represents the distance between samples q and p, represents the kth nearest neighbor of sample i, represents the kth nearest neighbor of sample j, Sample i and The distance between Represents sample j and The distance between represents the similarity of the adjacent domain 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. The formula is as follows:
[0049] ;
[0050] In the formula, 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, represents the distance between sample i and the nearest point with higher density, represents the local density of sample j, represents the distance between samples i and p, represents the distance between students i and q, Indicates the maximum value among all samples except sample i value, represents the distance between sample j and the nearest point with higher density;
[0054] Step S415: Calculate the decision value, the formula is as follows:
[0055] ;
[0056] In the formula, represents the decision value, represents the local density of the sample, Represents the distance between a sample data point and the nearest point with higher density;
[0057] Step S416: selecting core data points, specifically, sorting in descending order according to the decision values, and selecting the top 10% of the sample points in the decision values as core data points;
[0058] Step S417: assign core data points, specifically initialize the sample queue Q, put the selected core data points into the sample queue Q, and if Q is not empty, pop up the cluster center point p of the queue Q to obtain K nearest neighbor samples. , calculate the adjacent domain similarity between sample p and its K nearest neighbors , for each unassigned sample q with respect to sample p, if , then assign q to the cluster to which p belongs;
[0059] Step S418: Allocate the remaining sample data points; specifically, the following steps are included:
[0060] Step S4181: Construct an allocation matrix, specifically to find all sample data points that are not assigned to clusters. If the number of unassigned sample data points h is greater than 0, the size of the construction is Allocation matrix M; Indicates the number of clusters;
[0061] Step S4182: Calculate the distribution coefficient. The specific formula is as follows:
[0062] ;
[0063] In the formula, Represents sample p pairs The distribution coefficient, represents the jth nearest neighbor of sample point p, represents the sample p and distance;
[0064] Step S4183: Fill the matrix, specifically for each unassigned sample data point , traverse its K nearest neighbors ; If the sample data point The nearest neighbor of has been assigned to a cluster, then The distribution coefficients are added to the matrix M Row Correspondence The columns of the cluster to which it belongs, otherwise the coefficients are evenly distributed Add uniformly to the matrix M The rows correspond to the columns of all clusters;
[0065] Step S4184: Get the maximum value of the matrix, specifically find the maximum value max(M) in the matrix M and its corresponding row r and column c, and get the second largest value in row r ;
[0066] Step S4185: Assign sample data points, specifically if , the sample data points corresponding to the r rows are assigned to the cth cluster, otherwise, the assignment is stopped;
[0067] Step S4186: neighbor selection strategy, specifically, when there are still unassigned sample data points, the nearest assigned point is selected according to its distance to the assigned point, and it is assigned to the cluster;
[0068] Step S42: training the watershed ecosystem monitoring model, specifically using the historical ecosystem monitoring data in the preliminary watershed ecological security monitoring data and the historical ecological environment monitoring status to train the watershed ecosystem monitoring model to obtain a trained watershed ecosystem monitoring model;
[0069] Step S43: Real-time monitoring of the watershed ecosystem status, specifically, using the real-time ecosystem monitoring data in the preliminary data of the watershed ecological security monitoring and the current watershed ecological environment monitoring status results as input data of 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 upper limit ub;
[0072] Step S52: Initialize the population, specifically including the following steps:
[0073] Step S521: Initialize the search individual, specifically, initialize the search individual at a random position in the feasible search space, and the formula used is as follows:
[0074] ;
[0075] In the formula, represents the position of the i-th individual, Indicates between A random number uniformly distributed within a range;
[0076] Step S522: Generate the same number of opposing search individuals; the formula is as follows:
[0077] ;
[0078] In the formula, represents the position of the i-th opposition search individual;
[0079] Step S523: Select the initial population, specifically calculate the individual fitness value f in the population i ; The performance of the watershed ecosystem monitoring model established based on the individual position is used as the individual fitness value, and 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 fitness values from best to worst, defining the individual fa with the best fitness and its position X a , the individual fb with the second best fitness and its position X b , the third best individual fc and its position X c , classify fa, fb and fc as hunting individuals;
[0081] Step S54: Obtain the dynamic adaptation factor, the formula used is as follows:
[0082] ;
[0083] In the formula, represents the dynamic adaptation factor, which is used to control the exploration and development capabilities of the search individual, t represents the number of iterations, express Randomness parameter within range;
[0084] Step S55: Update the search individual position; the formula used is as follows:
[0085] ;
[0086] ;
[0087] ;
[0088] ;
[0089] In the formula, represents the position of the candidate search individual after moving to fa, represents the position of the candidate search individual after moving to fb, represents the position of the candidate search individual after moving to fc, represents the position of the candidate search individual in the t-th generation population, represents the position of the candidate search individual in the t+1 generation population, , and represents the randomness parameter in 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, represents the distance function between the candidate search individual and other search individuals, Indicates the location of other search individuals;
[0093] Step S57: reciprocal update, specifically selecting the distance between the candidate search individual and the candidate search individual The farthest other search individuals are taken as symbiotic individuals; the formula used is as follows:
[0094] ;
[0095] ;
[0096] In the formula, represents the position of the candidate search individual in the t+1 generation population after reciprocal update, and represents a randomness parameter in the range [0,1], represents the position of the symbiotic individual in the t-th generation population, represents the position of the candidate symbiotic individuals in the t+1 generation population after reciprocal updating, represents the position of the individual with the best fitness value in the t-th generation population, represents the advantage factor, specifically a constant;
[0097] Step S58: Symbiotic update, the formula used is as follows:
[0098] ;
[0099] In the formula, represents the position of the candidate search individual in the t+1 generation population after the symbiotic update, represents the randomness parameter in the range [0,1];
[0100] Step S59: Select update, specifically, by comparing the fitness values of the candidate search individuals and the candidate search individuals after symbiotic update, select the search individual with a high fitness value; the formula used is as follows:
[0101] ;
[0102] In the formula, represents the position of the final search individual in this iteration, It represents the fitness function;
[0103] Step S510: search determination, specifically, by constructing a search termination condition, searching and determining the optimal individual position, and obtaining the optimal individual position data setting;
[0104] The search termination conditions include threshold termination and iteration termination;
[0105] The threshold termination is specifically to set the fitness threshold, when the individual fitness value f iWhen it is above the fitness threshold, the hyperparameter search is completed;
[0106] The 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 position is a combination of watershed ecological environment monitoring model parameters.
[0108] Furthermore, in step S6, the comprehensive monitoring of the watershed ecology is specifically based on the current watershed ecological environment monitoring status results and the current watershed ecosystem monitoring status results, comprehensively identifying the ecological environment status and ecosystem status of the watershed, evaluating 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: A watershed ecological security monitoring system based on big data provided by the present invention 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 watershed ecological comprehensive monitoring module;
[0110] The data collection module obtains the original data of 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 ecological environment monitoring platform, and sends the original data of watershed ecological security monitoring to the data preprocessing module;
[0111] The data preprocessing module receives the data sent by the data acquisition module, and performs data cleaning, standardization, data integration and feature selection on the original data of the watershed ecological security monitoring to obtain preliminary data of the watershed ecological security monitoring, and sends the preliminary data of the watershed ecological security monitoring to the watershed ecological environment monitoring module and the watershed ecosystem monitoring module;
[0112] The watershed ecological environment monitoring module receives the preliminary watershed ecological security monitoring data sent by the data preprocessing module, and establishes a watershed ecological environment monitoring model to monitor the watershed ecological environment, obtains the current watershed ecological environment monitoring status result, and sends the current watershed ecological environment monitoring status result to the watershed ecosystem monitoring module and the watershed ecological comprehensive monitoring module;
[0113] The watershed ecosystem monitoring module receives the preliminary watershed ecological security monitoring data sent by the data preprocessing module and the current watershed ecological environment monitoring status results sent by the watershed ecological environment monitoring module, establishes a watershed ecosystem monitoring model and trains the model, inputs 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, obtains the current watershed ecosystem monitoring status results, and sends the current watershed ecosystem monitoring status results to the watershed ecological comprehensive monitoring module;
[0114] The hyperparameter optimization module obtains the optimal solution combination of the parameters of the watershed ecological environment monitoring model by establishing a search algorithm, and sends the optimal solution combination of the parameters of the watershed ecological environment monitoring model to the watershed ecological environment monitoring module;
[0115] The watershed ecological comprehensive monitoring module receives the monitoring results sent by the watershed ecological environment monitoring module and the watershed ecosystem monitoring module, and can comprehensively evaluate 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 scheme are as follows:
[0117] (1) In view of the problem that the traditional watershed ecological security monitoring method separates the ecological environment from the ecosystem analysis, ignores the complex relationship between the two, leads to one-sided analysis, and thus makes it impossible to comprehensively and accurately assess the ecological security status of the watershed. This plan creatively integrates ecological environment monitoring and ecosystem monitoring, and solves the limitation of analyzing watershed ecological security in a single dimension. Through this comprehensive and integrated 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 management of watershed ecology.
[0118] (2) In order to address the technical problems of incorrect cluster center selection and improper data point allocation in existing clustering methods applicable to watershed ecosystem monitoring models, which lead to insufficient accuracy of watershed ecosystem monitoring results, this scheme innovatively introduces neighboring domain similarity, standard deviation adjusted distance and allocation coefficient 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 solving the technical problem of insufficient accuracy of watershed ecosystem monitoring results.
[0119] (3) In order to address the technical problem that the existing models suitable for watershed ecological environment monitoring have improper built-in parameter settings, which leads to inaccurate output results of the prediction model, this scheme adopts dynamic adaptive factors, opposing individuals and individual symbiotic updates to improve the algorithm for obtaining the optimal parameters of the prediction model, obtain the optimal parameter combination, and improve the accuracy of the model output results, thereby making the watershed ecological environment monitoring results more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0120] Figure 1 A schematic diagram of a flow chart of a watershed ecological security monitoring method based on big data provided by the present invention;
[0121] Figure 2 A schematic diagram of a module of a watershed ecological security monitoring system based on big data provided by the present invention;
[0122] Figure 3 This is a schematic diagram of the process of watershed ecological environment monitoring in step S3;
[0123] Figure 4 It is a schematic diagram of the process of watershed ecosystem monitoring in step S4;
[0124] Figure 5 A schematic diagram of the process of hyperparameter optimization in step S5;
[0125] Figure 6 A schematic diagram of the process of establishing a watershed ecosystem monitoring model in step S41;
[0126] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0127] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0128] In the description of the present invention, it is necessary to understand that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred system or element must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.
[0129] Example 1, see Figure 1 The present invention provides a watershed ecological security monitoring method based on big data, which includes the following steps:
[0130] Step S1: data collection, specifically, obtaining the original data of 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 ecological environment monitoring platform;
[0131] Step S2: data preprocessing, specifically, data cleaning, standardization, data integration and feature selection of the original data of the watershed ecological security monitoring to obtain preliminary data of the 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 solution combination of watershed ecological environment monitoring model parameters by establishing a search algorithm;
[0135] Step S6: Comprehensive monitoring of the watershed ecology, specifically, comprehensively evaluating the overall ecological security status of the watershed based on the current watershed ecological environment monitoring status results and the current watershed ecosystem monitoring status results, and proposing targeted ecological protection measures and optimization suggestions.
[0136] Example 2, see Figure 1 and Figure 2This embodiment is based on the above embodiment. In step S1, the data collection is specifically to obtain the original data of watershed ecological security monitoring from the government ecological environment monitoring platform by collection; the original data of watershed ecological security monitoring includes historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data and real-time ecosystem monitoring data; the historical environmental monitoring data and real-time environmental monitoring data both include water quality data, air quality data, soil data and climate data; the historical environmental monitoring data also includes historical ecological environment monitoring status; the historical ecosystem monitoring data and real-time ecosystem monitoring data both include the number of biological species, biological species distribution, watershed vegetation coverage, watershed biological habitat area, watershed ecological function data and ecological The historical ecosystem monitoring data also includes the monitoring status of the watershed ecosystem; the water quality data include water pH, dissolved oxygen concentration, chemical oxygen demand, ammonia nitrogen concentration, heavy metal content and turbidity; the air quality data include fine particle concentration, inhalable particle concentration, carbon dioxide concentration, nitrogen oxide concentration and sulfur dioxide concentration; the soil data include soil moisture, soil pH, soil organic matter content and soil temperature; the climate data includes temperature, humidity, precipitation and wind speed; the watershed ecosystem monitoring status includes healthy ecology, ecological pressure, mild ecological degradation and severe ecological status. The watershed ecosystem monitoring status is used as a data label, which is not considered during clustering and is only used when 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 perform data cleaning, standardization, data integration and feature selection on the original data of watershed ecological security monitoring to obtain preliminary data of watershed ecological security monitoring; the data cleaning is to process missing values, outliers and duplicate values; the standardization is to standardize the data based on the maximum and minimum normalization method; the data integration is to merge and unify the original data of watershed ecological security monitoring from different sources and formats; the feature selection is to use the correlation analysis method to select the most relevant and most representative features of ecological environment monitoring and ecosystem monitoring from the original 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, the following steps are included:
[0139] Step S31: Establishing a watershed ecological environment monitoring model, specifically including the following steps:
[0140] Step S311: Initialize model parameters and set model input vector dimensions and output vector dimensions;
[0141] Step S312: Design the input layer. The formula used is as follows:
[0142] ;
[0143] In the formula, Represents the overall input data of the multidimensional time series, including time series data of four dimensions: soil, air, water quality, and climate. represents soil time series data, represents the air time series data, represents water quality time series data, Represents climate time series data;
[0144] Step S313: Sharing the LSTM layer, specifically extracting key features from the overall input data time series and generating a shared feature vector, specifically includes the following steps:
[0145] Step S3131: LSTM unit output calculation, specifically, based on the current input data, the hidden state and cell state at the previous moment, the hidden state is calculated. The formula used is as follows:
[0146] ;
[0147] In the formula, Indicates the unit runs the function, Indicates the hidden state at the current moment, Represents the input data at the current moment, It indicates the hidden state at the previous moment. Indicates the cell state at the previous moment;
[0148] Step S3132: Aggregation of shared feature vectors, specifically aggregating the hidden states of all time steps into a shared feature vector; the formula used is as follows:
[0149] ;
[0150] In the formula, represents the shared feature vector, T represents the total number of time steps of the time series data, t represents the time step index, Represents the time position adjustment weight parameter;
[0151] Step S314: Divide the task branches into multiple branches, specifically each task branch corresponds to a dimension of pollution status monitoring, using an independent fully connected layer and activation function, the formula used is as follows:
[0152] ;
[0153] ;
[0154] ;
[0155] ;
[0156] In the formula, Indicates the monitoring results of the soil monitoring task branch, represents the weight matrix of the soil monitoring task branch, represents the bias parameter of the soil monitoring task branch, express Activation function, Indicates the monitoring results of the air monitoring task branch, represents the weight matrix of the air monitoring task branch, represents the bias parameter of the air monitoring task branch, express Activation function, Indicates the monitoring results of the water quality monitoring task branch, represents the weight matrix of the water quality monitoring task branch, represents the bias parameter of the water quality monitoring task branch, express Activation function, represents the monitoring results of the climate monitoring task branch, represents the weight matrix of the climate monitoring task branch, represents the bias parameter of the climate monitoring task branch, express Activation function;
[0157] Step S315: Overall pollution status monitoring output, specifically, selecting the most serious pollution status among the output results of the four task branches to determine the overall pollution status of the basin, the formula used is as follows:
[0158] ;
[0159] In the formula, Indicates the overall pollution status monitoring output;
[0160] Step S32: training a watershed ecological environment monitoring model, specifically using the historical environmental monitoring data in the preliminary watershed ecological security monitoring data as input data to train the watershed ecological environment monitoring model to obtain a trained watershed ecological environment monitoring model;
[0161] Step S33: Real-time monitoring of the ecological environment of the watershed, specifically, using the real-time environmental monitoring data in the preliminary data of the watershed ecological security monitoring as the input data of 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, light pollution, moderate pollution and heavy pollution.
[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, the following steps are included:
[0163] Step S41: Establishing a watershed ecosystem monitoring model, specifically including the following steps:
[0164] Step S411: Calculate the distance between sample data points, where the sample data points are 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, represents the distance between samples i and j, m represents the number of features of each sample, and n represents the number of samples. represents the weight of the kth feature, represents the value of sample i on the kth feature, represents the value of sample j on the kth feature, represents the value of sample l on the kth feature, represents the average value of k features in all samples, represents the sum of the standard deviations of all features, Indicates the standard deviation of sample characteristics;
[0168] Step S412: Calculate the adjacent domain similarity between sample data points. The formula is as follows:
[0169] ;
[0170] ;
[0171] ;
[0172] In the formula, represents the nearest neighbor set of sample i, represents the nearest neighbor set of sample j, represents the distance between samples q and p, represents the kth nearest neighbor of sample i, represents the kth nearest neighbor of sample j, Sample i and The distance between Represents sample j and The distance between represents the similarity of the adjacent domain 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. The formula is as follows:
[0174] ;
[0175] In the formula, 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, represents the distance between sample i and the nearest point with higher density, represents the local density of sample j, represents the distance between samples i and p, represents the distance between students i and q, Indicates the maximum value among all samples except sample i value, represents the distance between sample j and the nearest point with higher density;
[0179] Step S415: Calculate the decision value, the formula is as follows:
[0180] ;
[0181] In the formula, represents the decision value, represents the local density of the sample, Represents the distance between a sample data point and the nearest point with higher density;
[0182] Step S416: selecting core data points, specifically, sorting in descending order according to the decision values, and selecting the top 10% of the sample points in the decision values as core data points;
[0183] Step S417: assign core data points, specifically initialize the sample queue Q, put the selected core data points into the sample queue Q, and if Q is not empty, pop up the cluster center point p of the queue Q to obtain K nearest neighbor samples. , calculate the adjacent domain similarity between sample p and its K nearest neighbors , for each unassigned sample q with respect to sample p, if , then assign q to the cluster to which p belongs;
[0184] Step S418: Allocate the remaining sample data points; specifically, the following steps are included:
[0185] Step S4181: Construct an allocation matrix, specifically to find all sample data points that are not assigned to clusters. If the number of unassigned sample data points h is greater than 0, the size of the construction is Allocation matrix M; Indicates the number of clusters;
[0186] Step S4182: Calculate the distribution coefficient. The specific formula is as follows:
[0187] ;
[0188] In the formula, Represents sample p pairs The distribution coefficient, represents the jth nearest neighbor of sample point p, represents the sample p and distance;
[0189] Step S4183: Fill the matrix, specifically for each unassigned sample data point , traverse its K nearest neighbors ; If the sample data point The nearest neighbor of has been assigned to a cluster, then The distribution coefficients are added to the matrix M Row Correspondence The columns of the cluster to which it belongs, otherwise the coefficients are evenly distributed Add uniformly to the matrix M The rows correspond to the columns of all clusters;
[0190] Step S4184: Get the maximum value of the matrix, specifically find the maximum value max(M) in the matrix M and its corresponding row r and column c, and get the second largest value in row r ;
[0191] Step S4185: Assign sample data points, specifically if , the sample data points corresponding to the r rows are assigned to the cth cluster, otherwise, the assignment is stopped;
[0192] Step S4186: neighbor selection strategy, specifically, when there are still unassigned sample data points, the nearest assigned point is selected according to its distance to the assigned point, and it is assigned to the cluster;
[0193] Step S42: training the watershed ecosystem monitoring model, specifically using the historical ecosystem monitoring data in the preliminary watershed ecological security monitoring data and the historical ecological environment monitoring status to train the watershed ecosystem monitoring model to obtain a trained watershed ecosystem monitoring model;
[0194] Step S43: Real-time monitoring of the watershed ecosystem status, specifically, using the real-time ecosystem monitoring data in the preliminary data of the watershed ecological safety monitoring and the current ecological environment monitoring status results as input data of the trained watershed ecosystem monitoring model to obtain the current watershed ecosystem monitoring status results.
[0195] By performing the above operations, this solution innovatively introduces adjacent domain similarity, standard deviation adjusted distance and distribution coefficient to more accurately define local density and distance, optimize the cluster center selection process, effectively solve the data point distribution problem, and improve the accuracy of clustering results, thereby solving the technical problem 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 upper limit ub;
[0198] Step S52: Initialize the population, specifically including the following steps:
[0199] Step S521: Initialize the search individual, specifically, initialize the search individual at a random position in the feasible search space, and the formula used is as follows:
[0200] ;
[0201] In the formula, represents the position of the i-th individual, Indicates between A random number uniformly distributed within a range;
[0202] Step S522: Generate the same number of opposing search individuals; the formula is as follows:
[0203] ;
[0204] In the formula, represents the position of the i-th opposition search individual;
[0205] Step S523: Select the initial population, specifically calculate the individual fitness value f in the population i ; The performance of the watershed ecosystem monitoring model established based on the individual position is used as the individual fitness value, and 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 fitness values from best to worst, defining the individual fa with the best fitness and its position X a , the individual fb with the second best fitness and its position X b , the third best individual fc and its position X c , classify fa, fb and fc as hunting individuals;
[0207] Step S54: Obtain the dynamic adaptation factor, the formula used is as follows:
[0208] ;
[0209] In the formula, represents the dynamic adaptation factor, which is used to control the exploration and development capabilities of the search individual, t represents the number of iterations, express Randomness parameter within range;
[0210] Step S55: Update the search individual position; the formula used is as follows:
[0211] ;
[0212] ;
[0213] ;
[0214] ;
[0215] In the formula, represents the position of the candidate search individual after moving to fa, represents the position of the candidate search individual after moving to fb, represents the position of the candidate search individual after moving to fc, represents the position of the candidate search individual in the t-th generation population, represents the position of the candidate search individual in the t+1 generation population, , and represents the randomness parameter in 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, represents the distance function between the candidate search individual and other search individuals, Indicates the location of other search individuals;
[0219] Step S57: reciprocal update, specifically selecting the distance between the candidate search individual and the candidate search individual The farthest other search individuals are taken as symbiotic individuals; the formula used is as follows:
[0220] ;
[0221] ;
[0222] In the formula, represents the position of the candidate search individual in the t+1 generation population after reciprocal update, and represents a randomness parameter in the range [0,1], represents the position of the symbiotic individual in the t-th generation population, represents the position of the candidate symbiotic individuals in the t+1 generation population after reciprocal updating, represents the position of the individual with the best fitness value in the t-th generation population, represents the advantage factor, specifically a constant;
[0223] Step S58: Symbiotic update, the formula used is as follows:
[0224] ;
[0225] In the formula, represents the position of the candidate search individual in the t+1 generation population after the symbiotic update, represents the randomness parameter in the range [0,1];
[0226] Step S59: Select update, specifically, by comparing the fitness values of the candidate search individuals and the candidate search individuals after symbiotic update, select the search individual with a high fitness value; the formula used is as follows:
[0227] ;
[0228] In the formula, represents the position of the final search individual in this iteration, It represents the fitness function;
[0229] Step S510: search determination, specifically, by constructing a search termination condition, searching and determining the optimal individual position, and obtaining the optimal individual position data setting;
[0230] The search termination conditions include threshold termination and iteration termination;
[0231] The threshold termination is specifically to set the fitness threshold, when the individual fitness value f i When it is above the fitness threshold, the hyperparameter search is completed;
[0232] The 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 position is a combination of watershed ecological environment monitoring model parameters.
[0234] By performing the above operations, in order to address the technical problem that the existing models suitable for watershed ecological environment monitoring have improper built-in parameter settings, resulting in inaccurate output results of the prediction model, this solution adopts dynamic adaptive factors, opposing individuals and individual symbiotic updates to improve the algorithm for obtaining the optimal parameters of the prediction model, obtain the optimal parameter combination, and improve the accuracy of the model output results, thereby making the watershed ecological environment monitoring results more accurate.
[0235] Embodiment 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 is specifically based on the current watershed ecological environment monitoring status results and the current watershed ecosystem monitoring status results, comprehensively identifying the ecological environment status and ecosystem status of the watershed, evaluating 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, in view of the problem of separating ecological environment and ecosystem analysis in traditional watershed ecological security monitoring methods, ignoring the complex relationship between the two, resulting in one-sided analysis, and thus making it impossible to comprehensively and accurately assess the ecological security status of the watershed, this program creatively integrates ecological environment monitoring and ecosystem monitoring, and solves the limitation of analyzing watershed ecological security in a single dimension. Through this comprehensive and all-round assessment, the comprehensiveness, depth and accuracy of watershed ecological security monitoring are significantly improved, ensuring the accuracy and timeliness of the monitoring results, thereby providing a scientific and reliable decision-making basis for sustainable management of watershed ecology.
[0237] Embodiment 8, see Figure 1 and Figure 2 , this embodiment is based on the above embodiment, and 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;
[0238] The data collection module obtains the original data of 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 ecological environment monitoring platform, and sends the original data of watershed ecological security monitoring to the data preprocessing module;
[0239] The data preprocessing module receives the data sent by the data acquisition module, and performs data cleaning, standardization, data integration and feature selection on the original data of the watershed ecological security monitoring to obtain preliminary data of the watershed ecological security monitoring, and sends the preliminary data of the watershed ecological security monitoring to the watershed ecological environment monitoring module and the watershed ecosystem monitoring module;
[0240] The watershed ecological environment monitoring module receives the preliminary watershed ecological security monitoring data sent by the data preprocessing module, and establishes a watershed ecological environment monitoring model to monitor the watershed ecological environment, obtains the current watershed ecological environment monitoring status result, and sends the current watershed ecological environment monitoring status result to the watershed ecosystem monitoring module and the watershed ecological comprehensive monitoring module;
[0241] The watershed ecosystem monitoring module receives the preliminary watershed ecological security monitoring data sent by the data preprocessing module and the current watershed ecological environment monitoring status results sent by the watershed ecological environment monitoring module, establishes a watershed ecosystem monitoring model and trains the model, inputs 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, obtains the current watershed ecosystem monitoring status results, and sends the current watershed ecosystem monitoring status results to the watershed ecological comprehensive monitoring module;
[0242] The hyperparameter optimization module obtains the optimal solution combination of the parameters of the watershed ecological environment monitoring model by establishing a search algorithm, and sends the optimal solution combination of the parameters of the watershed ecological environment monitoring model to the watershed ecological environment monitoring module;
[0243] The watershed ecological comprehensive monitoring module receives the monitoring results sent by the watershed ecological environment monitoring module and the watershed ecosystem monitoring module, and can comprehensively evaluate the overall ecological security status of the watershed through the two monitoring results.
[0244] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0245] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.
[0246] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A watershed ecological security monitoring method based on big data, characterized by: The method comprises the following steps: Step S1: data collection, specifically, obtaining the original data of 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 ecological environment monitoring platform; Step S2: data preprocessing, specifically, data cleaning, standardization, data integration and feature selection of the original data of the watershed ecological security monitoring to obtain preliminary data of the watershed ecological security monitoring; Step S3: Basin ecological environment monitoring, specifically, by combining multi-task learning and LSTM, using ecological environment data of multiple dimensions of the basin to establish a basin ecological environment monitoring model to conduct comprehensive monitoring of the basin ecological environment, and obtain the current basin ecological environment monitoring status results; Step S4: watershed ecosystem monitoring, specifically, establishing a watershed ecosystem monitoring model and training the model by using a clustering algorithm of adjacent domain similarity, standard deviation adjusted distance and distribution coefficient, 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; Step S5: Hyperparameter optimization, specifically, using dynamic adaptive factors, opposing individuals and individual symbiotic update to improve the algorithm for obtaining the optimal parameters of the monitoring model, and obtaining the optimal solution combination of the parameters of the watershed ecological environment monitoring model; Step S6: Comprehensive monitoring of the watershed ecology, specifically, comprehensively evaluating the overall ecological security status of the watershed based on the current watershed ecological environment monitoring status results and the current watershed ecosystem monitoring status results, and proposing targeted ecological protection measures and optimization suggestions.
2. A 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, the following steps are included: Step S31: Establishing a watershed ecological environment monitoring model, specifically including the following steps: Step S311: Initialize model parameters and set model input vector dimensions and output vector dimensions; Step S312: Design the input layer. The formula used is as follows: ; In the formula, Represents the overall input data of the multidimensional time series, including time series data of four dimensions: soil, air, water quality, and climate. represents soil time series data, represents the air time series data, represents water quality time series data, Represents climate time series data; Step S313: Sharing the LSTM layer, specifically extracting key features from the overall input data time series and generating a shared feature vector, specifically includes the following steps: Step S3131: LSTM unit output calculation, specifically, based on the current input data, the hidden state and cell state at the previous moment, the hidden state is calculated. The formula used is as follows: ; In the formula, Indicates the unit runs the function, Indicates the hidden state at the current moment, Represents the input data at the current moment, It indicates the hidden state at the previous moment. Indicates the cell state at the previous moment; Step S3132: Aggregation of shared feature vectors, specifically aggregating the hidden states of all time steps into a shared feature vector; the formula used is as follows: ; In the formula, represents the shared feature vector, T represents the total number of time steps of the time series data, t represents the time step index, Represents the time position adjustment weight parameter; Step S314: Divide the task branches into multiple branches, specifically each task branch corresponds to a dimension of pollution status monitoring, using an independent fully connected layer and activation function, the formula used is as follows: ; ; ; ; In the formula, Indicates the monitoring results of the soil monitoring task branch, represents the weight matrix of the soil monitoring task branch, represents the bias parameter of the soil monitoring task branch, express Activation function, Indicates the monitoring results of the air monitoring task branch, represents the weight matrix of the air monitoring task branch, represents the bias parameter of the air monitoring task branch, express Activation function, Indicates the monitoring results of the water quality monitoring task branch, represents the weight matrix of the water quality monitoring task branch, represents the bias parameter of the water quality monitoring task branch, express Activation function, represents the monitoring results of the climate monitoring task branch, represents the weight matrix of the climate monitoring task branch, represents the bias parameter of the climate monitoring task branch, express Activation function; Step S315: Overall pollution status monitoring output, specifically, selecting the most serious pollution status among the output results of the four task branches to determine the overall pollution status of the basin, the formula used is as follows: ; In the formula, Indicates the overall pollution status monitoring output; Step S32: training a watershed ecological environment monitoring model, specifically using the historical environmental monitoring data in the preliminary watershed ecological security monitoring data as input data to train the watershed ecological environment monitoring model to obtain a trained watershed ecological environment monitoring model; Step S33: Real-time monitoring of the watershed ecological environment, specifically, using the real-time environmental monitoring data in the preliminary data of the watershed ecological security monitoring as input data of the trained watershed ecological environment monitoring model to obtain the current watershed ecological environment monitoring status results.
3. The method for monitoring watershed ecological security 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, the following steps are included: Step S41: Establishing a watershed ecosystem monitoring model, specifically including the following steps: Step S411: Calculate the distance between sample data points, specifically using standard deviation to adjust the distance. The sample data points are 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, represents the distance between samples i and j, m represents the number of features of each sample, and n represents the number of samples. represents the weight of the kth feature, represents the value of sample i on the kth feature, represents the value of sample j on the kth feature, represents the value of sample l on the kth feature, represents the average value of k features in all samples, represents the sum of the standard deviations of all features, Indicates the standard deviation of sample characteristics; Step S412: Calculate the adjacent domain similarity between sample data points. The formula is as follows: ; ; ; In the formula, represents the nearest neighbor set of sample i, represents the nearest neighbor set of sample j, represents the distance between samples q and p, represents the kth nearest neighbor of sample i, represents the kth nearest neighbor of sample j, Sample i and The distance between Represents sample j and The distance between represents the similarity of the adjacent domain 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. The formula is as follows: ; In the formula, represents the local density of sample i; Step S414: Calculate the relative distance; the formula used is as follows: ; In the formula, represents the distance between sample i and the nearest point with higher density, represents the local density of sample j, represents the distance between samples i and p, represents the distance between students i and q, Indicates the maximum value among all samples except sample i value, represents the distance between sample j and the nearest point with higher density; Step S415: Calculate the decision value, the formula is as follows: ; In the formula, represents the decision value, represents the local density of the sample, Represents the distance between a sample data point and the nearest point with higher density; Step S416: selecting core data points, specifically, sorting in descending order according to the decision values, and selecting the top 10% of the decision values as core data points; Step S417: assign core data points, specifically initialize the sample queue Q, put the selected core data points into the sample queue Q, and if Q is not empty, pop up the cluster center point p of the queue Q to obtain K nearest neighbor samples. , calculate the adjacent domain similarity between sample p and its K nearest neighbors , for each unassigned sample q with respect to sample p, if , then assign q to the cluster to which p belongs; Step S418: Allocate the remaining sample data points; specifically, the following steps are included: Step S4181: Construct an allocation matrix, specifically to find all sample data points that are not assigned to clusters. If the number of unassigned sample data points h is greater than 0, then the size of the construction is Allocation matrix M; Indicates the number of clusters; Step S4182: Calculate the distribution coefficient. The specific formula is as follows: ; In the formula, Represents sample p pairs The distribution coefficient, represents the jth nearest neighbor of sample point p, represents the sample p and distance; Step S4183: Fill the matrix, specifically for each unassigned sample data point , traverse its K nearest neighbors ; If the sample data point The nearest neighbor of has been assigned to a cluster, then The distribution coefficients are added to the matrix M Row correspondence The columns of the cluster to which it belongs, otherwise the coefficients are evenly distributed Add uniformly to the matrix M The rows correspond to the columns of all clusters; Step S4184: Get the maximum value of the matrix, specifically find the maximum value max(M) in the matrix M and its corresponding row r and column c, and get the second largest value in row r ; Step S4185: Assign sample data points, specifically if , the sample data points corresponding to the r rows are assigned to the cth cluster, otherwise, the assignment is stopped; Step S4186: neighbor selection strategy, specifically, when there are still unassigned sample data points, the nearest assigned point is selected according to its distance to the assigned point, and it is assigned to the cluster; Step S42: training the watershed ecosystem monitoring model, specifically using the historical ecosystem monitoring data in the preliminary watershed ecological security monitoring data and the historical ecological environment monitoring status to train the watershed ecosystem monitoring model to obtain a trained watershed ecosystem monitoring model; Step S43: Real-time monitoring of the watershed ecosystem status, specifically, using the real-time ecosystem monitoring data in the preliminary data of the watershed ecological security monitoring and the current watershed ecological environment monitoring status results as input data of the trained watershed ecosystem monitoring model to obtain the current watershed ecosystem monitoring status results.
4. The method for monitoring watershed ecological security 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 upper limit ub; Step S52: Initialize the population, specifically including the following steps: Step S521: Initialize the search individual, specifically, initialize the search individual at a random position in the feasible search space, and the formula used is as follows: ; In the formula, represents the position of the i-th individual, Indicates between A random number uniformly distributed in the range; Step S522: Generate the same number of opposing search individuals; the formula is as follows: ; In the formula, represents the position of the i-th opposing search individual; Step S523: Select the initial population, specifically calculate the individual fitness value f in the population i ; The performance of the watershed ecosystem monitoring model established based on the individual position is used as the individual fitness value, and 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 fitness values from best to worst, defining the individual fa with the best fitness and its position X a , the individual fb with the second best fitness and its position X b , the third best individual fc and its position X c , classify fa, fb and fc as hunting individuals; Step S54: Obtain the dynamic adaptation factor, the formula used is as follows: ; In the formula, represents the dynamic adaptation factor, which is used to control the exploration and development capabilities of the search individual, t represents the number of iterations, express Randomness parameter within range; Step S55: Update the search individual position; the formula used is as follows: ; ; ; ; In the formula, represents the position of the candidate search individual after moving to fa, represents the position of the candidate search individual after moving to fb, represents the position of the candidate search individual after moving to fc, represents the position of the candidate search individual in the t-th generation population, represents the position of the candidate search individual in the t+1 generation population, , and represents the randomness parameter in 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, represents the distance function between the candidate search individual and other search individuals, Indicates the location of other search individuals; Step S57: reciprocal update, specifically selecting the distance between the candidate search individual and the candidate search individual The farthest other search individuals are taken as symbiotic individuals; the formula used is as follows: ; ; In the formula, represents the position of the candidate search individual in the t+1 generation population after reciprocal update, and represents a randomness parameter in the range [0,1], represents the position of the symbiotic individual in the t-th generation population, represents the position of the candidate symbiotic individuals in the t+1 generation population after reciprocal updating, represents the position of the individual with the best fitness value in the t-th generation population, represents the advantage factor, specifically a constant; Step S58: Symbiotic update, the formula used is as follows: ; In the formula, represents the position of the candidate search individual in the t+1 generation population after the symbiotic update, represents the randomness parameter in the range [0,1]; Step S59: Select update, specifically, by comparing the fitness values of the candidate search individuals and the candidate search individuals after symbiotic update, select the search individual with a high fitness value; the formula used is as follows: ; In the formula, represents the position of the final search individual in this iteration, It represents the fitness function; Step S510: search determination, specifically, by constructing a search termination condition, searching and determining the optimal individual position, and obtaining the optimal individual position data setting; The search termination conditions include threshold termination and iteration termination; The threshold termination is specifically to set the fitness threshold, when the individual fitness value f i When it is above the fitness threshold, the hyperparameter search is completed; The 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 position is a combination of watershed ecological environment monitoring model parameters.
5. The method for monitoring watershed ecological security based on big data according to claim 1, characterized in that: In step S6, the comprehensive monitoring of the watershed ecology is specifically based on the current watershed ecological environment monitoring status results and the current watershed ecosystem monitoring status results, comprehensively identifying the ecological environment status and ecosystem status of the watershed, evaluating the overall ecological security status of the watershed, and proposing targeted protection measures and optimization suggestions based on the monitoring results.
6. The method for monitoring watershed ecological security based on big data according to claim 1, characterized in that: In step S1, the data collection is specifically to obtain the original data of watershed ecological security monitoring from the government ecological environment monitoring platform by collection; the original data of watershed ecological security monitoring includes historical environmental monitoring data, historical ecosystem monitoring data, real-time environmental monitoring data and real-time ecosystem monitoring data; the historical environmental monitoring data and real-time environmental monitoring data both include water quality data, air quality data, soil data and climate data; the historical environmental monitoring data also includes historical ecological environment monitoring status; the historical ecosystem monitoring data and real-time ecosystem monitoring data both include the number of biological species, biological species distribution, watershed vegetation coverage, watershed biological habitat area, watershed ecological function data and ecological carrying capacity data; The historical ecosystem monitoring data also includes the monitoring status of the watershed ecosystem; 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. The monitoring status of the watershed ecosystem includes healthy ecology, ecological pressure, mild ecological degradation and severe ecological status. The monitoring status of the watershed ecosystem is used as a data label. The data label is not considered during clustering and is only used when selecting cluster labels.
7. The method for monitoring watershed ecological security based on big data according to claim 1, characterized in that: In step S2, the data preprocessing is used to perform data cleaning, standardization, data integration and feature selection on the original data of watershed ecological security monitoring to obtain preliminary data of watershed ecological security monitoring; the data cleaning is to process missing values, abnormal values and duplicate values; the standardization is to standardize the data based on the maximum and minimum normalization method; The data integration is to merge and uniformly process the original data of watershed ecological security monitoring from different sources and formats; The feature selection is to use the correlation analysis method to select the most relevant and representative features of ecological environment monitoring and ecosystem monitoring from the original data of watershed ecological security monitoring.
8. A watershed ecological security monitoring system based on big data, used to implement a watershed ecological security monitoring method based on big data as described in any one of claims 1 to 7, characterized in that: It includes data acquisition module, data preprocessing module, watershed ecological environment monitoring module, watershed ecosystem monitoring module, hyperparameter optimization module and watershed ecological comprehensive monitoring module.
9. A watershed ecological security monitoring system based on big data according to claim 8, characterized in that: The data collection module obtains the original data of 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 ecological environment monitoring platform, and sends the original data of watershed ecological security monitoring to the data preprocessing module; The data preprocessing module receives the data sent by the data acquisition module, and performs data cleaning, standardization, data integration and feature selection on the original data of the watershed ecological security monitoring to obtain preliminary data of the watershed ecological security monitoring, and sends the preliminary data of the watershed ecological security monitoring to the watershed ecological environment monitoring module and the watershed ecosystem monitoring module; The watershed ecological environment monitoring module receives the preliminary watershed ecological security monitoring data sent by the data preprocessing module, and establishes a watershed ecological environment monitoring model to monitor the watershed ecological environment, obtains the current watershed ecological environment monitoring status result, and sends the current watershed ecological environment monitoring status result to the watershed ecosystem monitoring module and the watershed ecological comprehensive monitoring module; The watershed ecosystem monitoring module receives the preliminary watershed ecological security monitoring data sent by the data preprocessing module and the current watershed ecological environment monitoring status results sent by the watershed ecological environment monitoring module, establishes a watershed ecosystem monitoring model and trains the model, inputs 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, obtains the current watershed ecosystem monitoring status results, and sends the current watershed ecosystem monitoring status results to the watershed ecological comprehensive monitoring module; The hyperparameter optimization module obtains the optimal solution combination of the parameters of the watershed ecological environment monitoring model by establishing a search algorithm, and sends the optimal solution combination of the parameters of the watershed ecological environment monitoring model to the watershed ecological environment monitoring module; The watershed ecological comprehensive monitoring module receives the monitoring results sent by the watershed ecological environment monitoring module and the watershed ecosystem monitoring module, and can comprehensively evaluate the overall ecological security status of the watershed through the two monitoring results.
Citation Information
Patent Citations
Intelligent evaluation and early warning system and method for river and lake water environment health
CN111027893A
Vulnerability assessment method based on watershed ecosystem
CN116976709A
Environment monitoring method and system based on machine learning
CN117520933A
Marine ecological environment prediction and evaluation system based on artificial intelligence
CN118095972A
Basin water environment ecological evaluation method
CN118710083A
Cited By
Basin ecological risk monitoring method and device, electronic equipment and storage medium
CN120387684A
Basin ecological risk monitoring method and device, electronic equipment and storage medium
CN120387684B
Drainage basin ecological anomaly monitoring method based on clustering processing
CN120449054A